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 | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 31 | define VERSION_PATCH 43 |
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 | 8f49fcb | 2017-03-06 16:02:58 -0800 | [diff] [blame] | 96 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 5 |
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 |
| 253 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present" |
| 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 |
| 312 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 1 |
| 313 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_COUNTER_EXTENSION_NAME "VK_EXT_swapchain_colorspace" |
| 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 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 323 | // 123 |
| 324 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1 |
| 325 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" |
| 326 | |
| 327 | // 124 |
| 328 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1 |
| 329 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" |
| 330 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 331 | ///////////// |
| 332 | // Types // |
| 333 | ///////////// |
| 334 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 335 | type u32 VkBool32 |
| 336 | type u32 VkFlags |
| 337 | type u64 VkDeviceSize |
| 338 | type u32 VkSampleMask |
| 339 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 340 | /// Dispatchable handle types. |
| 341 | @dispatchHandle type u64 VkInstance |
| 342 | @dispatchHandle type u64 VkPhysicalDevice |
| 343 | @dispatchHandle type u64 VkDevice |
| 344 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 345 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 346 | |
| 347 | /// Non dispatchable handle types. |
| 348 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 349 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 350 | @nonDispatchHandle type u64 VkBuffer |
| 351 | @nonDispatchHandle type u64 VkBufferView |
| 352 | @nonDispatchHandle type u64 VkImage |
| 353 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 354 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 355 | @nonDispatchHandle type u64 VkPipeline |
| 356 | @nonDispatchHandle type u64 VkPipelineLayout |
| 357 | @nonDispatchHandle type u64 VkSampler |
| 358 | @nonDispatchHandle type u64 VkDescriptorSet |
| 359 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 360 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 361 | @nonDispatchHandle type u64 VkFence |
| 362 | @nonDispatchHandle type u64 VkSemaphore |
| 363 | @nonDispatchHandle type u64 VkEvent |
| 364 | @nonDispatchHandle type u64 VkQueryPool |
| 365 | @nonDispatchHandle type u64 VkFramebuffer |
| 366 | @nonDispatchHandle type u64 VkRenderPass |
| 367 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 368 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 369 | // 1 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 370 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 371 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 372 | // 2 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 373 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 374 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 375 | // 3 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 376 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 377 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 378 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 379 | // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 380 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 381 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 382 | // 86 |
| 383 | @extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR |
| 384 | |
| 385 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 386 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 387 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 388 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 389 | |
| 390 | ///////////// |
| 391 | // Enums // |
| 392 | ///////////// |
| 393 | |
| 394 | enum VkImageLayout { |
| 395 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 396 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 397 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 398 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 399 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 400 | 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] | 401 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 402 | 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] | 403 | 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] | 404 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 405 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 406 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 407 | |
| 408 | //@extension("VK_KHR_shared_presentable_image") |
| 409 | VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 410 | } |
| 411 | |
| 412 | enum VkAttachmentLoadOp { |
| 413 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 414 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 415 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 416 | } |
| 417 | |
| 418 | enum VkAttachmentStoreOp { |
| 419 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 420 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 421 | } |
| 422 | |
| 423 | enum VkImageType { |
| 424 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 425 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 426 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 427 | } |
| 428 | |
| 429 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 430 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 431 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 432 | } |
| 433 | |
| 434 | enum VkImageViewType { |
| 435 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 436 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 437 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 438 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 439 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 440 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 441 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 442 | } |
| 443 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 444 | enum VkCommandBufferLevel { |
| 445 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 446 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 447 | } |
| 448 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 449 | enum VkComponentSwizzle { |
| 450 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 451 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 452 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 453 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 454 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 455 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 456 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 457 | } |
| 458 | |
| 459 | enum VkDescriptorType { |
| 460 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 461 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 462 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 463 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 464 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 465 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 466 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 467 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 468 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 469 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 470 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 471 | } |
| 472 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 473 | enum VkQueryType { |
| 474 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 475 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 476 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 477 | } |
| 478 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 479 | enum VkBorderColor { |
| 480 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 481 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 482 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 483 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 484 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 485 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 486 | } |
| 487 | |
| 488 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 489 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 490 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 491 | } |
| 492 | |
| 493 | enum VkPrimitiveTopology { |
| 494 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 495 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 496 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 497 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 498 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 499 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 500 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 501 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 502 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 503 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 504 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 505 | } |
| 506 | |
| 507 | enum VkSharingMode { |
| 508 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 509 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 510 | } |
| 511 | |
| 512 | enum VkIndexType { |
| 513 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 514 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 515 | } |
| 516 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 517 | enum VkFilter { |
| 518 | VK_FILTER_NEAREST = 0x00000000, |
| 519 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 520 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 521 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 522 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 523 | } |
| 524 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 525 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 526 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 527 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 528 | } |
| 529 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 530 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 531 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 532 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 533 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 534 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 535 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | enum VkCompareOp { |
| 539 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 540 | VK_COMPARE_OP_LESS = 0x00000001, |
| 541 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 542 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 543 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 544 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 545 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 546 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 547 | } |
| 548 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 549 | enum VkPolygonMode { |
| 550 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 551 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 552 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 553 | } |
| 554 | |
| 555 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 556 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 557 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 558 | } |
| 559 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 560 | enum VkBlendFactor { |
| 561 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 562 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 563 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 564 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 565 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 566 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 567 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 568 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 569 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 570 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 571 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 572 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 573 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 574 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 575 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 576 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 577 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 578 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 579 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 580 | } |
| 581 | |
| 582 | enum VkBlendOp { |
| 583 | VK_BLEND_OP_ADD = 0x00000000, |
| 584 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 585 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 586 | VK_BLEND_OP_MIN = 0x00000003, |
| 587 | VK_BLEND_OP_MAX = 0x00000004, |
| 588 | } |
| 589 | |
| 590 | enum VkStencilOp { |
| 591 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 592 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 593 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 594 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 595 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 596 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 597 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 598 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 599 | } |
| 600 | |
| 601 | enum VkLogicOp { |
| 602 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 603 | VK_LOGIC_OP_AND = 0x00000001, |
| 604 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 605 | VK_LOGIC_OP_COPY = 0x00000003, |
| 606 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 607 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 608 | VK_LOGIC_OP_XOR = 0x00000006, |
| 609 | VK_LOGIC_OP_OR = 0x00000007, |
| 610 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 611 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 612 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 613 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 614 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 615 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 616 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 617 | VK_LOGIC_OP_SET = 0x0000000f, |
| 618 | } |
| 619 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 620 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 621 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 622 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 623 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 624 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 625 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 626 | } |
| 627 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 628 | enum VkInternalAllocationType { |
| 629 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 630 | } |
| 631 | |
| 632 | enum VkPhysicalDeviceType { |
| 633 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 634 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 635 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 636 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 637 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 638 | } |
| 639 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 640 | enum VkVertexInputRate { |
| 641 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 642 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 643 | } |
| 644 | |
| 645 | /// Vulkan format definitions |
| 646 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 647 | VK_FORMAT_UNDEFINED = 0, |
| 648 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 649 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 650 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 651 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 652 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 653 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 654 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 655 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 656 | VK_FORMAT_R8_UNORM = 9, |
| 657 | VK_FORMAT_R8_SNORM = 10, |
| 658 | VK_FORMAT_R8_USCALED = 11, |
| 659 | VK_FORMAT_R8_SSCALED = 12, |
| 660 | VK_FORMAT_R8_UINT = 13, |
| 661 | VK_FORMAT_R8_SINT = 14, |
| 662 | VK_FORMAT_R8_SRGB = 15, |
| 663 | VK_FORMAT_R8G8_UNORM = 16, |
| 664 | VK_FORMAT_R8G8_SNORM = 17, |
| 665 | VK_FORMAT_R8G8_USCALED = 18, |
| 666 | VK_FORMAT_R8G8_SSCALED = 19, |
| 667 | VK_FORMAT_R8G8_UINT = 20, |
| 668 | VK_FORMAT_R8G8_SINT = 21, |
| 669 | VK_FORMAT_R8G8_SRGB = 22, |
| 670 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 671 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 672 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 673 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 674 | VK_FORMAT_R8G8B8_UINT = 27, |
| 675 | VK_FORMAT_R8G8B8_SINT = 28, |
| 676 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 677 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 678 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 679 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 680 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 681 | VK_FORMAT_B8G8R8_UINT = 34, |
| 682 | VK_FORMAT_B8G8R8_SINT = 35, |
| 683 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 684 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 685 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 686 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 687 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 688 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 689 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 690 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 691 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 692 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 693 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 694 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 695 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 696 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 697 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 698 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 699 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 700 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 701 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 702 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 703 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 704 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 705 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 706 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 707 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 708 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 709 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 710 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 711 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 712 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 713 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 714 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 715 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 716 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 717 | VK_FORMAT_R16_UNORM = 70, |
| 718 | VK_FORMAT_R16_SNORM = 71, |
| 719 | VK_FORMAT_R16_USCALED = 72, |
| 720 | VK_FORMAT_R16_SSCALED = 73, |
| 721 | VK_FORMAT_R16_UINT = 74, |
| 722 | VK_FORMAT_R16_SINT = 75, |
| 723 | VK_FORMAT_R16_SFLOAT = 76, |
| 724 | VK_FORMAT_R16G16_UNORM = 77, |
| 725 | VK_FORMAT_R16G16_SNORM = 78, |
| 726 | VK_FORMAT_R16G16_USCALED = 79, |
| 727 | VK_FORMAT_R16G16_SSCALED = 80, |
| 728 | VK_FORMAT_R16G16_UINT = 81, |
| 729 | VK_FORMAT_R16G16_SINT = 82, |
| 730 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 731 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 732 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 733 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 734 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 735 | VK_FORMAT_R16G16B16_UINT = 88, |
| 736 | VK_FORMAT_R16G16B16_SINT = 89, |
| 737 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 738 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 739 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 740 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 741 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 742 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 743 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 744 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 745 | VK_FORMAT_R32_UINT = 98, |
| 746 | VK_FORMAT_R32_SINT = 99, |
| 747 | VK_FORMAT_R32_SFLOAT = 100, |
| 748 | VK_FORMAT_R32G32_UINT = 101, |
| 749 | VK_FORMAT_R32G32_SINT = 102, |
| 750 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 751 | VK_FORMAT_R32G32B32_UINT = 104, |
| 752 | VK_FORMAT_R32G32B32_SINT = 105, |
| 753 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 754 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 755 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 756 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 757 | VK_FORMAT_R64_UINT = 110, |
| 758 | VK_FORMAT_R64_SINT = 111, |
| 759 | VK_FORMAT_R64_SFLOAT = 112, |
| 760 | VK_FORMAT_R64G64_UINT = 113, |
| 761 | VK_FORMAT_R64G64_SINT = 114, |
| 762 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 763 | VK_FORMAT_R64G64B64_UINT = 116, |
| 764 | VK_FORMAT_R64G64B64_SINT = 117, |
| 765 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 766 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 767 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 768 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 769 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 770 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 771 | VK_FORMAT_D16_UNORM = 124, |
| 772 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 773 | VK_FORMAT_D32_SFLOAT = 126, |
| 774 | VK_FORMAT_S8_UINT = 127, |
| 775 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 776 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 777 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 778 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 779 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 780 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 781 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 782 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 783 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 784 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 785 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 786 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 787 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 788 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 789 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 790 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 791 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 792 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 793 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 794 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 795 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 796 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 797 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 798 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 799 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 800 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 801 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 802 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 803 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 804 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 805 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 806 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 807 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 808 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 809 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 810 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 811 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 812 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 813 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 814 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 815 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 816 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 817 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 818 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 819 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 820 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 821 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 822 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 823 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 824 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 825 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 826 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 827 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 828 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 829 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 830 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 831 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 832 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 833 | //@extension("VK_IMG_format_pvrtc") // 28 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 834 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 835 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 836 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 837 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 838 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 839 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 840 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 841 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 842 | } |
| 843 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 844 | /// Structure type enumerant |
| 845 | enum VkStructureType { |
| 846 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 847 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 848 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 849 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 850 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 851 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 852 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 853 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 854 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 855 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 856 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 857 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 858 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 859 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 860 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 861 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 862 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 863 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 864 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 865 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 866 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 867 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 868 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 869 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 870 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 871 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 872 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 873 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 874 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 875 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 876 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 877 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 878 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 879 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 880 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 881 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 882 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 883 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 884 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 885 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 886 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 887 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 888 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 889 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 890 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 891 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 892 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 893 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 894 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 895 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 896 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 897 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 898 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
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_display") // 3 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 901 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 902 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
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_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 905 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 906 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 907 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 908 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 909 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 910 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 911 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 912 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 913 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 914 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 915 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 916 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 917 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 918 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 919 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 920 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 921 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 922 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 923 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 924 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 925 | //@extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 926 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 927 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 928 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 929 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 930 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 931 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 932 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 933 | //@extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 934 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 935 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 936 | //@extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 937 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 938 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 939 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 940 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 941 | //@extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 942 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 943 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 944 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 945 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 946 | //@extension("VK_KHX_multiview") // 54 |
| 947 | VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000, |
| 948 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001, |
| 949 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002, |
| 950 | |
| 951 | //@extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 952 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 953 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 954 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 955 | //@extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 956 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 957 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
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_win32_keyed_mutex") // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 960 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 961 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 962 | //@extension("VK_KHR_get_physical_device_properties2") // 60 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 963 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 964 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 965 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 966 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 967 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 968 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 969 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 970 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 971 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 972 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 973 | //@extension("VK_KHX_device_group") // 61 |
| 974 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, |
| 975 | VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, |
| 976 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, |
| 977 | VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, |
| 978 | VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, |
| 979 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, |
| 980 | VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, |
| 981 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, |
| 982 | VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, |
| 983 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, |
| 984 | VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, |
| 985 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, |
| 986 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, |
| 987 | |
| 988 | //@extension("VK_EXT_validation_flags") // 62 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 989 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 990 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 991 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 992 | VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, |
| 993 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 994 | //@extension("VK_KHX_device_group_creation") // 71 |
| 995 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000, |
| 996 | VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001, |
| 997 | |
| 998 | //@extension("VK_KHX_external_memory_capabilities") // 72 |
| 999 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000, |
| 1000 | VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001, |
| 1001 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002, |
| 1002 | VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003, |
| 1003 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004, |
| 1004 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005, |
| 1005 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006, |
| 1006 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007, |
| 1007 | |
| 1008 | //@extension("VK_KHX_external_memory") // 73 |
| 1009 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000, |
| 1010 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001, |
| 1011 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002, |
| 1012 | |
| 1013 | //@extension("VK_KHX_external_memory_win32") // 74 |
| 1014 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000, |
| 1015 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001, |
| 1016 | VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002, |
| 1017 | |
| 1018 | //@extension("VK_KHX_external_memory_fd") // 75 |
| 1019 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000, |
| 1020 | VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001, |
| 1021 | |
| 1022 | //@extension("VK_KHX_win32_keyed_mutex") // 76 |
| 1023 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000, |
| 1024 | |
| 1025 | //@extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1026 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000, |
| 1027 | VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001, |
| 1028 | |
| 1029 | //@extension("VK_KHX_external_semaphore") // 78 |
| 1030 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000, |
| 1031 | |
| 1032 | //@extension("VK_KHX_external_semaphore_win32") // 79 |
| 1033 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000, |
| 1034 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001, |
| 1035 | VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002, |
| 1036 | |
| 1037 | //@extension("VK_KHX_external_semaphore_fd") // 80 |
| 1038 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000, |
| 1039 | |
| 1040 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1041 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, |
| 1042 | |
| 1043 | //@extension("VK_KHR_incremental_present") // 85 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1044 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1045 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1046 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 1047 | VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, |
| 1048 | |
| 1049 | //@extension("VK_NVX_device_generated_commands") // 87 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1050 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 1051 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 1052 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 1053 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 1054 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 1055 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1056 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1057 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1058 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, |
| 1059 | |
| 1060 | //@extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1061 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, |
| 1062 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1063 | //@extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1064 | VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, |
| 1065 | VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, |
| 1066 | VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, |
| 1067 | VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1068 | |
| 1069 | //@extension("VK_GOOGLE_display_timing") // 93 |
| 1070 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, |
| 1071 | |
| 1072 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1073 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, |
| 1074 | |
| 1075 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 1076 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, |
| 1077 | |
| 1078 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1079 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, |
| 1080 | VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, |
| 1081 | |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 1082 | //@extension("VK_EXT_hdr_metadata") // 106 |
| 1083 | VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, |
| 1084 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1085 | //@extension("VK_MVK_ios_surface") // 123 |
| 1086 | VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, |
| 1087 | |
| 1088 | //@extension("VK_MVK_macos_surface") // 124 |
| 1089 | VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1090 | } |
| 1091 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1092 | enum VkSubpassContents { |
| 1093 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 1094 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1095 | } |
| 1096 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1097 | enum VkPipelineCacheHeaderVersion { |
| 1098 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 1099 | } |
| 1100 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1101 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1102 | /// Error and return codes |
| 1103 | enum VkResult { |
| 1104 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1105 | VK_SUCCESS = 0, |
| 1106 | VK_NOT_READY = 1, |
| 1107 | VK_TIMEOUT = 2, |
| 1108 | VK_EVENT_SET = 3, |
| 1109 | VK_EVENT_RESET = 4, |
| 1110 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1111 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1112 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1113 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1114 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1115 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1116 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 1117 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 1118 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 1119 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 1120 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 1121 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 1122 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 1123 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 1124 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 1125 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 1126 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 1127 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1128 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1129 | //@extension("VK_KHR_surface") // 1 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1130 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1131 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1132 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1133 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1134 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1135 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1136 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1137 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1138 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1139 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1140 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1141 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1142 | //@extension("VK_NV_glsl_shader") // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1143 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1144 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1145 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1146 | VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1147 | |
| 1148 | //@extension("VK_KHX_external_memory") // 73 |
| 1149 | VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1150 | } |
| 1151 | |
| 1152 | enum VkDynamicState { |
| 1153 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 1154 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 1155 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 1156 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 1157 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 1158 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 1159 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 1160 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 1161 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1162 | |
| 1163 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1164 | VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, |
| 1165 | |
| 1166 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1167 | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1168 | } |
| 1169 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1170 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1171 | enum VkPresentModeKHR { |
| 1172 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 1173 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 1174 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1175 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1176 | |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 1177 | //@extension("VK_KHR_shared_presentable_image") |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1178 | VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, |
| 1179 | VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [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 VkColorSpaceKHR { |
| 1184 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1185 | |
| 1186 | //@extension("VK_EXT_swapchain_colorspace") |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1187 | VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001, |
Courtney Goeltzenleuchter | 7f558ed | 2017-01-23 17:15:24 -0700 | [diff] [blame] | 1188 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002, |
| 1189 | VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003, |
| 1190 | VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004, |
| 1191 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005, |
| 1192 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006, |
| 1193 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007, |
| 1194 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008, |
| 1195 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009, |
| 1196 | VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010, |
| 1197 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 1198 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1199 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1200 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1201 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1202 | enum VkDebugReportObjectTypeEXT { |
| 1203 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 1204 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 1205 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 1206 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 1207 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 1208 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 1209 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 1210 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 1211 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 1212 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 1213 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 1214 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 1215 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 1216 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 1217 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 1218 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 1219 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 1220 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 1221 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 1222 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 1223 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 1224 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 1225 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 1226 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 1227 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 1228 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 1229 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 1230 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 1231 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1232 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 1233 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 1234 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 1235 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1236 | } |
| 1237 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1238 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1239 | enum VkDebugReportErrorEXT { |
| 1240 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 1241 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 1242 | } |
| 1243 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1244 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1245 | enum VkRasterizationOrderAMD { |
| 1246 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 1247 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 1248 | } |
| 1249 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1250 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1251 | enum VkValidationCheckEXT { |
| 1252 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 1253 | } |
| 1254 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1255 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 1256 | enum VkDescriptorUpdateTemplateTypeKHR { |
| 1257 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0, |
| 1258 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, |
| 1259 | } |
| 1260 | |
| 1261 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1262 | enum VkIndirectCommandsTokenTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1263 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1264 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1265 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1266 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1267 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1268 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1269 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1270 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1271 | } |
| 1272 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1273 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1274 | enum VkObjectEntryTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1275 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1276 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1277 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1278 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1279 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1280 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1281 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1282 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1283 | enum VkDisplayPowerStateEXT { |
| 1284 | VK_DISPLAY_POWER_STATE_OFF_EXT = 0, |
| 1285 | VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, |
| 1286 | VK_DISPLAY_POWER_STATE_ON_EXT = 2, |
| 1287 | } |
| 1288 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1289 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1290 | enum VkDeviceEventTypeEXT { |
| 1291 | VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, |
| 1292 | } |
| 1293 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1294 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1295 | enum VkDisplayEventTypeEXT { |
| 1296 | VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, |
| 1297 | } |
| 1298 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1299 | @extension("VK_NV_viewport_swizzle") // 99 |
| 1300 | enum VkViewportCoordinateSwizzleNV { |
| 1301 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, |
| 1302 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, |
| 1303 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, |
| 1304 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, |
| 1305 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, |
| 1306 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, |
| 1307 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, |
| 1308 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, |
| 1309 | } |
| 1310 | |
| 1311 | @extension("VK_EXT_discard_rectangles") // 100 |
| 1312 | enum VkDiscardRectangleModeEXT { |
| 1313 | VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, |
| 1314 | VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, |
| 1315 | } |
| 1316 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1317 | ///////////////// |
| 1318 | // Bitfields // |
| 1319 | ///////////////// |
| 1320 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1321 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1322 | type VkFlags VkQueueFlags |
| 1323 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1324 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1325 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1326 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1327 | 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] | 1328 | } |
| 1329 | |
| 1330 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1331 | type VkFlags VkMemoryPropertyFlags |
| 1332 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1333 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1334 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1335 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1336 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1337 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1338 | } |
| 1339 | |
| 1340 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1341 | type VkFlags VkMemoryHeapFlags |
| 1342 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1343 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1344 | |
| 1345 | //@extension("VK_KHX_device_group_creation") // 71 |
| 1346 | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1347 | } |
| 1348 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1349 | /// Access flags |
| 1350 | type VkFlags VkAccessFlags |
| 1351 | bitfield VkAccessFlagBits { |
| 1352 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1353 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1354 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1355 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1356 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1357 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1358 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1359 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1360 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1361 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1362 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1363 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1364 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1365 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1366 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1367 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1368 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1369 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1370 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1371 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1372 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1373 | } |
| 1374 | |
| 1375 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1376 | type VkFlags VkBufferUsageFlags |
| 1377 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1378 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1379 | 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] | 1380 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1381 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1382 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1383 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1384 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1385 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1386 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1387 | } |
| 1388 | |
| 1389 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1390 | type VkFlags VkBufferCreateFlags |
| 1391 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1392 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1393 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1394 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1395 | } |
| 1396 | |
| 1397 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1398 | type VkFlags VkShaderStageFlags |
| 1399 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1400 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1401 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1402 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1403 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1404 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1405 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1406 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1407 | |
| 1408 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1409 | } |
| 1410 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1411 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1412 | type VkFlags VkDescriptorPoolCreateFlags |
| 1413 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1414 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1415 | } |
| 1416 | |
| 1417 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1418 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1419 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1420 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1421 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1422 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1423 | type VkFlags VkImageUsageFlags |
| 1424 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1425 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1426 | 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] | 1427 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1428 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1429 | 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] | 1430 | 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] | 1431 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1432 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1433 | } |
| 1434 | |
| 1435 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1436 | type VkFlags VkImageCreateFlags |
| 1437 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1438 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1439 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1440 | 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] | 1441 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1442 | 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] | 1443 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1444 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1445 | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1446 | |
| 1447 | //@extension("VK_KHX_device_group") // 61 |
| 1448 | VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1449 | } |
| 1450 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1451 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1452 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1453 | //bitfield VkImageViewCreateFlagBits { |
| 1454 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1455 | |
| 1456 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1457 | type VkFlags VkPipelineCreateFlags |
| 1458 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1459 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1460 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1461 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1462 | |
| 1463 | //@extension("VK_KHX_device_group") // 61 |
| 1464 | VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008, |
| 1465 | VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1466 | } |
| 1467 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1468 | /// Color component flags |
| 1469 | type VkFlags VkColorComponentFlags |
| 1470 | bitfield VkColorComponentFlagBits { |
| 1471 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1472 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1473 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1474 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1475 | } |
| 1476 | |
| 1477 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1478 | type VkFlags VkFenceCreateFlags |
| 1479 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1480 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1481 | } |
| 1482 | |
| 1483 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1484 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1485 | //bitfield VkSemaphoreCreateFlagBits { |
| 1486 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1487 | |
| 1488 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1489 | type VkFlags VkFormatFeatureFlags |
| 1490 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1491 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1492 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1493 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1494 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1495 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1496 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1497 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1498 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1499 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1500 | 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] | 1501 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1502 | 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] | 1503 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1504 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1505 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1506 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1507 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1508 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1509 | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, |
| 1510 | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1511 | } |
| 1512 | |
| 1513 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1514 | type VkFlags VkQueryControlFlags |
| 1515 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1516 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1517 | } |
| 1518 | |
| 1519 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1520 | type VkFlags VkQueryResultFlags |
| 1521 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1522 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1523 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1524 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1525 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1526 | } |
| 1527 | |
| 1528 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1529 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1530 | //bitfield VkShaderModuleCreateFlagBits { |
| 1531 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1532 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1533 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1534 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1535 | //bitfield VkEventCreateFlagBits { |
| 1536 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1537 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1538 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1539 | type VkFlags VkCommandBufferUsageFlags |
| 1540 | bitfield VkCommandBufferUsageFlagBits { |
| 1541 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1542 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1543 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1544 | } |
| 1545 | |
| 1546 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1547 | type VkFlags VkQueryPipelineStatisticFlags |
| 1548 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1549 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1550 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1551 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1552 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1553 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1554 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1555 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1556 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1557 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1558 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1559 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1560 | } |
| 1561 | |
| 1562 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1563 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1564 | //bitfield VkMemoryMapFlagBits { |
| 1565 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1566 | |
| 1567 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1568 | type VkFlags VkImageAspectFlags |
| 1569 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1570 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1571 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1572 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1573 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1574 | } |
| 1575 | |
| 1576 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1577 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1578 | bitfield VkSparseMemoryBindFlagBits { |
| 1579 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1580 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1581 | |
| 1582 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1583 | type VkFlags VkSparseImageFormatFlags |
| 1584 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1585 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1586 | 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. |
| 1587 | 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] | 1588 | } |
| 1589 | |
| 1590 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1591 | type VkFlags VkPipelineStageFlags |
| 1592 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1593 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1594 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1595 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1596 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1597 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1598 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1599 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1600 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1601 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1602 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1603 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1604 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1605 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1606 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1607 | 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] | 1608 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1609 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1610 | 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] | 1611 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1612 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1613 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1614 | } |
| 1615 | |
| 1616 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1617 | type VkFlags VkAttachmentDescriptionFlags |
| 1618 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1619 | 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] | 1620 | } |
| 1621 | |
| 1622 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1623 | type VkFlags VkSubpassDescriptionFlags |
| 1624 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1625 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1626 | VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, |
| 1627 | VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1628 | } |
| 1629 | |
| 1630 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1631 | type VkFlags VkCommandPoolCreateFlags |
| 1632 | bitfield VkCommandPoolCreateFlagBits { |
| 1633 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1634 | 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] | 1635 | } |
| 1636 | |
| 1637 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1638 | type VkFlags VkCommandPoolResetFlags |
| 1639 | bitfield VkCommandPoolResetFlagBits { |
| 1640 | 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] | 1641 | } |
| 1642 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1643 | type VkFlags VkCommandBufferResetFlags |
| 1644 | bitfield VkCommandBufferResetFlagBits { |
| 1645 | 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] | 1646 | } |
| 1647 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1648 | type VkFlags VkSampleCountFlags |
| 1649 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1650 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1651 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1652 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1653 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1654 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1655 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1656 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1657 | } |
| 1658 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1659 | type VkFlags VkStencilFaceFlags |
| 1660 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1661 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1662 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1663 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1664 | } |
| 1665 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1666 | /// Instance creation flags |
| 1667 | type VkFlags VkInstanceCreateFlags |
| 1668 | //bitfield VkInstanceCreateFlagBits { |
| 1669 | //} |
| 1670 | |
| 1671 | /// Device creation flags |
| 1672 | type VkFlags VkDeviceCreateFlags |
| 1673 | //bitfield VkDeviceCreateFlagBits { |
| 1674 | //} |
| 1675 | |
| 1676 | /// Device queue creation flags |
| 1677 | type VkFlags VkDeviceQueueCreateFlags |
| 1678 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1679 | //} |
| 1680 | |
| 1681 | /// Query pool creation flags |
| 1682 | type VkFlags VkQueryPoolCreateFlags |
| 1683 | //bitfield VkQueryPoolCreateFlagBits { |
| 1684 | //} |
| 1685 | |
| 1686 | /// Buffer view creation flags |
| 1687 | type VkFlags VkBufferViewCreateFlags |
| 1688 | //bitfield VkBufferViewCreateFlagBits { |
| 1689 | //} |
| 1690 | |
| 1691 | /// Pipeline cache creation flags |
| 1692 | type VkFlags VkPipelineCacheCreateFlags |
| 1693 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1694 | //} |
| 1695 | |
| 1696 | /// Pipeline shader stage creation flags |
| 1697 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1698 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1699 | //} |
| 1700 | |
| 1701 | /// Descriptor set layout creation flags |
| 1702 | type VkFlags VkDescriptorSetLayoutCreateFlags |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1703 | bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1704 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1705 | VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, |
| 1706 | } |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1707 | |
| 1708 | /// Pipeline vertex input state creation flags |
| 1709 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1710 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1711 | //} |
| 1712 | |
| 1713 | /// Pipeline input assembly state creation flags |
| 1714 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1715 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1716 | //} |
| 1717 | |
| 1718 | /// Tessellation state creation flags |
| 1719 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1720 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1721 | //} |
| 1722 | |
| 1723 | /// Viewport state creation flags |
| 1724 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1725 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1726 | //} |
| 1727 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1728 | /// Rasterization state creation flags |
| 1729 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1730 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1731 | //} |
| 1732 | |
| 1733 | /// Multisample state creation flags |
| 1734 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1735 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1736 | //} |
| 1737 | |
| 1738 | /// Color blend state creation flags |
| 1739 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1740 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1741 | //} |
| 1742 | |
| 1743 | /// Depth/stencil state creation flags |
| 1744 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1745 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1746 | //} |
| 1747 | |
| 1748 | /// Dynamic state creation flags |
| 1749 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1750 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1751 | //} |
| 1752 | |
| 1753 | /// Pipeline layout creation flags |
| 1754 | type VkFlags VkPipelineLayoutCreateFlags |
| 1755 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1756 | //} |
| 1757 | |
| 1758 | /// Sampler creation flags |
| 1759 | type VkFlags VkSamplerCreateFlags |
| 1760 | //bitfield VkSamplerCreateFlagBits { |
| 1761 | //} |
| 1762 | |
| 1763 | /// Render pass creation flags |
| 1764 | type VkFlags VkRenderPassCreateFlags |
| 1765 | //bitfield VkRenderPassCreateFlagBits { |
| 1766 | //} |
| 1767 | |
| 1768 | /// Framebuffer creation flags |
| 1769 | type VkFlags VkFramebufferCreateFlags |
| 1770 | //bitfield VkFramebufferCreateFlagBits { |
| 1771 | //} |
| 1772 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1773 | /// Dependency flags |
| 1774 | type VkFlags VkDependencyFlags |
| 1775 | bitfield VkDependencyFlagBits { |
| 1776 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1777 | |
| 1778 | //@extension("VK_KHX_multiview") // 54 |
| 1779 | VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002, |
| 1780 | |
| 1781 | //@extension("VK_KHX_device_group") // 61 |
| 1782 | VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1783 | } |
| 1784 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1785 | /// Cull mode flags |
| 1786 | type VkFlags VkCullModeFlags |
| 1787 | bitfield VkCullModeFlagBits { |
| 1788 | VK_CULL_MODE_NONE = 0x00000000, |
| 1789 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1790 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1791 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1792 | } |
| 1793 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1794 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1795 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1796 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1797 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1798 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1799 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1800 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1801 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1802 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1803 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1804 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1805 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1806 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1807 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1808 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1809 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1810 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1811 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1812 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1813 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1814 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1815 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1816 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1817 | } |
| 1818 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1819 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1820 | type VkFlags VkSwapchainCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1821 | @extension("VK_KHR_swapchain") // 2 |
| 1822 | bitfield VkSwapchainCreateFlagBitsKHR { |
| 1823 | //@extension("VK_KHX_device_group") // 61 |
| 1824 | VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001, |
| 1825 | } |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1826 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1827 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1828 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1829 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1830 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1831 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1832 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1833 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1834 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1835 | } |
| 1836 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1837 | @extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1838 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1839 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1840 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1841 | //} |
| 1842 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1843 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1844 | type VkFlags VkDisplayModeCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1845 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1846 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1847 | //} |
| 1848 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1849 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1850 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1851 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1852 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1853 | //} |
| 1854 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1855 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1856 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1857 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1858 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1859 | //} |
| 1860 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1861 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1862 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1863 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1864 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1865 | //} |
| 1866 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1867 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1868 | type VkFlags VkMirSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1869 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1870 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1871 | //} |
| 1872 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1873 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1874 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1875 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1876 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1877 | //} |
| 1878 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1879 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1880 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1881 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1882 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1883 | //} |
| 1884 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1885 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1886 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1887 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1888 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1889 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001, |
| 1890 | } |
| 1891 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1892 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1893 | type VkFlags VkDebugReportFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1894 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1895 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1896 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1897 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1898 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1899 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1900 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1901 | } |
| 1902 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1903 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1904 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1905 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1906 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1907 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1908 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1909 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1910 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1911 | } |
| 1912 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1913 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1914 | type VkFlags VkExternalMemoryFeatureFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1915 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1916 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1917 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1918 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1919 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1920 | } |
| 1921 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1922 | @extension("VK_KHX_device_group") // 61 |
| 1923 | type VkFlags VkPeerMemoryFeatureFlagsKHX |
| 1924 | @extension("VK_KHX_device_group") // 61 |
| 1925 | bitfield VkPeerMemoryFeatureFlagBitsKHX { |
| 1926 | VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001, |
| 1927 | VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002, |
| 1928 | VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004, |
| 1929 | VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008, |
| 1930 | } |
| 1931 | |
| 1932 | @extension("VK_KHX_device_group") // 61 |
| 1933 | type VkFlags VkMemoryAllocateFlagsKHX |
| 1934 | @extension("VK_KHX_device_group") // 61 |
| 1935 | bitfield VkMemoryAllocateFlagBitsKHX { |
| 1936 | VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001, |
| 1937 | } |
| 1938 | |
| 1939 | @extension("VK_KHX_device_group") // 61 |
| 1940 | type VkFlags VkDeviceGroupPresentModeFlagsKHX |
| 1941 | @extension("VK_KHX_device_group") // 61 |
| 1942 | bitfield VkDeviceGroupPresentModeFlagBitsKHX { |
| 1943 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001, |
| 1944 | VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002, |
| 1945 | VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004, |
| 1946 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008, |
| 1947 | } |
| 1948 | |
| 1949 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1950 | type VkFlags VkViSurfaceCreateFlagsNN |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1951 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1952 | //bitfield VkViSurfaceCreateFlagBitsNN { |
| 1953 | //} |
| 1954 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1955 | @extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1956 | type VkFlags VkCommandPoolTrimFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1957 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1958 | //bitfield VkCommandPoolTrimFlagBitsKHR { |
| 1959 | //} |
| 1960 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1961 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1962 | type VkFlags VkExternalMemoryHandleTypeFlagsKHX |
| 1963 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1964 | bitfield VkExternalMemoryHandleTypeFlagBitsKHX { |
| 1965 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, |
| 1966 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, |
| 1967 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, |
| 1968 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008, |
| 1969 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010, |
| 1970 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020, |
| 1971 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040, |
| 1972 | } |
| 1973 | |
| 1974 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1975 | type VkFlags VkExternalMemoryFeatureFlagsKHX |
| 1976 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1977 | bitfield VkExternalMemoryFeatureFlagBitsKHX { |
| 1978 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001, |
| 1979 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002, |
| 1980 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004, |
| 1981 | } |
| 1982 | |
| 1983 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1984 | type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX |
| 1985 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1986 | bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX { |
| 1987 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001 |
| 1988 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002 |
| 1989 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004 |
| 1990 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008 |
| 1991 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010 |
| 1992 | } |
| 1993 | |
| 1994 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1995 | type VkFlags VkExternalSemaphoreFeatureFlagsKHX |
| 1996 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1997 | bitfield VkExternalSemaphoreFeatureFlagBitsKHX { |
| 1998 | VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001, |
| 1999 | VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002, |
| 2000 | } |
| 2001 | |
| 2002 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 2003 | type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR |
| 2004 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 2005 | //bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR { |
| 2006 | //} |
| 2007 | |
| 2008 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2009 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2010 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2011 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2012 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 2013 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 2014 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 2015 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2016 | } |
| 2017 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2018 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2019 | type VkFlags VkObjectEntryUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2020 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2021 | bitfield VkObjectEntryUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2022 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 2023 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2024 | } |
| 2025 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2026 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2027 | type VkFlags VkSurfaceCounterFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2028 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2029 | bitfield VkSurfaceCounterFlagBitsEXT { |
| 2030 | VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, |
| 2031 | } |
| 2032 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2033 | @extension("VK_NV_viewport_swizzle") // 99 |
| 2034 | type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV |
| 2035 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 2036 | //bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV { |
| 2037 | //} |
| 2038 | |
| 2039 | @extension("VK_EXT_discard_rectangles") // 100 |
| 2040 | type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT |
| 2041 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 2042 | //bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT { |
| 2043 | //} |
| 2044 | |
| 2045 | @extension("VK_MVK_ios_surface") // 123 |
| 2046 | type VkFlags VkIOSSurfaceCreateFlagsMVK |
| 2047 | //@extension("VK_MVK_ios_surface") // 123 |
| 2048 | //bitfield VkIOSSurfaceCreateFlagBitsMVK { |
| 2049 | //} |
| 2050 | |
| 2051 | @extension("VK_MVK_macos_surface") // 124 |
| 2052 | type VkFlags VkMacOSSurfaceCreateFlagsMVK |
| 2053 | //@extension("VK_MVK_macos_surface") // 124 |
| 2054 | //bitfield VkMacOSSurfaceCreateFlagBitsMVK { |
| 2055 | //} |
| 2056 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2057 | ////////////////// |
| 2058 | // Structures // |
| 2059 | ////////////////// |
| 2060 | |
| 2061 | class VkOffset2D { |
| 2062 | s32 x |
| 2063 | s32 y |
| 2064 | } |
| 2065 | |
| 2066 | class VkOffset3D { |
| 2067 | s32 x |
| 2068 | s32 y |
| 2069 | s32 z |
| 2070 | } |
| 2071 | |
| 2072 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2073 | u32 width |
| 2074 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2075 | } |
| 2076 | |
| 2077 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2078 | u32 width |
| 2079 | u32 height |
| 2080 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2081 | } |
| 2082 | |
| 2083 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2084 | f32 x |
| 2085 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2086 | f32 width |
| 2087 | f32 height |
| 2088 | f32 minDepth |
| 2089 | f32 maxDepth |
| 2090 | } |
| 2091 | |
| 2092 | class VkRect2D { |
| 2093 | VkOffset2D offset |
| 2094 | VkExtent2D extent |
| 2095 | } |
| 2096 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2097 | class VkClearRect { |
| 2098 | VkRect2D rect |
| 2099 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2100 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2101 | } |
| 2102 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2103 | class VkComponentMapping { |
| 2104 | VkComponentSwizzle r |
| 2105 | VkComponentSwizzle g |
| 2106 | VkComponentSwizzle b |
| 2107 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2108 | } |
| 2109 | |
| 2110 | class VkPhysicalDeviceProperties { |
| 2111 | u32 apiVersion |
| 2112 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2113 | u32 vendorID |
| 2114 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2115 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2116 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 2117 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2118 | VkPhysicalDeviceLimits limits |
| 2119 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2120 | } |
| 2121 | |
| 2122 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2123 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2124 | u32 specVersion /// version of the extension specification implemented |
| 2125 | } |
| 2126 | |
| 2127 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2128 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2129 | u32 specVersion /// version of the layer specification implemented |
| 2130 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2131 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2132 | } |
| 2133 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2134 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2135 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 2136 | const void* pNext /// Next structure in chain |
| 2137 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2138 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2139 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2140 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2141 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2142 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2143 | const VkSemaphore* pSignalSemaphores |
| 2144 | } |
| 2145 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2146 | class VkApplicationInfo { |
| 2147 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 2148 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2149 | const char* pApplicationName |
| 2150 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2151 | const char* pEngineName |
| 2152 | u32 engineVersion |
| 2153 | u32 apiVersion |
| 2154 | } |
| 2155 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2156 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2157 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2158 | PFN_vkAllocationFunction pfnAllocation |
| 2159 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2160 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2161 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2162 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2163 | } |
| 2164 | |
| 2165 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2166 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 2167 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2168 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2169 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2170 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2171 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2172 | } |
| 2173 | |
| 2174 | class VkDeviceCreateInfo { |
| 2175 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 2176 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2177 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2178 | u32 queueCreateInfoCount |
| 2179 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2180 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2181 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2182 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2183 | const char* const* ppEnabledExtensionNames |
| 2184 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2185 | } |
| 2186 | |
| 2187 | class VkInstanceCreateInfo { |
| 2188 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 2189 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2190 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2191 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2192 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2193 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2194 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2195 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 2196 | } |
| 2197 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2198 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2199 | VkQueueFlags queueFlags /// Queue flags |
| 2200 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2201 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2202 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2203 | } |
| 2204 | |
| 2205 | class VkPhysicalDeviceMemoryProperties { |
| 2206 | u32 memoryTypeCount |
| 2207 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 2208 | u32 memoryHeapCount |
| 2209 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 2210 | } |
| 2211 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2212 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2213 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2214 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2215 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2216 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 2217 | } |
| 2218 | |
| 2219 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2220 | VkDeviceSize size /// Specified in bytes |
| 2221 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2222 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 2223 | } |
| 2224 | |
| 2225 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2226 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2227 | VkExtent3D imageGranularity |
| 2228 | VkSparseImageFormatFlags flags |
| 2229 | } |
| 2230 | |
| 2231 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2232 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2233 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2234 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 2235 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 2236 | 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] | 2237 | } |
| 2238 | |
| 2239 | class VkMemoryType { |
| 2240 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 2241 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 2242 | } |
| 2243 | |
| 2244 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2245 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2246 | VkMemoryHeapFlags flags /// Flags for the heap |
| 2247 | } |
| 2248 | |
| 2249 | class VkMappedMemoryRange { |
| 2250 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 2251 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2252 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2253 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 2254 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2255 | } |
| 2256 | |
| 2257 | class VkFormatProperties { |
| 2258 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 2259 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2260 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2261 | } |
| 2262 | |
| 2263 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2264 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 2265 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2266 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2267 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 2268 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 2269 | } |
| 2270 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2271 | class VkDescriptorImageInfo { |
| 2272 | VkSampler sampler |
| 2273 | VkImageView imageView |
| 2274 | VkImageLayout imageLayout |
| 2275 | } |
| 2276 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2277 | class VkDescriptorBufferInfo { |
| 2278 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 2279 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 2280 | 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] | 2281 | } |
| 2282 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2283 | class VkWriteDescriptorSet { |
| 2284 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 2285 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2286 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2287 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 2288 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2289 | 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] | 2290 | 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] | 2291 | const VkDescriptorImageInfo* pImageInfo |
| 2292 | const VkDescriptorBufferInfo* pBufferInfo |
| 2293 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2294 | } |
| 2295 | |
| 2296 | class VkCopyDescriptorSet { |
| 2297 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 2298 | const void* pNext /// Pointer to next structure |
| 2299 | VkDescriptorSet srcSet /// Source descriptor set |
| 2300 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 2301 | u32 srcArrayElement /// Array element within the source binding to copy from |
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 copy to |
| 2304 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2305 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2306 | } |
| 2307 | |
| 2308 | class VkBufferCreateInfo { |
| 2309 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 2310 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2311 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2312 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2314 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2315 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2316 | const u32* pQueueFamilyIndices |
| 2317 | } |
| 2318 | |
| 2319 | class VkBufferViewCreateInfo { |
| 2320 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 2321 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2322 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2323 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2324 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2325 | VkDeviceSize offset /// Specified in bytes |
| 2326 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2327 | } |
| 2328 | |
| 2329 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2330 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2331 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2332 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2333 | } |
| 2334 | |
| 2335 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2336 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2337 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2338 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2339 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2340 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2341 | } |
| 2342 | |
| 2343 | class VkMemoryBarrier { |
| 2344 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 2345 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2346 | VkAccessFlags srcAccessMask |
| 2347 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2348 | } |
| 2349 | |
| 2350 | class VkBufferMemoryBarrier { |
| 2351 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 2352 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2353 | VkAccessFlags srcAccessMask |
| 2354 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2355 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2356 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2357 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2358 | VkDeviceSize offset /// Offset within the buffer to sync |
| 2359 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2360 | } |
| 2361 | |
| 2362 | class VkImageMemoryBarrier { |
| 2363 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 2364 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2365 | VkAccessFlags srcAccessMask |
| 2366 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2367 | VkImageLayout oldLayout /// Current layout of the image |
| 2368 | VkImageLayout newLayout /// New layout to transition the image to |
| 2369 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2370 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2371 | VkImage image /// Image to sync |
| 2372 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 2373 | } |
| 2374 | |
| 2375 | class VkImageCreateInfo { |
| 2376 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 2377 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2378 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2379 | VkImageType imageType |
| 2380 | VkFormat format |
| 2381 | VkExtent3D extent |
| 2382 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2383 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2384 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2385 | VkImageTiling tiling |
| 2386 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2387 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2388 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2389 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2390 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2391 | } |
| 2392 | |
| 2393 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2394 | VkDeviceSize offset /// Specified in bytes |
| 2395 | VkDeviceSize size /// Specified in bytes |
| 2396 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2397 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2398 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2399 | } |
| 2400 | |
| 2401 | class VkImageViewCreateInfo { |
| 2402 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 2403 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2404 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2405 | VkImage image |
| 2406 | VkImageViewType viewType |
| 2407 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2408 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2409 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2410 | } |
| 2411 | |
| 2412 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2413 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2414 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2415 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2416 | } |
| 2417 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2418 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2419 | VkDeviceSize resourceOffset /// Specified in bytes |
| 2420 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2421 | VkDeviceMemory memory |
| 2422 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2423 | VkSparseMemoryBindFlags flags |
| 2424 | } |
| 2425 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2426 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2427 | VkImageSubresource subresource |
| 2428 | VkOffset3D offset |
| 2429 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2430 | VkDeviceMemory memory |
| 2431 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2432 | VkSparseMemoryBindFlags flags |
| 2433 | } |
| 2434 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2435 | class VkSparseBufferMemoryBindInfo { |
| 2436 | VkBuffer buffer |
| 2437 | u32 bindCount |
| 2438 | const VkSparseMemoryBind* pBinds |
| 2439 | } |
| 2440 | |
| 2441 | class VkSparseImageOpaqueMemoryBindInfo { |
| 2442 | VkImage image |
| 2443 | u32 bindCount |
| 2444 | const VkSparseMemoryBind* pBinds |
| 2445 | } |
| 2446 | |
| 2447 | class VkSparseImageMemoryBindInfo { |
| 2448 | VkImage image |
| 2449 | u32 bindCount |
| 2450 | const VkSparseMemoryBind* pBinds |
| 2451 | } |
| 2452 | |
| 2453 | class VkBindSparseInfo { |
| 2454 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2455 | const void* pNext |
| 2456 | u32 waitSemaphoreCount |
| 2457 | const VkSemaphore* pWaitSemaphores |
| 2458 | u32 numBufferBinds |
| 2459 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2460 | u32 numImageOpaqueBinds |
| 2461 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2462 | u32 numImageBinds |
| 2463 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2464 | u32 signalSemaphoreCount |
| 2465 | const VkSemaphore* pSignalSemaphores |
| 2466 | } |
| 2467 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2468 | class VkImageSubresourceLayers { |
| 2469 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2470 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2471 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2472 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2473 | } |
| 2474 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2475 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2476 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2477 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2478 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2479 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2480 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2481 | } |
| 2482 | |
| 2483 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2484 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2485 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2486 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2487 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2488 | } |
| 2489 | |
| 2490 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2491 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2492 | u32 bufferRowLength /// Specified in texels |
| 2493 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2494 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2495 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2496 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2497 | } |
| 2498 | |
| 2499 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2500 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2501 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2502 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2503 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2504 | VkExtent3D extent |
| 2505 | } |
| 2506 | |
| 2507 | class VkShaderModuleCreateInfo { |
| 2508 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2509 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2510 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2511 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2512 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2513 | } |
| 2514 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2515 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2516 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2517 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2518 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2519 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2520 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2521 | } |
| 2522 | |
| 2523 | class VkDescriptorSetLayoutCreateInfo { |
| 2524 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2525 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2526 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2527 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2528 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2529 | } |
| 2530 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2531 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2532 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2533 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2534 | } |
| 2535 | |
| 2536 | class VkDescriptorPoolCreateInfo { |
| 2537 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2538 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2539 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2540 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2541 | u32 poolSizeCount |
| 2542 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2543 | } |
| 2544 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2545 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2546 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2547 | const void* pNext /// Pointer to next structure |
| 2548 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2549 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2550 | const VkDescriptorSetLayout* pSetLayouts |
| 2551 | } |
| 2552 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2553 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2554 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2555 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2556 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2557 | } |
| 2558 | |
| 2559 | class VkSpecializationInfo { |
| 2560 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2561 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2562 | platform.size_t dataSize /// Size in bytes of pData |
| 2563 | const void* pData /// Pointer to SpecConstant data |
| 2564 | } |
| 2565 | |
| 2566 | class VkPipelineShaderStageCreateInfo { |
| 2567 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2568 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2569 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2570 | VkShaderStageFlagBits stage |
| 2571 | VkShaderModule module |
| 2572 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2573 | const VkSpecializationInfo* pSpecializationInfo |
| 2574 | } |
| 2575 | |
| 2576 | class VkComputePipelineCreateInfo { |
| 2577 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2578 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2579 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2580 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2581 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2582 | 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 |
| 2583 | 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 |
| 2584 | } |
| 2585 | |
| 2586 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2587 | u32 binding /// Vertex buffer binding id |
| 2588 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2589 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2590 | } |
| 2591 | |
| 2592 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2593 | u32 location /// location of the shader vertex attrib |
| 2594 | u32 binding /// Vertex buffer binding id |
| 2595 | VkFormat format /// format of source data |
| 2596 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2597 | } |
| 2598 | |
| 2599 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2600 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2601 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2602 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2603 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2604 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2605 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2606 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2607 | } |
| 2608 | |
| 2609 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2610 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2611 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2612 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2613 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2614 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2615 | } |
| 2616 | |
| 2617 | class VkPipelineTessellationStateCreateInfo { |
| 2618 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2619 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2620 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2621 | u32 patchControlPoints |
| 2622 | } |
| 2623 | |
| 2624 | class VkPipelineViewportStateCreateInfo { |
| 2625 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2626 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2627 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2628 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2629 | const VkViewport* pViewports |
| 2630 | u32 scissorCount |
| 2631 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2632 | } |
| 2633 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2634 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2635 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2636 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2637 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2638 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2639 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2640 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2641 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2642 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2643 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2644 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2645 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2646 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2647 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2648 | } |
| 2649 | |
| 2650 | class VkPipelineMultisampleStateCreateInfo { |
| 2651 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2652 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2653 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2654 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2655 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2656 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2657 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2658 | VkBool32 alphaToCoverageEnable |
| 2659 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2660 | } |
| 2661 | |
| 2662 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2663 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2664 | VkBlendFactor srcColorBlendFactor |
| 2665 | VkBlendFactor dstColorBlendFactor |
| 2666 | VkBlendOp colorBlendOp |
| 2667 | VkBlendFactor srcAlphaBlendFactor |
| 2668 | VkBlendFactor dstAlphaBlendFactor |
| 2669 | VkBlendOp alphaBlendOp |
| 2670 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2671 | } |
| 2672 | |
| 2673 | class VkPipelineColorBlendStateCreateInfo { |
| 2674 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2675 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2676 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2677 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2678 | VkLogicOp logicOp |
| 2679 | u32 attachmentCount /// # of pAttachments |
| 2680 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2681 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2682 | } |
| 2683 | |
| 2684 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2685 | VkStencilOp failOp |
| 2686 | VkStencilOp passOp |
| 2687 | VkStencilOp depthFailOp |
| 2688 | VkCompareOp compareOp |
| 2689 | u32 compareMask |
| 2690 | u32 writeMask |
| 2691 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2692 | } |
| 2693 | |
| 2694 | class VkPipelineDepthStencilStateCreateInfo { |
| 2695 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2696 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2697 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2698 | VkBool32 depthTestEnable |
| 2699 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2700 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2701 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2702 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2703 | VkStencilOpState front |
| 2704 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2705 | f32 minDepthBounds |
| 2706 | f32 maxDepthBounds |
| 2707 | } |
| 2708 | |
| 2709 | class VkPipelineDynamicStateCreateInfo { |
| 2710 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2711 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2712 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2713 | u32 dynamicStateCount |
| 2714 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2715 | } |
| 2716 | |
| 2717 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2718 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2719 | const void* pNext /// Pointer to next structure |
| 2720 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2721 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2722 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2723 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2724 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2725 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2726 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2727 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2728 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2729 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2730 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2731 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2732 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2733 | VkRenderPass renderPass |
| 2734 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2735 | 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 |
| 2736 | 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] | 2737 | } |
| 2738 | |
| 2739 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2740 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2741 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2742 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2743 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2744 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2745 | } |
| 2746 | |
| 2747 | class VkPushConstantRange { |
| 2748 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2749 | u32 offset /// Start of the range, in bytes |
| 2750 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2751 | } |
| 2752 | |
| 2753 | class VkPipelineLayoutCreateInfo { |
| 2754 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2755 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2756 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2757 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2758 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2759 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2760 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2761 | } |
| 2762 | |
| 2763 | class VkSamplerCreateInfo { |
| 2764 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2765 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2766 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2767 | VkFilter magFilter /// Filter mode for magnification |
| 2768 | VkFilter minFilter /// Filter mode for minifiation |
| 2769 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2770 | VkSamplerAddressMode addressModeU |
| 2771 | VkSamplerAddressMode addressModeV |
| 2772 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2773 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2774 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2775 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2776 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2777 | VkCompareOp compareOp |
| 2778 | f32 minLod |
| 2779 | f32 maxLod |
| 2780 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2781 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2782 | } |
| 2783 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2784 | class VkCommandPoolCreateInfo { |
| 2785 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2786 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2787 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2788 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2789 | } |
| 2790 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2791 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2792 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2793 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2794 | VkCommandPool commandPool |
| 2795 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2796 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2797 | } |
| 2798 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2799 | class VkCommandBufferInheritanceInfo { |
| 2800 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2801 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2802 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2803 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2804 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2805 | VkBool32 occlusionQueryEnable |
| 2806 | VkQueryControlFlags queryFlags |
| 2807 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2808 | } |
| 2809 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2810 | class VkCommandBufferBeginInfo { |
| 2811 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2812 | const void* pNext /// Pointer to next structure |
| 2813 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2814 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2815 | } |
| 2816 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2817 | class VkRenderPassBeginInfo { |
| 2818 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2819 | const void* pNext /// Pointer to next structure |
| 2820 | VkRenderPass renderPass |
| 2821 | VkFramebuffer framebuffer |
| 2822 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2823 | u32 clearValueCount |
| 2824 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2825 | } |
| 2826 | |
| 2827 | @union |
| 2828 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2829 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2830 | f32[4] float32 |
| 2831 | s32[4] int32 |
| 2832 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2833 | } |
| 2834 | |
| 2835 | class VkClearDepthStencilValue { |
| 2836 | f32 depth |
| 2837 | u32 stencil |
| 2838 | } |
| 2839 | |
| 2840 | @union |
| 2841 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2842 | class VkClearValue { |
| 2843 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2844 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2845 | } |
| 2846 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2847 | class VkClearAttachment { |
| 2848 | VkImageAspectFlags aspectMask |
| 2849 | u32 colorAttachment |
| 2850 | VkClearValue clearValue |
| 2851 | } |
| 2852 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2853 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2854 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2855 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2856 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2857 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2858 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2859 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2860 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2861 | VkImageLayout initialLayout |
| 2862 | VkImageLayout finalLayout |
| 2863 | } |
| 2864 | |
| 2865 | class VkAttachmentReference { |
| 2866 | u32 attachment |
| 2867 | VkImageLayout layout |
| 2868 | } |
| 2869 | |
| 2870 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2871 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2872 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2873 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2874 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2875 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2876 | const VkAttachmentReference* pColorAttachments |
| 2877 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2878 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2879 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2880 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2881 | } |
| 2882 | |
| 2883 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2884 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2885 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2886 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2887 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2888 | VkAccessFlags srcAccessMask |
| 2889 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2890 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2891 | } |
| 2892 | |
| 2893 | class VkRenderPassCreateInfo { |
| 2894 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2895 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2896 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2897 | u32 attachmentCount |
| 2898 | const VkAttachmentDescription* pAttachments |
| 2899 | u32 subpassCount |
| 2900 | const VkSubpassDescription* pSubpasses |
| 2901 | u32 dependencyCount |
| 2902 | const VkSubpassDependency* pDependencies |
| 2903 | } |
| 2904 | |
| 2905 | class VkEventCreateInfo { |
| 2906 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2907 | const void* pNext /// Pointer to next structure |
| 2908 | VkEventCreateFlags flags /// Event creation flags |
| 2909 | } |
| 2910 | |
| 2911 | class VkFenceCreateInfo { |
| 2912 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2913 | const void* pNext /// Pointer to next structure |
| 2914 | VkFenceCreateFlags flags /// Fence creation flags |
| 2915 | } |
| 2916 | |
| 2917 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2918 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2919 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2920 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2921 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2922 | VkBool32 geometryShader /// geometry stage |
| 2923 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2924 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2925 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2926 | VkBool32 logicOp /// logic operations |
| 2927 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2928 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2929 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2930 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2931 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2932 | VkBool32 depthBounds /// depth bounds test |
| 2933 | VkBool32 wideLines /// lines with width greater than 1 |
| 2934 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2935 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2936 | VkBool32 multiViewport |
| 2937 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2938 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2939 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2940 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2941 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2942 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2943 | VkBool32 vertexPipelineStoresAndAtomics |
| 2944 | VkBool32 fragmentStoresAndAtomics |
| 2945 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2946 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2947 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2948 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2949 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2950 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2951 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2952 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2953 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2954 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2955 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2956 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2957 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2958 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2959 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2960 | 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] | 2961 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2962 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2963 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2964 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2965 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2966 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2967 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2968 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2969 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2970 | 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] | 2971 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2972 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2973 | } |
| 2974 | |
| 2975 | class VkPhysicalDeviceLimits { |
| 2976 | /// resource maximum sizes |
| 2977 | u32 maxImageDimension1D /// max 1D image dimension |
| 2978 | u32 maxImageDimension2D /// max 2D image dimension |
| 2979 | u32 maxImageDimension3D /// max 3D image dimension |
| 2980 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2981 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2982 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2983 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 2984 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2985 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 2986 | /// memory limits |
| 2987 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2988 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2989 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 2990 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2991 | /// descriptor set limits |
| 2992 | 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] | 2993 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 2994 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 2995 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 2996 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 2997 | 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] | 2998 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2999 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3000 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 3001 | 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] | 3002 | 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] | 3003 | 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] | 3004 | 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] | 3005 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 3006 | 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] | 3007 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3008 | /// vertex stage limits |
| 3009 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3010 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3011 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 3012 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 3013 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 3014 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3015 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 3016 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 3017 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 3018 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 3019 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 3020 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 3021 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 3022 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3023 | /// geometry stage limits |
| 3024 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 3025 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 3026 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 3027 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 3028 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 3029 | /// fragment stage limits |
| 3030 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3031 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3032 | 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] | 3033 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 3034 | /// compute stage limits |
| 3035 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 3036 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 3037 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 3038 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 3039 | |
| 3040 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 3041 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 3042 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 3043 | |
| 3044 | 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] | 3045 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3046 | |
| 3047 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 3048 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 3049 | |
| 3050 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3051 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 3052 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 3053 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 3054 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 3055 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 3056 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 3057 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 3058 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3059 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3060 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3061 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3062 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3063 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 3064 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 3065 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 3066 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 3067 | |
| 3068 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 3069 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 3070 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3071 | VkSampleCountFlags framebufferColorSampleCounts |
| 3072 | VkSampleCountFlags framebufferDepthSampleCounts |
| 3073 | VkSampleCountFlags framebufferStencilSampleCounts |
| 3074 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3075 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 3076 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3077 | VkSampleCountFlags sampledImageColorSampleCounts |
| 3078 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 3079 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 3080 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 3081 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3082 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3083 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3084 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3085 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3086 | |
| 3087 | u32 maxClipDistances /// max number of clip distances |
| 3088 | u32 maxCullDistances /// max number of cull distances |
| 3089 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 3090 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3091 | u32 discreteQueuePriorities |
| 3092 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3093 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 3094 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3095 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 3096 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3097 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3098 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3099 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 3100 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 3101 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3102 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3103 | } |
| 3104 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3105 | class VkPhysicalDeviceSparseProperties { |
| 3106 | 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] | 3107 | 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] | 3108 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 3109 | 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] | 3110 | 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 |
| 3111 | } |
| 3112 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3113 | class VkSemaphoreCreateInfo { |
| 3114 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 3115 | const void* pNext /// Pointer to next structure |
| 3116 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 3117 | } |
| 3118 | |
| 3119 | class VkQueryPoolCreateInfo { |
| 3120 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 3121 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3122 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3123 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3124 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3125 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 3126 | } |
| 3127 | |
| 3128 | class VkFramebufferCreateInfo { |
| 3129 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 3130 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3131 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3132 | VkRenderPass renderPass |
| 3133 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3134 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3135 | u32 width |
| 3136 | u32 height |
| 3137 | u32 layers |
| 3138 | } |
| 3139 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3140 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3141 | u32 vertexCount |
| 3142 | u32 instanceCount |
| 3143 | u32 firstVertex |
| 3144 | u32 firstInstance |
| 3145 | } |
| 3146 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3147 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3148 | u32 indexCount |
| 3149 | u32 instanceCount |
| 3150 | u32 firstIndex |
| 3151 | s32 vertexOffset |
| 3152 | u32 firstInstance |
| 3153 | } |
| 3154 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3155 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3156 | u32 x |
| 3157 | u32 y |
| 3158 | u32 z |
| 3159 | } |
| 3160 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3161 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3162 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3163 | u32 minImageCount |
| 3164 | u32 maxImageCount |
| 3165 | VkExtent2D currentExtent |
| 3166 | VkExtent2D minImageExtent |
| 3167 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3168 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3169 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3170 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3171 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3172 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3173 | } |
| 3174 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3175 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3176 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3177 | VkFormat format |
| 3178 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3179 | } |
| 3180 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3181 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3182 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3183 | VkStructureType sType |
| 3184 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3185 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3186 | VkSurfaceKHR surface |
| 3187 | u32 minImageCount |
| 3188 | VkFormat imageFormat |
| 3189 | VkColorSpaceKHR imageColorSpace |
| 3190 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3191 | u32 imageArrayLayers |
| 3192 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3193 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3194 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3195 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3196 | VkSurfaceTransformFlagBitsKHR preTransform |
| 3197 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3198 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3199 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3200 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3201 | } |
| 3202 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3203 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3204 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3205 | VkStructureType sType |
| 3206 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3207 | u32 waitSemaphoreCount |
| 3208 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3209 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3210 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3211 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3212 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3213 | } |
| 3214 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3215 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3216 | class VkDisplayPropertiesKHR { |
| 3217 | VkDisplayKHR display |
| 3218 | const char* displayName |
| 3219 | VkExtent2D physicalDimensions |
| 3220 | VkExtent2D physicalResolution |
| 3221 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3222 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3223 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3224 | } |
| 3225 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3226 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3227 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3228 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3229 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3230 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3231 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3232 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3233 | class VkDisplayModePropertiesKHR { |
| 3234 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3235 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3236 | } |
| 3237 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3238 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3239 | class VkDisplayModeCreateInfoKHR { |
| 3240 | VkStructureType sType |
| 3241 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 3242 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3243 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3244 | } |
| 3245 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3246 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3247 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3248 | VkDisplayKHR currentDisplay |
| 3249 | u32 currentStackIndex |
| 3250 | } |
| 3251 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3252 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3253 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3254 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 3255 | VkOffset2D minSrcPosition |
| 3256 | VkOffset2D maxSrcPosition |
| 3257 | VkExtent2D minSrcExtent |
| 3258 | VkExtent2D maxSrcExtent |
| 3259 | VkOffset2D minDstPosition |
| 3260 | VkOffset2D maxDstPosition |
| 3261 | VkExtent2D minDstExtent |
| 3262 | VkExtent2D maxDstExtent |
| 3263 | } |
| 3264 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3265 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3266 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3267 | VkStructureType sType |
| 3268 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3269 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3270 | VkDisplayModeKHR displayMode |
| 3271 | u32 planeIndex |
| 3272 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3273 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3274 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3275 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 3276 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3277 | } |
| 3278 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3279 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3280 | class VkDisplayPresentInfoKHR { |
| 3281 | VkStructureType sType |
| 3282 | const void* pNext |
| 3283 | VkRect2D srcRect |
| 3284 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3285 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3286 | } |
| 3287 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3288 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3289 | class VkXlibSurfaceCreateInfoKHR { |
| 3290 | VkStructureType sType |
| 3291 | const void* pNext |
| 3292 | VkXlibSurfaceCreateFlagsKHR flags |
| 3293 | platform.Display* dpy |
| 3294 | platform.Window window |
| 3295 | } |
| 3296 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3297 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3298 | class VkXcbSurfaceCreateInfoKHR { |
| 3299 | VkStructureType sType |
| 3300 | const void* pNext |
| 3301 | VkXcbSurfaceCreateFlagsKHR flags |
| 3302 | platform.xcb_connection_t* connection |
| 3303 | platform.xcb_window_t window |
| 3304 | } |
| 3305 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3306 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3307 | class VkWaylandSurfaceCreateInfoKHR { |
| 3308 | VkStructureType sType |
| 3309 | const void* pNext |
| 3310 | VkWaylandSurfaceCreateFlagsKHR flags |
| 3311 | platform.wl_display* display |
| 3312 | platform.wl_surface* surface |
| 3313 | } |
| 3314 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3315 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3316 | class VkMirSurfaceCreateInfoKHR { |
| 3317 | VkStructureType sType |
| 3318 | const void* pNext |
| 3319 | VkMirSurfaceCreateFlagsKHR flags |
| 3320 | platform.MirConnection* connection |
| 3321 | platform.MirSurface* mirSurface |
| 3322 | } |
| 3323 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3324 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3325 | class VkAndroidSurfaceCreateInfoKHR { |
| 3326 | VkStructureType sType |
| 3327 | const void* pNext |
| 3328 | VkAndroidSurfaceCreateFlagsKHR flags |
| 3329 | platform.ANativeWindow* window |
| 3330 | } |
| 3331 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3332 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3333 | class VkWin32SurfaceCreateInfoKHR { |
| 3334 | VkStructureType sType |
| 3335 | const void* pNext |
| 3336 | VkWin32SurfaceCreateFlagsKHR flags |
| 3337 | platform.HINSTANCE hinstance |
| 3338 | platform.HWND hwnd |
| 3339 | } |
| 3340 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3341 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3342 | @internal class Gralloc1Usage { |
| 3343 | u64 consumer |
| 3344 | u64 producer |
| 3345 | } |
| 3346 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3347 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3348 | class VkNativeBufferANDROID { |
| 3349 | VkStructureType sType |
| 3350 | const void* pNext |
| 3351 | platform.buffer_handle_t handle |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3352 | s32 stride |
| 3353 | s32 format |
| 3354 | s32 usage |
| 3355 | Gralloc1Usage usage2 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3356 | } |
| 3357 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3358 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 3359 | class VkSwapchainImageCreateInfoANDROID { |
| 3360 | VkStructureType sType |
| 3361 | const void* pNext |
Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 3362 | VkSwapchainImageUsageFlagsANDROID flags |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 3363 | } |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 3364 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3365 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 3366 | class VkPhysicalDevicePresentationPropertiesANDROID { |
| 3367 | VkStructureType sType |
| 3368 | void* pNext |
| 3369 | VkBool32 sharedImage |
| 3370 | } |
| 3371 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3372 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 3373 | class VkDebugReportCallbackCreateInfoEXT { |
| 3374 | VkStructureType sType |
| 3375 | const void* pNext |
| 3376 | VkDebugReportFlagsEXT flags |
| 3377 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 3378 | void* pUserData |
| 3379 | } |
| 3380 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3381 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3382 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 3383 | VkStructureType sType |
| 3384 | const void* pNext |
| 3385 | VkRasterizationOrderAMD rasterizationOrder |
| 3386 | } |
| 3387 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3388 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3389 | class VkDebugMarkerObjectNameInfoEXT { |
| 3390 | VkStructureType sType |
| 3391 | const void* pNext |
| 3392 | VkDebugReportObjectTypeEXT objectType |
| 3393 | u64 object |
| 3394 | const char* pObjectName |
| 3395 | } |
| 3396 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3397 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3398 | class VkDebugMarkerObjectTagInfoEXT { |
| 3399 | VkStructureType sType |
| 3400 | const void* pNext |
| 3401 | VkDebugReportObjectTypeEXT objectType |
| 3402 | u64 object |
| 3403 | u64 tagName |
| 3404 | platform.size_t tagSize |
| 3405 | const void* pTag |
| 3406 | } |
| 3407 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3408 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3409 | class VkDebugMarkerMarkerInfoEXT { |
| 3410 | VkStructureType sType |
| 3411 | const void* pNext |
| 3412 | const char* pMarkerName |
| 3413 | f32[4] color |
| 3414 | } |
| 3415 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3416 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3417 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3418 | VkStructureType sType |
| 3419 | const void* pNext |
| 3420 | VkBool32 dedicatedAllocation |
| 3421 | } |
| 3422 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3423 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3424 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3425 | VkStructureType sType |
| 3426 | const void* pNext |
| 3427 | VkBool32 dedicatedAllocation |
| 3428 | } |
| 3429 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3430 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3431 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3432 | VkStructureType sType |
| 3433 | const void* pNext |
| 3434 | VkImage image |
| 3435 | VkBuffer buffer |
| 3436 | } |
| 3437 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3438 | @extension("VK_KHX_multiview") // 54 |
| 3439 | class VkRenderPassMultiviewCreateInfoKHX { |
| 3440 | VkStructureType sType |
| 3441 | const void* pNext |
| 3442 | u32 subpassCount |
| 3443 | const u32* pViewMasks |
| 3444 | u32 dependencyCount |
| 3445 | const s32* pViewOffsets |
| 3446 | u32 correlationMaskCount |
| 3447 | const u32* pCorrelationMasks |
| 3448 | } |
| 3449 | |
| 3450 | @extension("VK_KHX_multiview") // 54 |
| 3451 | class VkPhysicalDeviceMultiviewFeaturesKHX { |
| 3452 | VkStructureType sType |
| 3453 | void* pNext |
| 3454 | VkBool32 multiview |
| 3455 | VkBool32 multiviewGeometryShader |
| 3456 | VkBool32 multiviewTessellationShader |
| 3457 | } |
| 3458 | |
| 3459 | @extension("VK_KHX_multiview") // 54 |
| 3460 | class VkPhysicalDeviceMultiviewPropertiesKHX { |
| 3461 | VkStructureType sType |
| 3462 | void* pNext |
| 3463 | u32 maxMultiviewViewCount |
| 3464 | u32 maxMultiviewInstanceIndex |
| 3465 | } |
| 3466 | |
| 3467 | @extension("VK_NV_external_memory_capabilities") // 56 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3468 | class VkExternalImageFormatPropertiesNV { |
| 3469 | VkImageFormatProperties imageFormatProperties |
| 3470 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3471 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3472 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3473 | } |
| 3474 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3475 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3476 | class VkExternalMemoryImageCreateInfoNV { |
| 3477 | VkStructureType sType |
| 3478 | const void* pNext |
| 3479 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3480 | } |
| 3481 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3482 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3483 | class VkExportMemoryAllocateInfoNV { |
| 3484 | VkStructureType sType |
| 3485 | const void* pNext |
| 3486 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3487 | } |
| 3488 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3489 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3490 | class VkImportMemoryWin32HandleInfoNV { |
| 3491 | VkStructureType sType |
| 3492 | const void* pNext |
| 3493 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3494 | platform.HANDLE handle |
| 3495 | } |
| 3496 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3497 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3498 | class VkExportMemoryWin32HandleInfoNV { |
| 3499 | VkStructureType sType |
| 3500 | const void* pNext |
| 3501 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3502 | platform.DWORD dwAccess |
| 3503 | } |
| 3504 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3505 | @extension("VK_NV_win32_keyed_mutex") // 59 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3506 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3507 | VkStructureType sType |
| 3508 | const void* pNext |
| 3509 | u32 acquireCount |
| 3510 | const VkDeviceMemory* pAcquireSyncs |
| 3511 | const u64* pAcquireKeys |
| 3512 | const u32* pAcquireTimeoutMilliseconds |
| 3513 | u32 releaseCount |
| 3514 | const VkDeviceMemory* pReleaseSyncs |
| 3515 | const u64* pReleaseKeys |
| 3516 | } |
| 3517 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3518 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3519 | class VkPhysicalDeviceFeatures2KHR { |
| 3520 | VkStructureType sType |
| 3521 | void* pNext |
| 3522 | VkPhysicalDeviceFeatures features |
| 3523 | } |
| 3524 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3525 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3526 | class VkPhysicalDeviceProperties2KHR { |
| 3527 | VkStructureType sType |
| 3528 | void* pNext |
| 3529 | VkPhysicalDeviceProperties properties |
| 3530 | } |
| 3531 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3532 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3533 | class VkFormatProperties2KHR { |
| 3534 | VkStructureType sType |
| 3535 | void* pNext |
| 3536 | VkFormatProperties formatProperties |
| 3537 | } |
| 3538 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3539 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3540 | class VkImageFormatProperties2KHR { |
| 3541 | VkStructureType sType |
| 3542 | void* pNext |
| 3543 | VkImageFormatProperties imageFormatProperties |
| 3544 | } |
| 3545 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3546 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3547 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3548 | VkStructureType sType |
| 3549 | const void* pNext |
| 3550 | VkFormat format |
| 3551 | VkImageType type |
| 3552 | VkImageTiling tiling |
| 3553 | VkImageUsageFlags usage |
| 3554 | VkImageCreateFlags flags |
| 3555 | } |
| 3556 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3557 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3558 | class VkQueueFamilyProperties2KHR { |
| 3559 | VkStructureType sType |
| 3560 | void* pNext |
| 3561 | VkQueueFamilyProperties queueFamilyProperties |
| 3562 | } |
| 3563 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3564 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3565 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3566 | VkStructureType sType |
| 3567 | void* pNext |
| 3568 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3569 | } |
| 3570 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3571 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3572 | class VkSparseImageFormatProperties2KHR { |
| 3573 | VkStructureType sType |
| 3574 | void* pNext |
| 3575 | VkSparseImageFormatProperties properties |
| 3576 | } |
| 3577 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3578 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3579 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3580 | VkStructureType sType |
| 3581 | const void* pNext |
| 3582 | VkFormat format |
| 3583 | VkImageType type |
| 3584 | VkSampleCountFlagBits samples |
| 3585 | VkImageUsageFlags usage |
| 3586 | VkImageTiling tiling |
| 3587 | } |
| 3588 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3589 | @extension("VK_KHX_device_group") // 61 |
| 3590 | class VkMemoryAllocateFlagsInfoKHX { |
| 3591 | VkStructureType sType |
| 3592 | const void* pNext |
| 3593 | VkMemoryAllocateFlagsKHX flags |
| 3594 | u32 deviceMask |
| 3595 | } |
| 3596 | |
| 3597 | @extension("VK_KHX_device_group") // 61 |
| 3598 | class VkBindBufferMemoryInfoKHX { |
| 3599 | VkStructureType sType |
| 3600 | const void* pNext |
| 3601 | VkBuffer buffer |
| 3602 | VkDeviceMemory memory |
| 3603 | VkDeviceSize memoryOffset |
| 3604 | u32 deviceIndexCount |
| 3605 | const u32* pDeviceIndices |
| 3606 | } |
| 3607 | |
| 3608 | @extension("VK_KHX_device_group") // 61 |
| 3609 | class VkBindImageMemoryInfoKHX { |
| 3610 | VkStructureType sType |
| 3611 | const void* pNext |
| 3612 | VkImage image |
| 3613 | VkDeviceMemory memory |
| 3614 | VkDeviceSize memoryOffset |
| 3615 | u32 deviceIndexCount |
| 3616 | const u32* pDeviceIndices |
| 3617 | u32 SFRRectCount |
| 3618 | const VkRect2D* pSFRRects |
| 3619 | } |
| 3620 | |
| 3621 | @extension("VK_KHX_device_group") // 61 |
| 3622 | class VkDeviceGroupRenderPassBeginInfoKHX { |
| 3623 | VkStructureType sType |
| 3624 | const void* pNext |
| 3625 | u32 deviceMask |
| 3626 | u32 deviceRenderAreaCount |
| 3627 | const VkRect2D* pDeviceRenderAreas |
| 3628 | } |
| 3629 | |
| 3630 | @extension("VK_KHX_device_group") // 61 |
| 3631 | class VkDeviceGroupCommandBufferBeginInfoKHX { |
| 3632 | VkStructureType sType |
| 3633 | const void* pNext |
| 3634 | u32 deviceMask |
| 3635 | } |
| 3636 | |
| 3637 | @extension("VK_KHX_device_group") // 61 |
| 3638 | class VkDeviceGroupSubmitInfoKHX { |
| 3639 | VkStructureType sType |
| 3640 | const void* pNext |
| 3641 | u32 waitSemaphoreCount |
| 3642 | const u32* pWaitSemaphoreDeviceIndices |
| 3643 | u32 commandBufferCount |
| 3644 | const u32* pCommandBufferDeviceMasks |
| 3645 | u32 signalSemaphoreCount |
| 3646 | const u32* pSignalSemaphoreDeviceIndices |
| 3647 | } |
| 3648 | |
| 3649 | @extension("VK_KHX_device_group") // 61 |
| 3650 | class VkDeviceGroupBindSparseInfoKHX { |
| 3651 | VkStructureType sType |
| 3652 | const void* pNext |
| 3653 | u32 resourceDeviceIndex |
| 3654 | u32 memoryDeviceIndex |
| 3655 | } |
| 3656 | |
| 3657 | @extension("VK_KHX_device_group") // 61 |
| 3658 | class VkDeviceGroupPresentCapabilitiesKHX { |
| 3659 | VkStructureType sType |
| 3660 | const void* pNext |
| 3661 | u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask |
| 3662 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3663 | } |
| 3664 | |
| 3665 | @extension("VK_KHX_device_group") // 61 |
| 3666 | class VkImageSwapchainCreateInfoKHX { |
| 3667 | VkStructureType sType |
| 3668 | const void* pNext |
| 3669 | VkSwapchainKHR swapchain |
| 3670 | } |
| 3671 | |
| 3672 | @extension("VK_KHX_device_group") // 61 |
| 3673 | class VkBindImageMemorySwapchainInfoKHX { |
| 3674 | VkStructureType sType |
| 3675 | const void* pNext |
| 3676 | VkSwapchainKHR swapchain |
| 3677 | u32 imageIndex |
| 3678 | } |
| 3679 | |
| 3680 | @extension("VK_KHX_device_group") // 61 |
| 3681 | class VkAcquireNextImageInfoKHX { |
| 3682 | VkStructureType sType |
| 3683 | const void* pNext |
| 3684 | VkSwapchainKHR swapchain |
| 3685 | u64 timeout |
| 3686 | VkSemaphore semaphore |
| 3687 | VkFence fence |
| 3688 | u32 deviceMask |
| 3689 | } |
| 3690 | |
| 3691 | @extension("VK_KHX_device_group") // 61 |
| 3692 | class VkDeviceGroupPresentInfoKHX { |
| 3693 | VkStructureType sType |
| 3694 | const void* pNext |
| 3695 | u32 swapchainCount |
| 3696 | const u32* pDeviceMasks |
| 3697 | VkDeviceGroupPresentModeFlagBitsKHX mode |
| 3698 | } |
| 3699 | |
| 3700 | @extension("VK_KHX_device_group") // 61 |
| 3701 | class VkDeviceGroupSwapchainCreateInfoKHX { |
| 3702 | VkStructureType sType |
| 3703 | const void* pNext |
| 3704 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3705 | } |
| 3706 | |
| 3707 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3708 | class VkValidationFlagsEXT { |
| 3709 | VkStructureType sType |
| 3710 | const void* pNext |
| 3711 | u32 disabledValidationCheckCount |
| 3712 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3713 | } |
| 3714 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3715 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 3716 | class VkViSurfaceCreateInfoNN { |
| 3717 | VkStructureType sType |
| 3718 | const void* pNext |
| 3719 | VkViSurfaceCreateFlagsNN flags |
| 3720 | void* window |
| 3721 | } |
| 3722 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3723 | @extension("VK_KHX_device_group_creation") // 71 |
| 3724 | class VkPhysicalDeviceGroupPropertiesKHX { |
| 3725 | VkStructureType sType |
| 3726 | const void* pNext |
| 3727 | u32 physicalDeviceCount |
| 3728 | VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices |
| 3729 | VkBool32 subsetAllocation |
| 3730 | } |
| 3731 | |
| 3732 | @extension("VK_KHX_device_group_creation") // 71 |
| 3733 | class VkDeviceGroupDeviceCreateInfoKHX { |
| 3734 | VkStructureType sType |
| 3735 | const void* pNext |
| 3736 | u32 physicalDeviceCount |
| 3737 | const VkPhysicalDevice* pPhysicalDevices |
| 3738 | } |
| 3739 | |
| 3740 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3741 | class VkExternalMemoryPropertiesKHX { |
| 3742 | VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures |
| 3743 | VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3744 | VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes |
| 3745 | } |
| 3746 | |
| 3747 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3748 | class VkPhysicalDeviceExternalImageFormatInfoKHX { |
| 3749 | VkStructureType sType |
| 3750 | const void* pNext |
| 3751 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3752 | } |
| 3753 | |
| 3754 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3755 | class VkExternalImageFormatPropertiesKHX { |
| 3756 | VkStructureType sType |
| 3757 | void* pNext |
| 3758 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3759 | } |
| 3760 | |
| 3761 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3762 | class VkPhysicalDeviceExternalBufferInfoKHX { |
| 3763 | VkStructureType sType |
| 3764 | const void* pNext |
| 3765 | VkBufferCreateFlags flags |
| 3766 | VkBufferUsageFlags usage |
| 3767 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3768 | } |
| 3769 | |
| 3770 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3771 | class VkExternalBufferPropertiesKHX { |
| 3772 | VkStructureType sType |
| 3773 | void* pNext |
| 3774 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3775 | } |
| 3776 | |
| 3777 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3778 | class VkPhysicalDeviceIDPropertiesKHX { |
| 3779 | VkStructureType sType |
| 3780 | void* pNext |
| 3781 | u8[VK_UUID_SIZE] deviceUUID |
| 3782 | u8[VK_UUID_SIZE] driverUUID |
| 3783 | u8[VK_LUID_SIZE_KHX] deviceLUID |
| 3784 | VkBool32 deviceLUIDValid |
| 3785 | } |
| 3786 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3787 | @extension("VK_KHX_external_memory") // 73 |
| 3788 | class VkExternalMemoryImageCreateInfoKHX { |
| 3789 | VkStructureType sType |
| 3790 | const void* pNext |
| 3791 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3792 | } |
| 3793 | |
| 3794 | @extension("VK_KHX_external_memory") // 73 |
| 3795 | class VkExternalMemoryBufferCreateInfoKHX { |
| 3796 | VkStructureType sType |
| 3797 | const void* pNext |
| 3798 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3799 | } |
| 3800 | |
| 3801 | @extension("VK_KHX_external_memory") // 73 |
| 3802 | class VkExportMemoryAllocateInfoKHX { |
| 3803 | VkStructureType sType |
| 3804 | const void* pNext |
| 3805 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3806 | } |
| 3807 | |
| 3808 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3809 | class VkImportMemoryWin32HandleInfoKHX { |
| 3810 | VkStructureType sType |
| 3811 | const void* pNext |
| 3812 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3813 | platform.HANDLE handle |
| 3814 | } |
| 3815 | |
| 3816 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3817 | class VkExportMemoryWin32HandleInfoKHX { |
| 3818 | VkStructureType sType |
| 3819 | const void* pNext |
| 3820 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3821 | platform.DWORD dwAccess |
| 3822 | platform.LPCWSTR name |
| 3823 | } |
| 3824 | |
| 3825 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3826 | class VkMemoryWin32HandlePropertiesKHX { |
| 3827 | VkStructureType sType |
| 3828 | void* pNext |
| 3829 | u32 memoryTypeBits |
| 3830 | } |
| 3831 | |
| 3832 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3833 | class VkImportMemoryFdInfoKHX { |
| 3834 | VkStructureType sType |
| 3835 | const void* pNext |
| 3836 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3837 | int fd |
| 3838 | } |
| 3839 | |
| 3840 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3841 | class VkMemoryFdPropertiesKHX { |
| 3842 | VkStructureType sType |
| 3843 | void* pNext |
| 3844 | u32 memoryTypeBits |
| 3845 | } |
| 3846 | |
| 3847 | @extension("VK_KHX_win32_keyed_mutex") // 76 |
| 3848 | class VkWin32KeyedMutexAcquireReleaseInfoKHX { |
| 3849 | VkStructureType sType |
| 3850 | const void* pNext |
| 3851 | u32 acquireCount |
| 3852 | const VkDeviceMemory* pAcquireSyncs |
| 3853 | const u64* pAcquireKeys |
| 3854 | const u32* pAcquireTimeouts |
| 3855 | u32 releaseCount |
| 3856 | const VkDeviceMemory* pReleaseSyncs |
| 3857 | const u64* pReleaseKeys |
| 3858 | } |
| 3859 | |
| 3860 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3861 | class VkPhysicalDeviceExternalSemaphoreInfoKHX { |
| 3862 | VkStructureType sType |
| 3863 | const void* pNext |
| 3864 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3865 | } |
| 3866 | |
| 3867 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3868 | class VkExternalSemaphorePropertiesKHX { |
| 3869 | VkStructureType sType |
| 3870 | void* pNext |
| 3871 | VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3872 | VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes |
| 3873 | VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures |
| 3874 | } |
| 3875 | |
| 3876 | @extension("VK_KHX_external_semaphore") // 78 |
| 3877 | class VkExportSemaphoreCreateInfoKHX { |
| 3878 | VkStructureType sType |
| 3879 | const void* pNext |
| 3880 | VkExternalSemaphoreHandleTypeFlagsKHX handleTypes |
| 3881 | } |
| 3882 | |
| 3883 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3884 | class VkImportSemaphoreWin32HandleInfoKHX { |
| 3885 | VkStructureType sType |
| 3886 | const void* pNext |
| 3887 | VkSemaphore semaphore |
| 3888 | VkExternalSemaphoreHandleTypeFlagsKHX handleType |
| 3889 | platform.HANDLE handle |
| 3890 | } |
| 3891 | |
| 3892 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3893 | class VkExportSemaphoreWin32HandleInfoKHX { |
| 3894 | VkStructureType sType |
| 3895 | const void* pNext |
| 3896 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3897 | platform.DWORD dwAccess |
| 3898 | platform.LPCWSTR name |
| 3899 | } |
| 3900 | |
| 3901 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3902 | class VkD3D12FenceSubmitInfoKHX { |
| 3903 | VkStructureType sType |
| 3904 | const void* pNext |
| 3905 | u32 waitSemaphoreValuesCount |
| 3906 | const u64* pWaitSemaphoreValues |
| 3907 | u32 signalSemaphoreValuesCount |
| 3908 | const u64* pSignalSemaphoreValues |
| 3909 | } |
| 3910 | |
| 3911 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 3912 | class VkImportSemaphoreFdInfoKHX { |
| 3913 | VkStructureType sType |
| 3914 | const void* pNext |
| 3915 | VkSemaphore semaphore |
| 3916 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3917 | s32 fd |
| 3918 | } |
| 3919 | |
| 3920 | @extension("VK_KHR_push_descriptor") // 81 |
| 3921 | class VkPhysicalDevicePushDescriptorPropertiesKHR { |
| 3922 | VkStructureType sType |
| 3923 | void* pNext |
| 3924 | u32 maxPushDescriptors |
| 3925 | } |
| 3926 | |
| 3927 | @extension("VK_KHR_incremental_present") // 85 |
| 3928 | class VkRectLayerKHR { |
| 3929 | VkOffset2D offset |
| 3930 | VkExtent2D extent |
| 3931 | u32 layer |
| 3932 | } |
| 3933 | |
| 3934 | @extension("VK_KHR_incremental_present") // 85 |
| 3935 | class VkPresentRegionKHR { |
| 3936 | u32 rectangleCount |
| 3937 | const VkRectLayerKHR* pRectangles |
| 3938 | } |
| 3939 | |
| 3940 | @extension("VK_KHR_incremental_present") // 85 |
| 3941 | class VkPresentRegionsKHR { |
| 3942 | VkStructureType sType |
| 3943 | const void* pNext |
| 3944 | u32 swapchainCount |
| 3945 | const VkPresentRegionKHR* pRegions |
| 3946 | } |
| 3947 | |
| 3948 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3949 | class VkDescriptorUpdateTemplateEntryKHR { |
| 3950 | u32 dstBinding |
| 3951 | u32 dstArrayElement |
| 3952 | u32 descriptorCount |
| 3953 | VkDescriptorType descriptorType |
| 3954 | platform.size_t offset |
| 3955 | platform.size_t stride |
| 3956 | } |
| 3957 | |
| 3958 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3959 | class VkDescriptorUpdateTemplateCreateInfoKHR { |
| 3960 | VkStructureType sType |
| 3961 | void* pNext |
| 3962 | VkDescriptorUpdateTemplateCreateFlagsKHR flags |
| 3963 | u32 descriptorUpdateEntryCount |
| 3964 | const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries |
| 3965 | VkDescriptorUpdateTemplateTypeKHR templateType |
| 3966 | VkDescriptorSetLayout descriptorSetLayout |
| 3967 | VkPipelineBindPoint pipelineBindPoint |
| 3968 | VkPipelineLayout pipelineLayout |
| 3969 | u32 set |
| 3970 | } |
| 3971 | |
| 3972 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3973 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3974 | VkStructureType sType |
| 3975 | const void* pNext |
| 3976 | VkBool32 computeBindingPointSupport |
| 3977 | } |
| 3978 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3979 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3980 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 3981 | VkStructureType sType |
| 3982 | const void* pNext |
| 3983 | u32 maxIndirectCommandsLayoutTokenCount |
| 3984 | u32 maxObjectEntryCounts |
| 3985 | u32 minSequenceCountBufferOffsetAlignment |
| 3986 | u32 minSequenceIndexBufferOffsetAlignment |
| 3987 | u32 minCommandsTokenBufferOffsetAlignment |
| 3988 | } |
| 3989 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3990 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3991 | class VkIndirectCommandsTokenNVX { |
| 3992 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3993 | VkBuffer buffer |
| 3994 | VkDeviceSize offset |
| 3995 | } |
| 3996 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3997 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3998 | class VkIndirectCommandsLayoutTokenNVX { |
| 3999 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4000 | u32 bindingUnit |
| 4001 | u32 dynamicCount |
| 4002 | u32 divisor |
| 4003 | } |
| 4004 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4005 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4006 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 4007 | VkStructureType sType |
| 4008 | const void* pNext |
| 4009 | VkPipelineBindPoint pipelineBindPoint |
| 4010 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 4011 | u32 tokenCount |
| 4012 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 4013 | } |
| 4014 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4015 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4016 | class VkCmdProcessCommandsInfoNVX { |
| 4017 | VkStructureType sType |
| 4018 | const void* pNext |
| 4019 | VkObjectTableNVX objectTable |
| 4020 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4021 | u32 indirectCommandsTokenCount |
| 4022 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 4023 | u32 maxSequencesCount |
| 4024 | VkCommandBuffer targetCommandBuffer |
| 4025 | VkBuffer sequencesCountBuffer |
| 4026 | VkDeviceSize sequencesCountOffset |
| 4027 | VkBuffer sequencesIndexBuffer |
| 4028 | VkDeviceSize sequencesIndexOffset |
| 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 VkCmdReserveSpaceForCommandsInfoNVX { |
| 4033 | VkStructureType sType |
| 4034 | const void* pNext |
| 4035 | VkObjectTableNVX objectTable |
| 4036 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4037 | u32 maxSequencesCount |
| 4038 | } |
| 4039 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4040 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4041 | class VkObjectTableCreateInfoNVX { |
| 4042 | VkStructureType sType |
| 4043 | const void* pNext |
| 4044 | u32 objectCount |
| 4045 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 4046 | const u32* pObjectEntryCounts |
| 4047 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 4048 | u32 maxUniformBuffersPerDescriptor |
| 4049 | u32 maxStorageBuffersPerDescriptor |
| 4050 | u32 maxStorageImagesPerDescriptor |
| 4051 | u32 maxSampledImagesPerDescriptor |
| 4052 | u32 maxPipelineLayouts |
| 4053 | } |
| 4054 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4055 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4056 | class VkObjectTableEntryNVX { |
| 4057 | VkObjectEntryTypeNVX type |
| 4058 | VkObjectEntryUsageFlagsNVX flags |
| 4059 | } |
| 4060 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4061 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4062 | class VkObjectTablePipelineEntryNVX { |
| 4063 | VkObjectEntryTypeNVX type |
| 4064 | VkObjectEntryUsageFlagsNVX flags |
| 4065 | VkPipeline pipeline |
| 4066 | } |
| 4067 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4068 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4069 | class VkObjectTableDescriptorSetEntryNVX { |
| 4070 | VkObjectEntryTypeNVX type |
| 4071 | VkObjectEntryUsageFlagsNVX flags |
| 4072 | VkPipelineLayout pipelineLayout |
| 4073 | VkDescriptorSet descriptorSet |
| 4074 | } |
| 4075 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4076 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4077 | class VkObjectTableVertexBufferEntryNVX { |
| 4078 | VkObjectEntryTypeNVX type |
| 4079 | VkObjectEntryUsageFlagsNVX flags |
| 4080 | VkBuffer buffer |
| 4081 | } |
| 4082 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4083 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4084 | class VkObjectTableIndexBufferEntryNVX { |
| 4085 | VkObjectEntryTypeNVX type |
| 4086 | VkObjectEntryUsageFlagsNVX flags |
| 4087 | VkBuffer buffer |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4088 | VkIndexType indexType |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4089 | } |
| 4090 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4091 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4092 | class VkObjectTablePushConstantEntryNVX { |
| 4093 | VkObjectEntryTypeNVX type |
| 4094 | VkObjectEntryUsageFlagsNVX flags |
| 4095 | VkPipelineLayout pipelineLayout |
| 4096 | VkShaderStageFlags stageFlags |
| 4097 | } |
| 4098 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4099 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4100 | class VkViewportWScalingNV { |
| 4101 | f32 xcoeff |
| 4102 | f32 ycoeff |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4103 | } |
| 4104 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4105 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4106 | class VkPipelineViewportWScalingStateCreateInfoNV { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4107 | VkStructureType sType |
| 4108 | const void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4109 | VkBool32 viewportWScalingEnable |
| 4110 | u32 viewportCount |
| 4111 | const VkViewportWScalingNV* pViewportWScalings |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4112 | } |
| 4113 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4114 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4115 | class VkSurfaceCapabilities2EXT { |
| 4116 | VkStructureType sType |
| 4117 | void* pNext |
| 4118 | u32 minImageCount |
| 4119 | u32 maxImageCount |
| 4120 | VkExtent2D currentExtent |
| 4121 | VkExtent2D minImageExtent |
| 4122 | VkExtent2D maxImageExtent |
| 4123 | u32 maxImageArrayLayers |
| 4124 | VkSurfaceTransformFlagsKHR supportedTransforms |
| 4125 | VkSurfaceTransformFlagBitsKHR currentTransform |
| 4126 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
| 4127 | VkImageUsageFlags supportedUsageFlags |
| 4128 | VkSurfaceCounterFlagsEXT supportedSurfaceCounters |
| 4129 | } |
| 4130 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4131 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4132 | class VkDisplayPowerInfoEXT { |
| 4133 | VkStructureType sType |
| 4134 | const void* pNext |
| 4135 | VkDisplayPowerStateEXT powerState |
| 4136 | } |
| 4137 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4138 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4139 | class VkDeviceEventInfoEXT { |
| 4140 | VkStructureType sType |
| 4141 | const void* pNext |
| 4142 | VkDeviceEventTypeEXT deviceEvent |
| 4143 | } |
| 4144 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4145 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4146 | class VkDisplayEventInfoEXT { |
| 4147 | VkStructureType sType |
| 4148 | const void* pNext |
| 4149 | VkDisplayEventTypeEXT displayEvent |
| 4150 | } |
| 4151 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4152 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4153 | class VkSwapchainCounterCreateInfoEXT { |
| 4154 | VkStructureType sType |
| 4155 | const void* pNext |
| 4156 | VkSurfaceCounterFlagsEXT surfaceCounters |
| 4157 | } |
| 4158 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4159 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4160 | class VkRefreshCycleDurationGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4161 | u64 refreshDuration |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4162 | } |
| 4163 | |
| 4164 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4165 | class VkPastPresentationTimingGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4166 | u32 presentID |
| 4167 | u64 desiredPresentTime |
| 4168 | u64 actualPresentTime |
| 4169 | u64 earliestPresentTime |
| 4170 | u64 presentMargin |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4171 | } |
| 4172 | |
| 4173 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4174 | class VkPresentTimeGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4175 | u32 presentID |
| 4176 | u64 desiredPresentTime |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4177 | } |
| 4178 | |
| 4179 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4180 | class VkPresentTimesInfoGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4181 | VkStructureType sType |
| 4182 | const void* pNext |
| 4183 | u32 swapchainCount |
| 4184 | const VkPresentTimeGOOGLE* pTimes |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4185 | } |
| 4186 | |
| 4187 | @extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 4188 | class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { |
| 4189 | VkStructureType sType |
| 4190 | void* pNext |
| 4191 | VkBool32 perViewPositionAllComponents |
| 4192 | } |
| 4193 | |
| 4194 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4195 | class VkViewportSwizzleNV { |
| 4196 | VkViewportCoordinateSwizzleNV x |
| 4197 | VkViewportCoordinateSwizzleNV y |
| 4198 | VkViewportCoordinateSwizzleNV z |
| 4199 | VkViewportCoordinateSwizzleNV w |
| 4200 | } |
| 4201 | |
| 4202 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4203 | class VkPipelineViewportSwizzleStateCreateInfoNV { |
| 4204 | VkStructureType sType |
| 4205 | const void* pNext |
| 4206 | VkPipelineViewportSwizzleStateCreateFlagsNV flags |
| 4207 | u32 viewportCount |
| 4208 | const VkViewportSwizzleNV* pViewportSwizzles |
| 4209 | } |
| 4210 | |
| 4211 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4212 | class VkPhysicalDeviceDiscardRectanglePropertiesEXT { |
| 4213 | VkStructureType sType |
| 4214 | const void* pNext |
| 4215 | u32 maxDiscardRectangles |
| 4216 | } |
| 4217 | |
| 4218 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4219 | class VkPipelineDiscardRectangleStateCreateInfoEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4220 | VkStructureType sType |
| 4221 | const void* pNext |
| 4222 | VkPipelineDiscardRectangleStateCreateFlagsEXT flags |
| 4223 | VkDiscardRectangleModeEXT discardRectangleMode |
| 4224 | u32 discardRectangleCount |
| 4225 | const VkRect2D* pDiscardRectangles |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4226 | } |
| 4227 | |
| 4228 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4229 | class VkXYColorEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4230 | f32 x |
| 4231 | f32 y |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4232 | } |
| 4233 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4234 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4235 | class VkHdrMetadataEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 4236 | VkStructureType sType |
| 4237 | const void* pNext |
| 4238 | VkXYColorEXT displayPrimaryRed |
| 4239 | VkXYColorEXT displayPrimaryGreen |
| 4240 | VkXYColorEXT displayPrimaryBlue |
| 4241 | VkXYColorEXT whitePoint |
| 4242 | f32 maxLuminance |
| 4243 | f32 minLuminance |
| 4244 | f32 maxContentLightLevel |
| 4245 | f32 maxFrameAverageLightLevel |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4246 | } |
| 4247 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4248 | @extension("VK_MVK_ios_surface") // 123 |
| 4249 | class VkIOSSurfaceCreateInfoMVK { |
| 4250 | VkStructureType sType |
| 4251 | const void* pNext |
| 4252 | VkIOSSurfaceCreateFlagsMVK flags |
| 4253 | const void* pView |
| 4254 | } |
| 4255 | |
| 4256 | @extension("VK_MVK_macos_surface") // 124 |
| 4257 | class VkMacOSSurfaceCreateInfoMVK { |
| 4258 | VkStructureType sType |
| 4259 | const void* pNext |
| 4260 | VkMacOSSurfaceCreateFlagsMVK flags |
| 4261 | const void* pView |
| 4262 | } |
| 4263 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4264 | //////////////// |
| 4265 | // Commands // |
| 4266 | //////////////// |
| 4267 | |
| 4268 | // Function pointers. TODO: add support for function pointers. |
| 4269 | |
| 4270 | @external type void* PFN_vkVoidFunction |
| 4271 | @pfn cmd void vkVoidFunction() { |
| 4272 | } |
| 4273 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4274 | @external type void* PFN_vkAllocationFunction |
| 4275 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4276 | void* pUserData, |
| 4277 | platform.size_t size, |
| 4278 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4279 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4280 | return ? |
| 4281 | } |
| 4282 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4283 | @external type void* PFN_vkReallocationFunction |
| 4284 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4285 | void* pUserData, |
| 4286 | void* pOriginal, |
| 4287 | platform.size_t size, |
| 4288 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4289 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4290 | return ? |
| 4291 | } |
| 4292 | |
| 4293 | @external type void* PFN_vkFreeFunction |
| 4294 | @pfn cmd void vkFreeFunction( |
| 4295 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4296 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4297 | } |
| 4298 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4299 | @external type void* PFN_vkInternalAllocationNotification |
| 4300 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4301 | void* pUserData, |
| 4302 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4303 | VkInternalAllocationType allocationType, |
| 4304 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4305 | } |
| 4306 | |
| 4307 | @external type void* PFN_vkInternalFreeNotification |
| 4308 | @pfn cmd void vkInternalFreeNotification( |
| 4309 | void* pUserData, |
| 4310 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4311 | VkInternalAllocationType allocationType, |
| 4312 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4313 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4314 | |
| 4315 | // Global functions |
| 4316 | |
| 4317 | @threadSafety("system") |
| 4318 | cmd VkResult vkCreateInstance( |
| 4319 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4320 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4321 | VkInstance* pInstance) { |
| 4322 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 4323 | |
| 4324 | instance := ? |
| 4325 | pInstance[0] = instance |
| 4326 | State.Instances[instance] = new!InstanceObject() |
| 4327 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4328 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 4329 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4330 | |
| 4331 | return ? |
| 4332 | } |
| 4333 | |
| 4334 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4335 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4336 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4337 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4338 | instanceObject := GetInstance(instance) |
| 4339 | |
| 4340 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4341 | } |
| 4342 | |
| 4343 | @threadSafety("system") |
| 4344 | cmd VkResult vkEnumeratePhysicalDevices( |
| 4345 | VkInstance instance, |
| 4346 | u32* pPhysicalDeviceCount, |
| 4347 | VkPhysicalDevice* pPhysicalDevices) { |
| 4348 | instanceObject := GetInstance(instance) |
| 4349 | |
| 4350 | physicalDeviceCount := as!u32(?) |
| 4351 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 4352 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 4353 | |
| 4354 | for i in (0 .. physicalDeviceCount) { |
| 4355 | physicalDevice := ? |
| 4356 | physicalDevices[i] = physicalDevice |
| 4357 | if !(physicalDevice in State.PhysicalDevices) { |
| 4358 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 4359 | } |
| 4360 | } |
| 4361 | |
| 4362 | return ? |
| 4363 | } |
| 4364 | |
| 4365 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 4366 | VkDevice device, |
| 4367 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4368 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4369 | device := GetDevice(device) |
| 4370 | } |
| 4371 | |
| 4372 | return ? |
| 4373 | } |
| 4374 | |
| 4375 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 4376 | VkInstance instance, |
| 4377 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4378 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4379 | instanceObject := GetInstance(instance) |
| 4380 | } |
| 4381 | |
| 4382 | return ? |
| 4383 | } |
| 4384 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4385 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4386 | VkPhysicalDevice physicalDevice, |
| 4387 | VkPhysicalDeviceProperties* pProperties) { |
| 4388 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4389 | |
| 4390 | properties := ? |
| 4391 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4392 | } |
| 4393 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4394 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4395 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4396 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4397 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4398 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4399 | // TODO: Figure out how to express fetch-count-or-properties |
| 4400 | // This version fails 'apic validate' with 'fence not allowed in |
| 4401 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 4402 | // errors. |
| 4403 | // if pQueueFamilyProperties != null { |
| 4404 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 4405 | // for i in (0 .. pCount[0]) { |
| 4406 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 4407 | // queuesProperties[i] = queueProperties |
| 4408 | // } |
| 4409 | // } else { |
| 4410 | // count := ? |
| 4411 | // pCount[0] = count |
| 4412 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4413 | } |
| 4414 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4415 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4416 | VkPhysicalDevice physicalDevice, |
| 4417 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 4418 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4419 | |
| 4420 | memoryProperties := ? |
| 4421 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4422 | } |
| 4423 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4424 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4425 | VkPhysicalDevice physicalDevice, |
| 4426 | VkPhysicalDeviceFeatures* pFeatures) { |
| 4427 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4428 | |
| 4429 | features := ? |
| 4430 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4431 | } |
| 4432 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4433 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4434 | VkPhysicalDevice physicalDevice, |
| 4435 | VkFormat format, |
| 4436 | VkFormatProperties* pFormatProperties) { |
| 4437 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4438 | |
| 4439 | formatProperties := ? |
| 4440 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4441 | } |
| 4442 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4443 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4444 | VkPhysicalDevice physicalDevice, |
| 4445 | VkFormat format, |
| 4446 | VkImageType type, |
| 4447 | VkImageTiling tiling, |
| 4448 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4449 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4450 | VkImageFormatProperties* pImageFormatProperties) { |
| 4451 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4452 | |
| 4453 | imageFormatProperties := ? |
| 4454 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4455 | |
| 4456 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4457 | } |
| 4458 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4459 | |
| 4460 | // Device functions |
| 4461 | |
| 4462 | @threadSafety("system") |
| 4463 | cmd VkResult vkCreateDevice( |
| 4464 | VkPhysicalDevice physicalDevice, |
| 4465 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4466 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4467 | VkDevice* pDevice) { |
| 4468 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 4469 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4470 | |
| 4471 | device := ? |
| 4472 | pDevice[0] = device |
| 4473 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 4474 | |
| 4475 | return ? |
| 4476 | } |
| 4477 | |
| 4478 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4479 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4480 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4481 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4482 | deviceObject := GetDevice(device) |
| 4483 | |
| 4484 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4485 | } |
| 4486 | |
| 4487 | |
| 4488 | // Extension discovery functions |
| 4489 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4490 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4491 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4492 | VkLayerProperties* pProperties) { |
| 4493 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4494 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4495 | |
| 4496 | properties := pProperties[0:count] |
| 4497 | for i in (0 .. count) { |
| 4498 | property := ? |
| 4499 | properties[i] = property |
| 4500 | } |
| 4501 | |
| 4502 | return ? |
| 4503 | } |
| 4504 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4505 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4506 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4507 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4508 | VkExtensionProperties* pProperties) { |
| 4509 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4510 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4511 | |
| 4512 | properties := pProperties[0:count] |
| 4513 | for i in (0 .. count) { |
| 4514 | property := ? |
| 4515 | properties[i] = property |
| 4516 | } |
| 4517 | |
| 4518 | return ? |
| 4519 | } |
| 4520 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4521 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4522 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4523 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4524 | VkLayerProperties* pProperties) { |
| 4525 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4526 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4527 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4528 | |
| 4529 | properties := pProperties[0:count] |
| 4530 | for i in (0 .. count) { |
| 4531 | property := ? |
| 4532 | properties[i] = property |
| 4533 | } |
| 4534 | |
| 4535 | return ? |
| 4536 | } |
| 4537 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4538 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4539 | VkPhysicalDevice physicalDevice, |
| 4540 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4541 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4542 | VkExtensionProperties* pProperties) { |
| 4543 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4544 | |
| 4545 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4546 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4547 | |
| 4548 | properties := pProperties[0:count] |
| 4549 | for i in (0 .. count) { |
| 4550 | property := ? |
| 4551 | properties[i] = property |
| 4552 | } |
| 4553 | |
| 4554 | return ? |
| 4555 | } |
| 4556 | |
| 4557 | |
| 4558 | // Queue functions |
| 4559 | |
| 4560 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4561 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4562 | VkDevice device, |
| 4563 | u32 queueFamilyIndex, |
| 4564 | u32 queueIndex, |
| 4565 | VkQueue* pQueue) { |
| 4566 | deviceObject := GetDevice(device) |
| 4567 | |
| 4568 | queue := ? |
| 4569 | pQueue[0] = queue |
| 4570 | |
| 4571 | if !(queue in State.Queues) { |
| 4572 | State.Queues[queue] = new!QueueObject(device: device) |
| 4573 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4574 | } |
| 4575 | |
| 4576 | @threadSafety("app") |
| 4577 | cmd VkResult vkQueueSubmit( |
| 4578 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4579 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4580 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4581 | VkFence fence) { |
| 4582 | queueObject := GetQueue(queue) |
| 4583 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4584 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4585 | fenceObject := GetFence(fence) |
| 4586 | assert(fenceObject.device == queueObject.device) |
| 4587 | } |
| 4588 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4589 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 4590 | // for i in (0 .. commandBufferCount) { |
| 4591 | // commandBuffer := commandBuffers[i] |
| 4592 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4593 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4594 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4595 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 4596 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4597 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4598 | |
| 4599 | return ? |
| 4600 | } |
| 4601 | |
| 4602 | @threadSafety("system") |
| 4603 | cmd VkResult vkQueueWaitIdle( |
| 4604 | VkQueue queue) { |
| 4605 | queueObject := GetQueue(queue) |
| 4606 | |
| 4607 | return ? |
| 4608 | } |
| 4609 | |
| 4610 | @threadSafety("system") |
| 4611 | cmd VkResult vkDeviceWaitIdle( |
| 4612 | VkDevice device) { |
| 4613 | deviceObject := GetDevice(device) |
| 4614 | |
| 4615 | return ? |
| 4616 | } |
| 4617 | |
| 4618 | |
| 4619 | // Memory functions |
| 4620 | |
| 4621 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4622 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4623 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4624 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 4625 | const VkAllocationCallbacks* pAllocator, |
| 4626 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4627 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4628 | deviceObject := GetDevice(device) |
| 4629 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4630 | memory := ? |
| 4631 | pMemory[0] = memory |
| 4632 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4633 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4634 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4635 | |
| 4636 | return ? |
| 4637 | } |
| 4638 | |
| 4639 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4640 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4641 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4642 | VkDeviceMemory memory, |
| 4643 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4644 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4645 | memoryObject := GetDeviceMemory(memory) |
| 4646 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4647 | |
| 4648 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4649 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4650 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4651 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 4652 | "vkFreeMemory: commandBuffers still bound") |
| 4653 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4654 | } |
| 4655 | |
| 4656 | @threadSafety("app") |
| 4657 | cmd VkResult vkMapMemory( |
| 4658 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4659 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4660 | VkDeviceSize offset, |
| 4661 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4662 | VkMemoryMapFlags flags, |
| 4663 | void** ppData) { |
| 4664 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4665 | memoryObject := GetDeviceMemory(memory) |
| 4666 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4667 | |
| 4668 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4669 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4670 | |
| 4671 | return ? |
| 4672 | } |
| 4673 | |
| 4674 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4675 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4676 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4677 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4678 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4679 | memoryObject := GetDeviceMemory(memory) |
| 4680 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4681 | } |
| 4682 | |
| 4683 | cmd VkResult vkFlushMappedMemoryRanges( |
| 4684 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4685 | u32 memoryRangeCount |
| 4686 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4687 | deviceObject := GetDevice(device) |
| 4688 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4689 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4690 | for i in (0 .. memoryRangeCount) { |
| 4691 | memoryRange := memoryRanges[i] |
| 4692 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4693 | assert(memoryObject.device == device) |
| 4694 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4695 | } |
| 4696 | |
| 4697 | return ? |
| 4698 | } |
| 4699 | |
| 4700 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 4701 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4702 | u32 memoryRangeCount, |
| 4703 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4704 | deviceObject := GetDevice(device) |
| 4705 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4706 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4707 | for i in (0 .. memoryRangeCount) { |
| 4708 | memoryRange := memoryRanges[i] |
| 4709 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4710 | assert(memoryObject.device == device) |
| 4711 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4712 | } |
| 4713 | |
| 4714 | return ? |
| 4715 | } |
| 4716 | |
| 4717 | |
| 4718 | // Memory management API functions |
| 4719 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4720 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4721 | VkDevice device, |
| 4722 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4723 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4724 | deviceObject := GetDevice(device) |
| 4725 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4726 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4727 | memoryObject := GetDeviceMemory(memory) |
| 4728 | assert(memoryObject.device == device) |
| 4729 | } |
| 4730 | |
| 4731 | committedMemoryInBytes := ? |
| 4732 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4733 | } |
| 4734 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4735 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4736 | VkDevice device, |
| 4737 | VkBuffer buffer, |
| 4738 | VkMemoryRequirements* pMemoryRequirements) { |
| 4739 | deviceObject := GetDevice(device) |
| 4740 | bufferObject := GetBuffer(buffer) |
| 4741 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4742 | } |
| 4743 | |
| 4744 | cmd VkResult vkBindBufferMemory( |
| 4745 | VkDevice device, |
| 4746 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4747 | VkDeviceMemory memory, |
| 4748 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4749 | deviceObject := GetDevice(device) |
| 4750 | bufferObject := GetBuffer(buffer) |
| 4751 | assert(bufferObject.device == device) |
| 4752 | |
| 4753 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4754 | if bufferObject.memory != NULL_HANDLE { |
| 4755 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 4756 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4757 | } |
| 4758 | |
| 4759 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4760 | if memory != NULL_HANDLE { |
| 4761 | memoryObject := GetDeviceMemory(memory) |
| 4762 | assert(memoryObject.device == device) |
| 4763 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4764 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4765 | bufferObject.memory = memory |
| 4766 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4767 | |
| 4768 | return ? |
| 4769 | } |
| 4770 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4771 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4772 | VkDevice device, |
| 4773 | VkImage image, |
| 4774 | VkMemoryRequirements* pMemoryRequirements) { |
| 4775 | deviceObject := GetDevice(device) |
| 4776 | imageObject := GetImage(image) |
| 4777 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4778 | } |
| 4779 | |
| 4780 | cmd VkResult vkBindImageMemory( |
| 4781 | VkDevice device, |
| 4782 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4783 | VkDeviceMemory memory, |
| 4784 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 | deviceObject := GetDevice(device) |
| 4786 | imageObject := GetImage(image) |
| 4787 | assert(imageObject.device == device) |
| 4788 | |
| 4789 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4790 | if imageObject.memory != NULL_HANDLE { |
| 4791 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 4792 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4793 | } |
| 4794 | |
| 4795 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4796 | if memory != NULL_HANDLE { |
| 4797 | memoryObject := GetDeviceMemory(memory) |
| 4798 | assert(memoryObject.device == device) |
| 4799 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4800 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4801 | imageObject.memory = memory |
| 4802 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4803 | |
| 4804 | return ? |
| 4805 | } |
| 4806 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4807 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4808 | VkDevice device, |
| 4809 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4810 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4811 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 4812 | deviceObject := GetDevice(device) |
| 4813 | imageObject := GetImage(image) |
| 4814 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4815 | } |
| 4816 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4817 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4818 | VkPhysicalDevice physicalDevice, |
| 4819 | VkFormat format, |
| 4820 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 4821 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4822 | VkImageUsageFlags usage, |
| 4823 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4824 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4825 | VkSparseImageFormatProperties* pProperties) { |
| 4826 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4827 | } |
| 4828 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4829 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4830 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4831 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4832 | const VkBindSparseInfo* pBindInfo, |
| 4833 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4834 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4835 | |
| 4836 | return ? |
| 4837 | } |
| 4838 | |
| 4839 | |
| 4840 | // Fence functions |
| 4841 | |
| 4842 | @threadSafety("system") |
| 4843 | cmd VkResult vkCreateFence( |
| 4844 | VkDevice device, |
| 4845 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4846 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4847 | VkFence* pFence) { |
| 4848 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 4849 | deviceObject := GetDevice(device) |
| 4850 | |
| 4851 | fence := ? |
| 4852 | pFence[0] = fence |
| 4853 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4854 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4855 | |
| 4856 | return ? |
| 4857 | } |
| 4858 | |
| 4859 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4860 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4861 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4862 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4863 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4864 | deviceObject := GetDevice(device) |
| 4865 | fenceObject := GetFence(fence) |
| 4866 | assert(fenceObject.device == device) |
| 4867 | |
| 4868 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4869 | } |
| 4870 | |
| 4871 | @threadSafety("system") |
| 4872 | cmd VkResult vkResetFences( |
| 4873 | VkDevice device, |
| 4874 | u32 fenceCount, |
| 4875 | const VkFence* pFences) { |
| 4876 | deviceObject := GetDevice(device) |
| 4877 | |
| 4878 | fences := pFences[0:fenceCount] |
| 4879 | for i in (0 .. fenceCount) { |
| 4880 | fence := fences[i] |
| 4881 | fenceObject := GetFence(fence) |
| 4882 | assert(fenceObject.device == device) |
| 4883 | fenceObject.signaled = false |
| 4884 | } |
| 4885 | |
| 4886 | return ? |
| 4887 | } |
| 4888 | |
| 4889 | @threadSafety("system") |
| 4890 | cmd VkResult vkGetFenceStatus( |
| 4891 | VkDevice device, |
| 4892 | VkFence fence) { |
| 4893 | deviceObject := GetDevice(device) |
| 4894 | fenceObject := GetFence(fence) |
| 4895 | assert(fenceObject.device == device) |
| 4896 | |
| 4897 | return ? |
| 4898 | } |
| 4899 | |
| 4900 | @threadSafety("system") |
| 4901 | cmd VkResult vkWaitForFences( |
| 4902 | VkDevice device, |
| 4903 | u32 fenceCount, |
| 4904 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4905 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4906 | u64 timeout) { /// timeout in nanoseconds |
| 4907 | deviceObject := GetDevice(device) |
| 4908 | |
| 4909 | fences := pFences[0:fenceCount] |
| 4910 | for i in (0 .. fenceCount) { |
| 4911 | fence := fences[i] |
| 4912 | fenceObject := GetFence(fence) |
| 4913 | assert(fenceObject.device == device) |
| 4914 | } |
| 4915 | |
| 4916 | return ? |
| 4917 | } |
| 4918 | |
| 4919 | |
| 4920 | // Queue semaphore functions |
| 4921 | |
| 4922 | @threadSafety("system") |
| 4923 | cmd VkResult vkCreateSemaphore( |
| 4924 | VkDevice device, |
| 4925 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4926 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4927 | VkSemaphore* pSemaphore) { |
| 4928 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 4929 | deviceObject := GetDevice(device) |
| 4930 | |
| 4931 | semaphore := ? |
| 4932 | pSemaphore[0] = semaphore |
| 4933 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 4934 | |
| 4935 | return ? |
| 4936 | } |
| 4937 | |
| 4938 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4939 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4940 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4941 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4942 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4943 | deviceObject := GetDevice(device) |
| 4944 | semaphoreObject := GetSemaphore(semaphore) |
| 4945 | assert(semaphoreObject.device == device) |
| 4946 | |
| 4947 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4948 | } |
| 4949 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4950 | |
| 4951 | // Event functions |
| 4952 | |
| 4953 | @threadSafety("system") |
| 4954 | cmd VkResult vkCreateEvent( |
| 4955 | VkDevice device, |
| 4956 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4957 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4958 | VkEvent* pEvent) { |
| 4959 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 4960 | deviceObject := GetDevice(device) |
| 4961 | |
| 4962 | event := ? |
| 4963 | pEvent[0] = event |
| 4964 | State.Events[event] = new!EventObject(device: device) |
| 4965 | |
| 4966 | return ? |
| 4967 | } |
| 4968 | |
| 4969 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4970 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4972 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4973 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4974 | deviceObject := GetDevice(device) |
| 4975 | eventObject := GetEvent(event) |
| 4976 | assert(eventObject.device == device) |
| 4977 | |
| 4978 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4979 | } |
| 4980 | |
| 4981 | @threadSafety("system") |
| 4982 | cmd VkResult vkGetEventStatus( |
| 4983 | VkDevice device, |
| 4984 | VkEvent event) { |
| 4985 | deviceObject := GetDevice(device) |
| 4986 | eventObject := GetEvent(event) |
| 4987 | assert(eventObject.device == device) |
| 4988 | |
| 4989 | return ? |
| 4990 | } |
| 4991 | |
| 4992 | @threadSafety("system") |
| 4993 | cmd VkResult vkSetEvent( |
| 4994 | VkDevice device, |
| 4995 | VkEvent event) { |
| 4996 | deviceObject := GetDevice(device) |
| 4997 | eventObject := GetEvent(event) |
| 4998 | assert(eventObject.device == device) |
| 4999 | |
| 5000 | return ? |
| 5001 | } |
| 5002 | |
| 5003 | @threadSafety("system") |
| 5004 | cmd VkResult vkResetEvent( |
| 5005 | VkDevice device, |
| 5006 | VkEvent event) { |
| 5007 | deviceObject := GetDevice(device) |
| 5008 | eventObject := GetEvent(event) |
| 5009 | assert(eventObject.device == device) |
| 5010 | |
| 5011 | return ? |
| 5012 | } |
| 5013 | |
| 5014 | |
| 5015 | // Query functions |
| 5016 | |
| 5017 | @threadSafety("system") |
| 5018 | cmd VkResult vkCreateQueryPool( |
| 5019 | VkDevice device, |
| 5020 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5021 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5022 | VkQueryPool* pQueryPool) { |
| 5023 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 5024 | deviceObject := GetDevice(device) |
| 5025 | |
| 5026 | queryPool := ? |
| 5027 | pQueryPool[0] = queryPool |
| 5028 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 5029 | |
| 5030 | return ? |
| 5031 | } |
| 5032 | |
| 5033 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5034 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5035 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5036 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5037 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5038 | deviceObject := GetDevice(device) |
| 5039 | queryPoolObject := GetQueryPool(queryPool) |
| 5040 | assert(queryPoolObject.device == device) |
| 5041 | |
| 5042 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5043 | } |
| 5044 | |
| 5045 | @threadSafety("system") |
| 5046 | cmd VkResult vkGetQueryPoolResults( |
| 5047 | VkDevice device, |
| 5048 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5049 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5050 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5051 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5052 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5053 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5054 | VkQueryResultFlags flags) { |
| 5055 | deviceObject := GetDevice(device) |
| 5056 | queryPoolObject := GetQueryPool(queryPool) |
| 5057 | assert(queryPoolObject.device == device) |
| 5058 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5059 | data := pData[0:dataSize] |
| 5060 | |
| 5061 | return ? |
| 5062 | } |
| 5063 | |
| 5064 | // Buffer functions |
| 5065 | |
| 5066 | @threadSafety("system") |
| 5067 | cmd VkResult vkCreateBuffer( |
| 5068 | VkDevice device, |
| 5069 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5070 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5071 | VkBuffer* pBuffer) { |
| 5072 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 5073 | deviceObject := GetDevice(device) |
| 5074 | |
| 5075 | buffer := ? |
| 5076 | pBuffer[0] = buffer |
| 5077 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 5078 | |
| 5079 | return ? |
| 5080 | } |
| 5081 | |
| 5082 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5083 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5084 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5085 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5086 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5087 | deviceObject := GetDevice(device) |
| 5088 | bufferObject := GetBuffer(buffer) |
| 5089 | assert(bufferObject.device == device) |
| 5090 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5091 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5092 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5093 | } |
| 5094 | |
| 5095 | |
| 5096 | // Buffer view functions |
| 5097 | |
| 5098 | @threadSafety("system") |
| 5099 | cmd VkResult vkCreateBufferView( |
| 5100 | VkDevice device, |
| 5101 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5102 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5103 | VkBufferView* pView) { |
| 5104 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 5105 | deviceObject := GetDevice(device) |
| 5106 | |
| 5107 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 5108 | assert(bufferObject.device == device) |
| 5109 | |
| 5110 | view := ? |
| 5111 | pView[0] = view |
| 5112 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 5113 | |
| 5114 | return ? |
| 5115 | } |
| 5116 | |
| 5117 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5118 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5119 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5120 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5121 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5122 | deviceObject := GetDevice(device) |
| 5123 | bufferViewObject := GetBufferView(bufferView) |
| 5124 | assert(bufferViewObject.device == device) |
| 5125 | |
| 5126 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5127 | } |
| 5128 | |
| 5129 | |
| 5130 | // Image functions |
| 5131 | |
| 5132 | @threadSafety("system") |
| 5133 | cmd VkResult vkCreateImage( |
| 5134 | VkDevice device, |
| 5135 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5136 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5137 | VkImage* pImage) { |
| 5138 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 5139 | deviceObject := GetDevice(device) |
| 5140 | |
| 5141 | image := ? |
| 5142 | pImage[0] = image |
| 5143 | State.Images[image] = new!ImageObject(device: device) |
| 5144 | |
| 5145 | return ? |
| 5146 | } |
| 5147 | |
| 5148 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5149 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5150 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5151 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5152 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5153 | deviceObject := GetDevice(device) |
| 5154 | imageObject := GetImage(image) |
| 5155 | assert(imageObject.device == device) |
| 5156 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5157 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5158 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5159 | } |
| 5160 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5161 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5162 | VkDevice device, |
| 5163 | VkImage image, |
| 5164 | const VkImageSubresource* pSubresource, |
| 5165 | VkSubresourceLayout* pLayout) { |
| 5166 | deviceObject := GetDevice(device) |
| 5167 | imageObject := GetImage(image) |
| 5168 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5169 | } |
| 5170 | |
| 5171 | |
| 5172 | // Image view functions |
| 5173 | |
| 5174 | @threadSafety("system") |
| 5175 | cmd VkResult vkCreateImageView( |
| 5176 | VkDevice device, |
| 5177 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5178 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5179 | VkImageView* pView) { |
| 5180 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 5181 | deviceObject := GetDevice(device) |
| 5182 | |
| 5183 | imageObject := GetImage(pCreateInfo.image) |
| 5184 | assert(imageObject.device == device) |
| 5185 | |
| 5186 | view := ? |
| 5187 | pView[0] = view |
| 5188 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 5189 | |
| 5190 | return ? |
| 5191 | } |
| 5192 | |
| 5193 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5194 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5195 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5196 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5197 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5198 | deviceObject := GetDevice(device) |
| 5199 | imageViewObject := GetImageView(imageView) |
| 5200 | assert(imageViewObject.device == device) |
| 5201 | |
| 5202 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5203 | } |
| 5204 | |
| 5205 | |
| 5206 | // Shader functions |
| 5207 | |
| 5208 | cmd VkResult vkCreateShaderModule( |
| 5209 | VkDevice device, |
| 5210 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5211 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5212 | VkShaderModule* pShaderModule) { |
| 5213 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 5214 | deviceObject := GetDevice(device) |
| 5215 | |
| 5216 | shaderModule := ? |
| 5217 | pShaderModule[0] = shaderModule |
| 5218 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 5219 | |
| 5220 | return ? |
| 5221 | } |
| 5222 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5223 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5224 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5225 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5226 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5227 | deviceObject := GetDevice(device) |
| 5228 | shaderModuleObject := GetShaderModule(shaderModule) |
| 5229 | assert(shaderModuleObject.device == device) |
| 5230 | |
| 5231 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5232 | } |
| 5233 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5234 | |
| 5235 | // Pipeline functions |
| 5236 | |
| 5237 | cmd VkResult vkCreatePipelineCache( |
| 5238 | VkDevice device, |
| 5239 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5240 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5241 | VkPipelineCache* pPipelineCache) { |
| 5242 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 5243 | deviceObject := GetDevice(device) |
| 5244 | |
| 5245 | pipelineCache := ? |
| 5246 | pPipelineCache[0] = pipelineCache |
| 5247 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 5248 | |
| 5249 | return ? |
| 5250 | } |
| 5251 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5252 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5253 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5254 | VkPipelineCache pipelineCache, |
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 | deviceObject := GetDevice(device) |
| 5257 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5258 | assert(pipelineCacheObject.device == device) |
| 5259 | |
| 5260 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5261 | } |
| 5262 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5263 | cmd VkResult vkGetPipelineCacheData( |
| 5264 | VkDevice device, |
| 5265 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5266 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5267 | void* pData) { |
| 5268 | deviceObject := GetDevice(device) |
| 5269 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5270 | assert(pipelineCacheObject.device == device) |
| 5271 | |
| 5272 | return ? |
| 5273 | } |
| 5274 | |
| 5275 | cmd VkResult vkMergePipelineCaches( |
| 5276 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5277 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5278 | u32 srcCacheCount, |
| 5279 | const VkPipelineCache* pSrcCaches) { |
| 5280 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5281 | dstCacheObject := GetPipelineCache(dstCache) |
| 5282 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5283 | |
| 5284 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 5285 | for i in (0 .. srcCacheCount) { |
| 5286 | srcCache := srcCaches[i] |
| 5287 | srcCacheObject := GetPipelineCache(srcCache) |
| 5288 | assert(srcCacheObject.device == device) |
| 5289 | } |
| 5290 | |
| 5291 | return ? |
| 5292 | } |
| 5293 | |
| 5294 | cmd VkResult vkCreateGraphicsPipelines( |
| 5295 | VkDevice device, |
| 5296 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5297 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5298 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
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 | VkPipeline* pPipelines) { |
| 5301 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5302 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5303 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5304 | assert(pipelineCacheObject.device == device) |
| 5305 | } |
| 5306 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5307 | createInfos := pCreateInfos[0:createInfoCount] |
| 5308 | pipelines := pPipelines[0:createInfoCount] |
| 5309 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5310 | pipeline := ? |
| 5311 | pipelines[i] = pipeline |
| 5312 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5313 | } |
| 5314 | |
| 5315 | return ? |
| 5316 | } |
| 5317 | |
| 5318 | cmd VkResult vkCreateComputePipelines( |
| 5319 | VkDevice device, |
| 5320 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5321 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5322 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5323 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5324 | VkPipeline* pPipelines) { |
| 5325 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5326 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5327 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5328 | assert(pipelineCacheObject.device == device) |
| 5329 | } |
| 5330 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5331 | createInfos := pCreateInfos[0:createInfoCount] |
| 5332 | pipelines := pPipelines[0:createInfoCount] |
| 5333 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5334 | pipeline := ? |
| 5335 | pipelines[i] = pipeline |
| 5336 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5337 | } |
| 5338 | |
| 5339 | return ? |
| 5340 | } |
| 5341 | |
| 5342 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5343 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5344 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5345 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5346 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5347 | deviceObject := GetDevice(device) |
| 5348 | pipelineObjects := GetPipeline(pipeline) |
| 5349 | assert(pipelineObjects.device == device) |
| 5350 | |
| 5351 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5352 | } |
| 5353 | |
| 5354 | |
| 5355 | // Pipeline layout functions |
| 5356 | |
| 5357 | @threadSafety("system") |
| 5358 | cmd VkResult vkCreatePipelineLayout( |
| 5359 | VkDevice device, |
| 5360 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5361 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5362 | VkPipelineLayout* pPipelineLayout) { |
| 5363 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 5364 | deviceObject := GetDevice(device) |
| 5365 | |
| 5366 | pipelineLayout := ? |
| 5367 | pPipelineLayout[0] = pipelineLayout |
| 5368 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 5369 | |
| 5370 | return ? |
| 5371 | } |
| 5372 | |
| 5373 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5374 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5375 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5376 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5377 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5378 | deviceObject := GetDevice(device) |
| 5379 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 5380 | assert(pipelineLayoutObjects.device == device) |
| 5381 | |
| 5382 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5383 | } |
| 5384 | |
| 5385 | |
| 5386 | // Sampler functions |
| 5387 | |
| 5388 | @threadSafety("system") |
| 5389 | cmd VkResult vkCreateSampler( |
| 5390 | VkDevice device, |
| 5391 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5392 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5393 | VkSampler* pSampler) { |
| 5394 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 5395 | deviceObject := GetDevice(device) |
| 5396 | |
| 5397 | sampler := ? |
| 5398 | pSampler[0] = sampler |
| 5399 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 5400 | |
| 5401 | return ? |
| 5402 | } |
| 5403 | |
| 5404 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5405 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5406 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5407 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5408 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5409 | deviceObject := GetDevice(device) |
| 5410 | samplerObject := GetSampler(sampler) |
| 5411 | assert(samplerObject.device == device) |
| 5412 | |
| 5413 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5414 | } |
| 5415 | |
| 5416 | |
| 5417 | // Descriptor set functions |
| 5418 | |
| 5419 | @threadSafety("system") |
| 5420 | cmd VkResult vkCreateDescriptorSetLayout( |
| 5421 | VkDevice device, |
| 5422 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5423 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5424 | VkDescriptorSetLayout* pSetLayout) { |
| 5425 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 5426 | deviceObject := GetDevice(device) |
| 5427 | |
| 5428 | setLayout := ? |
| 5429 | pSetLayout[0] = setLayout |
| 5430 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 5431 | |
| 5432 | return ? |
| 5433 | } |
| 5434 | |
| 5435 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5436 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5437 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5438 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5439 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5440 | deviceObject := GetDevice(device) |
| 5441 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 5442 | assert(descriptorSetLayoutObject.device == device) |
| 5443 | |
| 5444 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5445 | } |
| 5446 | |
| 5447 | @threadSafety("system") |
| 5448 | cmd VkResult vkCreateDescriptorPool( |
| 5449 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5450 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5451 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5452 | VkDescriptorPool* pDescriptorPool) { |
| 5453 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 5454 | deviceObject := GetDevice(device) |
| 5455 | |
| 5456 | descriptorPool := ? |
| 5457 | pDescriptorPool[0] = descriptorPool |
| 5458 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 5459 | |
| 5460 | return ? |
| 5461 | } |
| 5462 | |
| 5463 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5464 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5465 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5466 | VkDescriptorPool descriptorPool, |
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 | deviceObject := GetDevice(device) |
| 5469 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5470 | assert(descriptorPoolObject.device == device) |
| 5471 | |
| 5472 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5473 | } |
| 5474 | |
| 5475 | @threadSafety("app") |
| 5476 | cmd VkResult vkResetDescriptorPool( |
| 5477 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5478 | VkDescriptorPool descriptorPool, |
| 5479 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5480 | deviceObject := GetDevice(device) |
| 5481 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5482 | assert(descriptorPoolObject.device == device) |
| 5483 | |
| 5484 | return ? |
| 5485 | } |
| 5486 | |
| 5487 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5488 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5489 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5490 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5491 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5492 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5493 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5494 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5495 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5496 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 5497 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5498 | setLayout := setLayouts[i] |
| 5499 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 5500 | assert(setLayoutObject.device == device) |
| 5501 | } |
| 5502 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5503 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 5504 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5505 | descriptorSet := ? |
| 5506 | descriptorSets[i] = descriptorSet |
| 5507 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 5508 | } |
| 5509 | |
| 5510 | return ? |
| 5511 | } |
| 5512 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5513 | cmd VkResult vkFreeDescriptorSets( |
| 5514 | VkDevice device, |
| 5515 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5516 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5517 | const VkDescriptorSet* pDescriptorSets) { |
| 5518 | deviceObject := GetDevice(device) |
| 5519 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5520 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5521 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5522 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5523 | descriptorSet := descriptorSets[i] |
| 5524 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 5525 | assert(descriptorSetObject.device == device) |
| 5526 | State.DescriptorSets[descriptorSet] = null |
| 5527 | } |
| 5528 | |
| 5529 | return ? |
| 5530 | } |
| 5531 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5532 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5533 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5534 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5535 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5536 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5537 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 5538 | deviceObject := GetDevice(device) |
| 5539 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5540 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 5541 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5542 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5543 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5544 | assert(descriptorWriteObject.device == device) |
| 5545 | } |
| 5546 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5547 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 5548 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5549 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5550 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5551 | assert(descriptorCopyObject.device == device) |
| 5552 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5553 | } |
| 5554 | |
| 5555 | |
| 5556 | // Framebuffer functions |
| 5557 | |
| 5558 | @threadSafety("system") |
| 5559 | cmd VkResult vkCreateFramebuffer( |
| 5560 | VkDevice device, |
| 5561 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5562 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5563 | VkFramebuffer* pFramebuffer) { |
| 5564 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 5565 | deviceObject := GetDevice(device) |
| 5566 | |
| 5567 | framebuffer := ? |
| 5568 | pFramebuffer[0] = framebuffer |
| 5569 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 5570 | |
| 5571 | return ? |
| 5572 | } |
| 5573 | |
| 5574 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5575 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5576 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5577 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5578 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5579 | deviceObject := GetDevice(device) |
| 5580 | framebufferObject := GetFramebuffer(framebuffer) |
| 5581 | assert(framebufferObject.device == device) |
| 5582 | |
| 5583 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5584 | } |
| 5585 | |
| 5586 | |
| 5587 | // Renderpass functions |
| 5588 | |
| 5589 | @threadSafety("system") |
| 5590 | cmd VkResult vkCreateRenderPass( |
| 5591 | VkDevice device, |
| 5592 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5593 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5594 | VkRenderPass* pRenderPass) { |
| 5595 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 5596 | deviceObject := GetDevice(device) |
| 5597 | |
| 5598 | renderpass := ? |
| 5599 | pRenderPass[0] = renderpass |
| 5600 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 5601 | |
| 5602 | return ? |
| 5603 | } |
| 5604 | |
| 5605 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5606 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5607 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5608 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5609 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5610 | deviceObject := GetDevice(device) |
| 5611 | renderPassObject := GetRenderPass(renderPass) |
| 5612 | assert(renderPassObject.device == device) |
| 5613 | |
| 5614 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5615 | } |
| 5616 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5617 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5618 | VkDevice device, |
| 5619 | VkRenderPass renderPass, |
| 5620 | VkExtent2D* pGranularity) { |
| 5621 | deviceObject := GetDevice(device) |
| 5622 | renderPassObject := GetRenderPass(renderPass) |
| 5623 | |
| 5624 | granularity := ? |
| 5625 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5626 | } |
| 5627 | |
| 5628 | // Command pool functions |
| 5629 | |
| 5630 | cmd VkResult vkCreateCommandPool( |
| 5631 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5632 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 5633 | const VkAllocationCallbacks* pAllocator, |
| 5634 | VkCommandPool* pCommandPool) { |
| 5635 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5636 | deviceObject := GetDevice(device) |
| 5637 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5638 | commandPool := ? |
| 5639 | pCommandPool[0] = commandPool |
| 5640 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5641 | |
| 5642 | return ? |
| 5643 | } |
| 5644 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5645 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5646 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5647 | VkCommandPool commandPool, |
| 5648 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5649 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5650 | commandPoolObject := GetCommandPool(commandPool) |
| 5651 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5652 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5653 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5654 | } |
| 5655 | |
| 5656 | cmd VkResult vkResetCommandPool( |
| 5657 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5658 | VkCommandPool commandPool, |
| 5659 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5660 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5661 | commandPoolObject := GetCommandPool(commandPool) |
| 5662 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5663 | |
| 5664 | return ? |
| 5665 | } |
| 5666 | |
| 5667 | // Command buffer functions |
| 5668 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5669 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5670 | memoryObject := GetDeviceMemory(memory) |
| 5671 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5672 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5673 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5674 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5675 | } |
| 5676 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5677 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5678 | memoryObject := GetDeviceMemory(memory) |
| 5679 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5680 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5681 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5682 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5683 | } |
| 5684 | |
| 5685 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5686 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5687 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5688 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 5689 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5690 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5691 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5692 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5693 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5694 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5695 | commandBuffer := ? |
| 5696 | commandBuffers[i] = commandBuffer |
| 5697 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5698 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5699 | |
| 5700 | return ? |
| 5701 | } |
| 5702 | |
| 5703 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5704 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5705 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5706 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5707 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5708 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5709 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5710 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5711 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5712 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5713 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 5714 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5715 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5716 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5717 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5718 | } |
| 5719 | |
| 5720 | @threadSafety("app") |
| 5721 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5722 | VkCommandBuffer commandBuffer, |
| 5723 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 5724 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 5725 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5726 | |
| 5727 | // TODO: iterate over boundObjects and clear memory bindings |
| 5728 | |
| 5729 | return ? |
| 5730 | } |
| 5731 | |
| 5732 | @threadSafety("app") |
| 5733 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5734 | VkCommandBuffer commandBuffer) { |
| 5735 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5736 | |
| 5737 | return ? |
| 5738 | } |
| 5739 | |
| 5740 | @threadSafety("app") |
| 5741 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5742 | VkCommandBuffer commandBuffer, |
| 5743 | VkCommandBufferResetFlags flags) { |
| 5744 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5745 | |
| 5746 | // TODO: iterate over boundObjects and clear memory bindings |
| 5747 | |
| 5748 | return ? |
| 5749 | } |
| 5750 | |
| 5751 | |
| 5752 | // Command buffer building functions |
| 5753 | |
| 5754 | @threadSafety("app") |
| 5755 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5756 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5757 | VkPipelineBindPoint pipelineBindPoint, |
| 5758 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5759 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5760 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5761 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5762 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5763 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5764 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5765 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5766 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5767 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5768 | } |
| 5769 | |
| 5770 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5771 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5772 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5773 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5774 | u32 viewportCount, |
| 5775 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5776 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5777 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5778 | } |
| 5779 | |
| 5780 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5781 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5782 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5783 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5784 | u32 scissorCount, |
| 5785 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5786 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5787 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5788 | } |
| 5789 | |
| 5790 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5791 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5792 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5793 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5794 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5795 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5796 | } |
| 5797 | |
| 5798 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5799 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5800 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5801 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5802 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5803 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5804 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5805 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5806 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5807 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5808 | @threadSafety("app") |
| 5809 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5810 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5811 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 5812 | // an annotation as a quick hack to pass this to the template without |
| 5813 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5814 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5815 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5816 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5817 | } |
| 5818 | |
| 5819 | @threadSafety("app") |
| 5820 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5821 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5822 | f32 minDepthBounds, |
| 5823 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5824 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5825 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5826 | } |
| 5827 | |
| 5828 | @threadSafety("app") |
| 5829 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5830 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5831 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5832 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5833 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5834 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5835 | } |
| 5836 | |
| 5837 | @threadSafety("app") |
| 5838 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5839 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5840 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5841 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5842 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5843 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5844 | } |
| 5845 | |
| 5846 | @threadSafety("app") |
| 5847 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5848 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5849 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5850 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5851 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5852 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5853 | } |
| 5854 | |
| 5855 | @threadSafety("app") |
| 5856 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5857 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5858 | VkPipelineBindPoint pipelineBindPoint, |
| 5859 | VkPipelineLayout layout, |
| 5860 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5861 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5862 | const VkDescriptorSet* pDescriptorSets, |
| 5863 | u32 dynamicOffsetCount, |
| 5864 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5865 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5866 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5867 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5868 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5869 | descriptorSet := descriptorSets[i] |
| 5870 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5871 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5872 | } |
| 5873 | |
| 5874 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 5875 | for i in (0 .. dynamicOffsetCount) { |
| 5876 | dynamicOffset := dynamicOffsets[i] |
| 5877 | } |
| 5878 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5879 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5880 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5881 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5882 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5883 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5884 | } |
| 5885 | |
| 5886 | @threadSafety("app") |
| 5887 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5888 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5889 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5890 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5891 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5892 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5893 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5894 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5895 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5896 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5897 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5898 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5899 | } |
| 5900 | |
| 5901 | @threadSafety("app") |
| 5902 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5903 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5904 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5905 | u32 bindingCount, |
| 5906 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5907 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5908 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5909 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5910 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5911 | buffers := pBuffers[0:bindingCount] |
| 5912 | offsets := pOffsets[0:bindingCount] |
| 5913 | for i in (0 .. bindingCount) { |
| 5914 | buffer := buffers[i] |
| 5915 | offset := offsets[i] |
| 5916 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5917 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5918 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5919 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5920 | } |
| 5921 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5922 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5923 | } |
| 5924 | |
| 5925 | @threadSafety("app") |
| 5926 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5927 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5928 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5929 | u32 instanceCount, |
| 5930 | u32 firstVertex, |
| 5931 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5932 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5933 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5934 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5935 | } |
| 5936 | |
| 5937 | @threadSafety("app") |
| 5938 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5939 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5940 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5941 | u32 instanceCount, |
| 5942 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5943 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5944 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5945 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5946 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5947 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5948 | } |
| 5949 | |
| 5950 | @threadSafety("app") |
| 5951 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5952 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5953 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5954 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5955 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5956 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5957 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5958 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5959 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5960 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5961 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
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 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5964 | } |
| 5965 | |
| 5966 | @threadSafety("app") |
| 5967 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5968 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5969 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5970 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5971 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5972 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5973 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5974 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5975 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5976 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5977 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5978 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5979 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5980 | } |
| 5981 | |
| 5982 | @threadSafety("app") |
| 5983 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5984 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 5985 | u32 groupCountX, |
| 5986 | u32 groupCountY, |
| 5987 | u32 groupCountZ) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5988 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5989 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5990 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5991 | } |
| 5992 | |
| 5993 | @threadSafety("app") |
| 5994 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5995 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5996 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5997 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5998 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5999 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6000 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6001 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6002 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6003 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6004 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6005 | } |
| 6006 | |
| 6007 | @threadSafety("app") |
| 6008 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6009 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6010 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6011 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6012 | u32 regionCount, |
| 6013 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6014 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6015 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6016 | dstBufferObject := GetBuffer(dstBuffer) |
| 6017 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6018 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6019 | |
| 6020 | regions := pRegions[0:regionCount] |
| 6021 | for i in (0 .. regionCount) { |
| 6022 | region := regions[i] |
| 6023 | } |
| 6024 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6025 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6026 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6027 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6028 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6029 | } |
| 6030 | |
| 6031 | @threadSafety("app") |
| 6032 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6033 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6034 | VkImage srcImage, |
| 6035 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6036 | VkImage dstImage, |
| 6037 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6038 | u32 regionCount, |
| 6039 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6040 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6041 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6042 | dstImageObject := GetImage(dstImage) |
| 6043 | assert(commandBufferObject.device == srcImageObject.device) |
| 6044 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6045 | |
| 6046 | regions := pRegions[0:regionCount] |
| 6047 | for i in (0 .. regionCount) { |
| 6048 | region := regions[i] |
| 6049 | } |
| 6050 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6051 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6052 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6053 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6054 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6055 | } |
| 6056 | |
| 6057 | @threadSafety("app") |
| 6058 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6059 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6060 | VkImage srcImage, |
| 6061 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6062 | VkImage dstImage, |
| 6063 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6064 | u32 regionCount, |
| 6065 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 6066 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6067 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6068 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6069 | dstImageObject := GetImage(dstImage) |
| 6070 | assert(commandBufferObject.device == srcImageObject.device) |
| 6071 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6072 | |
| 6073 | regions := pRegions[0:regionCount] |
| 6074 | for i in (0 .. regionCount) { |
| 6075 | region := regions[i] |
| 6076 | } |
| 6077 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6078 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6079 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6080 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6081 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6082 | } |
| 6083 | |
| 6084 | @threadSafety("app") |
| 6085 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6086 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6087 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6088 | VkImage dstImage, |
| 6089 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6090 | u32 regionCount, |
| 6091 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6092 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6093 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6094 | dstImageObject := GetImage(dstImage) |
| 6095 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6096 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6097 | |
| 6098 | regions := pRegions[0:regionCount] |
| 6099 | for i in (0 .. regionCount) { |
| 6100 | region := regions[i] |
| 6101 | } |
| 6102 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6103 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6104 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6105 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6106 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6107 | } |
| 6108 | |
| 6109 | @threadSafety("app") |
| 6110 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6111 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6112 | VkImage srcImage, |
| 6113 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6114 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6115 | u32 regionCount, |
| 6116 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6117 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6118 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6119 | dstBufferObject := GetBuffer(dstBuffer) |
| 6120 | assert(commandBufferObject.device == srcImageObject.device) |
| 6121 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6122 | |
| 6123 | regions := pRegions[0:regionCount] |
| 6124 | for i in (0 .. regionCount) { |
| 6125 | region := regions[i] |
| 6126 | } |
| 6127 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6128 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6129 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6130 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6131 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6132 | } |
| 6133 | |
| 6134 | @threadSafety("app") |
| 6135 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6136 | VkCommandBuffer commandBuffer, |
| 6137 | VkBuffer dstBuffer, |
| 6138 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6139 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 6140 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6141 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6142 | dstBufferObject := GetBuffer(dstBuffer) |
| 6143 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6144 | |
| 6145 | data := pData[0:dataSize] |
| 6146 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6147 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6148 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6149 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6150 | } |
| 6151 | |
| 6152 | @threadSafety("app") |
| 6153 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6154 | VkCommandBuffer commandBuffer, |
| 6155 | VkBuffer dstBuffer, |
| 6156 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6157 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6158 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6159 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6160 | dstBufferObject := GetBuffer(dstBuffer) |
| 6161 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6162 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6163 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6164 | } |
| 6165 | |
| 6166 | @threadSafety("app") |
| 6167 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6168 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6169 | VkImage image, |
| 6170 | VkImageLayout imageLayout, |
| 6171 | const VkClearColorValue* pColor, |
| 6172 | u32 rangeCount, |
| 6173 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6174 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6175 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6176 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6177 | |
| 6178 | ranges := pRanges[0:rangeCount] |
| 6179 | for i in (0 .. rangeCount) { |
| 6180 | range := ranges[i] |
| 6181 | } |
| 6182 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6183 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6184 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6185 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6186 | } |
| 6187 | |
| 6188 | @threadSafety("app") |
| 6189 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6190 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6191 | VkImage image, |
| 6192 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6193 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6194 | u32 rangeCount, |
| 6195 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6196 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6197 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6198 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6199 | |
| 6200 | ranges := pRanges[0:rangeCount] |
| 6201 | for i in (0 .. rangeCount) { |
| 6202 | range := ranges[i] |
| 6203 | } |
| 6204 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6205 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6206 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6207 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6208 | } |
| 6209 | |
| 6210 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6211 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6212 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6213 | u32 attachmentCount, |
| 6214 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6215 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 6216 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6217 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6218 | |
| 6219 | rects := pRects[0:rectCount] |
| 6220 | for i in (0 .. rectCount) { |
| 6221 | rect := rects[i] |
| 6222 | } |
| 6223 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6224 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6225 | } |
| 6226 | |
| 6227 | @threadSafety("app") |
| 6228 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6229 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6230 | VkImage srcImage, |
| 6231 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6232 | VkImage dstImage, |
| 6233 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6234 | u32 regionCount, |
| 6235 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6236 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6237 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6238 | dstImageObject := GetImage(dstImage) |
| 6239 | assert(commandBufferObject.device == srcImageObject.device) |
| 6240 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6241 | |
| 6242 | regions := pRegions[0:regionCount] |
| 6243 | for i in (0 .. regionCount) { |
| 6244 | region := regions[i] |
| 6245 | } |
| 6246 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6247 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6248 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6249 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6250 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6251 | } |
| 6252 | |
| 6253 | @threadSafety("app") |
| 6254 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6255 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6256 | VkEvent event, |
| 6257 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6258 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6259 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6260 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6261 | } |
| 6262 | |
| 6263 | @threadSafety("app") |
| 6264 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6265 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6266 | VkEvent event, |
| 6267 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6268 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6269 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6270 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6271 | } |
| 6272 | |
| 6273 | @threadSafety("app") |
| 6274 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6275 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6276 | u32 eventCount, |
| 6277 | const VkEvent* pEvents, |
| 6278 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6279 | VkPipelineStageFlags dstStageMask, |
| 6280 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6281 | const VkMemoryBarrier* pMemoryBarriers, |
| 6282 | u32 bufferMemoryBarrierCount, |
| 6283 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6284 | u32 imageMemoryBarrierCount, |
| 6285 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6286 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6287 | |
| 6288 | events := pEvents[0:eventCount] |
| 6289 | for i in (0 .. eventCount) { |
| 6290 | event := events[i] |
| 6291 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6292 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6293 | } |
| 6294 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6295 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6296 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6297 | memoryBarrier := memoryBarriers[i] |
| 6298 | } |
| 6299 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6300 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6301 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6302 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6303 | assert(bufferObject.device == commandBufferObject.device) |
| 6304 | } |
| 6305 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6306 | for i in (0 .. imageMemoryBarrierCount) { |
| 6307 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6308 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6309 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6310 | } |
| 6311 | } |
| 6312 | |
| 6313 | @threadSafety("app") |
| 6314 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6315 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6316 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6317 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 6318 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6319 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6320 | const VkMemoryBarrier* pMemoryBarriers, |
| 6321 | u32 bufferMemoryBarrierCount, |
| 6322 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6323 | u32 imageMemoryBarrierCount, |
| 6324 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6325 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6326 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6327 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6328 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6329 | memoryBarrier := memoryBarriers[i] |
| 6330 | } |
| 6331 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6332 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6333 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6334 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6335 | assert(bufferObject.device == commandBufferObject.device) |
| 6336 | } |
| 6337 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6338 | for i in (0 .. imageMemoryBarrierCount) { |
| 6339 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6340 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6341 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6342 | } |
| 6343 | } |
| 6344 | |
| 6345 | @threadSafety("app") |
| 6346 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6347 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6348 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6349 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6350 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6351 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6352 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6353 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6354 | } |
| 6355 | |
| 6356 | @threadSafety("app") |
| 6357 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6358 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6359 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6360 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6361 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6362 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6363 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6364 | } |
| 6365 | |
| 6366 | @threadSafety("app") |
| 6367 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6368 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6369 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6370 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6371 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6372 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6373 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6374 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6375 | } |
| 6376 | |
| 6377 | @threadSafety("app") |
| 6378 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6379 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 6380 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6381 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6382 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6383 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6384 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6385 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6386 | } |
| 6387 | |
| 6388 | @threadSafety("app") |
| 6389 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6390 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6391 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6392 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6393 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6394 | VkBuffer dstBuffer, |
| 6395 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 6396 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6397 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6398 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6399 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6400 | dstBufferObject := GetBuffer(dstBuffer) |
| 6401 | assert(commandBufferObject.device == queryPoolObject.device) |
| 6402 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6403 | } |
| 6404 | |
| 6405 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6406 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6407 | VkPipelineLayout layout, |
| 6408 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6409 | u32 offset, |
| 6410 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6411 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6412 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6413 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6414 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6415 | } |
| 6416 | |
| 6417 | @threadSafety("app") |
| 6418 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6419 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6420 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6421 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6422 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6423 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 6424 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6425 | assert(commandBufferObject.device == renderPassObject.device) |
| 6426 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6427 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6428 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6429 | } |
| 6430 | |
| 6431 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6432 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6433 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6434 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6435 | } |
| 6436 | |
| 6437 | @threadSafety("app") |
| 6438 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6439 | VkCommandBuffer commandBuffer) { |
| 6440 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6441 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6442 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6443 | } |
| 6444 | |
| 6445 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6446 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6447 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6448 | const VkCommandBuffer* pCommandBuffers) { |
| 6449 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6450 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6451 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 6452 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6453 | secondaryCommandBuffer := commandBuffers[i] |
| 6454 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 6455 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6456 | } |
| 6457 | } |
| 6458 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6459 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6460 | cmd void vkDestroySurfaceKHR( |
| 6461 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6462 | VkSurfaceKHR surface, |
| 6463 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6464 | instanceObject := GetInstance(instance) |
| 6465 | surfaceObject := GetSurface(surface) |
| 6466 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6467 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6468 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 6469 | } |
| 6470 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6471 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6472 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6473 | VkPhysicalDevice physicalDevice, |
| 6474 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6475 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6476 | VkBool32* pSupported) { |
| 6477 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6478 | |
| 6479 | return ? |
| 6480 | } |
| 6481 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6482 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6483 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 6484 | VkPhysicalDevice physicalDevice, |
| 6485 | VkSurfaceKHR surface, |
| 6486 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 6487 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6488 | |
| 6489 | surfaceCapabilities := ? |
| 6490 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 6491 | |
| 6492 | return ? |
| 6493 | } |
| 6494 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6495 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6496 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 6497 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6498 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6499 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6500 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6501 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6502 | |
| 6503 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6504 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6505 | surfaceFormats := pSurfaceFormats[0:count] |
| 6506 | |
| 6507 | for i in (0 .. count) { |
| 6508 | surfaceFormat := ? |
| 6509 | surfaceFormats[i] = surfaceFormat |
| 6510 | } |
| 6511 | |
| 6512 | return ? |
| 6513 | } |
| 6514 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6515 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6516 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 6517 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6518 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6519 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6520 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6521 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6522 | |
| 6523 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6524 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6525 | presentModes := pPresentModes[0:count] |
| 6526 | |
| 6527 | for i in (0 .. count) { |
| 6528 | presentMode := ? |
| 6529 | presentModes[i] = presentMode |
| 6530 | } |
| 6531 | |
| 6532 | return ? |
| 6533 | } |
| 6534 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6535 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6536 | cmd VkResult vkCreateSwapchainKHR( |
| 6537 | VkDevice device, |
| 6538 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6539 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6540 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6541 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6542 | deviceObject := GetDevice(device) |
| 6543 | |
| 6544 | swapchain := ? |
| 6545 | pSwapchain[0] = swapchain |
| 6546 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 6547 | |
| 6548 | return ? |
| 6549 | } |
| 6550 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6551 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6552 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6553 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6554 | VkSwapchainKHR swapchain, |
| 6555 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6556 | deviceObject := GetDevice(device) |
| 6557 | swapchainObject := GetSwapchain(swapchain) |
| 6558 | assert(swapchainObject.device == device) |
| 6559 | |
| 6560 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6561 | } |
| 6562 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6563 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6564 | cmd VkResult vkGetSwapchainImagesKHR( |
| 6565 | VkDevice device, |
| 6566 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6567 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6568 | VkImage* pSwapchainImages) { |
| 6569 | deviceObject := GetDevice(device) |
| 6570 | |
| 6571 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6572 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6573 | swapchainImages := pSwapchainImages[0:count] |
| 6574 | |
| 6575 | for i in (0 .. count) { |
| 6576 | swapchainImage := ? |
| 6577 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6578 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6579 | } |
| 6580 | |
| 6581 | return ? |
| 6582 | } |
| 6583 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6584 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6585 | cmd VkResult vkAcquireNextImageKHR( |
| 6586 | VkDevice device, |
| 6587 | VkSwapchainKHR swapchain, |
| 6588 | u64 timeout, |
| 6589 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6590 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6591 | u32* pImageIndex) { |
| 6592 | deviceObject := GetDevice(device) |
| 6593 | swapchainObject := GetSwapchain(swapchain) |
| 6594 | |
| 6595 | imageIndex := ? |
| 6596 | pImageIndex[0] = imageIndex |
| 6597 | |
| 6598 | return ? |
| 6599 | } |
| 6600 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6601 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6602 | cmd VkResult vkQueuePresentKHR( |
| 6603 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6604 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6605 | queueObject := GetQueue(queue) |
| 6606 | |
| 6607 | presentInfo := ? |
| 6608 | pPresentInfo[0] = presentInfo |
| 6609 | |
| 6610 | return ? |
| 6611 | } |
| 6612 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6613 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6614 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6615 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6616 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6617 | VkDisplayPropertiesKHR* pProperties) { |
| 6618 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6619 | return ? |
| 6620 | } |
| 6621 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6622 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6623 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6624 | VkPhysicalDevice physicalDevice, |
| 6625 | u32* pPropertyCount, |
| 6626 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 6627 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6628 | return ? |
| 6629 | } |
| 6630 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6631 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6632 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6633 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6634 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6635 | u32* pDisplayCount, |
| 6636 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6637 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6638 | return ? |
| 6639 | } |
| 6640 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6641 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6642 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 6643 | VkPhysicalDevice physicalDevice, |
| 6644 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6645 | u32* pPropertyCount, |
| 6646 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6647 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6648 | return ? |
| 6649 | } |
| 6650 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6651 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6652 | cmd VkResult vkCreateDisplayModeKHR( |
| 6653 | VkPhysicalDevice physicalDevice, |
| 6654 | VkDisplayKHR display, |
| 6655 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6656 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6657 | VkDisplayModeKHR* pMode) { |
| 6658 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6659 | return ? |
| 6660 | } |
| 6661 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6662 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6663 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6664 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6665 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6666 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6667 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6668 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6669 | return ? |
| 6670 | } |
| 6671 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6672 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6673 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 6674 | VkInstance instance, |
| 6675 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6676 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6677 | VkSurfaceKHR* pSurface) { |
| 6678 | return ? |
| 6679 | } |
| 6680 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6681 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6682 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 6683 | VkDevice device, |
| 6684 | u32 swapchainCount, |
| 6685 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6686 | const VkAllocationCallbacks* pAllocator, |
| 6687 | VkSwapchainKHR* pSwapchains) { |
| 6688 | return ? |
| 6689 | } |
| 6690 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6691 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6692 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6693 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6694 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6695 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6696 | VkSurfaceKHR* pSurface) { |
| 6697 | instanceObject := GetInstance(instance) |
| 6698 | return ? |
| 6699 | } |
| 6700 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6701 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6702 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6703 | VkPhysicalDevice physicalDevice, |
| 6704 | u32 queueFamilyIndex, |
| 6705 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6706 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6707 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6708 | return ? |
| 6709 | } |
| 6710 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6711 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6712 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6713 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6714 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6715 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6716 | VkSurfaceKHR* pSurface) { |
| 6717 | instanceObject := GetInstance(instance) |
| 6718 | return ? |
| 6719 | } |
| 6720 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6721 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6722 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6723 | VkPhysicalDevice physicalDevice, |
| 6724 | u32 queueFamilyIndex, |
| 6725 | platform.xcb_connection_t* connection, |
| 6726 | platform.xcb_visualid_t visual_id) { |
| 6727 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6728 | return ? |
| 6729 | } |
| 6730 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6731 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6732 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 6733 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6734 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6735 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6736 | VkSurfaceKHR* pSurface) { |
| 6737 | instanceObject := GetInstance(instance) |
| 6738 | return ? |
| 6739 | } |
| 6740 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6741 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6742 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6743 | VkPhysicalDevice physicalDevice, |
| 6744 | u32 queueFamilyIndex, |
| 6745 | platform.wl_display* display) { |
| 6746 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6747 | return ? |
| 6748 | } |
| 6749 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6750 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6751 | cmd VkResult vkCreateMirSurfaceKHR( |
| 6752 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6753 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6754 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6755 | VkSurfaceKHR* pSurface) { |
| 6756 | instanceObject := GetInstance(instance) |
| 6757 | return ? |
| 6758 | } |
| 6759 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6760 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6761 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6762 | VkPhysicalDevice physicalDevice, |
| 6763 | u32 queueFamilyIndex, |
| 6764 | platform.MirConnection* connection) { |
| 6765 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6766 | return ? |
| 6767 | } |
| 6768 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6769 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6770 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 6771 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6772 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6773 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6774 | VkSurfaceKHR* pSurface) { |
| 6775 | instanceObject := GetInstance(instance) |
| 6776 | return ? |
| 6777 | } |
| 6778 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6779 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6780 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 6781 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6782 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6783 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6784 | VkSurfaceKHR* pSurface) { |
| 6785 | instanceObject := GetInstance(instance) |
| 6786 | return ? |
| 6787 | } |
| 6788 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6789 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6790 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6791 | VkPhysicalDevice physicalDevice, |
| 6792 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 6793 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6794 | return ? |
| 6795 | } |
| 6796 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6797 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6798 | @optional |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6799 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 6800 | VkDevice device, |
| 6801 | VkFormat format, |
| 6802 | VkImageUsageFlags imageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6803 | s32* grallocUsage) { |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6804 | return ? |
| 6805 | } |
| 6806 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6807 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6808 | @optional |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6809 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 6810 | VkDevice device, |
| 6811 | VkFormat format, |
| 6812 | VkImageUsageFlags imageUsage, |
| 6813 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6814 | u64* grallocConsumerUsage, |
| 6815 | u64* grallocProducerUsage) { |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6816 | return ? |
| 6817 | } |
| 6818 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6819 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6820 | cmd VkResult vkAcquireImageANDROID( |
| 6821 | VkDevice device, |
| 6822 | VkImage image, |
| 6823 | int nativeFenceFd, |
| 6824 | VkSemaphore semaphore, |
| 6825 | VkFence fence) { |
| 6826 | return ? |
| 6827 | } |
| 6828 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6829 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6830 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 6831 | VkQueue queue, |
| 6832 | u32 waitSemaphoreCount, |
| 6833 | const VkSemaphore* pWaitSemaphores, |
| 6834 | VkImage image, |
| 6835 | int* pNativeFenceFd) { |
| 6836 | return ? |
| 6837 | } |
| 6838 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6839 | @extension("VK_EXT_debug_report") // 12 |
| 6840 | @external type void* PFN_vkDebugReportCallbackEXT |
| 6841 | @extension("VK_EXT_debug_report") // 12 |
| 6842 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 6843 | VkDebugReportFlagsEXT flags, |
| 6844 | VkDebugReportObjectTypeEXT objectType, |
| 6845 | u64 object, |
| 6846 | platform.size_t location, |
| 6847 | s32 messageCode, |
| 6848 | const char* pLayerPrefix, |
| 6849 | const char* pMessage, |
| 6850 | void* pUserData) { |
| 6851 | return ? |
| 6852 | } |
| 6853 | |
| 6854 | @extension("VK_EXT_debug_report") // 12 |
| 6855 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 6856 | VkInstance instance, |
| 6857 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 6858 | const VkAllocationCallbacks* pAllocator, |
| 6859 | VkDebugReportCallbackEXT* pCallback) { |
| 6860 | return ? |
| 6861 | } |
| 6862 | |
| 6863 | @extension("VK_EXT_debug_report") // 12 |
| 6864 | cmd void vkDestroyDebugReportCallbackEXT( |
| 6865 | VkInstance instance, |
| 6866 | VkDebugReportCallbackEXT callback, |
| 6867 | const VkAllocationCallbacks* pAllocator) { |
| 6868 | } |
| 6869 | |
| 6870 | @extension("VK_EXT_debug_report") // 12 |
| 6871 | cmd void vkDebugReportMessageEXT( |
| 6872 | VkInstance instance, |
| 6873 | VkDebugReportFlagsEXT flags, |
| 6874 | VkDebugReportObjectTypeEXT objectType, |
| 6875 | u64 object, |
| 6876 | platform.size_t location, |
| 6877 | s32 messageCode, |
| 6878 | const char* pLayerPrefix, |
| 6879 | const char* pMessage) { |
| 6880 | } |
| 6881 | |
| 6882 | @extension("VK_EXT_debug_marker") // 23 |
| 6883 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 6884 | VkDevice device, |
| 6885 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 6886 | return ? |
| 6887 | } |
| 6888 | |
| 6889 | @extension("VK_EXT_debug_marker") // 23 |
| 6890 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 6891 | VkDevice device, |
| 6892 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 6893 | return ? |
| 6894 | } |
| 6895 | |
| 6896 | @extension("VK_EXT_debug_marker") // 23 |
| 6897 | cmd void vkCmdDebugMarkerBeginEXT( |
| 6898 | VkCommandBuffer commandBuffer, |
| 6899 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6900 | } |
| 6901 | |
| 6902 | @extension("VK_EXT_debug_marker") // 23 |
| 6903 | cmd void vkCmdDebugMarkerEndEXT( |
| 6904 | VkCommandBuffer commandBuffer) { |
| 6905 | } |
| 6906 | |
| 6907 | @extension("VK_EXT_debug_marker") // 23 |
| 6908 | cmd void vkCmdDebugMarkerInsertEXT( |
| 6909 | VkCommandBuffer commandBuffer, |
| 6910 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6911 | } |
| 6912 | |
| 6913 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6914 | cmd void vkCmdDrawIndirectCountAMD( |
| 6915 | VkCommandBuffer commandBuffer, |
| 6916 | VkBuffer buffer, |
| 6917 | VkDeviceSize offset, |
| 6918 | VkBuffer countBuffer, |
| 6919 | VkDeviceSize countBufferOffset, |
| 6920 | u32 maxDrawCount, |
| 6921 | u32 stride) { |
| 6922 | } |
| 6923 | |
| 6924 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6925 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 6926 | VkCommandBuffer commandBuffer, |
| 6927 | VkBuffer buffer, |
| 6928 | VkDeviceSize offset, |
| 6929 | VkBuffer countBuffer, |
| 6930 | VkDeviceSize countBufferOffset, |
| 6931 | u32 maxDrawCount, |
| 6932 | u32 stride) { |
| 6933 | } |
| 6934 | |
| 6935 | @extension("VK_NV_external_memory_capabilities") // 56 |
| 6936 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 6937 | VkPhysicalDevice physicalDevice, |
| 6938 | VkFormat format, |
| 6939 | VkImageType type, |
| 6940 | VkImageTiling tiling, |
| 6941 | VkImageUsageFlags usage, |
| 6942 | VkImageCreateFlags flags, |
| 6943 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 6944 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 6945 | return ? |
| 6946 | } |
| 6947 | |
| 6948 | @extension("VK_NV_external_memory_win32") // 58 |
| 6949 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 6950 | VkDevice device, |
| 6951 | VkDeviceMemory memory, |
| 6952 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6953 | platform.HANDLE* pHandle) { |
| 6954 | return ? |
| 6955 | } |
| 6956 | |
| 6957 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6958 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 6959 | VkPhysicalDevice physicalDevice, |
| 6960 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 6961 | } |
| 6962 | |
| 6963 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6964 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 6965 | VkPhysicalDevice physicalDevice, |
| 6966 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 6967 | } |
| 6968 | |
| 6969 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6970 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 6971 | VkPhysicalDevice physicalDevice, |
| 6972 | VkFormat format, |
| 6973 | VkFormatProperties2KHR* pFormatProperties) { |
| 6974 | } |
| 6975 | |
| 6976 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6977 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 6978 | VkPhysicalDevice physicalDevice, |
| 6979 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 6980 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 6981 | return ? |
| 6982 | } |
| 6983 | |
| 6984 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6985 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 6986 | VkPhysicalDevice physicalDevice, |
| 6987 | u32* pQueueFamilyPropertyCount, |
| 6988 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 6989 | } |
| 6990 | |
| 6991 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6992 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 6993 | VkPhysicalDevice physicalDevice, |
| 6994 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 6995 | } |
| 6996 | |
| 6997 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6998 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 6999 | VkPhysicalDevice physicalDevice, |
| 7000 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 7001 | u32* pPropertyCount, |
| 7002 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 7003 | } |
| 7004 | |
| 7005 | @extension("VK_KHX_device_group") // 61 |
| 7006 | cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX( |
| 7007 | VkDevice device, |
| 7008 | u32 heapIndex, |
| 7009 | u32 localDeviceIndex, |
| 7010 | u32 remoteDeviceIndex, |
| 7011 | VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) { |
| 7012 | } |
| 7013 | |
| 7014 | @extension("VK_KHX_device_group") // 61 |
| 7015 | cmd VkResult vkBindBufferMemory2KHX( |
| 7016 | VkDevice device, |
| 7017 | u32 bindInfoCount, |
| 7018 | const VkBindBufferMemoryInfoKHX* pBindInfos) { |
| 7019 | return ? |
| 7020 | } |
| 7021 | |
| 7022 | @extension("VK_KHX_device_group") // 61 |
| 7023 | cmd VkResult vkBindImageMemory2KHX( |
| 7024 | VkDevice device, |
| 7025 | u32 bindInfoCount, |
| 7026 | const VkBindImageMemoryInfoKHX* pBindInfos) { |
| 7027 | return ? |
| 7028 | } |
| 7029 | |
| 7030 | @extension("VK_KHX_device_group") // 61 |
| 7031 | cmd void vkCmdSetDeviceMaskKHX( |
| 7032 | VkCommandBuffer commandBuffer, |
| 7033 | u32 deviceMask) { |
| 7034 | } |
| 7035 | |
| 7036 | @extension("VK_KHX_device_group") // 61 |
| 7037 | cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX( |
| 7038 | VkDevice device, |
| 7039 | VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) { |
| 7040 | return ? |
| 7041 | } |
| 7042 | |
| 7043 | @extension("VK_KHX_device_group") // 61 |
| 7044 | cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX( |
| 7045 | VkDevice device, |
| 7046 | VkSurfaceKHR surface, |
| 7047 | VkDeviceGroupPresentModeFlagsKHX* pModes) { |
| 7048 | return ? |
| 7049 | } |
| 7050 | |
| 7051 | @extension("VK_KHX_device_group") // 61 |
| 7052 | cmd VkResult vkAcquireNextImage2KHX( |
| 7053 | VkDevice device, |
| 7054 | const VkAcquireNextImageInfoKHX* pAcquireInfo, |
| 7055 | u32* pImageIndex) { |
| 7056 | return ? |
| 7057 | } |
| 7058 | |
| 7059 | @extension("VK_KHX_device_group") // 61 |
| 7060 | cmd void vkCmdDispatchBaseKHX( |
| 7061 | VkCommandBuffer commandBuffer, |
| 7062 | u32 baseGroupX, |
| 7063 | u32 baseGroupY, |
| 7064 | u32 baseGroupZ, |
| 7065 | u32 groupCountX, |
| 7066 | u32 groupCountY, |
| 7067 | u32 groupCountZ) { |
| 7068 | } |
| 7069 | |
| 7070 | @extension("VK_KHX_device_group") // 61 |
| 7071 | cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX( |
| 7072 | VkPhysicalDevice physicalDevice, |
| 7073 | VkSurfaceKHR surface, |
| 7074 | u32* pRectCount, |
| 7075 | VkRect2D* pRects) { |
| 7076 | return ? |
| 7077 | } |
| 7078 | |
| 7079 | @extension("VK_NN_vi_surface") // 63 |
| 7080 | cmd VkResult vkCreateViSurfaceNN( |
| 7081 | VkInstance instance, |
| 7082 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 7083 | const VkAllocationCallbacks* pAllocator, |
| 7084 | VkSurfaceKHR* pSurface) { |
| 7085 | return ? |
| 7086 | } |
| 7087 | |
| 7088 | @extension("VK_KHR_maintenance1") // 70 |
| 7089 | cmd void vkTrimCommandPoolKHR( |
| 7090 | VkDevice device, |
| 7091 | VkCommandPool commandPool, |
| 7092 | VkCommandPoolTrimFlagsKHR flags) { |
| 7093 | } |
| 7094 | |
| 7095 | @extension("VK_KHX_device_group_creation") // 71 |
| 7096 | cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX( |
| 7097 | VkInstance instance, |
| 7098 | u32* pPhysicalDeviceGroupCount, |
| 7099 | VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) { |
| 7100 | return ? |
| 7101 | } |
| 7102 | |
| 7103 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7104 | cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX( |
| 7105 | VkPhysicalDevice physicalDevice, |
| 7106 | const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, |
| 7107 | VkExternalBufferPropertiesKHX* pExternalBufferProperties) { |
| 7108 | } |
| 7109 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7110 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7111 | cmd VkResult vkGetMemoryWin32HandleKHX( |
| 7112 | VkDevice device, |
| 7113 | VkDeviceMemory memory, |
| 7114 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7115 | platform.HANDLE* pHandle) { |
| 7116 | return ? |
| 7117 | } |
| 7118 | |
| 7119 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7120 | cmd VkResult vkGetMemoryWin32HandlePropertiesKHX( |
| 7121 | VkDevice device, |
| 7122 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7123 | platform.HANDLE handle, |
| 7124 | VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) { |
| 7125 | return ? |
| 7126 | } |
| 7127 | |
| 7128 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7129 | cmd VkResult vkGetMemoryFdKHX( |
| 7130 | VkDevice device, |
| 7131 | VkDeviceMemory memory, |
| 7132 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7133 | s32* pFd) { |
| 7134 | return ? |
| 7135 | } |
| 7136 | |
| 7137 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7138 | cmd VkResult vkGetMemoryFdPropertiesKHX( |
| 7139 | VkDevice device, |
| 7140 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7141 | s32 fd, |
| 7142 | VkMemoryFdPropertiesKHX* pMemoryFdProperties) { |
| 7143 | return ? |
| 7144 | } |
| 7145 | |
| 7146 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 7147 | cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX( |
| 7148 | VkPhysicalDevice physicalDevice, |
| 7149 | const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, |
| 7150 | VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) { |
| 7151 | } |
| 7152 | |
| 7153 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7154 | cmd VkResult vkImportSemaphoreWin32HandleKHX( |
| 7155 | VkDevice device, |
| 7156 | const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) { |
| 7157 | return ? |
| 7158 | } |
| 7159 | |
| 7160 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7161 | cmd VkResult vkGetSemaphoreWin32HandleKHX( |
| 7162 | VkDevice device, |
| 7163 | VkSemaphore semaphore, |
| 7164 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7165 | platform.HANDLE* pHandle) { |
| 7166 | return ? |
| 7167 | } |
| 7168 | |
| 7169 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7170 | cmd VkResult vkImportSemaphoreFdKHX( |
| 7171 | VkDevice device, |
| 7172 | const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) { |
| 7173 | return ? |
| 7174 | } |
| 7175 | |
| 7176 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7177 | cmd VkResult vkGetSemaphoreFdKHX( |
| 7178 | VkDevice device, |
| 7179 | VkSemaphore semaphore, |
| 7180 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7181 | s32* pFd) { |
| 7182 | return ? |
| 7183 | } |
| 7184 | |
| 7185 | @extension("VK_KHR_push_descriptor") // 81 |
| 7186 | cmd void vkCmdPushDescriptorSetKHR( |
| 7187 | VkCommandBuffer commandBuffer, |
| 7188 | VkPipelineBindPoint pipelineBindPoint, |
| 7189 | VkPipelineLayout layout, |
| 7190 | u32 set, |
| 7191 | u32 descriptorWriteCount, |
| 7192 | const VkWriteDescriptorSet* pDescriptorWrites) { |
| 7193 | } |
| 7194 | |
| 7195 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7196 | cmd VkResult vkCreateDescriptorUpdateTemplateKHR( |
| 7197 | VkDevice device, |
| 7198 | const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, |
| 7199 | const VkAllocationCallbacks* pAllocator, |
| 7200 | VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) { |
| 7201 | return ? |
| 7202 | } |
| 7203 | |
| 7204 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7205 | cmd void vkDestroyDescriptorUpdateTemplateKHR( |
| 7206 | VkDevice device, |
| 7207 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7208 | const VkAllocationCallbacks* pAllocator) { |
| 7209 | } |
| 7210 | |
| 7211 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7212 | cmd void vkUpdateDescriptorSetWithTemplateKHR( |
| 7213 | VkDevice device, |
| 7214 | VkDescriptorSet descriptorSet, |
| 7215 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7216 | const void* pData) { |
| 7217 | } |
| 7218 | |
| 7219 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7220 | cmd void vkCmdPushDescriptorSetWithTemplateKHR( |
| 7221 | VkCommandBuffer commandBuffer, |
| 7222 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7223 | VkPipelineLayout layout, |
| 7224 | u32 set, |
| 7225 | const void* pData) { |
| 7226 | } |
| 7227 | |
| 7228 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7229 | cmd void vkCmdProcessCommandsNVX( |
| 7230 | VkCommandBuffer commandBuffer, |
| 7231 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 7232 | } |
| 7233 | |
| 7234 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7235 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 7236 | VkCommandBuffer commandBuffer, |
| 7237 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 7238 | } |
| 7239 | |
| 7240 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7241 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 7242 | VkDevice device, |
| 7243 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 7244 | const VkAllocationCallbacks* pAllocator, |
| 7245 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 7246 | return ? |
| 7247 | } |
| 7248 | |
| 7249 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7250 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 7251 | VkDevice device, |
| 7252 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 7253 | const VkAllocationCallbacks* pAllocator) { |
| 7254 | } |
| 7255 | |
| 7256 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7257 | cmd VkResult vkCreateObjectTableNVX( |
| 7258 | VkDevice device, |
| 7259 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 7260 | const VkAllocationCallbacks* pAllocator, |
| 7261 | VkObjectTableNVX* pObjectTable) { |
| 7262 | return ? |
| 7263 | } |
| 7264 | |
| 7265 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7266 | cmd void vkDestroyObjectTableNVX( |
| 7267 | VkDevice device, |
| 7268 | VkObjectTableNVX objectTable, |
| 7269 | const VkAllocationCallbacks* pAllocator) { |
| 7270 | } |
| 7271 | |
| 7272 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7273 | cmd VkResult vkRegisterObjectsNVX( |
| 7274 | VkDevice device, |
| 7275 | VkObjectTableNVX objectTable, |
| 7276 | u32 objectCount, |
| 7277 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 7278 | const u32* pObjectIndices) { |
| 7279 | return ? |
| 7280 | } |
| 7281 | |
| 7282 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7283 | cmd VkResult vkUnregisterObjectsNVX( |
| 7284 | VkDevice device, |
| 7285 | VkObjectTableNVX objectTable, |
| 7286 | u32 objectCount, |
| 7287 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 7288 | const u32* pObjectIndices) { |
| 7289 | return ? |
| 7290 | } |
| 7291 | |
| 7292 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7293 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 7294 | VkPhysicalDevice physicalDevice, |
| 7295 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 7296 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 7297 | } |
| 7298 | |
| 7299 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 7300 | cmd void vkCmdSetViewportWScalingNV( |
| 7301 | VkCommandBuffer commandBuffer, |
| 7302 | u32 firstViewport, |
| 7303 | u32 viewportCount, |
| 7304 | const VkViewportWScalingNV* pViewportWScalings) { |
| 7305 | } |
| 7306 | |
| 7307 | @extension("VK_EXT_direct_mode_display") // 89 |
| 7308 | cmd VkResult vkReleaseDisplayEXT( |
| 7309 | VkPhysicalDevice physicalDevice, |
| 7310 | VkDisplayKHR display) { |
| 7311 | return ? |
| 7312 | } |
| 7313 | |
| 7314 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7315 | cmd VkResult vkAcquireXlibDisplayEXT( |
| 7316 | VkPhysicalDevice physicalDevice, |
| 7317 | platform.Display* dpy, |
| 7318 | VkDisplayKHR display) { |
| 7319 | return ? |
| 7320 | } |
| 7321 | |
| 7322 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7323 | cmd VkResult vkGetRandROutputDisplayEXT( |
| 7324 | VkPhysicalDevice physicalDevice, |
| 7325 | platform.Display* dpy, |
| 7326 | platform.RROutput rrOutput, |
| 7327 | VkDisplayKHR* pDisplay) { |
| 7328 | return ? |
| 7329 | } |
| 7330 | |
| 7331 | @extension("VK_EXT_display_surface_counter") // 91 |
| 7332 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 7333 | VkPhysicalDevice physicalDevice, |
| 7334 | VkSurfaceKHR surface, |
| 7335 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 7336 | return ? |
| 7337 | } |
| 7338 | |
| 7339 | @extension("VK_EXT_display_control") // 92 |
| 7340 | cmd VkResult vkDisplayPowerControlEXT( |
| 7341 | VkDevice device, |
| 7342 | VkDisplayKHR display, |
| 7343 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 7344 | return ? |
| 7345 | } |
| 7346 | |
| 7347 | @extension("VK_EXT_display_control") // 92 |
| 7348 | cmd VkResult vkRegisterDeviceEventEXT( |
| 7349 | VkDevice device, |
| 7350 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 7351 | const VkAllocationCallbacks* pAllocator, |
| 7352 | VkFence* pFence) { |
| 7353 | return ? |
| 7354 | } |
| 7355 | |
| 7356 | @extension("VK_EXT_display_control") // 92 |
| 7357 | cmd VkResult vkRegisterDisplayEventEXT( |
| 7358 | VkDevice device, |
| 7359 | VkDisplayKHR display, |
| 7360 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 7361 | const VkAllocationCallbacks* pAllocator, |
| 7362 | VkFence* pFence) { |
| 7363 | return ? |
| 7364 | } |
| 7365 | |
| 7366 | @extension("VK_EXT_display_control") // 92 |
| 7367 | cmd VkResult vkGetSwapchainCounterEXT( |
| 7368 | VkDevice device, |
| 7369 | VkSwapchainKHR swapchain, |
| 7370 | VkSurfaceCounterFlagBitsEXT counter, |
| 7371 | u64* pCounterValue) { |
| 7372 | return ? |
| 7373 | } |
| 7374 | |
| 7375 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7376 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 7377 | VkDevice device, |
| 7378 | VkSwapchainKHR swapchain, |
| 7379 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7380 | deviceObject := GetDevice(device) |
| 7381 | swapchainObject := GetSwapchain(swapchain) |
| 7382 | |
| 7383 | displayTimingProperties := ? |
| 7384 | pDisplayTimingProperties[0] = displayTimingProperties |
| 7385 | |
| 7386 | return ? |
| 7387 | } |
| 7388 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7389 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7390 | cmd VkResult vkGetPastPresentationTimingGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 7391 | VkDevice device, |
| 7392 | VkSwapchainKHR swapchain, |
| 7393 | u32* pPresentationTimingCount, |
| 7394 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7395 | return ? |
| 7396 | } |
| 7397 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7398 | @extension("VK_EXT_discard_rectangles") // 100 |
| 7399 | cmd void vkCmdSetDiscardRectangleEXT( |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7400 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7401 | u32 firstDiscardRectangle, |
| 7402 | u32 discardRectangleCount, |
| 7403 | const VkRect2D* pDiscardRectangles) { |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7404 | } |
| 7405 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7406 | @extension("VK_EXT_hdr_metadata") // 106 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7407 | cmd void vkSetHdrMetadataEXT( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame^] | 7408 | VkDevice device, |
| 7409 | u32 swapchainCount, |
| 7410 | const VkSwapchainKHR* pSwapchains, |
| 7411 | const VkHdrMetadataEXT* pMetadata) { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7412 | } |
| 7413 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7414 | @extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 7415 | cmd VkResult vkGetSwapchainStatusKHR( |
| 7416 | VkDevice device, |
| 7417 | VkSwapchainKHR swapchain) { |
| 7418 | return ? |
| 7419 | } |
| 7420 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7421 | @extension("VK_MVK_ios_surface") // 123 |
| 7422 | cmd VkResult vkCreateIOSSurfaceMVK( |
| 7423 | VkInstance instance, |
| 7424 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7425 | const VkAllocationCallbacks* pAllocator, |
| 7426 | VkSurfaceKHR* pSurface) { |
| 7427 | return ? |
| 7428 | } |
| 7429 | |
| 7430 | @extension("VK_MVK_macos_surface") // 124 |
| 7431 | cmd VkResult vkCreateMacOSSurfaceMVK( |
| 7432 | VkInstance instance, |
| 7433 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7434 | const VkAllocationCallbacks* pAllocator, |
| 7435 | VkSurfaceKHR* pSurface) { |
| 7436 | return ? |
| 7437 | } |
| 7438 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7439 | //////////////// |
| 7440 | // Validation // |
| 7441 | //////////////// |
| 7442 | |
| 7443 | extern void validate(string layerName, bool condition, string message) |
| 7444 | |
| 7445 | |
| 7446 | ///////////////////////////// |
| 7447 | // Internal State Tracking // |
| 7448 | ///////////////////////////// |
| 7449 | |
| 7450 | StateObject State |
| 7451 | |
| 7452 | @internal class StateObject { |
| 7453 | // Dispatchable objects. |
| 7454 | map!(VkInstance, ref!InstanceObject) Instances |
| 7455 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 7456 | map!(VkDevice, ref!DeviceObject) Devices |
| 7457 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7458 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7459 | |
| 7460 | // Non-dispatchable objects. |
| 7461 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 7462 | map!(VkBuffer, ref!BufferObject) Buffers |
| 7463 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 7464 | map!(VkImage, ref!ImageObject) Images |
| 7465 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7466 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7467 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 7468 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 7469 | map!(VkSampler, ref!SamplerObject) Samplers |
| 7470 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 7471 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 7472 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7473 | map!(VkFence, ref!FenceObject) Fences |
| 7474 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 7475 | map!(VkEvent, ref!EventObject) Events |
| 7476 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 7477 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 7478 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 7479 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7480 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7481 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7482 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7483 | } |
| 7484 | |
| 7485 | @internal class InstanceObject { |
| 7486 | } |
| 7487 | |
| 7488 | @internal class PhysicalDeviceObject { |
| 7489 | VkInstance instance |
| 7490 | } |
| 7491 | |
| 7492 | @internal class DeviceObject { |
| 7493 | VkPhysicalDevice physicalDevice |
| 7494 | } |
| 7495 | |
| 7496 | @internal class QueueObject { |
| 7497 | VkDevice device |
| 7498 | VkQueueFlags flags |
| 7499 | } |
| 7500 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7501 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7502 | VkDevice device |
| 7503 | map!(u64, VkDeviceMemory) boundObjects |
| 7504 | VkQueueFlags queueFlags |
| 7505 | } |
| 7506 | |
| 7507 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7508 | VkDevice device |
| 7509 | VkDeviceSize allocationSize |
| 7510 | map!(u64, VkDeviceSize) boundObjects |
| 7511 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7512 | } |
| 7513 | |
| 7514 | @internal class BufferObject { |
| 7515 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7516 | VkDeviceMemory memory |
| 7517 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7518 | } |
| 7519 | |
| 7520 | @internal class BufferViewObject { |
| 7521 | VkDevice device |
| 7522 | VkBuffer buffer |
| 7523 | } |
| 7524 | |
| 7525 | @internal class ImageObject { |
| 7526 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7527 | VkDeviceMemory memory |
| 7528 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7529 | } |
| 7530 | |
| 7531 | @internal class ImageViewObject { |
| 7532 | VkDevice device |
| 7533 | VkImage image |
| 7534 | } |
| 7535 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7536 | @internal class ShaderObject { |
| 7537 | VkDevice device |
| 7538 | } |
| 7539 | |
| 7540 | @internal class ShaderModuleObject { |
| 7541 | VkDevice device |
| 7542 | } |
| 7543 | |
| 7544 | @internal class PipelineObject { |
| 7545 | VkDevice device |
| 7546 | } |
| 7547 | |
| 7548 | @internal class PipelineLayoutObject { |
| 7549 | VkDevice device |
| 7550 | } |
| 7551 | |
| 7552 | @internal class SamplerObject { |
| 7553 | VkDevice device |
| 7554 | } |
| 7555 | |
| 7556 | @internal class DescriptorSetObject { |
| 7557 | VkDevice device |
| 7558 | } |
| 7559 | |
| 7560 | @internal class DescriptorSetLayoutObject { |
| 7561 | VkDevice device |
| 7562 | } |
| 7563 | |
| 7564 | @internal class DescriptorPoolObject { |
| 7565 | VkDevice device |
| 7566 | } |
| 7567 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7568 | @internal class FenceObject { |
| 7569 | VkDevice device |
| 7570 | bool signaled |
| 7571 | } |
| 7572 | |
| 7573 | @internal class SemaphoreObject { |
| 7574 | VkDevice device |
| 7575 | } |
| 7576 | |
| 7577 | @internal class EventObject { |
| 7578 | VkDevice device |
| 7579 | } |
| 7580 | |
| 7581 | @internal class QueryPoolObject { |
| 7582 | VkDevice device |
| 7583 | } |
| 7584 | |
| 7585 | @internal class FramebufferObject { |
| 7586 | VkDevice device |
| 7587 | } |
| 7588 | |
| 7589 | @internal class RenderPassObject { |
| 7590 | VkDevice device |
| 7591 | } |
| 7592 | |
| 7593 | @internal class PipelineCacheObject { |
| 7594 | VkDevice device |
| 7595 | } |
| 7596 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7597 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7598 | VkDevice device |
| 7599 | } |
| 7600 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7601 | @internal class SurfaceObject { |
| 7602 | VkInstance instance |
| 7603 | } |
| 7604 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7605 | @internal class SwapchainObject { |
| 7606 | VkDevice device |
| 7607 | } |
| 7608 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7609 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 7610 | assert(instance in State.Instances) |
| 7611 | return State.Instances[instance] |
| 7612 | } |
| 7613 | |
| 7614 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 7615 | assert(physicalDevice in State.PhysicalDevices) |
| 7616 | return State.PhysicalDevices[physicalDevice] |
| 7617 | } |
| 7618 | |
| 7619 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 7620 | assert(device in State.Devices) |
| 7621 | return State.Devices[device] |
| 7622 | } |
| 7623 | |
| 7624 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 7625 | assert(queue in State.Queues) |
| 7626 | return State.Queues[queue] |
| 7627 | } |
| 7628 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7629 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 7630 | assert(commandBuffer in State.CommandBuffers) |
| 7631 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7632 | } |
| 7633 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7634 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 7635 | assert(memory in State.DeviceMemories) |
| 7636 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7637 | } |
| 7638 | |
| 7639 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 7640 | assert(buffer in State.Buffers) |
| 7641 | return State.Buffers[buffer] |
| 7642 | } |
| 7643 | |
| 7644 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 7645 | assert(bufferView in State.BufferViews) |
| 7646 | return State.BufferViews[bufferView] |
| 7647 | } |
| 7648 | |
| 7649 | macro ref!ImageObject GetImage(VkImage image) { |
| 7650 | assert(image in State.Images) |
| 7651 | return State.Images[image] |
| 7652 | } |
| 7653 | |
| 7654 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 7655 | assert(imageView in State.ImageViews) |
| 7656 | return State.ImageViews[imageView] |
| 7657 | } |
| 7658 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7659 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 7660 | assert(shaderModule in State.ShaderModules) |
| 7661 | return State.ShaderModules[shaderModule] |
| 7662 | } |
| 7663 | |
| 7664 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 7665 | assert(pipeline in State.Pipelines) |
| 7666 | return State.Pipelines[pipeline] |
| 7667 | } |
| 7668 | |
| 7669 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 7670 | assert(pipelineLayout in State.PipelineLayouts) |
| 7671 | return State.PipelineLayouts[pipelineLayout] |
| 7672 | } |
| 7673 | |
| 7674 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 7675 | assert(sampler in State.Samplers) |
| 7676 | return State.Samplers[sampler] |
| 7677 | } |
| 7678 | |
| 7679 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 7680 | assert(descriptorSet in State.DescriptorSets) |
| 7681 | return State.DescriptorSets[descriptorSet] |
| 7682 | } |
| 7683 | |
| 7684 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 7685 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 7686 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 7687 | } |
| 7688 | |
| 7689 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 7690 | assert(descriptorPool in State.DescriptorPools) |
| 7691 | return State.DescriptorPools[descriptorPool] |
| 7692 | } |
| 7693 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7694 | macro ref!FenceObject GetFence(VkFence fence) { |
| 7695 | assert(fence in State.Fences) |
| 7696 | return State.Fences[fence] |
| 7697 | } |
| 7698 | |
| 7699 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 7700 | assert(semaphore in State.Semaphores) |
| 7701 | return State.Semaphores[semaphore] |
| 7702 | } |
| 7703 | |
| 7704 | macro ref!EventObject GetEvent(VkEvent event) { |
| 7705 | assert(event in State.Events) |
| 7706 | return State.Events[event] |
| 7707 | } |
| 7708 | |
| 7709 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 7710 | assert(queryPool in State.QueryPools) |
| 7711 | return State.QueryPools[queryPool] |
| 7712 | } |
| 7713 | |
| 7714 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 7715 | assert(framebuffer in State.Framebuffers) |
| 7716 | return State.Framebuffers[framebuffer] |
| 7717 | } |
| 7718 | |
| 7719 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 7720 | assert(renderPass in State.RenderPasses) |
| 7721 | return State.RenderPasses[renderPass] |
| 7722 | } |
| 7723 | |
| 7724 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 7725 | assert(pipelineCache in State.PipelineCaches) |
| 7726 | return State.PipelineCaches[pipelineCache] |
| 7727 | } |
| 7728 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7729 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 7730 | assert(commandPool in State.CommandPools) |
| 7731 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 7732 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7733 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7734 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 7735 | assert(surface in State.Surfaces) |
| 7736 | return State.Surfaces[surface] |
| 7737 | } |
| 7738 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7739 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 7740 | assert(swapchain in State.Swapchains) |
| 7741 | return State.Swapchains[swapchain] |
| 7742 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 7743 | |
| 7744 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 7745 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 7746 | } |