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 | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 31 | define VERSION_PATCH 49 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 32 | |
| 33 | // API limits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 34 | define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 |
| 35 | define VK_UUID_SIZE 16 |
| 36 | define VK_MAX_EXTENSION_NAME_SIZE 256 |
| 37 | define VK_MAX_DESCRIPTION_SIZE 256 |
| 38 | define VK_MAX_MEMORY_TYPES 32 |
| 39 | define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types. |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 40 | define VK_MAX_DEVICE_GROUP_SIZE_KHX 32 |
| 41 | define VK_LUID_SIZE_KHX 8 |
| 42 | define VK_QUEUE_FAMILY_EXTERNAL_KHX -2 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 43 | |
| 44 | // API keywords |
| 45 | define VK_TRUE 1 |
| 46 | define VK_FALSE 0 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 47 | |
| 48 | // API keyword, but needs special handling by some templates |
| 49 | define NULL_HANDLE 0 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 50 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 51 | // 1 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 52 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 53 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 54 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 55 | // 2 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 56 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 57 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 58 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 59 | // 3 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 60 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 61 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 62 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 63 | // 4 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 64 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 65 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 66 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 67 | // 5 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 68 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 69 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 70 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 71 | // 6 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 72 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 73 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 74 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 75 | // 7 |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 76 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 77 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 78 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 79 | // 8 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 80 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 81 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 82 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 83 | // 9 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 84 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 85 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 86 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 87 | // 10 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 88 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 89 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 90 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 91 | // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 92 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 93 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer" |
| 94 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 95 | // 12 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 96 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 97 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report" |
| 98 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 99 | // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 100 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1 |
| 101 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader" |
| 102 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 103 | // 15 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 104 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 |
| 105 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge" |
| 106 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 107 | // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 108 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 |
| 109 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic" |
| 110 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 111 | // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 112 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 |
| 113 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order" |
| 114 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 115 | // 21 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 116 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 |
| 117 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" |
| 118 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 119 | // 22 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 120 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 |
| 121 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" |
| 122 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 123 | // 23 |
Jesse Hall | 8f49fcb | 2017-03-06 16:02:58 -0800 | [diff] [blame] | 124 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 125 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker" |
| 126 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 127 | // 26 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 128 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 |
| 129 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" |
| 130 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 131 | // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 132 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 |
| 133 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" |
| 134 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 135 | // 28 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 136 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 |
| 137 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" |
| 138 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 139 | // 34 |
| 140 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 |
| 141 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" |
| 142 | |
| 143 | // 36 |
| 144 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 |
| 145 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" |
| 146 | |
| 147 | // 37 |
| 148 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 |
| 149 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" |
| 150 | |
| 151 | // 38 |
| 152 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 |
| 153 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" |
| 154 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 155 | // 54 |
| 156 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1 |
| 157 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview" |
| 158 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 159 | // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 160 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 161 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" |
| 162 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 163 | // 57 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 164 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 165 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" |
| 166 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 167 | // 58 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 168 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 169 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" |
| 170 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 171 | // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 172 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 173 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" |
| 174 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 175 | // 60 |
| 176 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 |
| 177 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" |
| 178 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 179 | // 61 |
| 180 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1 |
| 181 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group" |
| 182 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 183 | // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 184 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 |
| 185 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" |
| 186 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 187 | // 63 |
| 188 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1 |
| 189 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" |
| 190 | |
| 191 | // 64 |
| 192 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 |
| 193 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" |
| 194 | |
| 195 | // 65 |
| 196 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 |
| 197 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" |
| 198 | |
| 199 | // 66 |
| 200 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 |
| 201 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" |
| 202 | |
| 203 | // 70 |
| 204 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1 |
| 205 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" |
| 206 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 207 | // 71 |
| 208 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1 |
| 209 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation" |
| 210 | |
| 211 | // 72 |
| 212 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 213 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities" |
| 214 | |
| 215 | // 73 |
| 216 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 217 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory" |
| 218 | |
| 219 | // 74 |
| 220 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 221 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32" |
| 222 | |
| 223 | // 75 |
| 224 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 |
| 225 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd" |
| 226 | |
| 227 | // 76 |
| 228 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 229 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex" |
| 230 | |
| 231 | // 77 |
| 232 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 |
| 233 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities" |
| 234 | |
| 235 | // 78 |
| 236 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 |
| 237 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore" |
| 238 | |
| 239 | // 79 |
| 240 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 |
| 241 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32" |
| 242 | |
| 243 | // 80 |
| 244 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 |
| 245 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd" |
| 246 | |
| 247 | // 81 |
| 248 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1 |
| 249 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" |
| 250 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 251 | // 85 |
| 252 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 253 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 254 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 255 | // 86 |
| 256 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 |
| 257 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" |
| 258 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 259 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 260 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 261 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 262 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 263 | // 88 |
| 264 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 |
| 265 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" |
| 266 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 267 | // 89 |
| 268 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 |
| 269 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" |
| 270 | |
| 271 | // 90 |
| 272 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 |
| 273 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" |
| 274 | |
| 275 | // 91 |
| 276 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 |
| 277 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" |
| 278 | |
| 279 | // 92 |
| 280 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 |
| 281 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control" |
| 282 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 283 | // 93 |
| 284 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 285 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 286 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 287 | // 95 |
| 288 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 |
| 289 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" |
| 290 | |
| 291 | // 96 |
| 292 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 |
| 293 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" |
| 294 | |
| 295 | // 97 |
| 296 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 |
| 297 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" |
| 298 | |
| 299 | // 98 |
| 300 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 |
| 301 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" |
| 302 | |
| 303 | // 99 |
| 304 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 |
| 305 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" |
| 306 | |
| 307 | // 100 |
| 308 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 |
| 309 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" |
| 310 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 311 | // 105 |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 312 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 2 |
| 313 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 314 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 315 | // 106 |
| 316 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1 |
| 317 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" |
| 318 | |
| 319 | // 112 |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 320 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 |
| 321 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 322 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 323 | // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 324 | @extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 |
| 325 | @extension("VK_KHR_get_surface_capabilities2") define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" |
| 326 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 327 | // 123 |
| 328 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1 |
| 329 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" |
| 330 | |
| 331 | // 124 |
| 332 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1 |
| 333 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" |
| 334 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 335 | ///////////// |
| 336 | // Types // |
| 337 | ///////////// |
| 338 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 339 | type u32 VkBool32 |
| 340 | type u32 VkFlags |
| 341 | type u64 VkDeviceSize |
| 342 | type u32 VkSampleMask |
| 343 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 344 | /// Dispatchable handle types. |
| 345 | @dispatchHandle type u64 VkInstance |
| 346 | @dispatchHandle type u64 VkPhysicalDevice |
| 347 | @dispatchHandle type u64 VkDevice |
| 348 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 349 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 350 | |
| 351 | /// Non dispatchable handle types. |
| 352 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 353 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 354 | @nonDispatchHandle type u64 VkBuffer |
| 355 | @nonDispatchHandle type u64 VkBufferView |
| 356 | @nonDispatchHandle type u64 VkImage |
| 357 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 358 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 359 | @nonDispatchHandle type u64 VkPipeline |
| 360 | @nonDispatchHandle type u64 VkPipelineLayout |
| 361 | @nonDispatchHandle type u64 VkSampler |
| 362 | @nonDispatchHandle type u64 VkDescriptorSet |
| 363 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 364 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 365 | @nonDispatchHandle type u64 VkFence |
| 366 | @nonDispatchHandle type u64 VkSemaphore |
| 367 | @nonDispatchHandle type u64 VkEvent |
| 368 | @nonDispatchHandle type u64 VkQueryPool |
| 369 | @nonDispatchHandle type u64 VkFramebuffer |
| 370 | @nonDispatchHandle type u64 VkRenderPass |
| 371 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 372 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 373 | // 1 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 374 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 375 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 376 | // 2 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 377 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 378 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 379 | // 3 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 380 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 381 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 382 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 383 | // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 384 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 385 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 386 | // 86 |
| 387 | @extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR |
| 388 | |
| 389 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 390 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 391 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 392 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 393 | |
| 394 | ///////////// |
| 395 | // Enums // |
| 396 | ///////////// |
| 397 | |
| 398 | enum VkImageLayout { |
| 399 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 400 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 401 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 402 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 403 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 404 | VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 405 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 406 | VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 407 | VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 408 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 409 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 410 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 411 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 412 | //@extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 413 | VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | enum VkAttachmentLoadOp { |
| 417 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 418 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 419 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 420 | } |
| 421 | |
| 422 | enum VkAttachmentStoreOp { |
| 423 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 424 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 425 | } |
| 426 | |
| 427 | enum VkImageType { |
| 428 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 429 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 430 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 431 | } |
| 432 | |
| 433 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 434 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 435 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 436 | } |
| 437 | |
| 438 | enum VkImageViewType { |
| 439 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 440 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 441 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 442 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 443 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 444 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 445 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 446 | } |
| 447 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 448 | enum VkCommandBufferLevel { |
| 449 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 450 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 451 | } |
| 452 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 453 | enum VkComponentSwizzle { |
| 454 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 455 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 456 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 457 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 458 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 459 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 460 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | enum VkDescriptorType { |
| 464 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 465 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 466 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 467 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 468 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 469 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 470 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 471 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 472 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 473 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 474 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 475 | } |
| 476 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 477 | enum VkQueryType { |
| 478 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 479 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 480 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 481 | } |
| 482 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 483 | enum VkBorderColor { |
| 484 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 485 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 486 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 487 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 488 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 489 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 490 | } |
| 491 | |
| 492 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 493 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 494 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 495 | } |
| 496 | |
| 497 | enum VkPrimitiveTopology { |
| 498 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 499 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 500 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 501 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 502 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 503 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 504 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 505 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 506 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 507 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 508 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 509 | } |
| 510 | |
| 511 | enum VkSharingMode { |
| 512 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 513 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 514 | } |
| 515 | |
| 516 | enum VkIndexType { |
| 517 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 518 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 519 | } |
| 520 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 521 | enum VkFilter { |
| 522 | VK_FILTER_NEAREST = 0x00000000, |
| 523 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 524 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 525 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 526 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 527 | } |
| 528 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 529 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 530 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 531 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 532 | } |
| 533 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 534 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 535 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 536 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 537 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 538 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 539 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 540 | } |
| 541 | |
| 542 | enum VkCompareOp { |
| 543 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 544 | VK_COMPARE_OP_LESS = 0x00000001, |
| 545 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 546 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 547 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 548 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 549 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 550 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 551 | } |
| 552 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 553 | enum VkPolygonMode { |
| 554 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 555 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 556 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 557 | } |
| 558 | |
| 559 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 560 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 561 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 562 | } |
| 563 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 564 | enum VkBlendFactor { |
| 565 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 566 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 567 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 568 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 569 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 570 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 571 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 572 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 573 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 574 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 575 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 576 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 577 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 578 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 579 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 580 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 581 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 582 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 583 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 584 | } |
| 585 | |
| 586 | enum VkBlendOp { |
| 587 | VK_BLEND_OP_ADD = 0x00000000, |
| 588 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 589 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 590 | VK_BLEND_OP_MIN = 0x00000003, |
| 591 | VK_BLEND_OP_MAX = 0x00000004, |
| 592 | } |
| 593 | |
| 594 | enum VkStencilOp { |
| 595 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 596 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 597 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 598 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 599 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 600 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 601 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 602 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 603 | } |
| 604 | |
| 605 | enum VkLogicOp { |
| 606 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 607 | VK_LOGIC_OP_AND = 0x00000001, |
| 608 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 609 | VK_LOGIC_OP_COPY = 0x00000003, |
| 610 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 611 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 612 | VK_LOGIC_OP_XOR = 0x00000006, |
| 613 | VK_LOGIC_OP_OR = 0x00000007, |
| 614 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 615 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 616 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 617 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 618 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 619 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 620 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 621 | VK_LOGIC_OP_SET = 0x0000000f, |
| 622 | } |
| 623 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 624 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 625 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 626 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 627 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 628 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 629 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 630 | } |
| 631 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 632 | enum VkInternalAllocationType { |
| 633 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 634 | } |
| 635 | |
| 636 | enum VkPhysicalDeviceType { |
| 637 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 638 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 639 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 640 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 641 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 642 | } |
| 643 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 644 | enum VkVertexInputRate { |
| 645 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 646 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 647 | } |
| 648 | |
| 649 | /// Vulkan format definitions |
| 650 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 651 | VK_FORMAT_UNDEFINED = 0, |
| 652 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 653 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 654 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 655 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 656 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 657 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 658 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 659 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 660 | VK_FORMAT_R8_UNORM = 9, |
| 661 | VK_FORMAT_R8_SNORM = 10, |
| 662 | VK_FORMAT_R8_USCALED = 11, |
| 663 | VK_FORMAT_R8_SSCALED = 12, |
| 664 | VK_FORMAT_R8_UINT = 13, |
| 665 | VK_FORMAT_R8_SINT = 14, |
| 666 | VK_FORMAT_R8_SRGB = 15, |
| 667 | VK_FORMAT_R8G8_UNORM = 16, |
| 668 | VK_FORMAT_R8G8_SNORM = 17, |
| 669 | VK_FORMAT_R8G8_USCALED = 18, |
| 670 | VK_FORMAT_R8G8_SSCALED = 19, |
| 671 | VK_FORMAT_R8G8_UINT = 20, |
| 672 | VK_FORMAT_R8G8_SINT = 21, |
| 673 | VK_FORMAT_R8G8_SRGB = 22, |
| 674 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 675 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 676 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 677 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 678 | VK_FORMAT_R8G8B8_UINT = 27, |
| 679 | VK_FORMAT_R8G8B8_SINT = 28, |
| 680 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 681 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 682 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 683 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 684 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 685 | VK_FORMAT_B8G8R8_UINT = 34, |
| 686 | VK_FORMAT_B8G8R8_SINT = 35, |
| 687 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 688 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 689 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 690 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 691 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 692 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 693 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 694 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 695 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 696 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 697 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 698 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 699 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 700 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 701 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 702 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 703 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 704 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 705 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 706 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 707 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 708 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 709 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 710 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 711 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 712 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 713 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 714 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 715 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 716 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 717 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 718 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 719 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 720 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 721 | VK_FORMAT_R16_UNORM = 70, |
| 722 | VK_FORMAT_R16_SNORM = 71, |
| 723 | VK_FORMAT_R16_USCALED = 72, |
| 724 | VK_FORMAT_R16_SSCALED = 73, |
| 725 | VK_FORMAT_R16_UINT = 74, |
| 726 | VK_FORMAT_R16_SINT = 75, |
| 727 | VK_FORMAT_R16_SFLOAT = 76, |
| 728 | VK_FORMAT_R16G16_UNORM = 77, |
| 729 | VK_FORMAT_R16G16_SNORM = 78, |
| 730 | VK_FORMAT_R16G16_USCALED = 79, |
| 731 | VK_FORMAT_R16G16_SSCALED = 80, |
| 732 | VK_FORMAT_R16G16_UINT = 81, |
| 733 | VK_FORMAT_R16G16_SINT = 82, |
| 734 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 735 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 736 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 737 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 738 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 739 | VK_FORMAT_R16G16B16_UINT = 88, |
| 740 | VK_FORMAT_R16G16B16_SINT = 89, |
| 741 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 742 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 743 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 744 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 745 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 746 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 747 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 748 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 749 | VK_FORMAT_R32_UINT = 98, |
| 750 | VK_FORMAT_R32_SINT = 99, |
| 751 | VK_FORMAT_R32_SFLOAT = 100, |
| 752 | VK_FORMAT_R32G32_UINT = 101, |
| 753 | VK_FORMAT_R32G32_SINT = 102, |
| 754 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 755 | VK_FORMAT_R32G32B32_UINT = 104, |
| 756 | VK_FORMAT_R32G32B32_SINT = 105, |
| 757 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 758 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 759 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 760 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 761 | VK_FORMAT_R64_UINT = 110, |
| 762 | VK_FORMAT_R64_SINT = 111, |
| 763 | VK_FORMAT_R64_SFLOAT = 112, |
| 764 | VK_FORMAT_R64G64_UINT = 113, |
| 765 | VK_FORMAT_R64G64_SINT = 114, |
| 766 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 767 | VK_FORMAT_R64G64B64_UINT = 116, |
| 768 | VK_FORMAT_R64G64B64_SINT = 117, |
| 769 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 770 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 771 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 772 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 773 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 774 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 775 | VK_FORMAT_D16_UNORM = 124, |
| 776 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 777 | VK_FORMAT_D32_SFLOAT = 126, |
| 778 | VK_FORMAT_S8_UINT = 127, |
| 779 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 780 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 781 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 782 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 783 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 784 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 785 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 786 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 787 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 788 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 789 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 790 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 791 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 792 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 793 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 794 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 795 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 796 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 797 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 798 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 799 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 800 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 801 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 802 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 803 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 804 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 805 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 806 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 807 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 808 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 809 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 810 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 811 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 812 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 813 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 814 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 815 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 816 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 817 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 818 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 819 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 820 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 821 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 822 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 823 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 824 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 825 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 826 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 827 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 828 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 829 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 830 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 831 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 832 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 833 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 834 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 835 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 836 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 837 | //@extension("VK_IMG_format_pvrtc") // 28 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 838 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 839 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 840 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 841 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 842 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 843 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 844 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 845 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 846 | } |
| 847 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 848 | /// Structure type enumerant |
| 849 | enum VkStructureType { |
| 850 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 851 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 852 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 853 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 854 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 855 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 856 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 857 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 858 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 859 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 860 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 861 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 862 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 863 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 864 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 865 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 866 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 867 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 868 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 869 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 870 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 871 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 872 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 873 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 874 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 875 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 876 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 877 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 878 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 879 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 880 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 881 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 882 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 883 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 884 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 885 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 886 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 887 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 888 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 889 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 890 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 891 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 892 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 893 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 894 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 895 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 896 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 897 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 898 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 899 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 900 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 901 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 902 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 903 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 904 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 905 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 906 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 907 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 908 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 909 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 910 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 911 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 912 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 913 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 914 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 915 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 916 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 917 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 918 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 919 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 920 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 921 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 922 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 923 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 924 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 925 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 926 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 927 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 928 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 929 | //@extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 930 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 931 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 932 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 933 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 934 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 935 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 936 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 937 | //@extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 938 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 939 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 940 | //@extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 941 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 942 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 943 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 944 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 945 | //@extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 946 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 947 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 948 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 949 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 950 | //@extension("VK_KHX_multiview") // 54 |
| 951 | VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000, |
| 952 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001, |
| 953 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002, |
| 954 | |
| 955 | //@extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 956 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 957 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 958 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 959 | //@extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 960 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 961 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 962 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 963 | //@extension("VK_NV_win32_keyed_mutex") // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 964 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 965 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 966 | //@extension("VK_KHR_get_physical_device_properties2") // 60 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 967 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 968 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 969 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 970 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 971 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 972 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 973 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 974 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 975 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 976 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 977 | //@extension("VK_KHX_device_group") // 61 |
| 978 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, |
| 979 | VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, |
| 980 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, |
| 981 | VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, |
| 982 | VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, |
| 983 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, |
| 984 | VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, |
| 985 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, |
| 986 | VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, |
| 987 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, |
| 988 | VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, |
| 989 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, |
| 990 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, |
| 991 | |
| 992 | //@extension("VK_EXT_validation_flags") // 62 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 993 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 994 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 995 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 996 | VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, |
| 997 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 998 | //@extension("VK_KHX_device_group_creation") // 71 |
| 999 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000, |
| 1000 | VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001, |
| 1001 | |
| 1002 | //@extension("VK_KHX_external_memory_capabilities") // 72 |
| 1003 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000, |
| 1004 | VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001, |
| 1005 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002, |
| 1006 | VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003, |
| 1007 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1008 | |
| 1009 | //@extension("VK_KHX_external_memory") // 73 |
| 1010 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000, |
| 1011 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001, |
| 1012 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002, |
| 1013 | |
| 1014 | //@extension("VK_KHX_external_memory_win32") // 74 |
| 1015 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000, |
| 1016 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001, |
| 1017 | VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002, |
| 1018 | |
| 1019 | //@extension("VK_KHX_external_memory_fd") // 75 |
| 1020 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000, |
| 1021 | VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001, |
| 1022 | |
| 1023 | //@extension("VK_KHX_win32_keyed_mutex") // 76 |
| 1024 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000, |
| 1025 | |
| 1026 | //@extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1027 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000, |
| 1028 | VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001, |
| 1029 | |
| 1030 | //@extension("VK_KHX_external_semaphore") // 78 |
| 1031 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000, |
| 1032 | |
| 1033 | //@extension("VK_KHX_external_semaphore_win32") // 79 |
| 1034 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000, |
| 1035 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001, |
| 1036 | VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002, |
| 1037 | |
| 1038 | //@extension("VK_KHX_external_semaphore_fd") // 80 |
| 1039 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000, |
| 1040 | |
| 1041 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1042 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, |
| 1043 | |
| 1044 | //@extension("VK_KHR_incremental_present") // 85 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1045 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1046 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1047 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 1048 | VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, |
| 1049 | |
| 1050 | //@extension("VK_NVX_device_generated_commands") // 87 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1051 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 1052 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 1053 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 1054 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 1055 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 1056 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1057 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1058 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1059 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, |
| 1060 | |
| 1061 | //@extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1062 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, |
| 1063 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1064 | //@extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1065 | VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, |
| 1066 | VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, |
| 1067 | VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, |
| 1068 | VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1069 | |
| 1070 | //@extension("VK_GOOGLE_display_timing") // 93 |
| 1071 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, |
| 1072 | |
| 1073 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1074 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, |
| 1075 | |
| 1076 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 1077 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, |
| 1078 | |
| 1079 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1080 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, |
| 1081 | VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, |
| 1082 | |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 1083 | //@extension("VK_EXT_hdr_metadata") // 106 |
| 1084 | VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, |
| 1085 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 1086 | //@extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 1087 | VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, |
| 1088 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 1089 | //@extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 1090 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, |
| 1091 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, |
| 1092 | VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, |
| 1093 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1094 | //@extension("VK_MVK_ios_surface") // 123 |
| 1095 | VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, |
| 1096 | |
| 1097 | //@extension("VK_MVK_macos_surface") // 124 |
| 1098 | VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1099 | } |
| 1100 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1101 | enum VkSubpassContents { |
| 1102 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 1103 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1104 | } |
| 1105 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1106 | enum VkPipelineCacheHeaderVersion { |
| 1107 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 1108 | } |
| 1109 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1110 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1111 | /// Error and return codes |
| 1112 | enum VkResult { |
| 1113 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1114 | VK_SUCCESS = 0, |
| 1115 | VK_NOT_READY = 1, |
| 1116 | VK_TIMEOUT = 2, |
| 1117 | VK_EVENT_SET = 3, |
| 1118 | VK_EVENT_RESET = 4, |
| 1119 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1120 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1121 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1122 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1123 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1124 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1125 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 1126 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 1127 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 1128 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 1129 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 1130 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 1131 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 1132 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 1133 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 1134 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 1135 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 1136 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1137 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1138 | //@extension("VK_KHR_surface") // 1 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1139 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1140 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1141 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1142 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1143 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1144 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1145 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1146 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1147 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1148 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1149 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1150 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1151 | //@extension("VK_NV_glsl_shader") // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1152 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1153 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1154 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1155 | VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1156 | |
| 1157 | //@extension("VK_KHX_external_memory") // 73 |
| 1158 | VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1159 | } |
| 1160 | |
| 1161 | enum VkDynamicState { |
| 1162 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 1163 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 1164 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 1165 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 1166 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 1167 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 1168 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 1169 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 1170 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1171 | |
| 1172 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1173 | VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, |
| 1174 | |
| 1175 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1176 | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1177 | } |
| 1178 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 1179 | enum VkObjectType { |
| 1180 | VK_OBJECT_TYPE_UNKNOWN = 0, |
| 1181 | VK_OBJECT_TYPE_INSTANCE = 1, |
| 1182 | VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2, |
| 1183 | VK_OBJECT_TYPE_DEVICE = 3, |
| 1184 | VK_OBJECT_TYPE_QUEUE = 4, |
| 1185 | VK_OBJECT_TYPE_SEMAPHORE = 5, |
| 1186 | VK_OBJECT_TYPE_COMMAND_BUFFER = 6, |
| 1187 | VK_OBJECT_TYPE_FENCE = 7, |
| 1188 | VK_OBJECT_TYPE_DEVICE_MEMORY = 8, |
| 1189 | VK_OBJECT_TYPE_BUFFER = 9, |
| 1190 | VK_OBJECT_TYPE_IMAGE = 10, |
| 1191 | VK_OBJECT_TYPE_EVENT = 11, |
| 1192 | VK_OBJECT_TYPE_QUERY_POOL = 12, |
| 1193 | VK_OBJECT_TYPE_BUFFER_VIEW = 13, |
| 1194 | VK_OBJECT_TYPE_IMAGE_VIEW = 14, |
| 1195 | VK_OBJECT_TYPE_SHADER_MODULE = 15, |
| 1196 | VK_OBJECT_TYPE_PIPELINE_CACHE = 16, |
| 1197 | VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17, |
| 1198 | VK_OBJECT_TYPE_RENDER_PASS = 18, |
| 1199 | VK_OBJECT_TYPE_PIPELINE = 19, |
| 1200 | VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20, |
| 1201 | VK_OBJECT_TYPE_SAMPLER = 21, |
| 1202 | VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22, |
| 1203 | VK_OBJECT_TYPE_DESCRIPTOR_SET = 23, |
| 1204 | VK_OBJECT_TYPE_FRAMEBUFFER = 24, |
| 1205 | VK_OBJECT_TYPE_COMMAND_POOL = 25, |
| 1206 | |
| 1207 | //@extension("VK_KHR_surface") // 1 |
| 1208 | VK_OBJECT_TYPE_SURFACE_KHR = 1000000000, |
| 1209 | |
| 1210 | //@extension("VK_KHR_swapchain") // 2 |
| 1211 | VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000, |
| 1212 | |
| 1213 | //@extension("VK_KHR_display") // 3 |
| 1214 | VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000, |
| 1215 | VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001, |
| 1216 | |
| 1217 | //@extension("VK_KHR_debug_report") // 12 |
| 1218 | VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000, |
| 1219 | |
| 1220 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 1221 | VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000, |
| 1222 | |
| 1223 | //@extension("VK_NVX_device_generated_commands") // 87 |
| 1224 | VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000, |
| 1225 | VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001, |
| 1226 | } |
| 1227 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1228 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1229 | enum VkPresentModeKHR { |
| 1230 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 1231 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 1232 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1233 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1234 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 1235 | //@extension("VK_KHR_shared_presentable_image") // 112 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1236 | VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, |
| 1237 | VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1238 | } |
| 1239 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1240 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1241 | enum VkColorSpaceKHR { |
| 1242 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1243 | |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 1244 | //@extension("VK_EXT_swapchain_colorspace") // 105 |
| 1245 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, |
| 1246 | VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, |
| 1247 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, |
| 1248 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, |
| 1249 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, |
| 1250 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, |
| 1251 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, |
| 1252 | VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, |
| 1253 | VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, |
| 1254 | VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, |
Courtney Goeltzenleuchter | 7f558ed | 2017-01-23 17:15:24 -0700 | [diff] [blame] | 1255 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 1256 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 1257 | VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1258 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1259 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1260 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1261 | enum VkDebugReportObjectTypeEXT { |
| 1262 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 1263 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 1264 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 1265 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 1266 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 1267 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 1268 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 1269 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 1270 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 1271 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 1272 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 1273 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 1274 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 1275 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 1276 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 1277 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 1278 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 1279 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 1280 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 1281 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 1282 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 1283 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 1284 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 1285 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 1286 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 1287 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 1288 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 1289 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 1290 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1291 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 1292 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 1293 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 1294 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 1295 | |
| 1296 | //extension("VK_KHR_descriptor_update_template") // 86 |
| 1297 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1298 | } |
| 1299 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1300 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1301 | enum VkDebugReportErrorEXT { |
| 1302 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 1303 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 1304 | } |
| 1305 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1306 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1307 | enum VkRasterizationOrderAMD { |
| 1308 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 1309 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 1310 | } |
| 1311 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1312 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1313 | enum VkValidationCheckEXT { |
| 1314 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 1315 | } |
| 1316 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1317 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 1318 | enum VkDescriptorUpdateTemplateTypeKHR { |
| 1319 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0, |
| 1320 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, |
| 1321 | } |
| 1322 | |
| 1323 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1324 | enum VkIndirectCommandsTokenTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1325 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1326 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1327 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1328 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1329 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1330 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1331 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1332 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1333 | } |
| 1334 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1335 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1336 | enum VkObjectEntryTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1337 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1338 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1339 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1340 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1341 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1342 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1343 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1344 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1345 | enum VkDisplayPowerStateEXT { |
| 1346 | VK_DISPLAY_POWER_STATE_OFF_EXT = 0, |
| 1347 | VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, |
| 1348 | VK_DISPLAY_POWER_STATE_ON_EXT = 2, |
| 1349 | } |
| 1350 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1351 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1352 | enum VkDeviceEventTypeEXT { |
| 1353 | VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, |
| 1354 | } |
| 1355 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1356 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1357 | enum VkDisplayEventTypeEXT { |
| 1358 | VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, |
| 1359 | } |
| 1360 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1361 | @extension("VK_NV_viewport_swizzle") // 99 |
| 1362 | enum VkViewportCoordinateSwizzleNV { |
| 1363 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, |
| 1364 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, |
| 1365 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, |
| 1366 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, |
| 1367 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, |
| 1368 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, |
| 1369 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, |
| 1370 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, |
| 1371 | } |
| 1372 | |
| 1373 | @extension("VK_EXT_discard_rectangles") // 100 |
| 1374 | enum VkDiscardRectangleModeEXT { |
| 1375 | VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, |
| 1376 | VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, |
| 1377 | } |
| 1378 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1379 | ///////////////// |
| 1380 | // Bitfields // |
| 1381 | ///////////////// |
| 1382 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1383 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1384 | type VkFlags VkQueueFlags |
| 1385 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1386 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1387 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1388 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1389 | 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] | 1390 | } |
| 1391 | |
| 1392 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1393 | type VkFlags VkMemoryPropertyFlags |
| 1394 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1395 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1396 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1397 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1398 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1399 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1400 | } |
| 1401 | |
| 1402 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1403 | type VkFlags VkMemoryHeapFlags |
| 1404 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1405 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1406 | |
| 1407 | //@extension("VK_KHX_device_group_creation") // 71 |
| 1408 | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1409 | } |
| 1410 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1411 | /// Access flags |
| 1412 | type VkFlags VkAccessFlags |
| 1413 | bitfield VkAccessFlagBits { |
| 1414 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1415 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1416 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1417 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1418 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1419 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1420 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1421 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1422 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1423 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1424 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1425 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1426 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1427 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1428 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1429 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1430 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1431 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1432 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1433 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1434 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1435 | } |
| 1436 | |
| 1437 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1438 | type VkFlags VkBufferUsageFlags |
| 1439 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1440 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1441 | 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] | 1442 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1443 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1444 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1445 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1446 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1447 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1448 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1449 | } |
| 1450 | |
| 1451 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1452 | type VkFlags VkBufferCreateFlags |
| 1453 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1454 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1455 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1456 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1457 | } |
| 1458 | |
| 1459 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1460 | type VkFlags VkShaderStageFlags |
| 1461 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1462 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1463 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1464 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1465 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1466 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1467 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1468 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1469 | |
| 1470 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1471 | } |
| 1472 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1473 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1474 | type VkFlags VkDescriptorPoolCreateFlags |
| 1475 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1476 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1477 | } |
| 1478 | |
| 1479 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1480 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1481 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1482 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1483 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1484 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1485 | type VkFlags VkImageUsageFlags |
| 1486 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1487 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1488 | 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] | 1489 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1490 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1491 | 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] | 1492 | 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] | 1493 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1494 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1495 | } |
| 1496 | |
| 1497 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1498 | type VkFlags VkImageCreateFlags |
| 1499 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1500 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1501 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1502 | 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] | 1503 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1504 | 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] | 1505 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1506 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1507 | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1508 | |
| 1509 | //@extension("VK_KHX_device_group") // 61 |
| 1510 | VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1511 | } |
| 1512 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1513 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1514 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1515 | //bitfield VkImageViewCreateFlagBits { |
| 1516 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1517 | |
| 1518 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1519 | type VkFlags VkPipelineCreateFlags |
| 1520 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1521 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1522 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1523 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1524 | |
| 1525 | //@extension("VK_KHX_device_group") // 61 |
| 1526 | VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008, |
| 1527 | VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1528 | } |
| 1529 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1530 | /// Color component flags |
| 1531 | type VkFlags VkColorComponentFlags |
| 1532 | bitfield VkColorComponentFlagBits { |
| 1533 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1534 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1535 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1536 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1537 | } |
| 1538 | |
| 1539 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1540 | type VkFlags VkFenceCreateFlags |
| 1541 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1542 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1543 | } |
| 1544 | |
| 1545 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1546 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1547 | //bitfield VkSemaphoreCreateFlagBits { |
| 1548 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1549 | |
| 1550 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1551 | type VkFlags VkFormatFeatureFlags |
| 1552 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1553 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1554 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1555 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1556 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1557 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1558 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1559 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1560 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1561 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1562 | 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] | 1563 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1564 | 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] | 1565 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1566 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1567 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1568 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1569 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1570 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1571 | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, |
| 1572 | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1573 | } |
| 1574 | |
| 1575 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1576 | type VkFlags VkQueryControlFlags |
| 1577 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1578 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1579 | } |
| 1580 | |
| 1581 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1582 | type VkFlags VkQueryResultFlags |
| 1583 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1584 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1585 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1586 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1587 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1588 | } |
| 1589 | |
| 1590 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1591 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1592 | //bitfield VkShaderModuleCreateFlagBits { |
| 1593 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1594 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1595 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1596 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1597 | //bitfield VkEventCreateFlagBits { |
| 1598 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1599 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1600 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1601 | type VkFlags VkCommandBufferUsageFlags |
| 1602 | bitfield VkCommandBufferUsageFlagBits { |
| 1603 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1604 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1605 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1606 | } |
| 1607 | |
| 1608 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1609 | type VkFlags VkQueryPipelineStatisticFlags |
| 1610 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1611 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1612 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1613 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1614 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1615 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1616 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1617 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1618 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1619 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1620 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1621 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1622 | } |
| 1623 | |
| 1624 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1625 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1626 | //bitfield VkMemoryMapFlagBits { |
| 1627 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1628 | |
| 1629 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1630 | type VkFlags VkImageAspectFlags |
| 1631 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1632 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1633 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1634 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1635 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1636 | } |
| 1637 | |
| 1638 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1639 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1640 | bitfield VkSparseMemoryBindFlagBits { |
| 1641 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1642 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1643 | |
| 1644 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1645 | type VkFlags VkSparseImageFormatFlags |
| 1646 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1647 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1648 | 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. |
| 1649 | 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] | 1650 | } |
| 1651 | |
| 1652 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1653 | type VkFlags VkPipelineStageFlags |
| 1654 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1655 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1656 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1657 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1658 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1659 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1660 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1661 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1662 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1663 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1664 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1665 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1666 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1667 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1668 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1669 | 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] | 1670 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1671 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1672 | 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] | 1673 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1674 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1675 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1676 | } |
| 1677 | |
| 1678 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1679 | type VkFlags VkAttachmentDescriptionFlags |
| 1680 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1681 | 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] | 1682 | } |
| 1683 | |
| 1684 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1685 | type VkFlags VkSubpassDescriptionFlags |
| 1686 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1687 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1688 | VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, |
| 1689 | VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1690 | } |
| 1691 | |
| 1692 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1693 | type VkFlags VkCommandPoolCreateFlags |
| 1694 | bitfield VkCommandPoolCreateFlagBits { |
| 1695 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1696 | 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] | 1697 | } |
| 1698 | |
| 1699 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1700 | type VkFlags VkCommandPoolResetFlags |
| 1701 | bitfield VkCommandPoolResetFlagBits { |
| 1702 | 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] | 1703 | } |
| 1704 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1705 | type VkFlags VkCommandBufferResetFlags |
| 1706 | bitfield VkCommandBufferResetFlagBits { |
| 1707 | 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] | 1708 | } |
| 1709 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1710 | type VkFlags VkSampleCountFlags |
| 1711 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1712 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1713 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1714 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1715 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1716 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1717 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1718 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1719 | } |
| 1720 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1721 | type VkFlags VkStencilFaceFlags |
| 1722 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1723 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1724 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1725 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1726 | } |
| 1727 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1728 | /// Instance creation flags |
| 1729 | type VkFlags VkInstanceCreateFlags |
| 1730 | //bitfield VkInstanceCreateFlagBits { |
| 1731 | //} |
| 1732 | |
| 1733 | /// Device creation flags |
| 1734 | type VkFlags VkDeviceCreateFlags |
| 1735 | //bitfield VkDeviceCreateFlagBits { |
| 1736 | //} |
| 1737 | |
| 1738 | /// Device queue creation flags |
| 1739 | type VkFlags VkDeviceQueueCreateFlags |
| 1740 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1741 | //} |
| 1742 | |
| 1743 | /// Query pool creation flags |
| 1744 | type VkFlags VkQueryPoolCreateFlags |
| 1745 | //bitfield VkQueryPoolCreateFlagBits { |
| 1746 | //} |
| 1747 | |
| 1748 | /// Buffer view creation flags |
| 1749 | type VkFlags VkBufferViewCreateFlags |
| 1750 | //bitfield VkBufferViewCreateFlagBits { |
| 1751 | //} |
| 1752 | |
| 1753 | /// Pipeline cache creation flags |
| 1754 | type VkFlags VkPipelineCacheCreateFlags |
| 1755 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1756 | //} |
| 1757 | |
| 1758 | /// Pipeline shader stage creation flags |
| 1759 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1760 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1761 | //} |
| 1762 | |
| 1763 | /// Descriptor set layout creation flags |
| 1764 | type VkFlags VkDescriptorSetLayoutCreateFlags |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1765 | bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1766 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1767 | VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, |
| 1768 | } |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1769 | |
| 1770 | /// Pipeline vertex input state creation flags |
| 1771 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1772 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1773 | //} |
| 1774 | |
| 1775 | /// Pipeline input assembly state creation flags |
| 1776 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1777 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1778 | //} |
| 1779 | |
| 1780 | /// Tessellation state creation flags |
| 1781 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1782 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1783 | //} |
| 1784 | |
| 1785 | /// Viewport state creation flags |
| 1786 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1787 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1788 | //} |
| 1789 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1790 | /// Rasterization state creation flags |
| 1791 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1792 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1793 | //} |
| 1794 | |
| 1795 | /// Multisample state creation flags |
| 1796 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1797 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1798 | //} |
| 1799 | |
| 1800 | /// Color blend state creation flags |
| 1801 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1802 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1803 | //} |
| 1804 | |
| 1805 | /// Depth/stencil state creation flags |
| 1806 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1807 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1808 | //} |
| 1809 | |
| 1810 | /// Dynamic state creation flags |
| 1811 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1812 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1813 | //} |
| 1814 | |
| 1815 | /// Pipeline layout creation flags |
| 1816 | type VkFlags VkPipelineLayoutCreateFlags |
| 1817 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1818 | //} |
| 1819 | |
| 1820 | /// Sampler creation flags |
| 1821 | type VkFlags VkSamplerCreateFlags |
| 1822 | //bitfield VkSamplerCreateFlagBits { |
| 1823 | //} |
| 1824 | |
| 1825 | /// Render pass creation flags |
| 1826 | type VkFlags VkRenderPassCreateFlags |
| 1827 | //bitfield VkRenderPassCreateFlagBits { |
| 1828 | //} |
| 1829 | |
| 1830 | /// Framebuffer creation flags |
| 1831 | type VkFlags VkFramebufferCreateFlags |
| 1832 | //bitfield VkFramebufferCreateFlagBits { |
| 1833 | //} |
| 1834 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1835 | /// Dependency flags |
| 1836 | type VkFlags VkDependencyFlags |
| 1837 | bitfield VkDependencyFlagBits { |
| 1838 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1839 | |
| 1840 | //@extension("VK_KHX_multiview") // 54 |
| 1841 | VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002, |
| 1842 | |
| 1843 | //@extension("VK_KHX_device_group") // 61 |
| 1844 | VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1845 | } |
| 1846 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1847 | /// Cull mode flags |
| 1848 | type VkFlags VkCullModeFlags |
| 1849 | bitfield VkCullModeFlagBits { |
| 1850 | VK_CULL_MODE_NONE = 0x00000000, |
| 1851 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1852 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1853 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1854 | } |
| 1855 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1856 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1857 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1858 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1859 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1860 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1861 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1862 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1863 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1864 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1865 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1866 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1867 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1868 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1869 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1870 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1871 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1872 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1873 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1874 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1875 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1876 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1877 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1878 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1879 | } |
| 1880 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1881 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1882 | type VkFlags VkSwapchainCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1883 | @extension("VK_KHR_swapchain") // 2 |
| 1884 | bitfield VkSwapchainCreateFlagBitsKHR { |
| 1885 | //@extension("VK_KHX_device_group") // 61 |
| 1886 | VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001, |
| 1887 | } |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1888 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1889 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1890 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1891 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1892 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1893 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1894 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1895 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1896 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1897 | } |
| 1898 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1899 | @extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1900 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1901 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1902 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1903 | //} |
| 1904 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1905 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1906 | type VkFlags VkDisplayModeCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1907 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1908 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1909 | //} |
| 1910 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1911 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1912 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1913 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1914 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1915 | //} |
| 1916 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1917 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1918 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1919 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1920 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1921 | //} |
| 1922 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1923 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1924 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1925 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1926 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1927 | //} |
| 1928 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1929 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1930 | type VkFlags VkMirSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1931 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1932 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1933 | //} |
| 1934 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1935 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1936 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1937 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1938 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1939 | //} |
| 1940 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1941 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1942 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1943 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1944 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1945 | //} |
| 1946 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1947 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1948 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1949 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1950 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1951 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001, |
| 1952 | } |
| 1953 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1954 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1955 | type VkFlags VkDebugReportFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1956 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1957 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1958 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1959 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1960 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1961 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1962 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1963 | } |
| 1964 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1965 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1966 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1967 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1968 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1969 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1970 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1971 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1972 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1973 | } |
| 1974 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1975 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1976 | type VkFlags VkExternalMemoryFeatureFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1977 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1978 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1979 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1980 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1981 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1982 | } |
| 1983 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 1984 | @extension("VK_KHX_device_group") // 61 |
| 1985 | type VkFlags VkPeerMemoryFeatureFlagsKHX |
| 1986 | @extension("VK_KHX_device_group") // 61 |
| 1987 | bitfield VkPeerMemoryFeatureFlagBitsKHX { |
| 1988 | VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001, |
| 1989 | VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002, |
| 1990 | VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004, |
| 1991 | VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008, |
| 1992 | } |
| 1993 | |
| 1994 | @extension("VK_KHX_device_group") // 61 |
| 1995 | type VkFlags VkMemoryAllocateFlagsKHX |
| 1996 | @extension("VK_KHX_device_group") // 61 |
| 1997 | bitfield VkMemoryAllocateFlagBitsKHX { |
| 1998 | VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001, |
| 1999 | } |
| 2000 | |
| 2001 | @extension("VK_KHX_device_group") // 61 |
| 2002 | type VkFlags VkDeviceGroupPresentModeFlagsKHX |
| 2003 | @extension("VK_KHX_device_group") // 61 |
| 2004 | bitfield VkDeviceGroupPresentModeFlagBitsKHX { |
| 2005 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001, |
| 2006 | VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002, |
| 2007 | VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004, |
| 2008 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008, |
| 2009 | } |
| 2010 | |
| 2011 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2012 | type VkFlags VkViSurfaceCreateFlagsNN |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2013 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2014 | //bitfield VkViSurfaceCreateFlagBitsNN { |
| 2015 | //} |
| 2016 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2017 | @extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2018 | type VkFlags VkCommandPoolTrimFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2019 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2020 | //bitfield VkCommandPoolTrimFlagBitsKHR { |
| 2021 | //} |
| 2022 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2023 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 2024 | type VkFlags VkExternalMemoryHandleTypeFlagsKHX |
| 2025 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 2026 | bitfield VkExternalMemoryHandleTypeFlagBitsKHX { |
| 2027 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, |
| 2028 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, |
| 2029 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, |
| 2030 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008, |
| 2031 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010, |
| 2032 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020, |
| 2033 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040, |
| 2034 | } |
| 2035 | |
| 2036 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 2037 | type VkFlags VkExternalMemoryFeatureFlagsKHX |
| 2038 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 2039 | bitfield VkExternalMemoryFeatureFlagBitsKHX { |
| 2040 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001, |
| 2041 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002, |
| 2042 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004, |
| 2043 | } |
| 2044 | |
| 2045 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2046 | type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX |
| 2047 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2048 | bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX { |
| 2049 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001 |
| 2050 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002 |
| 2051 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004 |
| 2052 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008 |
| 2053 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010 |
| 2054 | } |
| 2055 | |
| 2056 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2057 | type VkFlags VkExternalSemaphoreFeatureFlagsKHX |
| 2058 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 2059 | bitfield VkExternalSemaphoreFeatureFlagBitsKHX { |
| 2060 | VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001, |
| 2061 | VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002, |
| 2062 | } |
| 2063 | |
| 2064 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 2065 | type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR |
| 2066 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 2067 | //bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR { |
| 2068 | //} |
| 2069 | |
| 2070 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2071 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2072 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2073 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2074 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 2075 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 2076 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 2077 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2078 | } |
| 2079 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2080 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2081 | type VkFlags VkObjectEntryUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2082 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2083 | bitfield VkObjectEntryUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2084 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 2085 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2086 | } |
| 2087 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2088 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2089 | type VkFlags VkSurfaceCounterFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2090 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2091 | bitfield VkSurfaceCounterFlagBitsEXT { |
| 2092 | VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, |
| 2093 | } |
| 2094 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 2095 | @extension("VK_NV_viewport_swizzle") // 99 |
| 2096 | type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV |
| 2097 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 2098 | //bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV { |
| 2099 | //} |
| 2100 | |
| 2101 | @extension("VK_EXT_discard_rectangles") // 100 |
| 2102 | type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT |
| 2103 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 2104 | //bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT { |
| 2105 | //} |
| 2106 | |
| 2107 | @extension("VK_MVK_ios_surface") // 123 |
| 2108 | type VkFlags VkIOSSurfaceCreateFlagsMVK |
| 2109 | //@extension("VK_MVK_ios_surface") // 123 |
| 2110 | //bitfield VkIOSSurfaceCreateFlagBitsMVK { |
| 2111 | //} |
| 2112 | |
| 2113 | @extension("VK_MVK_macos_surface") // 124 |
| 2114 | type VkFlags VkMacOSSurfaceCreateFlagsMVK |
| 2115 | //@extension("VK_MVK_macos_surface") // 124 |
| 2116 | //bitfield VkMacOSSurfaceCreateFlagBitsMVK { |
| 2117 | //} |
| 2118 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2119 | ////////////////// |
| 2120 | // Structures // |
| 2121 | ////////////////// |
| 2122 | |
| 2123 | class VkOffset2D { |
| 2124 | s32 x |
| 2125 | s32 y |
| 2126 | } |
| 2127 | |
| 2128 | class VkOffset3D { |
| 2129 | s32 x |
| 2130 | s32 y |
| 2131 | s32 z |
| 2132 | } |
| 2133 | |
| 2134 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2135 | u32 width |
| 2136 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2137 | } |
| 2138 | |
| 2139 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2140 | u32 width |
| 2141 | u32 height |
| 2142 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2143 | } |
| 2144 | |
| 2145 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2146 | f32 x |
| 2147 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | f32 width |
| 2149 | f32 height |
| 2150 | f32 minDepth |
| 2151 | f32 maxDepth |
| 2152 | } |
| 2153 | |
| 2154 | class VkRect2D { |
| 2155 | VkOffset2D offset |
| 2156 | VkExtent2D extent |
| 2157 | } |
| 2158 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2159 | class VkClearRect { |
| 2160 | VkRect2D rect |
| 2161 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2162 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2163 | } |
| 2164 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2165 | class VkComponentMapping { |
| 2166 | VkComponentSwizzle r |
| 2167 | VkComponentSwizzle g |
| 2168 | VkComponentSwizzle b |
| 2169 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2170 | } |
| 2171 | |
| 2172 | class VkPhysicalDeviceProperties { |
| 2173 | u32 apiVersion |
| 2174 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2175 | u32 vendorID |
| 2176 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2177 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2178 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 2179 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2180 | VkPhysicalDeviceLimits limits |
| 2181 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2182 | } |
| 2183 | |
| 2184 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2185 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2186 | u32 specVersion /// version of the extension specification implemented |
| 2187 | } |
| 2188 | |
| 2189 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2190 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2191 | u32 specVersion /// version of the layer specification implemented |
| 2192 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2193 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2194 | } |
| 2195 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2196 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2197 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 2198 | const void* pNext /// Next structure in chain |
| 2199 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2200 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2201 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2202 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2203 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2204 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2205 | const VkSemaphore* pSignalSemaphores |
| 2206 | } |
| 2207 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2208 | class VkApplicationInfo { |
| 2209 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 2210 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2211 | const char* pApplicationName |
| 2212 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2213 | const char* pEngineName |
| 2214 | u32 engineVersion |
| 2215 | u32 apiVersion |
| 2216 | } |
| 2217 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2218 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2219 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2220 | PFN_vkAllocationFunction pfnAllocation |
| 2221 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2222 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2223 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2224 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2225 | } |
| 2226 | |
| 2227 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2228 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 2229 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2230 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2231 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2232 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2233 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2234 | } |
| 2235 | |
| 2236 | class VkDeviceCreateInfo { |
| 2237 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 2238 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2239 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2240 | u32 queueCreateInfoCount |
| 2241 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2242 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2243 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2244 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2245 | const char* const* ppEnabledExtensionNames |
| 2246 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2247 | } |
| 2248 | |
| 2249 | class VkInstanceCreateInfo { |
| 2250 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 2251 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2252 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2253 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2254 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2255 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2256 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2257 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 2258 | } |
| 2259 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2260 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2261 | VkQueueFlags queueFlags /// Queue flags |
| 2262 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2263 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2264 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2265 | } |
| 2266 | |
| 2267 | class VkPhysicalDeviceMemoryProperties { |
| 2268 | u32 memoryTypeCount |
| 2269 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 2270 | u32 memoryHeapCount |
| 2271 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 2272 | } |
| 2273 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2274 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2275 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2276 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2277 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2278 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 2279 | } |
| 2280 | |
| 2281 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2282 | VkDeviceSize size /// Specified in bytes |
| 2283 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2284 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 2285 | } |
| 2286 | |
| 2287 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2288 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2289 | VkExtent3D imageGranularity |
| 2290 | VkSparseImageFormatFlags flags |
| 2291 | } |
| 2292 | |
| 2293 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2294 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2295 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2296 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 2297 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 2298 | 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] | 2299 | } |
| 2300 | |
| 2301 | class VkMemoryType { |
| 2302 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 2303 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 2304 | } |
| 2305 | |
| 2306 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2307 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2308 | VkMemoryHeapFlags flags /// Flags for the heap |
| 2309 | } |
| 2310 | |
| 2311 | class VkMappedMemoryRange { |
| 2312 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 2313 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2314 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2315 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 2316 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2317 | } |
| 2318 | |
| 2319 | class VkFormatProperties { |
| 2320 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 2321 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2322 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2323 | } |
| 2324 | |
| 2325 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2326 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 2327 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2328 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2329 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 2330 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 2331 | } |
| 2332 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2333 | class VkDescriptorImageInfo { |
| 2334 | VkSampler sampler |
| 2335 | VkImageView imageView |
| 2336 | VkImageLayout imageLayout |
| 2337 | } |
| 2338 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2339 | class VkDescriptorBufferInfo { |
| 2340 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 2341 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 2342 | 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] | 2343 | } |
| 2344 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2345 | class VkWriteDescriptorSet { |
| 2346 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 2347 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2348 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2349 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 2350 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2351 | 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] | 2352 | 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] | 2353 | const VkDescriptorImageInfo* pImageInfo |
| 2354 | const VkDescriptorBufferInfo* pBufferInfo |
| 2355 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2356 | } |
| 2357 | |
| 2358 | class VkCopyDescriptorSet { |
| 2359 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 2360 | const void* pNext /// Pointer to next structure |
| 2361 | VkDescriptorSet srcSet /// Source descriptor set |
| 2362 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 2363 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2364 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2365 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 2366 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2367 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2368 | } |
| 2369 | |
| 2370 | class VkBufferCreateInfo { |
| 2371 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 2372 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2373 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2374 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2375 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2376 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2377 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2378 | const u32* pQueueFamilyIndices |
| 2379 | } |
| 2380 | |
| 2381 | class VkBufferViewCreateInfo { |
| 2382 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 2383 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2384 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2385 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2386 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2387 | VkDeviceSize offset /// Specified in bytes |
| 2388 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2389 | } |
| 2390 | |
| 2391 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2392 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2393 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2394 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2395 | } |
| 2396 | |
| 2397 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2398 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2399 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2400 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2401 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2402 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2403 | } |
| 2404 | |
| 2405 | class VkMemoryBarrier { |
| 2406 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 2407 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2408 | VkAccessFlags srcAccessMask |
| 2409 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2410 | } |
| 2411 | |
| 2412 | class VkBufferMemoryBarrier { |
| 2413 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 2414 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2415 | VkAccessFlags srcAccessMask |
| 2416 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2417 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2418 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2419 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2420 | VkDeviceSize offset /// Offset within the buffer to sync |
| 2421 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2422 | } |
| 2423 | |
| 2424 | class VkImageMemoryBarrier { |
| 2425 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 2426 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2427 | VkAccessFlags srcAccessMask |
| 2428 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2429 | VkImageLayout oldLayout /// Current layout of the image |
| 2430 | VkImageLayout newLayout /// New layout to transition the image to |
| 2431 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2432 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2433 | VkImage image /// Image to sync |
| 2434 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 2435 | } |
| 2436 | |
| 2437 | class VkImageCreateInfo { |
| 2438 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 2439 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2440 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2441 | VkImageType imageType |
| 2442 | VkFormat format |
| 2443 | VkExtent3D extent |
| 2444 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2445 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2446 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2447 | VkImageTiling tiling |
| 2448 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2449 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2450 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2451 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2452 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2453 | } |
| 2454 | |
| 2455 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2456 | VkDeviceSize offset /// Specified in bytes |
| 2457 | VkDeviceSize size /// Specified in bytes |
| 2458 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2459 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2460 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2461 | } |
| 2462 | |
| 2463 | class VkImageViewCreateInfo { |
| 2464 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 2465 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2466 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2467 | VkImage image |
| 2468 | VkImageViewType viewType |
| 2469 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2470 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2471 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2472 | } |
| 2473 | |
| 2474 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2475 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2476 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2477 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2478 | } |
| 2479 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2480 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2481 | VkDeviceSize resourceOffset /// Specified in bytes |
| 2482 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2483 | VkDeviceMemory memory |
| 2484 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2485 | VkSparseMemoryBindFlags flags |
| 2486 | } |
| 2487 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2488 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2489 | VkImageSubresource subresource |
| 2490 | VkOffset3D offset |
| 2491 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2492 | VkDeviceMemory memory |
| 2493 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2494 | VkSparseMemoryBindFlags flags |
| 2495 | } |
| 2496 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2497 | class VkSparseBufferMemoryBindInfo { |
| 2498 | VkBuffer buffer |
| 2499 | u32 bindCount |
| 2500 | const VkSparseMemoryBind* pBinds |
| 2501 | } |
| 2502 | |
| 2503 | class VkSparseImageOpaqueMemoryBindInfo { |
| 2504 | VkImage image |
| 2505 | u32 bindCount |
| 2506 | const VkSparseMemoryBind* pBinds |
| 2507 | } |
| 2508 | |
| 2509 | class VkSparseImageMemoryBindInfo { |
| 2510 | VkImage image |
| 2511 | u32 bindCount |
| 2512 | const VkSparseMemoryBind* pBinds |
| 2513 | } |
| 2514 | |
| 2515 | class VkBindSparseInfo { |
| 2516 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2517 | const void* pNext |
| 2518 | u32 waitSemaphoreCount |
| 2519 | const VkSemaphore* pWaitSemaphores |
| 2520 | u32 numBufferBinds |
| 2521 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2522 | u32 numImageOpaqueBinds |
| 2523 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2524 | u32 numImageBinds |
| 2525 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2526 | u32 signalSemaphoreCount |
| 2527 | const VkSemaphore* pSignalSemaphores |
| 2528 | } |
| 2529 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2530 | class VkImageSubresourceLayers { |
| 2531 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2532 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2533 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2534 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2535 | } |
| 2536 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2537 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2538 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2539 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2540 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2541 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2542 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2543 | } |
| 2544 | |
| 2545 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2546 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2547 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2548 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2549 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2550 | } |
| 2551 | |
| 2552 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2553 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2554 | u32 bufferRowLength /// Specified in texels |
| 2555 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2556 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2557 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2558 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2559 | } |
| 2560 | |
| 2561 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2562 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2563 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2564 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2565 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2566 | VkExtent3D extent |
| 2567 | } |
| 2568 | |
| 2569 | class VkShaderModuleCreateInfo { |
| 2570 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2571 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2572 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2573 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2574 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2575 | } |
| 2576 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2577 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2578 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2579 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2580 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2581 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2582 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2583 | } |
| 2584 | |
| 2585 | class VkDescriptorSetLayoutCreateInfo { |
| 2586 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2587 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2588 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2589 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2590 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2591 | } |
| 2592 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2593 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2594 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2595 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2596 | } |
| 2597 | |
| 2598 | class VkDescriptorPoolCreateInfo { |
| 2599 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2600 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2601 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2602 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2603 | u32 poolSizeCount |
| 2604 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2605 | } |
| 2606 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2607 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2608 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2609 | const void* pNext /// Pointer to next structure |
| 2610 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2611 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2612 | const VkDescriptorSetLayout* pSetLayouts |
| 2613 | } |
| 2614 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2615 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2616 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2617 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2618 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2619 | } |
| 2620 | |
| 2621 | class VkSpecializationInfo { |
| 2622 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2623 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2624 | platform.size_t dataSize /// Size in bytes of pData |
| 2625 | const void* pData /// Pointer to SpecConstant data |
| 2626 | } |
| 2627 | |
| 2628 | class VkPipelineShaderStageCreateInfo { |
| 2629 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2630 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2631 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2632 | VkShaderStageFlagBits stage |
| 2633 | VkShaderModule module |
| 2634 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2635 | const VkSpecializationInfo* pSpecializationInfo |
| 2636 | } |
| 2637 | |
| 2638 | class VkComputePipelineCreateInfo { |
| 2639 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2640 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2641 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2642 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2643 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2644 | 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 |
| 2645 | 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 |
| 2646 | } |
| 2647 | |
| 2648 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2649 | u32 binding /// Vertex buffer binding id |
| 2650 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2651 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2652 | } |
| 2653 | |
| 2654 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2655 | u32 location /// location of the shader vertex attrib |
| 2656 | u32 binding /// Vertex buffer binding id |
| 2657 | VkFormat format /// format of source data |
| 2658 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2659 | } |
| 2660 | |
| 2661 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2662 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2663 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2664 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2665 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2666 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2667 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2668 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2669 | } |
| 2670 | |
| 2671 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2672 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2673 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2674 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2675 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2676 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2677 | } |
| 2678 | |
| 2679 | class VkPipelineTessellationStateCreateInfo { |
| 2680 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2681 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2682 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2683 | u32 patchControlPoints |
| 2684 | } |
| 2685 | |
| 2686 | class VkPipelineViewportStateCreateInfo { |
| 2687 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2688 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2689 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2690 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2691 | const VkViewport* pViewports |
| 2692 | u32 scissorCount |
| 2693 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2694 | } |
| 2695 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2696 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2697 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2698 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2699 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2700 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2701 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2702 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2703 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2704 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2705 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2706 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2707 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2708 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2709 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2710 | } |
| 2711 | |
| 2712 | class VkPipelineMultisampleStateCreateInfo { |
| 2713 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2714 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2715 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2716 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2717 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2718 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2719 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2720 | VkBool32 alphaToCoverageEnable |
| 2721 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2722 | } |
| 2723 | |
| 2724 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2725 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2726 | VkBlendFactor srcColorBlendFactor |
| 2727 | VkBlendFactor dstColorBlendFactor |
| 2728 | VkBlendOp colorBlendOp |
| 2729 | VkBlendFactor srcAlphaBlendFactor |
| 2730 | VkBlendFactor dstAlphaBlendFactor |
| 2731 | VkBlendOp alphaBlendOp |
| 2732 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2733 | } |
| 2734 | |
| 2735 | class VkPipelineColorBlendStateCreateInfo { |
| 2736 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2737 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2738 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2739 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2740 | VkLogicOp logicOp |
| 2741 | u32 attachmentCount /// # of pAttachments |
| 2742 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2743 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2744 | } |
| 2745 | |
| 2746 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2747 | VkStencilOp failOp |
| 2748 | VkStencilOp passOp |
| 2749 | VkStencilOp depthFailOp |
| 2750 | VkCompareOp compareOp |
| 2751 | u32 compareMask |
| 2752 | u32 writeMask |
| 2753 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2754 | } |
| 2755 | |
| 2756 | class VkPipelineDepthStencilStateCreateInfo { |
| 2757 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2758 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2759 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2760 | VkBool32 depthTestEnable |
| 2761 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2762 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2763 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2764 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2765 | VkStencilOpState front |
| 2766 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2767 | f32 minDepthBounds |
| 2768 | f32 maxDepthBounds |
| 2769 | } |
| 2770 | |
| 2771 | class VkPipelineDynamicStateCreateInfo { |
| 2772 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2773 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2774 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2775 | u32 dynamicStateCount |
| 2776 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2777 | } |
| 2778 | |
| 2779 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2780 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2781 | const void* pNext /// Pointer to next structure |
| 2782 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2783 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2784 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2785 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2786 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2787 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2788 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2789 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2790 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2791 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2792 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2793 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2794 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2795 | VkRenderPass renderPass |
| 2796 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2797 | 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 |
| 2798 | 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] | 2799 | } |
| 2800 | |
| 2801 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2802 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2803 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2804 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2805 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2806 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2807 | } |
| 2808 | |
| 2809 | class VkPushConstantRange { |
| 2810 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2811 | u32 offset /// Start of the range, in bytes |
| 2812 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2813 | } |
| 2814 | |
| 2815 | class VkPipelineLayoutCreateInfo { |
| 2816 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2817 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2818 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2819 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2820 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2821 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2822 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2823 | } |
| 2824 | |
| 2825 | class VkSamplerCreateInfo { |
| 2826 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2827 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2828 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2829 | VkFilter magFilter /// Filter mode for magnification |
| 2830 | VkFilter minFilter /// Filter mode for minifiation |
| 2831 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2832 | VkSamplerAddressMode addressModeU |
| 2833 | VkSamplerAddressMode addressModeV |
| 2834 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2835 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2836 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2837 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2838 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2839 | VkCompareOp compareOp |
| 2840 | f32 minLod |
| 2841 | f32 maxLod |
| 2842 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2843 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2844 | } |
| 2845 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2846 | class VkCommandPoolCreateInfo { |
| 2847 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2848 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2849 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2850 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2851 | } |
| 2852 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2853 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2854 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2855 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2856 | VkCommandPool commandPool |
| 2857 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2858 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2859 | } |
| 2860 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2861 | class VkCommandBufferInheritanceInfo { |
| 2862 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2863 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2864 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2865 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2866 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2867 | VkBool32 occlusionQueryEnable |
| 2868 | VkQueryControlFlags queryFlags |
| 2869 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2870 | } |
| 2871 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2872 | class VkCommandBufferBeginInfo { |
| 2873 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2874 | const void* pNext /// Pointer to next structure |
| 2875 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2876 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2877 | } |
| 2878 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2879 | class VkRenderPassBeginInfo { |
| 2880 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2881 | const void* pNext /// Pointer to next structure |
| 2882 | VkRenderPass renderPass |
| 2883 | VkFramebuffer framebuffer |
| 2884 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2885 | u32 clearValueCount |
| 2886 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2887 | } |
| 2888 | |
| 2889 | @union |
| 2890 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2891 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2892 | f32[4] float32 |
| 2893 | s32[4] int32 |
| 2894 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2895 | } |
| 2896 | |
| 2897 | class VkClearDepthStencilValue { |
| 2898 | f32 depth |
| 2899 | u32 stencil |
| 2900 | } |
| 2901 | |
| 2902 | @union |
| 2903 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2904 | class VkClearValue { |
| 2905 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2906 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2907 | } |
| 2908 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2909 | class VkClearAttachment { |
| 2910 | VkImageAspectFlags aspectMask |
| 2911 | u32 colorAttachment |
| 2912 | VkClearValue clearValue |
| 2913 | } |
| 2914 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2915 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2916 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2917 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2918 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2919 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2920 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2921 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2922 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2923 | VkImageLayout initialLayout |
| 2924 | VkImageLayout finalLayout |
| 2925 | } |
| 2926 | |
| 2927 | class VkAttachmentReference { |
| 2928 | u32 attachment |
| 2929 | VkImageLayout layout |
| 2930 | } |
| 2931 | |
| 2932 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2933 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2934 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2935 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2936 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2937 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2938 | const VkAttachmentReference* pColorAttachments |
| 2939 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2940 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2941 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2942 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2943 | } |
| 2944 | |
| 2945 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2946 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2947 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2948 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2949 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2950 | VkAccessFlags srcAccessMask |
| 2951 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2952 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2953 | } |
| 2954 | |
| 2955 | class VkRenderPassCreateInfo { |
| 2956 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2957 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2958 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2959 | u32 attachmentCount |
| 2960 | const VkAttachmentDescription* pAttachments |
| 2961 | u32 subpassCount |
| 2962 | const VkSubpassDescription* pSubpasses |
| 2963 | u32 dependencyCount |
| 2964 | const VkSubpassDependency* pDependencies |
| 2965 | } |
| 2966 | |
| 2967 | class VkEventCreateInfo { |
| 2968 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2969 | const void* pNext /// Pointer to next structure |
| 2970 | VkEventCreateFlags flags /// Event creation flags |
| 2971 | } |
| 2972 | |
| 2973 | class VkFenceCreateInfo { |
| 2974 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2975 | const void* pNext /// Pointer to next structure |
| 2976 | VkFenceCreateFlags flags /// Fence creation flags |
| 2977 | } |
| 2978 | |
| 2979 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2980 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2981 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2982 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2983 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2984 | VkBool32 geometryShader /// geometry stage |
| 2985 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2986 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2987 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2988 | VkBool32 logicOp /// logic operations |
| 2989 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2990 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2991 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2992 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2993 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2994 | VkBool32 depthBounds /// depth bounds test |
| 2995 | VkBool32 wideLines /// lines with width greater than 1 |
| 2996 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2997 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2998 | VkBool32 multiViewport |
| 2999 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3000 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 3001 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 3002 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 3003 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3004 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 3005 | VkBool32 vertexPipelineStoresAndAtomics |
| 3006 | VkBool32 fragmentStoresAndAtomics |
| 3007 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3008 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 3009 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 3010 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 3011 | VkBool32 shaderStorageImageReadWithoutFormat |
| 3012 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3013 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 3014 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 3015 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 3016 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 3017 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 3018 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 3019 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 3020 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 3021 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 3022 | 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] | 3023 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3024 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 3025 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 3026 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 3027 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 3028 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 3029 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 3030 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 3031 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 3032 | 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] | 3033 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3034 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3035 | } |
| 3036 | |
| 3037 | class VkPhysicalDeviceLimits { |
| 3038 | /// resource maximum sizes |
| 3039 | u32 maxImageDimension1D /// max 1D image dimension |
| 3040 | u32 maxImageDimension2D /// max 2D image dimension |
| 3041 | u32 maxImageDimension3D /// max 3D image dimension |
| 3042 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 3043 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3044 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3045 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 3046 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3047 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 3048 | /// memory limits |
| 3049 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3050 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3051 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 3052 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3053 | /// descriptor set limits |
| 3054 | 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] | 3055 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 3056 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 3057 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 3058 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 3059 | 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] | 3060 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3061 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3062 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 3063 | 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] | 3064 | 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] | 3065 | 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] | 3066 | 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] | 3067 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 3068 | 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] | 3069 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3070 | /// vertex stage limits |
| 3071 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3072 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3073 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 3074 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 3075 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 3076 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3077 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 3078 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 3079 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 3080 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 3081 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 3082 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 3083 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 3084 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3085 | /// geometry stage limits |
| 3086 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 3087 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 3088 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 3089 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 3090 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 3091 | /// fragment stage limits |
| 3092 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3093 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3094 | 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] | 3095 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 3096 | /// compute stage limits |
| 3097 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 3098 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 3099 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 3100 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 3101 | |
| 3102 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 3103 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 3104 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 3105 | |
| 3106 | 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] | 3107 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3108 | |
| 3109 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 3110 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 3111 | |
| 3112 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3113 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 3114 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 3115 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 3116 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 3117 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 3118 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 3119 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 3120 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3121 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3122 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3123 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3124 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3125 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 3126 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 3127 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 3128 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 3129 | |
| 3130 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 3131 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 3132 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3133 | VkSampleCountFlags framebufferColorSampleCounts |
| 3134 | VkSampleCountFlags framebufferDepthSampleCounts |
| 3135 | VkSampleCountFlags framebufferStencilSampleCounts |
| 3136 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3137 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 3138 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3139 | VkSampleCountFlags sampledImageColorSampleCounts |
| 3140 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 3141 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 3142 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 3143 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3144 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3145 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3146 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3147 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3148 | |
| 3149 | u32 maxClipDistances /// max number of clip distances |
| 3150 | u32 maxCullDistances /// max number of cull distances |
| 3151 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 3152 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3153 | u32 discreteQueuePriorities |
| 3154 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3155 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 3156 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3157 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 3158 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3159 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3160 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3161 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 3162 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 3163 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3164 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3165 | } |
| 3166 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3167 | class VkPhysicalDeviceSparseProperties { |
| 3168 | 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] | 3169 | 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] | 3170 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 3171 | 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] | 3172 | 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 |
| 3173 | } |
| 3174 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3175 | class VkSemaphoreCreateInfo { |
| 3176 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 3177 | const void* pNext /// Pointer to next structure |
| 3178 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 3179 | } |
| 3180 | |
| 3181 | class VkQueryPoolCreateInfo { |
| 3182 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 3183 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3184 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3185 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3186 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3187 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 3188 | } |
| 3189 | |
| 3190 | class VkFramebufferCreateInfo { |
| 3191 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 3192 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3193 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3194 | VkRenderPass renderPass |
| 3195 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3196 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3197 | u32 width |
| 3198 | u32 height |
| 3199 | u32 layers |
| 3200 | } |
| 3201 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3202 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3203 | u32 vertexCount |
| 3204 | u32 instanceCount |
| 3205 | u32 firstVertex |
| 3206 | u32 firstInstance |
| 3207 | } |
| 3208 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3209 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3210 | u32 indexCount |
| 3211 | u32 instanceCount |
| 3212 | u32 firstIndex |
| 3213 | s32 vertexOffset |
| 3214 | u32 firstInstance |
| 3215 | } |
| 3216 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3217 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3218 | u32 x |
| 3219 | u32 y |
| 3220 | u32 z |
| 3221 | } |
| 3222 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3223 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3224 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3225 | u32 minImageCount |
| 3226 | u32 maxImageCount |
| 3227 | VkExtent2D currentExtent |
| 3228 | VkExtent2D minImageExtent |
| 3229 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3230 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3231 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3232 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3233 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3234 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3235 | } |
| 3236 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3237 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3238 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3239 | VkFormat format |
| 3240 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3241 | } |
| 3242 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3243 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3244 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3245 | VkStructureType sType |
| 3246 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3247 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3248 | VkSurfaceKHR surface |
| 3249 | u32 minImageCount |
| 3250 | VkFormat imageFormat |
| 3251 | VkColorSpaceKHR imageColorSpace |
| 3252 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3253 | u32 imageArrayLayers |
| 3254 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3255 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3256 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3257 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3258 | VkSurfaceTransformFlagBitsKHR preTransform |
| 3259 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3260 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3261 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3262 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3263 | } |
| 3264 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3265 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3266 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3267 | VkStructureType sType |
| 3268 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3269 | u32 waitSemaphoreCount |
| 3270 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3271 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3272 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3273 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3274 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3275 | } |
| 3276 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3277 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3278 | class VkDisplayPropertiesKHR { |
| 3279 | VkDisplayKHR display |
| 3280 | const char* displayName |
| 3281 | VkExtent2D physicalDimensions |
| 3282 | VkExtent2D physicalResolution |
| 3283 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3284 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3285 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3286 | } |
| 3287 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3288 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3289 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3290 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3291 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3292 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3293 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3294 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3295 | class VkDisplayModePropertiesKHR { |
| 3296 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3297 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3298 | } |
| 3299 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3300 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3301 | class VkDisplayModeCreateInfoKHR { |
| 3302 | VkStructureType sType |
| 3303 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 3304 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3305 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3306 | } |
| 3307 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3308 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3309 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3310 | VkDisplayKHR currentDisplay |
| 3311 | u32 currentStackIndex |
| 3312 | } |
| 3313 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3314 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3315 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3316 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 3317 | VkOffset2D minSrcPosition |
| 3318 | VkOffset2D maxSrcPosition |
| 3319 | VkExtent2D minSrcExtent |
| 3320 | VkExtent2D maxSrcExtent |
| 3321 | VkOffset2D minDstPosition |
| 3322 | VkOffset2D maxDstPosition |
| 3323 | VkExtent2D minDstExtent |
| 3324 | VkExtent2D maxDstExtent |
| 3325 | } |
| 3326 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3327 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3328 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3329 | VkStructureType sType |
| 3330 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3331 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3332 | VkDisplayModeKHR displayMode |
| 3333 | u32 planeIndex |
| 3334 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3335 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3336 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3337 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 3338 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3339 | } |
| 3340 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3341 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3342 | class VkDisplayPresentInfoKHR { |
| 3343 | VkStructureType sType |
| 3344 | const void* pNext |
| 3345 | VkRect2D srcRect |
| 3346 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3347 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3348 | } |
| 3349 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3350 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3351 | class VkXlibSurfaceCreateInfoKHR { |
| 3352 | VkStructureType sType |
| 3353 | const void* pNext |
| 3354 | VkXlibSurfaceCreateFlagsKHR flags |
| 3355 | platform.Display* dpy |
| 3356 | platform.Window window |
| 3357 | } |
| 3358 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3359 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3360 | class VkXcbSurfaceCreateInfoKHR { |
| 3361 | VkStructureType sType |
| 3362 | const void* pNext |
| 3363 | VkXcbSurfaceCreateFlagsKHR flags |
| 3364 | platform.xcb_connection_t* connection |
| 3365 | platform.xcb_window_t window |
| 3366 | } |
| 3367 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3368 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3369 | class VkWaylandSurfaceCreateInfoKHR { |
| 3370 | VkStructureType sType |
| 3371 | const void* pNext |
| 3372 | VkWaylandSurfaceCreateFlagsKHR flags |
| 3373 | platform.wl_display* display |
| 3374 | platform.wl_surface* surface |
| 3375 | } |
| 3376 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3377 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3378 | class VkMirSurfaceCreateInfoKHR { |
| 3379 | VkStructureType sType |
| 3380 | const void* pNext |
| 3381 | VkMirSurfaceCreateFlagsKHR flags |
| 3382 | platform.MirConnection* connection |
| 3383 | platform.MirSurface* mirSurface |
| 3384 | } |
| 3385 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3386 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3387 | class VkAndroidSurfaceCreateInfoKHR { |
| 3388 | VkStructureType sType |
| 3389 | const void* pNext |
| 3390 | VkAndroidSurfaceCreateFlagsKHR flags |
| 3391 | platform.ANativeWindow* window |
| 3392 | } |
| 3393 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3394 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3395 | class VkWin32SurfaceCreateInfoKHR { |
| 3396 | VkStructureType sType |
| 3397 | const void* pNext |
| 3398 | VkWin32SurfaceCreateFlagsKHR flags |
| 3399 | platform.HINSTANCE hinstance |
| 3400 | platform.HWND hwnd |
| 3401 | } |
| 3402 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3403 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3404 | @internal class Gralloc1Usage { |
| 3405 | u64 consumer |
| 3406 | u64 producer |
| 3407 | } |
| 3408 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3409 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3410 | class VkNativeBufferANDROID { |
| 3411 | VkStructureType sType |
| 3412 | const void* pNext |
| 3413 | platform.buffer_handle_t handle |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3414 | s32 stride |
| 3415 | s32 format |
| 3416 | s32 usage |
| 3417 | Gralloc1Usage usage2 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3418 | } |
| 3419 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3420 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 3421 | class VkSwapchainImageCreateInfoANDROID { |
| 3422 | VkStructureType sType |
| 3423 | const void* pNext |
Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 3424 | VkSwapchainImageUsageFlagsANDROID flags |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 3425 | } |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 3426 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3427 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 3428 | class VkPhysicalDevicePresentationPropertiesANDROID { |
| 3429 | VkStructureType sType |
| 3430 | void* pNext |
| 3431 | VkBool32 sharedImage |
| 3432 | } |
| 3433 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3434 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 3435 | class VkDebugReportCallbackCreateInfoEXT { |
| 3436 | VkStructureType sType |
| 3437 | const void* pNext |
| 3438 | VkDebugReportFlagsEXT flags |
| 3439 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 3440 | void* pUserData |
| 3441 | } |
| 3442 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3443 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3444 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 3445 | VkStructureType sType |
| 3446 | const void* pNext |
| 3447 | VkRasterizationOrderAMD rasterizationOrder |
| 3448 | } |
| 3449 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3450 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3451 | class VkDebugMarkerObjectNameInfoEXT { |
| 3452 | VkStructureType sType |
| 3453 | const void* pNext |
| 3454 | VkDebugReportObjectTypeEXT objectType |
| 3455 | u64 object |
| 3456 | const char* pObjectName |
| 3457 | } |
| 3458 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3459 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3460 | class VkDebugMarkerObjectTagInfoEXT { |
| 3461 | VkStructureType sType |
| 3462 | const void* pNext |
| 3463 | VkDebugReportObjectTypeEXT objectType |
| 3464 | u64 object |
| 3465 | u64 tagName |
| 3466 | platform.size_t tagSize |
| 3467 | const void* pTag |
| 3468 | } |
| 3469 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3470 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3471 | class VkDebugMarkerMarkerInfoEXT { |
| 3472 | VkStructureType sType |
| 3473 | const void* pNext |
| 3474 | const char* pMarkerName |
| 3475 | f32[4] color |
| 3476 | } |
| 3477 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3478 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3479 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3480 | VkStructureType sType |
| 3481 | const void* pNext |
| 3482 | VkBool32 dedicatedAllocation |
| 3483 | } |
| 3484 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3485 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3486 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3487 | VkStructureType sType |
| 3488 | const void* pNext |
| 3489 | VkBool32 dedicatedAllocation |
| 3490 | } |
| 3491 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3492 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3493 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3494 | VkStructureType sType |
| 3495 | const void* pNext |
| 3496 | VkImage image |
| 3497 | VkBuffer buffer |
| 3498 | } |
| 3499 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3500 | @extension("VK_KHX_multiview") // 54 |
| 3501 | class VkRenderPassMultiviewCreateInfoKHX { |
| 3502 | VkStructureType sType |
| 3503 | const void* pNext |
| 3504 | u32 subpassCount |
| 3505 | const u32* pViewMasks |
| 3506 | u32 dependencyCount |
| 3507 | const s32* pViewOffsets |
| 3508 | u32 correlationMaskCount |
| 3509 | const u32* pCorrelationMasks |
| 3510 | } |
| 3511 | |
| 3512 | @extension("VK_KHX_multiview") // 54 |
| 3513 | class VkPhysicalDeviceMultiviewFeaturesKHX { |
| 3514 | VkStructureType sType |
| 3515 | void* pNext |
| 3516 | VkBool32 multiview |
| 3517 | VkBool32 multiviewGeometryShader |
| 3518 | VkBool32 multiviewTessellationShader |
| 3519 | } |
| 3520 | |
| 3521 | @extension("VK_KHX_multiview") // 54 |
| 3522 | class VkPhysicalDeviceMultiviewPropertiesKHX { |
| 3523 | VkStructureType sType |
| 3524 | void* pNext |
| 3525 | u32 maxMultiviewViewCount |
| 3526 | u32 maxMultiviewInstanceIndex |
| 3527 | } |
| 3528 | |
| 3529 | @extension("VK_NV_external_memory_capabilities") // 56 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3530 | class VkExternalImageFormatPropertiesNV { |
| 3531 | VkImageFormatProperties imageFormatProperties |
| 3532 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3533 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3534 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3535 | } |
| 3536 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3537 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3538 | class VkExternalMemoryImageCreateInfoNV { |
| 3539 | VkStructureType sType |
| 3540 | const void* pNext |
| 3541 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3542 | } |
| 3543 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3544 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3545 | class VkExportMemoryAllocateInfoNV { |
| 3546 | VkStructureType sType |
| 3547 | const void* pNext |
| 3548 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3549 | } |
| 3550 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3551 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3552 | class VkImportMemoryWin32HandleInfoNV { |
| 3553 | VkStructureType sType |
| 3554 | const void* pNext |
| 3555 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3556 | platform.HANDLE handle |
| 3557 | } |
| 3558 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3559 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3560 | class VkExportMemoryWin32HandleInfoNV { |
| 3561 | VkStructureType sType |
| 3562 | const void* pNext |
| 3563 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3564 | platform.DWORD dwAccess |
| 3565 | } |
| 3566 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3567 | @extension("VK_NV_win32_keyed_mutex") // 59 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3568 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3569 | VkStructureType sType |
| 3570 | const void* pNext |
| 3571 | u32 acquireCount |
| 3572 | const VkDeviceMemory* pAcquireSyncs |
| 3573 | const u64* pAcquireKeys |
| 3574 | const u32* pAcquireTimeoutMilliseconds |
| 3575 | u32 releaseCount |
| 3576 | const VkDeviceMemory* pReleaseSyncs |
| 3577 | const u64* pReleaseKeys |
| 3578 | } |
| 3579 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3580 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3581 | class VkPhysicalDeviceFeatures2KHR { |
| 3582 | VkStructureType sType |
| 3583 | void* pNext |
| 3584 | VkPhysicalDeviceFeatures features |
| 3585 | } |
| 3586 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3587 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3588 | class VkPhysicalDeviceProperties2KHR { |
| 3589 | VkStructureType sType |
| 3590 | void* pNext |
| 3591 | VkPhysicalDeviceProperties properties |
| 3592 | } |
| 3593 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3594 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3595 | class VkFormatProperties2KHR { |
| 3596 | VkStructureType sType |
| 3597 | void* pNext |
| 3598 | VkFormatProperties formatProperties |
| 3599 | } |
| 3600 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3601 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3602 | class VkImageFormatProperties2KHR { |
| 3603 | VkStructureType sType |
| 3604 | void* pNext |
| 3605 | VkImageFormatProperties imageFormatProperties |
| 3606 | } |
| 3607 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3608 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3609 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3610 | VkStructureType sType |
| 3611 | const void* pNext |
| 3612 | VkFormat format |
| 3613 | VkImageType type |
| 3614 | VkImageTiling tiling |
| 3615 | VkImageUsageFlags usage |
| 3616 | VkImageCreateFlags flags |
| 3617 | } |
| 3618 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3619 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3620 | class VkQueueFamilyProperties2KHR { |
| 3621 | VkStructureType sType |
| 3622 | void* pNext |
| 3623 | VkQueueFamilyProperties queueFamilyProperties |
| 3624 | } |
| 3625 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3626 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3627 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3628 | VkStructureType sType |
| 3629 | void* pNext |
| 3630 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3631 | } |
| 3632 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3633 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3634 | class VkSparseImageFormatProperties2KHR { |
| 3635 | VkStructureType sType |
| 3636 | void* pNext |
| 3637 | VkSparseImageFormatProperties properties |
| 3638 | } |
| 3639 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3640 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3641 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3642 | VkStructureType sType |
| 3643 | const void* pNext |
| 3644 | VkFormat format |
| 3645 | VkImageType type |
| 3646 | VkSampleCountFlagBits samples |
| 3647 | VkImageUsageFlags usage |
| 3648 | VkImageTiling tiling |
| 3649 | } |
| 3650 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3651 | @extension("VK_KHX_device_group") // 61 |
| 3652 | class VkMemoryAllocateFlagsInfoKHX { |
| 3653 | VkStructureType sType |
| 3654 | const void* pNext |
| 3655 | VkMemoryAllocateFlagsKHX flags |
| 3656 | u32 deviceMask |
| 3657 | } |
| 3658 | |
| 3659 | @extension("VK_KHX_device_group") // 61 |
| 3660 | class VkBindBufferMemoryInfoKHX { |
| 3661 | VkStructureType sType |
| 3662 | const void* pNext |
| 3663 | VkBuffer buffer |
| 3664 | VkDeviceMemory memory |
| 3665 | VkDeviceSize memoryOffset |
| 3666 | u32 deviceIndexCount |
| 3667 | const u32* pDeviceIndices |
| 3668 | } |
| 3669 | |
| 3670 | @extension("VK_KHX_device_group") // 61 |
| 3671 | class VkBindImageMemoryInfoKHX { |
| 3672 | VkStructureType sType |
| 3673 | const void* pNext |
| 3674 | VkImage image |
| 3675 | VkDeviceMemory memory |
| 3676 | VkDeviceSize memoryOffset |
| 3677 | u32 deviceIndexCount |
| 3678 | const u32* pDeviceIndices |
| 3679 | u32 SFRRectCount |
| 3680 | const VkRect2D* pSFRRects |
| 3681 | } |
| 3682 | |
| 3683 | @extension("VK_KHX_device_group") // 61 |
| 3684 | class VkDeviceGroupRenderPassBeginInfoKHX { |
| 3685 | VkStructureType sType |
| 3686 | const void* pNext |
| 3687 | u32 deviceMask |
| 3688 | u32 deviceRenderAreaCount |
| 3689 | const VkRect2D* pDeviceRenderAreas |
| 3690 | } |
| 3691 | |
| 3692 | @extension("VK_KHX_device_group") // 61 |
| 3693 | class VkDeviceGroupCommandBufferBeginInfoKHX { |
| 3694 | VkStructureType sType |
| 3695 | const void* pNext |
| 3696 | u32 deviceMask |
| 3697 | } |
| 3698 | |
| 3699 | @extension("VK_KHX_device_group") // 61 |
| 3700 | class VkDeviceGroupSubmitInfoKHX { |
| 3701 | VkStructureType sType |
| 3702 | const void* pNext |
| 3703 | u32 waitSemaphoreCount |
| 3704 | const u32* pWaitSemaphoreDeviceIndices |
| 3705 | u32 commandBufferCount |
| 3706 | const u32* pCommandBufferDeviceMasks |
| 3707 | u32 signalSemaphoreCount |
| 3708 | const u32* pSignalSemaphoreDeviceIndices |
| 3709 | } |
| 3710 | |
| 3711 | @extension("VK_KHX_device_group") // 61 |
| 3712 | class VkDeviceGroupBindSparseInfoKHX { |
| 3713 | VkStructureType sType |
| 3714 | const void* pNext |
| 3715 | u32 resourceDeviceIndex |
| 3716 | u32 memoryDeviceIndex |
| 3717 | } |
| 3718 | |
| 3719 | @extension("VK_KHX_device_group") // 61 |
| 3720 | class VkDeviceGroupPresentCapabilitiesKHX { |
| 3721 | VkStructureType sType |
| 3722 | const void* pNext |
| 3723 | u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask |
| 3724 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3725 | } |
| 3726 | |
| 3727 | @extension("VK_KHX_device_group") // 61 |
| 3728 | class VkImageSwapchainCreateInfoKHX { |
| 3729 | VkStructureType sType |
| 3730 | const void* pNext |
| 3731 | VkSwapchainKHR swapchain |
| 3732 | } |
| 3733 | |
| 3734 | @extension("VK_KHX_device_group") // 61 |
| 3735 | class VkBindImageMemorySwapchainInfoKHX { |
| 3736 | VkStructureType sType |
| 3737 | const void* pNext |
| 3738 | VkSwapchainKHR swapchain |
| 3739 | u32 imageIndex |
| 3740 | } |
| 3741 | |
| 3742 | @extension("VK_KHX_device_group") // 61 |
| 3743 | class VkAcquireNextImageInfoKHX { |
| 3744 | VkStructureType sType |
| 3745 | const void* pNext |
| 3746 | VkSwapchainKHR swapchain |
| 3747 | u64 timeout |
| 3748 | VkSemaphore semaphore |
| 3749 | VkFence fence |
| 3750 | u32 deviceMask |
| 3751 | } |
| 3752 | |
| 3753 | @extension("VK_KHX_device_group") // 61 |
| 3754 | class VkDeviceGroupPresentInfoKHX { |
| 3755 | VkStructureType sType |
| 3756 | const void* pNext |
| 3757 | u32 swapchainCount |
| 3758 | const u32* pDeviceMasks |
| 3759 | VkDeviceGroupPresentModeFlagBitsKHX mode |
| 3760 | } |
| 3761 | |
| 3762 | @extension("VK_KHX_device_group") // 61 |
| 3763 | class VkDeviceGroupSwapchainCreateInfoKHX { |
| 3764 | VkStructureType sType |
| 3765 | const void* pNext |
| 3766 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3767 | } |
| 3768 | |
| 3769 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3770 | class VkValidationFlagsEXT { |
| 3771 | VkStructureType sType |
| 3772 | const void* pNext |
| 3773 | u32 disabledValidationCheckCount |
| 3774 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3775 | } |
| 3776 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3777 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 3778 | class VkViSurfaceCreateInfoNN { |
| 3779 | VkStructureType sType |
| 3780 | const void* pNext |
| 3781 | VkViSurfaceCreateFlagsNN flags |
| 3782 | void* window |
| 3783 | } |
| 3784 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3785 | @extension("VK_KHX_device_group_creation") // 71 |
| 3786 | class VkPhysicalDeviceGroupPropertiesKHX { |
| 3787 | VkStructureType sType |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 3788 | void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3789 | u32 physicalDeviceCount |
| 3790 | VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices |
| 3791 | VkBool32 subsetAllocation |
| 3792 | } |
| 3793 | |
| 3794 | @extension("VK_KHX_device_group_creation") // 71 |
| 3795 | class VkDeviceGroupDeviceCreateInfoKHX { |
| 3796 | VkStructureType sType |
| 3797 | const void* pNext |
| 3798 | u32 physicalDeviceCount |
| 3799 | const VkPhysicalDevice* pPhysicalDevices |
| 3800 | } |
| 3801 | |
| 3802 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3803 | class VkExternalMemoryPropertiesKHX { |
| 3804 | VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures |
| 3805 | VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3806 | VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes |
| 3807 | } |
| 3808 | |
| 3809 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3810 | class VkPhysicalDeviceExternalImageFormatInfoKHX { |
| 3811 | VkStructureType sType |
| 3812 | const void* pNext |
| 3813 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3814 | } |
| 3815 | |
| 3816 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3817 | class VkExternalImageFormatPropertiesKHX { |
| 3818 | VkStructureType sType |
| 3819 | void* pNext |
| 3820 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3821 | } |
| 3822 | |
| 3823 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3824 | class VkPhysicalDeviceExternalBufferInfoKHX { |
| 3825 | VkStructureType sType |
| 3826 | const void* pNext |
| 3827 | VkBufferCreateFlags flags |
| 3828 | VkBufferUsageFlags usage |
| 3829 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3830 | } |
| 3831 | |
| 3832 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3833 | class VkExternalBufferPropertiesKHX { |
| 3834 | VkStructureType sType |
| 3835 | void* pNext |
| 3836 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3837 | } |
| 3838 | |
| 3839 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3840 | class VkPhysicalDeviceIDPropertiesKHX { |
| 3841 | VkStructureType sType |
| 3842 | void* pNext |
| 3843 | u8[VK_UUID_SIZE] deviceUUID |
| 3844 | u8[VK_UUID_SIZE] driverUUID |
| 3845 | u8[VK_LUID_SIZE_KHX] deviceLUID |
| 3846 | VkBool32 deviceLUIDValid |
| 3847 | } |
| 3848 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 3849 | @extension("VK_KHX_external_memory") // 73 |
| 3850 | class VkExternalMemoryImageCreateInfoKHX { |
| 3851 | VkStructureType sType |
| 3852 | const void* pNext |
| 3853 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3854 | } |
| 3855 | |
| 3856 | @extension("VK_KHX_external_memory") // 73 |
| 3857 | class VkExternalMemoryBufferCreateInfoKHX { |
| 3858 | VkStructureType sType |
| 3859 | const void* pNext |
| 3860 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3861 | } |
| 3862 | |
| 3863 | @extension("VK_KHX_external_memory") // 73 |
| 3864 | class VkExportMemoryAllocateInfoKHX { |
| 3865 | VkStructureType sType |
| 3866 | const void* pNext |
| 3867 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3868 | } |
| 3869 | |
| 3870 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3871 | class VkImportMemoryWin32HandleInfoKHX { |
| 3872 | VkStructureType sType |
| 3873 | const void* pNext |
| 3874 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3875 | platform.HANDLE handle |
| 3876 | } |
| 3877 | |
| 3878 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3879 | class VkExportMemoryWin32HandleInfoKHX { |
| 3880 | VkStructureType sType |
| 3881 | const void* pNext |
| 3882 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3883 | platform.DWORD dwAccess |
| 3884 | platform.LPCWSTR name |
| 3885 | } |
| 3886 | |
| 3887 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3888 | class VkMemoryWin32HandlePropertiesKHX { |
| 3889 | VkStructureType sType |
| 3890 | void* pNext |
| 3891 | u32 memoryTypeBits |
| 3892 | } |
| 3893 | |
| 3894 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3895 | class VkImportMemoryFdInfoKHX { |
| 3896 | VkStructureType sType |
| 3897 | const void* pNext |
| 3898 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3899 | int fd |
| 3900 | } |
| 3901 | |
| 3902 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3903 | class VkMemoryFdPropertiesKHX { |
| 3904 | VkStructureType sType |
| 3905 | void* pNext |
| 3906 | u32 memoryTypeBits |
| 3907 | } |
| 3908 | |
| 3909 | @extension("VK_KHX_win32_keyed_mutex") // 76 |
| 3910 | class VkWin32KeyedMutexAcquireReleaseInfoKHX { |
| 3911 | VkStructureType sType |
| 3912 | const void* pNext |
| 3913 | u32 acquireCount |
| 3914 | const VkDeviceMemory* pAcquireSyncs |
| 3915 | const u64* pAcquireKeys |
| 3916 | const u32* pAcquireTimeouts |
| 3917 | u32 releaseCount |
| 3918 | const VkDeviceMemory* pReleaseSyncs |
| 3919 | const u64* pReleaseKeys |
| 3920 | } |
| 3921 | |
| 3922 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3923 | class VkPhysicalDeviceExternalSemaphoreInfoKHX { |
| 3924 | VkStructureType sType |
| 3925 | const void* pNext |
| 3926 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3927 | } |
| 3928 | |
| 3929 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3930 | class VkExternalSemaphorePropertiesKHX { |
| 3931 | VkStructureType sType |
| 3932 | void* pNext |
| 3933 | VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3934 | VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes |
| 3935 | VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures |
| 3936 | } |
| 3937 | |
| 3938 | @extension("VK_KHX_external_semaphore") // 78 |
| 3939 | class VkExportSemaphoreCreateInfoKHX { |
| 3940 | VkStructureType sType |
| 3941 | const void* pNext |
| 3942 | VkExternalSemaphoreHandleTypeFlagsKHX handleTypes |
| 3943 | } |
| 3944 | |
| 3945 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3946 | class VkImportSemaphoreWin32HandleInfoKHX { |
| 3947 | VkStructureType sType |
| 3948 | const void* pNext |
| 3949 | VkSemaphore semaphore |
| 3950 | VkExternalSemaphoreHandleTypeFlagsKHX handleType |
| 3951 | platform.HANDLE handle |
| 3952 | } |
| 3953 | |
| 3954 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3955 | class VkExportSemaphoreWin32HandleInfoKHX { |
| 3956 | VkStructureType sType |
| 3957 | const void* pNext |
| 3958 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3959 | platform.DWORD dwAccess |
| 3960 | platform.LPCWSTR name |
| 3961 | } |
| 3962 | |
| 3963 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3964 | class VkD3D12FenceSubmitInfoKHX { |
| 3965 | VkStructureType sType |
| 3966 | const void* pNext |
| 3967 | u32 waitSemaphoreValuesCount |
| 3968 | const u64* pWaitSemaphoreValues |
| 3969 | u32 signalSemaphoreValuesCount |
| 3970 | const u64* pSignalSemaphoreValues |
| 3971 | } |
| 3972 | |
| 3973 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 3974 | class VkImportSemaphoreFdInfoKHX { |
| 3975 | VkStructureType sType |
| 3976 | const void* pNext |
| 3977 | VkSemaphore semaphore |
| 3978 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3979 | s32 fd |
| 3980 | } |
| 3981 | |
| 3982 | @extension("VK_KHR_push_descriptor") // 81 |
| 3983 | class VkPhysicalDevicePushDescriptorPropertiesKHR { |
| 3984 | VkStructureType sType |
| 3985 | void* pNext |
| 3986 | u32 maxPushDescriptors |
| 3987 | } |
| 3988 | |
| 3989 | @extension("VK_KHR_incremental_present") // 85 |
| 3990 | class VkRectLayerKHR { |
| 3991 | VkOffset2D offset |
| 3992 | VkExtent2D extent |
| 3993 | u32 layer |
| 3994 | } |
| 3995 | |
| 3996 | @extension("VK_KHR_incremental_present") // 85 |
| 3997 | class VkPresentRegionKHR { |
| 3998 | u32 rectangleCount |
| 3999 | const VkRectLayerKHR* pRectangles |
| 4000 | } |
| 4001 | |
| 4002 | @extension("VK_KHR_incremental_present") // 85 |
| 4003 | class VkPresentRegionsKHR { |
| 4004 | VkStructureType sType |
| 4005 | const void* pNext |
| 4006 | u32 swapchainCount |
| 4007 | const VkPresentRegionKHR* pRegions |
| 4008 | } |
| 4009 | |
| 4010 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 4011 | class VkDescriptorUpdateTemplateEntryKHR { |
| 4012 | u32 dstBinding |
| 4013 | u32 dstArrayElement |
| 4014 | u32 descriptorCount |
| 4015 | VkDescriptorType descriptorType |
| 4016 | platform.size_t offset |
| 4017 | platform.size_t stride |
| 4018 | } |
| 4019 | |
| 4020 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 4021 | class VkDescriptorUpdateTemplateCreateInfoKHR { |
| 4022 | VkStructureType sType |
| 4023 | void* pNext |
| 4024 | VkDescriptorUpdateTemplateCreateFlagsKHR flags |
| 4025 | u32 descriptorUpdateEntryCount |
| 4026 | const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries |
| 4027 | VkDescriptorUpdateTemplateTypeKHR templateType |
| 4028 | VkDescriptorSetLayout descriptorSetLayout |
| 4029 | VkPipelineBindPoint pipelineBindPoint |
| 4030 | VkPipelineLayout pipelineLayout |
| 4031 | u32 set |
| 4032 | } |
| 4033 | |
| 4034 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4035 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 4036 | VkStructureType sType |
| 4037 | const void* pNext |
| 4038 | VkBool32 computeBindingPointSupport |
| 4039 | } |
| 4040 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4041 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4042 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 4043 | VkStructureType sType |
| 4044 | const void* pNext |
| 4045 | u32 maxIndirectCommandsLayoutTokenCount |
| 4046 | u32 maxObjectEntryCounts |
| 4047 | u32 minSequenceCountBufferOffsetAlignment |
| 4048 | u32 minSequenceIndexBufferOffsetAlignment |
| 4049 | u32 minCommandsTokenBufferOffsetAlignment |
| 4050 | } |
| 4051 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4052 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4053 | class VkIndirectCommandsTokenNVX { |
| 4054 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4055 | VkBuffer buffer |
| 4056 | VkDeviceSize offset |
| 4057 | } |
| 4058 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4059 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4060 | class VkIndirectCommandsLayoutTokenNVX { |
| 4061 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4062 | u32 bindingUnit |
| 4063 | u32 dynamicCount |
| 4064 | u32 divisor |
| 4065 | } |
| 4066 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4067 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4068 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 4069 | VkStructureType sType |
| 4070 | const void* pNext |
| 4071 | VkPipelineBindPoint pipelineBindPoint |
| 4072 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 4073 | u32 tokenCount |
| 4074 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 4075 | } |
| 4076 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4077 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4078 | class VkCmdProcessCommandsInfoNVX { |
| 4079 | VkStructureType sType |
| 4080 | const void* pNext |
| 4081 | VkObjectTableNVX objectTable |
| 4082 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4083 | u32 indirectCommandsTokenCount |
| 4084 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 4085 | u32 maxSequencesCount |
| 4086 | VkCommandBuffer targetCommandBuffer |
| 4087 | VkBuffer sequencesCountBuffer |
| 4088 | VkDeviceSize sequencesCountOffset |
| 4089 | VkBuffer sequencesIndexBuffer |
| 4090 | VkDeviceSize sequencesIndexOffset |
| 4091 | } |
| 4092 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4093 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4094 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 4095 | VkStructureType sType |
| 4096 | const void* pNext |
| 4097 | VkObjectTableNVX objectTable |
| 4098 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4099 | u32 maxSequencesCount |
| 4100 | } |
| 4101 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4102 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4103 | class VkObjectTableCreateInfoNVX { |
| 4104 | VkStructureType sType |
| 4105 | const void* pNext |
| 4106 | u32 objectCount |
| 4107 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 4108 | const u32* pObjectEntryCounts |
| 4109 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 4110 | u32 maxUniformBuffersPerDescriptor |
| 4111 | u32 maxStorageBuffersPerDescriptor |
| 4112 | u32 maxStorageImagesPerDescriptor |
| 4113 | u32 maxSampledImagesPerDescriptor |
| 4114 | u32 maxPipelineLayouts |
| 4115 | } |
| 4116 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4117 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4118 | class VkObjectTableEntryNVX { |
| 4119 | VkObjectEntryTypeNVX type |
| 4120 | VkObjectEntryUsageFlagsNVX flags |
| 4121 | } |
| 4122 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4123 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4124 | class VkObjectTablePipelineEntryNVX { |
| 4125 | VkObjectEntryTypeNVX type |
| 4126 | VkObjectEntryUsageFlagsNVX flags |
| 4127 | VkPipeline pipeline |
| 4128 | } |
| 4129 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4130 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4131 | class VkObjectTableDescriptorSetEntryNVX { |
| 4132 | VkObjectEntryTypeNVX type |
| 4133 | VkObjectEntryUsageFlagsNVX flags |
| 4134 | VkPipelineLayout pipelineLayout |
| 4135 | VkDescriptorSet descriptorSet |
| 4136 | } |
| 4137 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4138 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4139 | class VkObjectTableVertexBufferEntryNVX { |
| 4140 | VkObjectEntryTypeNVX type |
| 4141 | VkObjectEntryUsageFlagsNVX flags |
| 4142 | VkBuffer buffer |
| 4143 | } |
| 4144 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4145 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4146 | class VkObjectTableIndexBufferEntryNVX { |
| 4147 | VkObjectEntryTypeNVX type |
| 4148 | VkObjectEntryUsageFlagsNVX flags |
| 4149 | VkBuffer buffer |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4150 | VkIndexType indexType |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4151 | } |
| 4152 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4153 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4154 | class VkObjectTablePushConstantEntryNVX { |
| 4155 | VkObjectEntryTypeNVX type |
| 4156 | VkObjectEntryUsageFlagsNVX flags |
| 4157 | VkPipelineLayout pipelineLayout |
| 4158 | VkShaderStageFlags stageFlags |
| 4159 | } |
| 4160 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4161 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4162 | class VkViewportWScalingNV { |
| 4163 | f32 xcoeff |
| 4164 | f32 ycoeff |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4165 | } |
| 4166 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4167 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4168 | class VkPipelineViewportWScalingStateCreateInfoNV { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4169 | VkStructureType sType |
| 4170 | const void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4171 | VkBool32 viewportWScalingEnable |
| 4172 | u32 viewportCount |
| 4173 | const VkViewportWScalingNV* pViewportWScalings |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4174 | } |
| 4175 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4176 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4177 | class VkSurfaceCapabilities2EXT { |
| 4178 | VkStructureType sType |
| 4179 | void* pNext |
| 4180 | u32 minImageCount |
| 4181 | u32 maxImageCount |
| 4182 | VkExtent2D currentExtent |
| 4183 | VkExtent2D minImageExtent |
| 4184 | VkExtent2D maxImageExtent |
| 4185 | u32 maxImageArrayLayers |
| 4186 | VkSurfaceTransformFlagsKHR supportedTransforms |
| 4187 | VkSurfaceTransformFlagBitsKHR currentTransform |
| 4188 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
| 4189 | VkImageUsageFlags supportedUsageFlags |
| 4190 | VkSurfaceCounterFlagsEXT supportedSurfaceCounters |
| 4191 | } |
| 4192 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4193 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4194 | class VkDisplayPowerInfoEXT { |
| 4195 | VkStructureType sType |
| 4196 | const void* pNext |
| 4197 | VkDisplayPowerStateEXT powerState |
| 4198 | } |
| 4199 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4200 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4201 | class VkDeviceEventInfoEXT { |
| 4202 | VkStructureType sType |
| 4203 | const void* pNext |
| 4204 | VkDeviceEventTypeEXT deviceEvent |
| 4205 | } |
| 4206 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4207 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4208 | class VkDisplayEventInfoEXT { |
| 4209 | VkStructureType sType |
| 4210 | const void* pNext |
| 4211 | VkDisplayEventTypeEXT displayEvent |
| 4212 | } |
| 4213 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4214 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4215 | class VkSwapchainCounterCreateInfoEXT { |
| 4216 | VkStructureType sType |
| 4217 | const void* pNext |
| 4218 | VkSurfaceCounterFlagsEXT surfaceCounters |
| 4219 | } |
| 4220 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4221 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4222 | class VkRefreshCycleDurationGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4223 | u64 refreshDuration |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4224 | } |
| 4225 | |
| 4226 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4227 | class VkPastPresentationTimingGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4228 | u32 presentID |
| 4229 | u64 desiredPresentTime |
| 4230 | u64 actualPresentTime |
| 4231 | u64 earliestPresentTime |
| 4232 | u64 presentMargin |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4233 | } |
| 4234 | |
| 4235 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4236 | class VkPresentTimeGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4237 | u32 presentID |
| 4238 | u64 desiredPresentTime |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4239 | } |
| 4240 | |
| 4241 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4242 | class VkPresentTimesInfoGOOGLE { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4243 | VkStructureType sType |
| 4244 | const void* pNext |
| 4245 | u32 swapchainCount |
| 4246 | const VkPresentTimeGOOGLE* pTimes |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4247 | } |
| 4248 | |
| 4249 | @extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 4250 | class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { |
| 4251 | VkStructureType sType |
| 4252 | void* pNext |
| 4253 | VkBool32 perViewPositionAllComponents |
| 4254 | } |
| 4255 | |
| 4256 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4257 | class VkViewportSwizzleNV { |
| 4258 | VkViewportCoordinateSwizzleNV x |
| 4259 | VkViewportCoordinateSwizzleNV y |
| 4260 | VkViewportCoordinateSwizzleNV z |
| 4261 | VkViewportCoordinateSwizzleNV w |
| 4262 | } |
| 4263 | |
| 4264 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4265 | class VkPipelineViewportSwizzleStateCreateInfoNV { |
| 4266 | VkStructureType sType |
| 4267 | const void* pNext |
| 4268 | VkPipelineViewportSwizzleStateCreateFlagsNV flags |
| 4269 | u32 viewportCount |
| 4270 | const VkViewportSwizzleNV* pViewportSwizzles |
| 4271 | } |
| 4272 | |
| 4273 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4274 | class VkPhysicalDeviceDiscardRectanglePropertiesEXT { |
| 4275 | VkStructureType sType |
Jesse Hall | f5ad48b | 2017-03-20 13:09:19 -0700 | [diff] [blame] | 4276 | void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4277 | u32 maxDiscardRectangles |
| 4278 | } |
| 4279 | |
| 4280 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4281 | class VkPipelineDiscardRectangleStateCreateInfoEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4282 | VkStructureType sType |
| 4283 | const void* pNext |
| 4284 | VkPipelineDiscardRectangleStateCreateFlagsEXT flags |
| 4285 | VkDiscardRectangleModeEXT discardRectangleMode |
| 4286 | u32 discardRectangleCount |
| 4287 | const VkRect2D* pDiscardRectangles |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4288 | } |
| 4289 | |
| 4290 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4291 | class VkXYColorEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4292 | f32 x |
| 4293 | f32 y |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4294 | } |
| 4295 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4296 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4297 | class VkHdrMetadataEXT { |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 4298 | VkStructureType sType |
| 4299 | const void* pNext |
| 4300 | VkXYColorEXT displayPrimaryRed |
| 4301 | VkXYColorEXT displayPrimaryGreen |
| 4302 | VkXYColorEXT displayPrimaryBlue |
| 4303 | VkXYColorEXT whitePoint |
| 4304 | f32 maxLuminance |
| 4305 | f32 minLuminance |
| 4306 | f32 maxContentLightLevel |
| 4307 | f32 maxFrameAverageLightLevel |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4308 | } |
| 4309 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 4310 | @extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 4311 | class VkSharedPresentSurfaceCapabilitiesKHR { |
| 4312 | VkStructureType sType |
| 4313 | const void* pNext |
| 4314 | VkImageUsageFlags sharedPresentSupportedUsageFlags |
| 4315 | } |
| 4316 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 4317 | @extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 4318 | class VkPhysicalDeviceSurfaceInfo2KHR { |
| 4319 | VkStructureType sType |
| 4320 | const void* pNext |
| 4321 | VkSurfaceKHR surface |
| 4322 | } |
| 4323 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 4324 | @extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 4325 | class VkSurfaceCapabilities2KHR { |
| 4326 | VkStructureType sType |
| 4327 | void* pNext |
| 4328 | VkSurfaceCapabilitiesKHR surfaceCapabilities |
| 4329 | } |
| 4330 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 4331 | @extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 4332 | class VkSurfaceFormat2KHR { |
| 4333 | VkStructureType sType |
| 4334 | void* pNext |
| 4335 | VkSurfaceFormatKHR surfaceFormat |
| 4336 | } |
| 4337 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 4338 | @extension("VK_MVK_ios_surface") // 123 |
| 4339 | class VkIOSSurfaceCreateInfoMVK { |
| 4340 | VkStructureType sType |
| 4341 | const void* pNext |
| 4342 | VkIOSSurfaceCreateFlagsMVK flags |
| 4343 | const void* pView |
| 4344 | } |
| 4345 | |
| 4346 | @extension("VK_MVK_macos_surface") // 124 |
| 4347 | class VkMacOSSurfaceCreateInfoMVK { |
| 4348 | VkStructureType sType |
| 4349 | const void* pNext |
| 4350 | VkMacOSSurfaceCreateFlagsMVK flags |
| 4351 | const void* pView |
| 4352 | } |
| 4353 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4354 | //////////////// |
| 4355 | // Commands // |
| 4356 | //////////////// |
| 4357 | |
| 4358 | // Function pointers. TODO: add support for function pointers. |
| 4359 | |
| 4360 | @external type void* PFN_vkVoidFunction |
| 4361 | @pfn cmd void vkVoidFunction() { |
| 4362 | } |
| 4363 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4364 | @external type void* PFN_vkAllocationFunction |
| 4365 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4366 | void* pUserData, |
| 4367 | platform.size_t size, |
| 4368 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4369 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4370 | return ? |
| 4371 | } |
| 4372 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4373 | @external type void* PFN_vkReallocationFunction |
| 4374 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4375 | void* pUserData, |
| 4376 | void* pOriginal, |
| 4377 | platform.size_t size, |
| 4378 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4379 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4380 | return ? |
| 4381 | } |
| 4382 | |
| 4383 | @external type void* PFN_vkFreeFunction |
| 4384 | @pfn cmd void vkFreeFunction( |
| 4385 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4386 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4387 | } |
| 4388 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4389 | @external type void* PFN_vkInternalAllocationNotification |
| 4390 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4391 | void* pUserData, |
| 4392 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4393 | VkInternalAllocationType allocationType, |
| 4394 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4395 | } |
| 4396 | |
| 4397 | @external type void* PFN_vkInternalFreeNotification |
| 4398 | @pfn cmd void vkInternalFreeNotification( |
| 4399 | void* pUserData, |
| 4400 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4401 | VkInternalAllocationType allocationType, |
| 4402 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4403 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4404 | |
| 4405 | // Global functions |
| 4406 | |
| 4407 | @threadSafety("system") |
| 4408 | cmd VkResult vkCreateInstance( |
| 4409 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4410 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4411 | VkInstance* pInstance) { |
| 4412 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 4413 | |
| 4414 | instance := ? |
| 4415 | pInstance[0] = instance |
| 4416 | State.Instances[instance] = new!InstanceObject() |
| 4417 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4418 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 4419 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4420 | |
| 4421 | return ? |
| 4422 | } |
| 4423 | |
| 4424 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4425 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4426 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4427 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4428 | instanceObject := GetInstance(instance) |
| 4429 | |
| 4430 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4431 | } |
| 4432 | |
| 4433 | @threadSafety("system") |
| 4434 | cmd VkResult vkEnumeratePhysicalDevices( |
| 4435 | VkInstance instance, |
| 4436 | u32* pPhysicalDeviceCount, |
| 4437 | VkPhysicalDevice* pPhysicalDevices) { |
| 4438 | instanceObject := GetInstance(instance) |
| 4439 | |
| 4440 | physicalDeviceCount := as!u32(?) |
| 4441 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 4442 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 4443 | |
| 4444 | for i in (0 .. physicalDeviceCount) { |
| 4445 | physicalDevice := ? |
| 4446 | physicalDevices[i] = physicalDevice |
| 4447 | if !(physicalDevice in State.PhysicalDevices) { |
| 4448 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 4449 | } |
| 4450 | } |
| 4451 | |
| 4452 | return ? |
| 4453 | } |
| 4454 | |
| 4455 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 4456 | VkDevice device, |
| 4457 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4458 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4459 | device := GetDevice(device) |
| 4460 | } |
| 4461 | |
| 4462 | return ? |
| 4463 | } |
| 4464 | |
| 4465 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 4466 | VkInstance instance, |
| 4467 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4468 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4469 | instanceObject := GetInstance(instance) |
| 4470 | } |
| 4471 | |
| 4472 | return ? |
| 4473 | } |
| 4474 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4475 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4476 | VkPhysicalDevice physicalDevice, |
| 4477 | VkPhysicalDeviceProperties* pProperties) { |
| 4478 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4479 | |
| 4480 | properties := ? |
| 4481 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4482 | } |
| 4483 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4484 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4485 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4486 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4487 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4488 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4489 | // TODO: Figure out how to express fetch-count-or-properties |
| 4490 | // This version fails 'apic validate' with 'fence not allowed in |
| 4491 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 4492 | // errors. |
| 4493 | // if pQueueFamilyProperties != null { |
| 4494 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 4495 | // for i in (0 .. pCount[0]) { |
| 4496 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 4497 | // queuesProperties[i] = queueProperties |
| 4498 | // } |
| 4499 | // } else { |
| 4500 | // count := ? |
| 4501 | // pCount[0] = count |
| 4502 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4503 | } |
| 4504 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4505 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4506 | VkPhysicalDevice physicalDevice, |
| 4507 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 4508 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4509 | |
| 4510 | memoryProperties := ? |
| 4511 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4512 | } |
| 4513 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4514 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4515 | VkPhysicalDevice physicalDevice, |
| 4516 | VkPhysicalDeviceFeatures* pFeatures) { |
| 4517 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4518 | |
| 4519 | features := ? |
| 4520 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4521 | } |
| 4522 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4523 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4524 | VkPhysicalDevice physicalDevice, |
| 4525 | VkFormat format, |
| 4526 | VkFormatProperties* pFormatProperties) { |
| 4527 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4528 | |
| 4529 | formatProperties := ? |
| 4530 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4531 | } |
| 4532 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4533 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4534 | VkPhysicalDevice physicalDevice, |
| 4535 | VkFormat format, |
| 4536 | VkImageType type, |
| 4537 | VkImageTiling tiling, |
| 4538 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4539 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4540 | VkImageFormatProperties* pImageFormatProperties) { |
| 4541 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4542 | |
| 4543 | imageFormatProperties := ? |
| 4544 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4545 | |
| 4546 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4547 | } |
| 4548 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4549 | |
| 4550 | // Device functions |
| 4551 | |
| 4552 | @threadSafety("system") |
| 4553 | cmd VkResult vkCreateDevice( |
| 4554 | VkPhysicalDevice physicalDevice, |
| 4555 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4556 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4557 | VkDevice* pDevice) { |
| 4558 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 4559 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4560 | |
| 4561 | device := ? |
| 4562 | pDevice[0] = device |
| 4563 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 4564 | |
| 4565 | return ? |
| 4566 | } |
| 4567 | |
| 4568 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4569 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4570 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4571 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4572 | deviceObject := GetDevice(device) |
| 4573 | |
| 4574 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4575 | } |
| 4576 | |
| 4577 | |
| 4578 | // Extension discovery functions |
| 4579 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4580 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4581 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4582 | VkLayerProperties* pProperties) { |
| 4583 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4584 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4585 | |
| 4586 | properties := pProperties[0:count] |
| 4587 | for i in (0 .. count) { |
| 4588 | property := ? |
| 4589 | properties[i] = property |
| 4590 | } |
| 4591 | |
| 4592 | return ? |
| 4593 | } |
| 4594 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4595 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4596 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4597 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4598 | VkExtensionProperties* pProperties) { |
| 4599 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4600 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4601 | |
| 4602 | properties := pProperties[0:count] |
| 4603 | for i in (0 .. count) { |
| 4604 | property := ? |
| 4605 | properties[i] = property |
| 4606 | } |
| 4607 | |
| 4608 | return ? |
| 4609 | } |
| 4610 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4611 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4612 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4613 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4614 | VkLayerProperties* pProperties) { |
| 4615 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4616 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4617 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4618 | |
| 4619 | properties := pProperties[0:count] |
| 4620 | for i in (0 .. count) { |
| 4621 | property := ? |
| 4622 | properties[i] = property |
| 4623 | } |
| 4624 | |
| 4625 | return ? |
| 4626 | } |
| 4627 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4628 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4629 | VkPhysicalDevice physicalDevice, |
| 4630 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4631 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4632 | VkExtensionProperties* pProperties) { |
| 4633 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4634 | |
| 4635 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4636 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4637 | |
| 4638 | properties := pProperties[0:count] |
| 4639 | for i in (0 .. count) { |
| 4640 | property := ? |
| 4641 | properties[i] = property |
| 4642 | } |
| 4643 | |
| 4644 | return ? |
| 4645 | } |
| 4646 | |
| 4647 | |
| 4648 | // Queue functions |
| 4649 | |
| 4650 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4651 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4652 | VkDevice device, |
| 4653 | u32 queueFamilyIndex, |
| 4654 | u32 queueIndex, |
| 4655 | VkQueue* pQueue) { |
| 4656 | deviceObject := GetDevice(device) |
| 4657 | |
| 4658 | queue := ? |
| 4659 | pQueue[0] = queue |
| 4660 | |
| 4661 | if !(queue in State.Queues) { |
| 4662 | State.Queues[queue] = new!QueueObject(device: device) |
| 4663 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4664 | } |
| 4665 | |
| 4666 | @threadSafety("app") |
| 4667 | cmd VkResult vkQueueSubmit( |
| 4668 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4669 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4670 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4671 | VkFence fence) { |
| 4672 | queueObject := GetQueue(queue) |
| 4673 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4674 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4675 | fenceObject := GetFence(fence) |
| 4676 | assert(fenceObject.device == queueObject.device) |
| 4677 | } |
| 4678 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4679 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 4680 | // for i in (0 .. commandBufferCount) { |
| 4681 | // commandBuffer := commandBuffers[i] |
| 4682 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4683 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4684 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4685 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 4686 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4687 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4688 | |
| 4689 | return ? |
| 4690 | } |
| 4691 | |
| 4692 | @threadSafety("system") |
| 4693 | cmd VkResult vkQueueWaitIdle( |
| 4694 | VkQueue queue) { |
| 4695 | queueObject := GetQueue(queue) |
| 4696 | |
| 4697 | return ? |
| 4698 | } |
| 4699 | |
| 4700 | @threadSafety("system") |
| 4701 | cmd VkResult vkDeviceWaitIdle( |
| 4702 | VkDevice device) { |
| 4703 | deviceObject := GetDevice(device) |
| 4704 | |
| 4705 | return ? |
| 4706 | } |
| 4707 | |
| 4708 | |
| 4709 | // Memory functions |
| 4710 | |
| 4711 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4712 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4713 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4714 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 4715 | const VkAllocationCallbacks* pAllocator, |
| 4716 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4717 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4718 | deviceObject := GetDevice(device) |
| 4719 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4720 | memory := ? |
| 4721 | pMemory[0] = memory |
| 4722 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4723 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4724 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4725 | |
| 4726 | return ? |
| 4727 | } |
| 4728 | |
| 4729 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4730 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4731 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4732 | VkDeviceMemory memory, |
| 4733 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4734 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4735 | memoryObject := GetDeviceMemory(memory) |
| 4736 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4737 | |
| 4738 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4739 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4740 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4741 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 4742 | "vkFreeMemory: commandBuffers still bound") |
| 4743 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4744 | } |
| 4745 | |
| 4746 | @threadSafety("app") |
| 4747 | cmd VkResult vkMapMemory( |
| 4748 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4749 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4750 | VkDeviceSize offset, |
| 4751 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4752 | VkMemoryMapFlags flags, |
| 4753 | void** ppData) { |
| 4754 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4755 | memoryObject := GetDeviceMemory(memory) |
| 4756 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4757 | |
| 4758 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4759 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4760 | |
| 4761 | return ? |
| 4762 | } |
| 4763 | |
| 4764 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4765 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4766 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4767 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4768 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4769 | memoryObject := GetDeviceMemory(memory) |
| 4770 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4771 | } |
| 4772 | |
| 4773 | cmd VkResult vkFlushMappedMemoryRanges( |
| 4774 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4775 | u32 memoryRangeCount |
| 4776 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4777 | deviceObject := GetDevice(device) |
| 4778 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4779 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4780 | for i in (0 .. memoryRangeCount) { |
| 4781 | memoryRange := memoryRanges[i] |
| 4782 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4783 | assert(memoryObject.device == device) |
| 4784 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 | } |
| 4786 | |
| 4787 | return ? |
| 4788 | } |
| 4789 | |
| 4790 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 4791 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4792 | u32 memoryRangeCount, |
| 4793 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4794 | deviceObject := GetDevice(device) |
| 4795 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4796 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4797 | for i in (0 .. memoryRangeCount) { |
| 4798 | memoryRange := memoryRanges[i] |
| 4799 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4800 | assert(memoryObject.device == device) |
| 4801 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4802 | } |
| 4803 | |
| 4804 | return ? |
| 4805 | } |
| 4806 | |
| 4807 | |
| 4808 | // Memory management API functions |
| 4809 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4810 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4811 | VkDevice device, |
| 4812 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4813 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4814 | deviceObject := GetDevice(device) |
| 4815 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4816 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4817 | memoryObject := GetDeviceMemory(memory) |
| 4818 | assert(memoryObject.device == device) |
| 4819 | } |
| 4820 | |
| 4821 | committedMemoryInBytes := ? |
| 4822 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4823 | } |
| 4824 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4825 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4826 | VkDevice device, |
| 4827 | VkBuffer buffer, |
| 4828 | VkMemoryRequirements* pMemoryRequirements) { |
| 4829 | deviceObject := GetDevice(device) |
| 4830 | bufferObject := GetBuffer(buffer) |
| 4831 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4832 | } |
| 4833 | |
| 4834 | cmd VkResult vkBindBufferMemory( |
| 4835 | VkDevice device, |
| 4836 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4837 | VkDeviceMemory memory, |
| 4838 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4839 | deviceObject := GetDevice(device) |
| 4840 | bufferObject := GetBuffer(buffer) |
| 4841 | assert(bufferObject.device == device) |
| 4842 | |
| 4843 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4844 | if bufferObject.memory != NULL_HANDLE { |
| 4845 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 4846 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4847 | } |
| 4848 | |
| 4849 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4850 | if memory != NULL_HANDLE { |
| 4851 | memoryObject := GetDeviceMemory(memory) |
| 4852 | assert(memoryObject.device == device) |
| 4853 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4854 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4855 | bufferObject.memory = memory |
| 4856 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4857 | |
| 4858 | return ? |
| 4859 | } |
| 4860 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4861 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4862 | VkDevice device, |
| 4863 | VkImage image, |
| 4864 | VkMemoryRequirements* pMemoryRequirements) { |
| 4865 | deviceObject := GetDevice(device) |
| 4866 | imageObject := GetImage(image) |
| 4867 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | } |
| 4869 | |
| 4870 | cmd VkResult vkBindImageMemory( |
| 4871 | VkDevice device, |
| 4872 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4873 | VkDeviceMemory memory, |
| 4874 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4875 | deviceObject := GetDevice(device) |
| 4876 | imageObject := GetImage(image) |
| 4877 | assert(imageObject.device == device) |
| 4878 | |
| 4879 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4880 | if imageObject.memory != NULL_HANDLE { |
| 4881 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 4882 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4883 | } |
| 4884 | |
| 4885 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4886 | if memory != NULL_HANDLE { |
| 4887 | memoryObject := GetDeviceMemory(memory) |
| 4888 | assert(memoryObject.device == device) |
| 4889 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4890 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4891 | imageObject.memory = memory |
| 4892 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4893 | |
| 4894 | return ? |
| 4895 | } |
| 4896 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4897 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4898 | VkDevice device, |
| 4899 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4900 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4901 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 4902 | deviceObject := GetDevice(device) |
| 4903 | imageObject := GetImage(image) |
| 4904 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4905 | } |
| 4906 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4907 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4908 | VkPhysicalDevice physicalDevice, |
| 4909 | VkFormat format, |
| 4910 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 4911 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4912 | VkImageUsageFlags usage, |
| 4913 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4914 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4915 | VkSparseImageFormatProperties* pProperties) { |
| 4916 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4917 | } |
| 4918 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4919 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4921 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4922 | const VkBindSparseInfo* pBindInfo, |
| 4923 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4924 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4925 | |
| 4926 | return ? |
| 4927 | } |
| 4928 | |
| 4929 | |
| 4930 | // Fence functions |
| 4931 | |
| 4932 | @threadSafety("system") |
| 4933 | cmd VkResult vkCreateFence( |
| 4934 | VkDevice device, |
| 4935 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4936 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4937 | VkFence* pFence) { |
| 4938 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 4939 | deviceObject := GetDevice(device) |
| 4940 | |
| 4941 | fence := ? |
| 4942 | pFence[0] = fence |
| 4943 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4944 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4945 | |
| 4946 | return ? |
| 4947 | } |
| 4948 | |
| 4949 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4950 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4951 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4952 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4953 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4954 | deviceObject := GetDevice(device) |
| 4955 | fenceObject := GetFence(fence) |
| 4956 | assert(fenceObject.device == device) |
| 4957 | |
| 4958 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4959 | } |
| 4960 | |
| 4961 | @threadSafety("system") |
| 4962 | cmd VkResult vkResetFences( |
| 4963 | VkDevice device, |
| 4964 | u32 fenceCount, |
| 4965 | const VkFence* pFences) { |
| 4966 | deviceObject := GetDevice(device) |
| 4967 | |
| 4968 | fences := pFences[0:fenceCount] |
| 4969 | for i in (0 .. fenceCount) { |
| 4970 | fence := fences[i] |
| 4971 | fenceObject := GetFence(fence) |
| 4972 | assert(fenceObject.device == device) |
| 4973 | fenceObject.signaled = false |
| 4974 | } |
| 4975 | |
| 4976 | return ? |
| 4977 | } |
| 4978 | |
| 4979 | @threadSafety("system") |
| 4980 | cmd VkResult vkGetFenceStatus( |
| 4981 | VkDevice device, |
| 4982 | VkFence fence) { |
| 4983 | deviceObject := GetDevice(device) |
| 4984 | fenceObject := GetFence(fence) |
| 4985 | assert(fenceObject.device == device) |
| 4986 | |
| 4987 | return ? |
| 4988 | } |
| 4989 | |
| 4990 | @threadSafety("system") |
| 4991 | cmd VkResult vkWaitForFences( |
| 4992 | VkDevice device, |
| 4993 | u32 fenceCount, |
| 4994 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4995 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4996 | u64 timeout) { /// timeout in nanoseconds |
| 4997 | deviceObject := GetDevice(device) |
| 4998 | |
| 4999 | fences := pFences[0:fenceCount] |
| 5000 | for i in (0 .. fenceCount) { |
| 5001 | fence := fences[i] |
| 5002 | fenceObject := GetFence(fence) |
| 5003 | assert(fenceObject.device == device) |
| 5004 | } |
| 5005 | |
| 5006 | return ? |
| 5007 | } |
| 5008 | |
| 5009 | |
| 5010 | // Queue semaphore functions |
| 5011 | |
| 5012 | @threadSafety("system") |
| 5013 | cmd VkResult vkCreateSemaphore( |
| 5014 | VkDevice device, |
| 5015 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5016 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5017 | VkSemaphore* pSemaphore) { |
| 5018 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 5019 | deviceObject := GetDevice(device) |
| 5020 | |
| 5021 | semaphore := ? |
| 5022 | pSemaphore[0] = semaphore |
| 5023 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 5024 | |
| 5025 | return ? |
| 5026 | } |
| 5027 | |
| 5028 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5029 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5030 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5031 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5032 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5033 | deviceObject := GetDevice(device) |
| 5034 | semaphoreObject := GetSemaphore(semaphore) |
| 5035 | assert(semaphoreObject.device == device) |
| 5036 | |
| 5037 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5038 | } |
| 5039 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5040 | |
| 5041 | // Event functions |
| 5042 | |
| 5043 | @threadSafety("system") |
| 5044 | cmd VkResult vkCreateEvent( |
| 5045 | VkDevice device, |
| 5046 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5047 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5048 | VkEvent* pEvent) { |
| 5049 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 5050 | deviceObject := GetDevice(device) |
| 5051 | |
| 5052 | event := ? |
| 5053 | pEvent[0] = event |
| 5054 | State.Events[event] = new!EventObject(device: device) |
| 5055 | |
| 5056 | return ? |
| 5057 | } |
| 5058 | |
| 5059 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5060 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5061 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5062 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5063 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5064 | deviceObject := GetDevice(device) |
| 5065 | eventObject := GetEvent(event) |
| 5066 | assert(eventObject.device == device) |
| 5067 | |
| 5068 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5069 | } |
| 5070 | |
| 5071 | @threadSafety("system") |
| 5072 | cmd VkResult vkGetEventStatus( |
| 5073 | VkDevice device, |
| 5074 | VkEvent event) { |
| 5075 | deviceObject := GetDevice(device) |
| 5076 | eventObject := GetEvent(event) |
| 5077 | assert(eventObject.device == device) |
| 5078 | |
| 5079 | return ? |
| 5080 | } |
| 5081 | |
| 5082 | @threadSafety("system") |
| 5083 | cmd VkResult vkSetEvent( |
| 5084 | VkDevice device, |
| 5085 | VkEvent event) { |
| 5086 | deviceObject := GetDevice(device) |
| 5087 | eventObject := GetEvent(event) |
| 5088 | assert(eventObject.device == device) |
| 5089 | |
| 5090 | return ? |
| 5091 | } |
| 5092 | |
| 5093 | @threadSafety("system") |
| 5094 | cmd VkResult vkResetEvent( |
| 5095 | VkDevice device, |
| 5096 | VkEvent event) { |
| 5097 | deviceObject := GetDevice(device) |
| 5098 | eventObject := GetEvent(event) |
| 5099 | assert(eventObject.device == device) |
| 5100 | |
| 5101 | return ? |
| 5102 | } |
| 5103 | |
| 5104 | |
| 5105 | // Query functions |
| 5106 | |
| 5107 | @threadSafety("system") |
| 5108 | cmd VkResult vkCreateQueryPool( |
| 5109 | VkDevice device, |
| 5110 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5111 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5112 | VkQueryPool* pQueryPool) { |
| 5113 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 5114 | deviceObject := GetDevice(device) |
| 5115 | |
| 5116 | queryPool := ? |
| 5117 | pQueryPool[0] = queryPool |
| 5118 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 5119 | |
| 5120 | return ? |
| 5121 | } |
| 5122 | |
| 5123 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5124 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5125 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5126 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5127 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5128 | deviceObject := GetDevice(device) |
| 5129 | queryPoolObject := GetQueryPool(queryPool) |
| 5130 | assert(queryPoolObject.device == device) |
| 5131 | |
| 5132 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5133 | } |
| 5134 | |
| 5135 | @threadSafety("system") |
| 5136 | cmd VkResult vkGetQueryPoolResults( |
| 5137 | VkDevice device, |
| 5138 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5139 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5140 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5141 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5142 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5143 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5144 | VkQueryResultFlags flags) { |
| 5145 | deviceObject := GetDevice(device) |
| 5146 | queryPoolObject := GetQueryPool(queryPool) |
| 5147 | assert(queryPoolObject.device == device) |
| 5148 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5149 | data := pData[0:dataSize] |
| 5150 | |
| 5151 | return ? |
| 5152 | } |
| 5153 | |
| 5154 | // Buffer functions |
| 5155 | |
| 5156 | @threadSafety("system") |
| 5157 | cmd VkResult vkCreateBuffer( |
| 5158 | VkDevice device, |
| 5159 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5160 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5161 | VkBuffer* pBuffer) { |
| 5162 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 5163 | deviceObject := GetDevice(device) |
| 5164 | |
| 5165 | buffer := ? |
| 5166 | pBuffer[0] = buffer |
| 5167 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 5168 | |
| 5169 | return ? |
| 5170 | } |
| 5171 | |
| 5172 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5173 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5174 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5175 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5176 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5177 | deviceObject := GetDevice(device) |
| 5178 | bufferObject := GetBuffer(buffer) |
| 5179 | assert(bufferObject.device == device) |
| 5180 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5181 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5182 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5183 | } |
| 5184 | |
| 5185 | |
| 5186 | // Buffer view functions |
| 5187 | |
| 5188 | @threadSafety("system") |
| 5189 | cmd VkResult vkCreateBufferView( |
| 5190 | VkDevice device, |
| 5191 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5192 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5193 | VkBufferView* pView) { |
| 5194 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 5195 | deviceObject := GetDevice(device) |
| 5196 | |
| 5197 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 5198 | assert(bufferObject.device == device) |
| 5199 | |
| 5200 | view := ? |
| 5201 | pView[0] = view |
| 5202 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 5203 | |
| 5204 | return ? |
| 5205 | } |
| 5206 | |
| 5207 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5208 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5209 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5210 | VkBufferView bufferView, |
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 | deviceObject := GetDevice(device) |
| 5213 | bufferViewObject := GetBufferView(bufferView) |
| 5214 | assert(bufferViewObject.device == device) |
| 5215 | |
| 5216 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5217 | } |
| 5218 | |
| 5219 | |
| 5220 | // Image functions |
| 5221 | |
| 5222 | @threadSafety("system") |
| 5223 | cmd VkResult vkCreateImage( |
| 5224 | VkDevice device, |
| 5225 | const VkImageCreateInfo* pCreateInfo, |
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 | VkImage* pImage) { |
| 5228 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 5229 | deviceObject := GetDevice(device) |
| 5230 | |
| 5231 | image := ? |
| 5232 | pImage[0] = image |
| 5233 | State.Images[image] = new!ImageObject(device: device) |
| 5234 | |
| 5235 | return ? |
| 5236 | } |
| 5237 | |
| 5238 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5239 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5240 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5241 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5242 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5243 | deviceObject := GetDevice(device) |
| 5244 | imageObject := GetImage(image) |
| 5245 | assert(imageObject.device == device) |
| 5246 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5247 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5248 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5249 | } |
| 5250 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5251 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5252 | VkDevice device, |
| 5253 | VkImage image, |
| 5254 | const VkImageSubresource* pSubresource, |
| 5255 | VkSubresourceLayout* pLayout) { |
| 5256 | deviceObject := GetDevice(device) |
| 5257 | imageObject := GetImage(image) |
| 5258 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5259 | } |
| 5260 | |
| 5261 | |
| 5262 | // Image view functions |
| 5263 | |
| 5264 | @threadSafety("system") |
| 5265 | cmd VkResult vkCreateImageView( |
| 5266 | VkDevice device, |
| 5267 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5268 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5269 | VkImageView* pView) { |
| 5270 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 5271 | deviceObject := GetDevice(device) |
| 5272 | |
| 5273 | imageObject := GetImage(pCreateInfo.image) |
| 5274 | assert(imageObject.device == device) |
| 5275 | |
| 5276 | view := ? |
| 5277 | pView[0] = view |
| 5278 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 5279 | |
| 5280 | return ? |
| 5281 | } |
| 5282 | |
| 5283 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5284 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5285 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5286 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5287 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5288 | deviceObject := GetDevice(device) |
| 5289 | imageViewObject := GetImageView(imageView) |
| 5290 | assert(imageViewObject.device == device) |
| 5291 | |
| 5292 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5293 | } |
| 5294 | |
| 5295 | |
| 5296 | // Shader functions |
| 5297 | |
| 5298 | cmd VkResult vkCreateShaderModule( |
| 5299 | VkDevice device, |
| 5300 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5301 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5302 | VkShaderModule* pShaderModule) { |
| 5303 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 5304 | deviceObject := GetDevice(device) |
| 5305 | |
| 5306 | shaderModule := ? |
| 5307 | pShaderModule[0] = shaderModule |
| 5308 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 5309 | |
| 5310 | return ? |
| 5311 | } |
| 5312 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5313 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5314 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5315 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5316 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5317 | deviceObject := GetDevice(device) |
| 5318 | shaderModuleObject := GetShaderModule(shaderModule) |
| 5319 | assert(shaderModuleObject.device == device) |
| 5320 | |
| 5321 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5322 | } |
| 5323 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5324 | |
| 5325 | // Pipeline functions |
| 5326 | |
| 5327 | cmd VkResult vkCreatePipelineCache( |
| 5328 | VkDevice device, |
| 5329 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5330 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5331 | VkPipelineCache* pPipelineCache) { |
| 5332 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 5333 | deviceObject := GetDevice(device) |
| 5334 | |
| 5335 | pipelineCache := ? |
| 5336 | pPipelineCache[0] = pipelineCache |
| 5337 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 5338 | |
| 5339 | return ? |
| 5340 | } |
| 5341 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5342 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5343 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5344 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5345 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5346 | deviceObject := GetDevice(device) |
| 5347 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5348 | assert(pipelineCacheObject.device == device) |
| 5349 | |
| 5350 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5351 | } |
| 5352 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5353 | cmd VkResult vkGetPipelineCacheData( |
| 5354 | VkDevice device, |
| 5355 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5356 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5357 | void* pData) { |
| 5358 | deviceObject := GetDevice(device) |
| 5359 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5360 | assert(pipelineCacheObject.device == device) |
| 5361 | |
| 5362 | return ? |
| 5363 | } |
| 5364 | |
| 5365 | cmd VkResult vkMergePipelineCaches( |
| 5366 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5367 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5368 | u32 srcCacheCount, |
| 5369 | const VkPipelineCache* pSrcCaches) { |
| 5370 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5371 | dstCacheObject := GetPipelineCache(dstCache) |
| 5372 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5373 | |
| 5374 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 5375 | for i in (0 .. srcCacheCount) { |
| 5376 | srcCache := srcCaches[i] |
| 5377 | srcCacheObject := GetPipelineCache(srcCache) |
| 5378 | assert(srcCacheObject.device == device) |
| 5379 | } |
| 5380 | |
| 5381 | return ? |
| 5382 | } |
| 5383 | |
| 5384 | cmd VkResult vkCreateGraphicsPipelines( |
| 5385 | VkDevice device, |
| 5386 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5387 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5388 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5389 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5390 | VkPipeline* pPipelines) { |
| 5391 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5392 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5393 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5394 | assert(pipelineCacheObject.device == device) |
| 5395 | } |
| 5396 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5397 | createInfos := pCreateInfos[0:createInfoCount] |
| 5398 | pipelines := pPipelines[0:createInfoCount] |
| 5399 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5400 | pipeline := ? |
| 5401 | pipelines[i] = pipeline |
| 5402 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5403 | } |
| 5404 | |
| 5405 | return ? |
| 5406 | } |
| 5407 | |
| 5408 | cmd VkResult vkCreateComputePipelines( |
| 5409 | VkDevice device, |
| 5410 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5411 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5412 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5413 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5414 | VkPipeline* pPipelines) { |
| 5415 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5416 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5417 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5418 | assert(pipelineCacheObject.device == device) |
| 5419 | } |
| 5420 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5421 | createInfos := pCreateInfos[0:createInfoCount] |
| 5422 | pipelines := pPipelines[0:createInfoCount] |
| 5423 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5424 | pipeline := ? |
| 5425 | pipelines[i] = pipeline |
| 5426 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5427 | } |
| 5428 | |
| 5429 | return ? |
| 5430 | } |
| 5431 | |
| 5432 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5433 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5434 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5435 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5436 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5437 | deviceObject := GetDevice(device) |
| 5438 | pipelineObjects := GetPipeline(pipeline) |
| 5439 | assert(pipelineObjects.device == device) |
| 5440 | |
| 5441 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5442 | } |
| 5443 | |
| 5444 | |
| 5445 | // Pipeline layout functions |
| 5446 | |
| 5447 | @threadSafety("system") |
| 5448 | cmd VkResult vkCreatePipelineLayout( |
| 5449 | VkDevice device, |
| 5450 | const VkPipelineLayoutCreateInfo* 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 | VkPipelineLayout* pPipelineLayout) { |
| 5453 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 5454 | deviceObject := GetDevice(device) |
| 5455 | |
| 5456 | pipelineLayout := ? |
| 5457 | pPipelineLayout[0] = pipelineLayout |
| 5458 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(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 vkDestroyPipelineLayout( |
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 | VkPipelineLayout pipelineLayout, |
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 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 5470 | assert(pipelineLayoutObjects.device == device) |
| 5471 | |
| 5472 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5473 | } |
| 5474 | |
| 5475 | |
| 5476 | // Sampler functions |
| 5477 | |
| 5478 | @threadSafety("system") |
| 5479 | cmd VkResult vkCreateSampler( |
| 5480 | VkDevice device, |
| 5481 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5482 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5483 | VkSampler* pSampler) { |
| 5484 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 5485 | deviceObject := GetDevice(device) |
| 5486 | |
| 5487 | sampler := ? |
| 5488 | pSampler[0] = sampler |
| 5489 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 5490 | |
| 5491 | return ? |
| 5492 | } |
| 5493 | |
| 5494 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5495 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5496 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5497 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5498 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5499 | deviceObject := GetDevice(device) |
| 5500 | samplerObject := GetSampler(sampler) |
| 5501 | assert(samplerObject.device == device) |
| 5502 | |
| 5503 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5504 | } |
| 5505 | |
| 5506 | |
| 5507 | // Descriptor set functions |
| 5508 | |
| 5509 | @threadSafety("system") |
| 5510 | cmd VkResult vkCreateDescriptorSetLayout( |
| 5511 | VkDevice device, |
| 5512 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5513 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5514 | VkDescriptorSetLayout* pSetLayout) { |
| 5515 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 5516 | deviceObject := GetDevice(device) |
| 5517 | |
| 5518 | setLayout := ? |
| 5519 | pSetLayout[0] = setLayout |
| 5520 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 5521 | |
| 5522 | return ? |
| 5523 | } |
| 5524 | |
| 5525 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5526 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5527 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5528 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5529 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5530 | deviceObject := GetDevice(device) |
| 5531 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 5532 | assert(descriptorSetLayoutObject.device == device) |
| 5533 | |
| 5534 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5535 | } |
| 5536 | |
| 5537 | @threadSafety("system") |
| 5538 | cmd VkResult vkCreateDescriptorPool( |
| 5539 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5540 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5541 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5542 | VkDescriptorPool* pDescriptorPool) { |
| 5543 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 5544 | deviceObject := GetDevice(device) |
| 5545 | |
| 5546 | descriptorPool := ? |
| 5547 | pDescriptorPool[0] = descriptorPool |
| 5548 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 5549 | |
| 5550 | return ? |
| 5551 | } |
| 5552 | |
| 5553 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5554 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5555 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5556 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5557 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5558 | deviceObject := GetDevice(device) |
| 5559 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5560 | assert(descriptorPoolObject.device == device) |
| 5561 | |
| 5562 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5563 | } |
| 5564 | |
| 5565 | @threadSafety("app") |
| 5566 | cmd VkResult vkResetDescriptorPool( |
| 5567 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5568 | VkDescriptorPool descriptorPool, |
| 5569 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5570 | deviceObject := GetDevice(device) |
| 5571 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5572 | assert(descriptorPoolObject.device == device) |
| 5573 | |
| 5574 | return ? |
| 5575 | } |
| 5576 | |
| 5577 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5578 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5579 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5580 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5581 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5582 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5583 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5584 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5585 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5586 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 5587 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5588 | setLayout := setLayouts[i] |
| 5589 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 5590 | assert(setLayoutObject.device == device) |
| 5591 | } |
| 5592 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5593 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 5594 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5595 | descriptorSet := ? |
| 5596 | descriptorSets[i] = descriptorSet |
| 5597 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 5598 | } |
| 5599 | |
| 5600 | return ? |
| 5601 | } |
| 5602 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5603 | cmd VkResult vkFreeDescriptorSets( |
| 5604 | VkDevice device, |
| 5605 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5606 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5607 | const VkDescriptorSet* pDescriptorSets) { |
| 5608 | deviceObject := GetDevice(device) |
| 5609 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5610 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5611 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5612 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5613 | descriptorSet := descriptorSets[i] |
| 5614 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 5615 | assert(descriptorSetObject.device == device) |
| 5616 | State.DescriptorSets[descriptorSet] = null |
| 5617 | } |
| 5618 | |
| 5619 | return ? |
| 5620 | } |
| 5621 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5622 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5623 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5624 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5625 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5626 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5627 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 5628 | deviceObject := GetDevice(device) |
| 5629 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5630 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 5631 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5632 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5633 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5634 | assert(descriptorWriteObject.device == device) |
| 5635 | } |
| 5636 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5637 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 5638 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5639 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5640 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5641 | assert(descriptorCopyObject.device == device) |
| 5642 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5643 | } |
| 5644 | |
| 5645 | |
| 5646 | // Framebuffer functions |
| 5647 | |
| 5648 | @threadSafety("system") |
| 5649 | cmd VkResult vkCreateFramebuffer( |
| 5650 | VkDevice device, |
| 5651 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5652 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5653 | VkFramebuffer* pFramebuffer) { |
| 5654 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 5655 | deviceObject := GetDevice(device) |
| 5656 | |
| 5657 | framebuffer := ? |
| 5658 | pFramebuffer[0] = framebuffer |
| 5659 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 5660 | |
| 5661 | return ? |
| 5662 | } |
| 5663 | |
| 5664 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5665 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5666 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5667 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5668 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5669 | deviceObject := GetDevice(device) |
| 5670 | framebufferObject := GetFramebuffer(framebuffer) |
| 5671 | assert(framebufferObject.device == device) |
| 5672 | |
| 5673 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5674 | } |
| 5675 | |
| 5676 | |
| 5677 | // Renderpass functions |
| 5678 | |
| 5679 | @threadSafety("system") |
| 5680 | cmd VkResult vkCreateRenderPass( |
| 5681 | VkDevice device, |
| 5682 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5683 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5684 | VkRenderPass* pRenderPass) { |
| 5685 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 5686 | deviceObject := GetDevice(device) |
| 5687 | |
| 5688 | renderpass := ? |
| 5689 | pRenderPass[0] = renderpass |
| 5690 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 5691 | |
| 5692 | return ? |
| 5693 | } |
| 5694 | |
| 5695 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5696 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5697 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5698 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5699 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5700 | deviceObject := GetDevice(device) |
| 5701 | renderPassObject := GetRenderPass(renderPass) |
| 5702 | assert(renderPassObject.device == device) |
| 5703 | |
| 5704 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5705 | } |
| 5706 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5707 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5708 | VkDevice device, |
| 5709 | VkRenderPass renderPass, |
| 5710 | VkExtent2D* pGranularity) { |
| 5711 | deviceObject := GetDevice(device) |
| 5712 | renderPassObject := GetRenderPass(renderPass) |
| 5713 | |
| 5714 | granularity := ? |
| 5715 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5716 | } |
| 5717 | |
| 5718 | // Command pool functions |
| 5719 | |
| 5720 | cmd VkResult vkCreateCommandPool( |
| 5721 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5722 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 5723 | const VkAllocationCallbacks* pAllocator, |
| 5724 | VkCommandPool* pCommandPool) { |
| 5725 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5726 | deviceObject := GetDevice(device) |
| 5727 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5728 | commandPool := ? |
| 5729 | pCommandPool[0] = commandPool |
| 5730 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5731 | |
| 5732 | return ? |
| 5733 | } |
| 5734 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5735 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5736 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5737 | VkCommandPool commandPool, |
| 5738 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5739 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5740 | commandPoolObject := GetCommandPool(commandPool) |
| 5741 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5742 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5743 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5744 | } |
| 5745 | |
| 5746 | cmd VkResult vkResetCommandPool( |
| 5747 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5748 | VkCommandPool commandPool, |
| 5749 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5750 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5751 | commandPoolObject := GetCommandPool(commandPool) |
| 5752 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5753 | |
| 5754 | return ? |
| 5755 | } |
| 5756 | |
| 5757 | // Command buffer functions |
| 5758 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5759 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5760 | memoryObject := GetDeviceMemory(memory) |
| 5761 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5762 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5763 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5764 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5765 | } |
| 5766 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5767 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5768 | memoryObject := GetDeviceMemory(memory) |
| 5769 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5770 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5771 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5772 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5773 | } |
| 5774 | |
| 5775 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5776 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5777 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5778 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 5779 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5780 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5781 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5782 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5783 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5784 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5785 | commandBuffer := ? |
| 5786 | commandBuffers[i] = commandBuffer |
| 5787 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5788 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5789 | |
| 5790 | return ? |
| 5791 | } |
| 5792 | |
| 5793 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5794 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5795 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5796 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5797 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5798 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5799 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5800 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5801 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5802 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5803 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 5804 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5805 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5806 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5807 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5808 | } |
| 5809 | |
| 5810 | @threadSafety("app") |
| 5811 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5812 | VkCommandBuffer commandBuffer, |
| 5813 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 5814 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 5815 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5816 | |
| 5817 | // TODO: iterate over boundObjects and clear memory bindings |
| 5818 | |
| 5819 | return ? |
| 5820 | } |
| 5821 | |
| 5822 | @threadSafety("app") |
| 5823 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5824 | VkCommandBuffer commandBuffer) { |
| 5825 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5826 | |
| 5827 | return ? |
| 5828 | } |
| 5829 | |
| 5830 | @threadSafety("app") |
| 5831 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5832 | VkCommandBuffer commandBuffer, |
| 5833 | VkCommandBufferResetFlags flags) { |
| 5834 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5835 | |
| 5836 | // TODO: iterate over boundObjects and clear memory bindings |
| 5837 | |
| 5838 | return ? |
| 5839 | } |
| 5840 | |
| 5841 | |
| 5842 | // Command buffer building functions |
| 5843 | |
| 5844 | @threadSafety("app") |
| 5845 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5846 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5847 | VkPipelineBindPoint pipelineBindPoint, |
| 5848 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5849 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5850 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5851 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5852 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5853 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5854 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5855 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5856 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5857 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5858 | } |
| 5859 | |
| 5860 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5861 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5862 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5863 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5864 | u32 viewportCount, |
| 5865 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5866 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5867 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5868 | } |
| 5869 | |
| 5870 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5871 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5872 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5873 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5874 | u32 scissorCount, |
| 5875 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5876 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5877 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5878 | } |
| 5879 | |
| 5880 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5881 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5882 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5883 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5884 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5885 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5886 | } |
| 5887 | |
| 5888 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5889 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5890 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5891 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5892 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5893 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5894 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5895 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5896 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5897 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5898 | @threadSafety("app") |
| 5899 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5900 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5901 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 5902 | // an annotation as a quick hack to pass this to the template without |
| 5903 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5904 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5905 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5906 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5907 | } |
| 5908 | |
| 5909 | @threadSafety("app") |
| 5910 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5911 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5912 | f32 minDepthBounds, |
| 5913 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5914 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5915 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5916 | } |
| 5917 | |
| 5918 | @threadSafety("app") |
| 5919 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5920 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5921 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5922 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5923 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5924 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5925 | } |
| 5926 | |
| 5927 | @threadSafety("app") |
| 5928 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5929 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5930 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5931 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5932 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5933 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5934 | } |
| 5935 | |
| 5936 | @threadSafety("app") |
| 5937 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5938 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5939 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5940 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5941 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5942 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5943 | } |
| 5944 | |
| 5945 | @threadSafety("app") |
| 5946 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5947 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5948 | VkPipelineBindPoint pipelineBindPoint, |
| 5949 | VkPipelineLayout layout, |
| 5950 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5951 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5952 | const VkDescriptorSet* pDescriptorSets, |
| 5953 | u32 dynamicOffsetCount, |
| 5954 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5955 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5956 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5957 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5958 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5959 | descriptorSet := descriptorSets[i] |
| 5960 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5961 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5962 | } |
| 5963 | |
| 5964 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 5965 | for i in (0 .. dynamicOffsetCount) { |
| 5966 | dynamicOffset := dynamicOffsets[i] |
| 5967 | } |
| 5968 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5969 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5970 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5971 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5972 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5973 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5974 | } |
| 5975 | |
| 5976 | @threadSafety("app") |
| 5977 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5978 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5979 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5980 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5981 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5982 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5983 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5984 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5985 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5986 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5987 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5988 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5989 | } |
| 5990 | |
| 5991 | @threadSafety("app") |
| 5992 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5993 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5994 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5995 | u32 bindingCount, |
| 5996 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5997 | const VkDeviceSize* pOffsets) { |
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 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6000 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6001 | buffers := pBuffers[0:bindingCount] |
| 6002 | offsets := pOffsets[0:bindingCount] |
| 6003 | for i in (0 .. bindingCount) { |
| 6004 | buffer := buffers[i] |
| 6005 | offset := offsets[i] |
| 6006 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6007 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6008 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6009 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6010 | } |
| 6011 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6012 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6013 | } |
| 6014 | |
| 6015 | @threadSafety("app") |
| 6016 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6017 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6018 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6019 | u32 instanceCount, |
| 6020 | u32 firstVertex, |
| 6021 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6022 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6023 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6024 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6025 | } |
| 6026 | |
| 6027 | @threadSafety("app") |
| 6028 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6029 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6030 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6031 | u32 instanceCount, |
| 6032 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6033 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6034 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6035 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6036 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6037 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6038 | } |
| 6039 | |
| 6040 | @threadSafety("app") |
| 6041 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6042 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6043 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6044 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6045 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6046 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6047 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6048 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6049 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6050 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6051 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6052 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6053 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6054 | } |
| 6055 | |
| 6056 | @threadSafety("app") |
| 6057 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6058 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6059 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6060 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6061 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6062 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6063 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6064 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6065 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6066 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6067 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6068 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6069 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6070 | } |
| 6071 | |
| 6072 | @threadSafety("app") |
| 6073 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6074 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6075 | u32 groupCountX, |
| 6076 | u32 groupCountY, |
| 6077 | u32 groupCountZ) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6078 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6079 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6080 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6081 | } |
| 6082 | |
| 6083 | @threadSafety("app") |
| 6084 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6085 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6086 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6087 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6088 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6089 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6090 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6091 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6092 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6093 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6094 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6095 | } |
| 6096 | |
| 6097 | @threadSafety("app") |
| 6098 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6099 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6100 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6101 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6102 | u32 regionCount, |
| 6103 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6104 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6105 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6106 | dstBufferObject := GetBuffer(dstBuffer) |
| 6107 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6108 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6109 | |
| 6110 | regions := pRegions[0:regionCount] |
| 6111 | for i in (0 .. regionCount) { |
| 6112 | region := regions[i] |
| 6113 | } |
| 6114 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6115 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6116 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6117 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6118 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6119 | } |
| 6120 | |
| 6121 | @threadSafety("app") |
| 6122 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6123 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6124 | VkImage srcImage, |
| 6125 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6126 | VkImage dstImage, |
| 6127 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6128 | u32 regionCount, |
| 6129 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6130 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6131 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6132 | dstImageObject := GetImage(dstImage) |
| 6133 | assert(commandBufferObject.device == srcImageObject.device) |
| 6134 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6135 | |
| 6136 | regions := pRegions[0:regionCount] |
| 6137 | for i in (0 .. regionCount) { |
| 6138 | region := regions[i] |
| 6139 | } |
| 6140 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6141 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6142 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6143 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6144 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6145 | } |
| 6146 | |
| 6147 | @threadSafety("app") |
| 6148 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6149 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6150 | VkImage srcImage, |
| 6151 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6152 | VkImage dstImage, |
| 6153 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6154 | u32 regionCount, |
| 6155 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 6156 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6157 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6158 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6159 | dstImageObject := GetImage(dstImage) |
| 6160 | assert(commandBufferObject.device == srcImageObject.device) |
| 6161 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6162 | |
| 6163 | regions := pRegions[0:regionCount] |
| 6164 | for i in (0 .. regionCount) { |
| 6165 | region := regions[i] |
| 6166 | } |
| 6167 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6168 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6169 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6170 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6171 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6172 | } |
| 6173 | |
| 6174 | @threadSafety("app") |
| 6175 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6176 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6177 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6178 | VkImage dstImage, |
| 6179 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6180 | u32 regionCount, |
| 6181 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6182 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6183 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6184 | dstImageObject := GetImage(dstImage) |
| 6185 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6186 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6187 | |
| 6188 | regions := pRegions[0:regionCount] |
| 6189 | for i in (0 .. regionCount) { |
| 6190 | region := regions[i] |
| 6191 | } |
| 6192 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6193 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6194 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6195 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6196 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6197 | } |
| 6198 | |
| 6199 | @threadSafety("app") |
| 6200 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6201 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6202 | VkImage srcImage, |
| 6203 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6204 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6205 | u32 regionCount, |
| 6206 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6207 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6208 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6209 | dstBufferObject := GetBuffer(dstBuffer) |
| 6210 | assert(commandBufferObject.device == srcImageObject.device) |
| 6211 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6212 | |
| 6213 | regions := pRegions[0:regionCount] |
| 6214 | for i in (0 .. regionCount) { |
| 6215 | region := regions[i] |
| 6216 | } |
| 6217 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6218 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6219 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6220 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6221 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6222 | } |
| 6223 | |
| 6224 | @threadSafety("app") |
| 6225 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6226 | VkCommandBuffer commandBuffer, |
| 6227 | VkBuffer dstBuffer, |
| 6228 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6229 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 6230 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6231 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6232 | dstBufferObject := GetBuffer(dstBuffer) |
| 6233 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6234 | |
| 6235 | data := pData[0:dataSize] |
| 6236 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6237 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6238 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6239 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6240 | } |
| 6241 | |
| 6242 | @threadSafety("app") |
| 6243 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6244 | VkCommandBuffer commandBuffer, |
| 6245 | VkBuffer dstBuffer, |
| 6246 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6247 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6248 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6249 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6250 | dstBufferObject := GetBuffer(dstBuffer) |
| 6251 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6252 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6253 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6254 | } |
| 6255 | |
| 6256 | @threadSafety("app") |
| 6257 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6258 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6259 | VkImage image, |
| 6260 | VkImageLayout imageLayout, |
| 6261 | const VkClearColorValue* pColor, |
| 6262 | u32 rangeCount, |
| 6263 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6264 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6265 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6266 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6267 | |
| 6268 | ranges := pRanges[0:rangeCount] |
| 6269 | for i in (0 .. rangeCount) { |
| 6270 | range := ranges[i] |
| 6271 | } |
| 6272 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6273 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6274 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6275 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6276 | } |
| 6277 | |
| 6278 | @threadSafety("app") |
| 6279 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6280 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6281 | VkImage image, |
| 6282 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6283 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6284 | u32 rangeCount, |
| 6285 | const VkImageSubresourceRange* pRanges) { |
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 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6288 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6289 | |
| 6290 | ranges := pRanges[0:rangeCount] |
| 6291 | for i in (0 .. rangeCount) { |
| 6292 | range := ranges[i] |
| 6293 | } |
| 6294 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6295 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6296 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6297 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6298 | } |
| 6299 | |
| 6300 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6301 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6302 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6303 | u32 attachmentCount, |
| 6304 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6305 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 6306 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6307 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6308 | |
| 6309 | rects := pRects[0:rectCount] |
| 6310 | for i in (0 .. rectCount) { |
| 6311 | rect := rects[i] |
| 6312 | } |
| 6313 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6314 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6315 | } |
| 6316 | |
| 6317 | @threadSafety("app") |
| 6318 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6319 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6320 | VkImage srcImage, |
| 6321 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6322 | VkImage dstImage, |
| 6323 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6324 | u32 regionCount, |
| 6325 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6326 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6327 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6328 | dstImageObject := GetImage(dstImage) |
| 6329 | assert(commandBufferObject.device == srcImageObject.device) |
| 6330 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6331 | |
| 6332 | regions := pRegions[0:regionCount] |
| 6333 | for i in (0 .. regionCount) { |
| 6334 | region := regions[i] |
| 6335 | } |
| 6336 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6337 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6338 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6339 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6340 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6341 | } |
| 6342 | |
| 6343 | @threadSafety("app") |
| 6344 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6345 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6346 | VkEvent event, |
| 6347 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6348 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6349 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6350 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6351 | } |
| 6352 | |
| 6353 | @threadSafety("app") |
| 6354 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6355 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6356 | VkEvent event, |
| 6357 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6358 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6359 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6360 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6361 | } |
| 6362 | |
| 6363 | @threadSafety("app") |
| 6364 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6365 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6366 | u32 eventCount, |
| 6367 | const VkEvent* pEvents, |
| 6368 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6369 | VkPipelineStageFlags dstStageMask, |
| 6370 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6371 | const VkMemoryBarrier* pMemoryBarriers, |
| 6372 | u32 bufferMemoryBarrierCount, |
| 6373 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6374 | u32 imageMemoryBarrierCount, |
| 6375 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6376 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6377 | |
| 6378 | events := pEvents[0:eventCount] |
| 6379 | for i in (0 .. eventCount) { |
| 6380 | event := events[i] |
| 6381 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6382 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6383 | } |
| 6384 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6385 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6386 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6387 | memoryBarrier := memoryBarriers[i] |
| 6388 | } |
| 6389 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6390 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6391 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6392 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6393 | assert(bufferObject.device == commandBufferObject.device) |
| 6394 | } |
| 6395 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6396 | for i in (0 .. imageMemoryBarrierCount) { |
| 6397 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6398 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6399 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6400 | } |
| 6401 | } |
| 6402 | |
| 6403 | @threadSafety("app") |
| 6404 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6405 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6406 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6407 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 6408 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6409 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6410 | const VkMemoryBarrier* pMemoryBarriers, |
| 6411 | u32 bufferMemoryBarrierCount, |
| 6412 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6413 | u32 imageMemoryBarrierCount, |
| 6414 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6415 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6416 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6417 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6418 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6419 | memoryBarrier := memoryBarriers[i] |
| 6420 | } |
| 6421 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6422 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6423 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6424 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6425 | assert(bufferObject.device == commandBufferObject.device) |
| 6426 | } |
| 6427 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6428 | for i in (0 .. imageMemoryBarrierCount) { |
| 6429 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6430 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6431 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6432 | } |
| 6433 | } |
| 6434 | |
| 6435 | @threadSafety("app") |
| 6436 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6437 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6438 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6439 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6440 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6441 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6442 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6443 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6444 | } |
| 6445 | |
| 6446 | @threadSafety("app") |
| 6447 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6448 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6449 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6450 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6451 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6452 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6453 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6454 | } |
| 6455 | |
| 6456 | @threadSafety("app") |
| 6457 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6458 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6459 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6460 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6461 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6462 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6463 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6464 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6465 | } |
| 6466 | |
| 6467 | @threadSafety("app") |
| 6468 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6469 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 6470 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6471 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6472 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6473 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6474 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6475 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6476 | } |
| 6477 | |
| 6478 | @threadSafety("app") |
| 6479 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6480 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6481 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6482 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6483 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6484 | VkBuffer dstBuffer, |
| 6485 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 6486 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6487 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6488 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6489 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6490 | dstBufferObject := GetBuffer(dstBuffer) |
| 6491 | assert(commandBufferObject.device == queryPoolObject.device) |
| 6492 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6493 | } |
| 6494 | |
| 6495 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6496 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6497 | VkPipelineLayout layout, |
| 6498 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6499 | u32 offset, |
| 6500 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6501 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6502 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6503 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6504 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6505 | } |
| 6506 | |
| 6507 | @threadSafety("app") |
| 6508 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6509 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6510 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6511 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6512 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6513 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 6514 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6515 | assert(commandBufferObject.device == renderPassObject.device) |
| 6516 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6517 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6518 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6519 | } |
| 6520 | |
| 6521 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6522 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6523 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6524 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6525 | } |
| 6526 | |
| 6527 | @threadSafety("app") |
| 6528 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6529 | VkCommandBuffer commandBuffer) { |
| 6530 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6531 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6532 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6533 | } |
| 6534 | |
| 6535 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6536 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6537 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6538 | const VkCommandBuffer* pCommandBuffers) { |
| 6539 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6540 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6541 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 6542 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6543 | secondaryCommandBuffer := commandBuffers[i] |
| 6544 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 6545 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6546 | } |
| 6547 | } |
| 6548 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6549 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6550 | cmd void vkDestroySurfaceKHR( |
| 6551 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6552 | VkSurfaceKHR surface, |
| 6553 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6554 | instanceObject := GetInstance(instance) |
| 6555 | surfaceObject := GetSurface(surface) |
| 6556 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6557 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6558 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 6559 | } |
| 6560 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6561 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6562 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6563 | VkPhysicalDevice physicalDevice, |
| 6564 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6565 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6566 | VkBool32* pSupported) { |
| 6567 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6568 | |
| 6569 | return ? |
| 6570 | } |
| 6571 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6572 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6573 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 6574 | VkPhysicalDevice physicalDevice, |
| 6575 | VkSurfaceKHR surface, |
| 6576 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 6577 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6578 | |
| 6579 | surfaceCapabilities := ? |
| 6580 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 6581 | |
| 6582 | return ? |
| 6583 | } |
| 6584 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6585 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6586 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 6587 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6588 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6589 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6590 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6591 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6592 | |
| 6593 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6594 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6595 | surfaceFormats := pSurfaceFormats[0:count] |
| 6596 | |
| 6597 | for i in (0 .. count) { |
| 6598 | surfaceFormat := ? |
| 6599 | surfaceFormats[i] = surfaceFormat |
| 6600 | } |
| 6601 | |
| 6602 | return ? |
| 6603 | } |
| 6604 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6605 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6606 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 6607 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6608 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6609 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6610 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6611 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6612 | |
| 6613 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6614 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6615 | presentModes := pPresentModes[0:count] |
| 6616 | |
| 6617 | for i in (0 .. count) { |
| 6618 | presentMode := ? |
| 6619 | presentModes[i] = presentMode |
| 6620 | } |
| 6621 | |
| 6622 | return ? |
| 6623 | } |
| 6624 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6625 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6626 | cmd VkResult vkCreateSwapchainKHR( |
| 6627 | VkDevice device, |
| 6628 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6629 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6630 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6631 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6632 | deviceObject := GetDevice(device) |
| 6633 | |
| 6634 | swapchain := ? |
| 6635 | pSwapchain[0] = swapchain |
| 6636 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 6637 | |
| 6638 | return ? |
| 6639 | } |
| 6640 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6641 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6642 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6643 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6644 | VkSwapchainKHR swapchain, |
| 6645 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6646 | deviceObject := GetDevice(device) |
| 6647 | swapchainObject := GetSwapchain(swapchain) |
| 6648 | assert(swapchainObject.device == device) |
| 6649 | |
| 6650 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6651 | } |
| 6652 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6653 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6654 | cmd VkResult vkGetSwapchainImagesKHR( |
| 6655 | VkDevice device, |
| 6656 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6657 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6658 | VkImage* pSwapchainImages) { |
| 6659 | deviceObject := GetDevice(device) |
| 6660 | |
| 6661 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6662 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6663 | swapchainImages := pSwapchainImages[0:count] |
| 6664 | |
| 6665 | for i in (0 .. count) { |
| 6666 | swapchainImage := ? |
| 6667 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6668 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6669 | } |
| 6670 | |
| 6671 | return ? |
| 6672 | } |
| 6673 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6674 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6675 | cmd VkResult vkAcquireNextImageKHR( |
| 6676 | VkDevice device, |
| 6677 | VkSwapchainKHR swapchain, |
| 6678 | u64 timeout, |
| 6679 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6680 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6681 | u32* pImageIndex) { |
| 6682 | deviceObject := GetDevice(device) |
| 6683 | swapchainObject := GetSwapchain(swapchain) |
| 6684 | |
| 6685 | imageIndex := ? |
| 6686 | pImageIndex[0] = imageIndex |
| 6687 | |
| 6688 | return ? |
| 6689 | } |
| 6690 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6691 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6692 | cmd VkResult vkQueuePresentKHR( |
| 6693 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6694 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6695 | queueObject := GetQueue(queue) |
| 6696 | |
| 6697 | presentInfo := ? |
| 6698 | pPresentInfo[0] = presentInfo |
| 6699 | |
| 6700 | return ? |
| 6701 | } |
| 6702 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6703 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6704 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6705 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6706 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6707 | VkDisplayPropertiesKHR* pProperties) { |
| 6708 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6709 | return ? |
| 6710 | } |
| 6711 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6712 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6713 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6714 | VkPhysicalDevice physicalDevice, |
| 6715 | u32* pPropertyCount, |
| 6716 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 6717 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6718 | return ? |
| 6719 | } |
| 6720 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6721 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6722 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6723 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6724 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6725 | u32* pDisplayCount, |
| 6726 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6727 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6728 | return ? |
| 6729 | } |
| 6730 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6731 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6732 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 6733 | VkPhysicalDevice physicalDevice, |
| 6734 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6735 | u32* pPropertyCount, |
| 6736 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6737 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6738 | return ? |
| 6739 | } |
| 6740 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6741 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6742 | cmd VkResult vkCreateDisplayModeKHR( |
| 6743 | VkPhysicalDevice physicalDevice, |
| 6744 | VkDisplayKHR display, |
| 6745 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6746 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6747 | VkDisplayModeKHR* pMode) { |
| 6748 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6749 | return ? |
| 6750 | } |
| 6751 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6752 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6753 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6754 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6755 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6756 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6757 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6758 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6759 | return ? |
| 6760 | } |
| 6761 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6762 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6763 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 6764 | VkInstance instance, |
| 6765 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6766 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6767 | VkSurfaceKHR* pSurface) { |
| 6768 | return ? |
| 6769 | } |
| 6770 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6771 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6772 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 6773 | VkDevice device, |
| 6774 | u32 swapchainCount, |
| 6775 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6776 | const VkAllocationCallbacks* pAllocator, |
| 6777 | VkSwapchainKHR* pSwapchains) { |
| 6778 | return ? |
| 6779 | } |
| 6780 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6781 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6782 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6783 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6784 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6785 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6786 | VkSurfaceKHR* pSurface) { |
| 6787 | instanceObject := GetInstance(instance) |
| 6788 | return ? |
| 6789 | } |
| 6790 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6791 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6792 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6793 | VkPhysicalDevice physicalDevice, |
| 6794 | u32 queueFamilyIndex, |
| 6795 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6796 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6797 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6798 | return ? |
| 6799 | } |
| 6800 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6801 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6802 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6803 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6804 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6805 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6806 | VkSurfaceKHR* pSurface) { |
| 6807 | instanceObject := GetInstance(instance) |
| 6808 | return ? |
| 6809 | } |
| 6810 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6811 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6812 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6813 | VkPhysicalDevice physicalDevice, |
| 6814 | u32 queueFamilyIndex, |
| 6815 | platform.xcb_connection_t* connection, |
| 6816 | platform.xcb_visualid_t visual_id) { |
| 6817 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6818 | return ? |
| 6819 | } |
| 6820 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6821 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6822 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 6823 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6824 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6825 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6826 | VkSurfaceKHR* pSurface) { |
| 6827 | instanceObject := GetInstance(instance) |
| 6828 | return ? |
| 6829 | } |
| 6830 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6831 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6832 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6833 | VkPhysicalDevice physicalDevice, |
| 6834 | u32 queueFamilyIndex, |
| 6835 | platform.wl_display* display) { |
| 6836 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6837 | return ? |
| 6838 | } |
| 6839 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6840 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6841 | cmd VkResult vkCreateMirSurfaceKHR( |
| 6842 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6843 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6844 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6845 | VkSurfaceKHR* pSurface) { |
| 6846 | instanceObject := GetInstance(instance) |
| 6847 | return ? |
| 6848 | } |
| 6849 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6850 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6851 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6852 | VkPhysicalDevice physicalDevice, |
| 6853 | u32 queueFamilyIndex, |
| 6854 | platform.MirConnection* connection) { |
| 6855 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6856 | return ? |
| 6857 | } |
| 6858 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6859 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6860 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 6861 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6862 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6863 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6864 | VkSurfaceKHR* pSurface) { |
| 6865 | instanceObject := GetInstance(instance) |
| 6866 | return ? |
| 6867 | } |
| 6868 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6869 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6870 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 6871 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6872 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6873 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6874 | VkSurfaceKHR* pSurface) { |
| 6875 | instanceObject := GetInstance(instance) |
| 6876 | return ? |
| 6877 | } |
| 6878 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6879 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6880 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6881 | VkPhysicalDevice physicalDevice, |
| 6882 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 6883 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6884 | return ? |
| 6885 | } |
| 6886 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6887 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6888 | @optional |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6889 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 6890 | VkDevice device, |
| 6891 | VkFormat format, |
| 6892 | VkImageUsageFlags imageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6893 | s32* grallocUsage) { |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6894 | return ? |
| 6895 | } |
| 6896 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6897 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6898 | @optional |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6899 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 6900 | VkDevice device, |
| 6901 | VkFormat format, |
| 6902 | VkImageUsageFlags imageUsage, |
| 6903 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6904 | u64* grallocConsumerUsage, |
| 6905 | u64* grallocProducerUsage) { |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6906 | return ? |
| 6907 | } |
| 6908 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6909 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6910 | cmd VkResult vkAcquireImageANDROID( |
| 6911 | VkDevice device, |
| 6912 | VkImage image, |
| 6913 | int nativeFenceFd, |
| 6914 | VkSemaphore semaphore, |
| 6915 | VkFence fence) { |
| 6916 | return ? |
| 6917 | } |
| 6918 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6919 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6920 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 6921 | VkQueue queue, |
| 6922 | u32 waitSemaphoreCount, |
| 6923 | const VkSemaphore* pWaitSemaphores, |
| 6924 | VkImage image, |
| 6925 | int* pNativeFenceFd) { |
| 6926 | return ? |
| 6927 | } |
| 6928 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 6929 | @extension("VK_EXT_debug_report") // 12 |
| 6930 | @external type void* PFN_vkDebugReportCallbackEXT |
| 6931 | @extension("VK_EXT_debug_report") // 12 |
| 6932 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 6933 | VkDebugReportFlagsEXT flags, |
| 6934 | VkDebugReportObjectTypeEXT objectType, |
| 6935 | u64 object, |
| 6936 | platform.size_t location, |
| 6937 | s32 messageCode, |
| 6938 | const char* pLayerPrefix, |
| 6939 | const char* pMessage, |
| 6940 | void* pUserData) { |
| 6941 | return ? |
| 6942 | } |
| 6943 | |
| 6944 | @extension("VK_EXT_debug_report") // 12 |
| 6945 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 6946 | VkInstance instance, |
| 6947 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 6948 | const VkAllocationCallbacks* pAllocator, |
| 6949 | VkDebugReportCallbackEXT* pCallback) { |
| 6950 | return ? |
| 6951 | } |
| 6952 | |
| 6953 | @extension("VK_EXT_debug_report") // 12 |
| 6954 | cmd void vkDestroyDebugReportCallbackEXT( |
| 6955 | VkInstance instance, |
| 6956 | VkDebugReportCallbackEXT callback, |
| 6957 | const VkAllocationCallbacks* pAllocator) { |
| 6958 | } |
| 6959 | |
| 6960 | @extension("VK_EXT_debug_report") // 12 |
| 6961 | cmd void vkDebugReportMessageEXT( |
| 6962 | VkInstance instance, |
| 6963 | VkDebugReportFlagsEXT flags, |
| 6964 | VkDebugReportObjectTypeEXT objectType, |
| 6965 | u64 object, |
| 6966 | platform.size_t location, |
| 6967 | s32 messageCode, |
| 6968 | const char* pLayerPrefix, |
| 6969 | const char* pMessage) { |
| 6970 | } |
| 6971 | |
| 6972 | @extension("VK_EXT_debug_marker") // 23 |
| 6973 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 6974 | VkDevice device, |
| 6975 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 6976 | return ? |
| 6977 | } |
| 6978 | |
| 6979 | @extension("VK_EXT_debug_marker") // 23 |
| 6980 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 6981 | VkDevice device, |
| 6982 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 6983 | return ? |
| 6984 | } |
| 6985 | |
| 6986 | @extension("VK_EXT_debug_marker") // 23 |
| 6987 | cmd void vkCmdDebugMarkerBeginEXT( |
| 6988 | VkCommandBuffer commandBuffer, |
| 6989 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6990 | } |
| 6991 | |
| 6992 | @extension("VK_EXT_debug_marker") // 23 |
| 6993 | cmd void vkCmdDebugMarkerEndEXT( |
| 6994 | VkCommandBuffer commandBuffer) { |
| 6995 | } |
| 6996 | |
| 6997 | @extension("VK_EXT_debug_marker") // 23 |
| 6998 | cmd void vkCmdDebugMarkerInsertEXT( |
| 6999 | VkCommandBuffer commandBuffer, |
| 7000 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 7001 | } |
| 7002 | |
| 7003 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 7004 | cmd void vkCmdDrawIndirectCountAMD( |
| 7005 | VkCommandBuffer commandBuffer, |
| 7006 | VkBuffer buffer, |
| 7007 | VkDeviceSize offset, |
| 7008 | VkBuffer countBuffer, |
| 7009 | VkDeviceSize countBufferOffset, |
| 7010 | u32 maxDrawCount, |
| 7011 | u32 stride) { |
| 7012 | } |
| 7013 | |
| 7014 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 7015 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 7016 | VkCommandBuffer commandBuffer, |
| 7017 | VkBuffer buffer, |
| 7018 | VkDeviceSize offset, |
| 7019 | VkBuffer countBuffer, |
| 7020 | VkDeviceSize countBufferOffset, |
| 7021 | u32 maxDrawCount, |
| 7022 | u32 stride) { |
| 7023 | } |
| 7024 | |
| 7025 | @extension("VK_NV_external_memory_capabilities") // 56 |
| 7026 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 7027 | VkPhysicalDevice physicalDevice, |
| 7028 | VkFormat format, |
| 7029 | VkImageType type, |
| 7030 | VkImageTiling tiling, |
| 7031 | VkImageUsageFlags usage, |
| 7032 | VkImageCreateFlags flags, |
| 7033 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 7034 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 7035 | return ? |
| 7036 | } |
| 7037 | |
| 7038 | @extension("VK_NV_external_memory_win32") // 58 |
| 7039 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 7040 | VkDevice device, |
| 7041 | VkDeviceMemory memory, |
| 7042 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 7043 | platform.HANDLE* pHandle) { |
| 7044 | return ? |
| 7045 | } |
| 7046 | |
| 7047 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7048 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 7049 | VkPhysicalDevice physicalDevice, |
| 7050 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 7051 | } |
| 7052 | |
| 7053 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7054 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 7055 | VkPhysicalDevice physicalDevice, |
| 7056 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 7057 | } |
| 7058 | |
| 7059 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7060 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 7061 | VkPhysicalDevice physicalDevice, |
| 7062 | VkFormat format, |
| 7063 | VkFormatProperties2KHR* pFormatProperties) { |
| 7064 | } |
| 7065 | |
| 7066 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7067 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 7068 | VkPhysicalDevice physicalDevice, |
| 7069 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 7070 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 7071 | return ? |
| 7072 | } |
| 7073 | |
| 7074 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7075 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7076 | VkPhysicalDevice physicalDevice, |
| 7077 | u32* pQueueFamilyPropertyCount, |
| 7078 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 7079 | } |
| 7080 | |
| 7081 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7082 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7083 | VkPhysicalDevice physicalDevice, |
| 7084 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 7085 | } |
| 7086 | |
| 7087 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7088 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7089 | VkPhysicalDevice physicalDevice, |
| 7090 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 7091 | u32* pPropertyCount, |
| 7092 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 7093 | } |
| 7094 | |
| 7095 | @extension("VK_KHX_device_group") // 61 |
| 7096 | cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX( |
| 7097 | VkDevice device, |
| 7098 | u32 heapIndex, |
| 7099 | u32 localDeviceIndex, |
| 7100 | u32 remoteDeviceIndex, |
| 7101 | VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) { |
| 7102 | } |
| 7103 | |
| 7104 | @extension("VK_KHX_device_group") // 61 |
| 7105 | cmd VkResult vkBindBufferMemory2KHX( |
| 7106 | VkDevice device, |
| 7107 | u32 bindInfoCount, |
| 7108 | const VkBindBufferMemoryInfoKHX* pBindInfos) { |
| 7109 | return ? |
| 7110 | } |
| 7111 | |
| 7112 | @extension("VK_KHX_device_group") // 61 |
| 7113 | cmd VkResult vkBindImageMemory2KHX( |
| 7114 | VkDevice device, |
| 7115 | u32 bindInfoCount, |
| 7116 | const VkBindImageMemoryInfoKHX* pBindInfos) { |
| 7117 | return ? |
| 7118 | } |
| 7119 | |
| 7120 | @extension("VK_KHX_device_group") // 61 |
| 7121 | cmd void vkCmdSetDeviceMaskKHX( |
| 7122 | VkCommandBuffer commandBuffer, |
| 7123 | u32 deviceMask) { |
| 7124 | } |
| 7125 | |
| 7126 | @extension("VK_KHX_device_group") // 61 |
| 7127 | cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX( |
| 7128 | VkDevice device, |
| 7129 | VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) { |
| 7130 | return ? |
| 7131 | } |
| 7132 | |
| 7133 | @extension("VK_KHX_device_group") // 61 |
| 7134 | cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX( |
| 7135 | VkDevice device, |
| 7136 | VkSurfaceKHR surface, |
| 7137 | VkDeviceGroupPresentModeFlagsKHX* pModes) { |
| 7138 | return ? |
| 7139 | } |
| 7140 | |
| 7141 | @extension("VK_KHX_device_group") // 61 |
| 7142 | cmd VkResult vkAcquireNextImage2KHX( |
| 7143 | VkDevice device, |
| 7144 | const VkAcquireNextImageInfoKHX* pAcquireInfo, |
| 7145 | u32* pImageIndex) { |
| 7146 | return ? |
| 7147 | } |
| 7148 | |
| 7149 | @extension("VK_KHX_device_group") // 61 |
| 7150 | cmd void vkCmdDispatchBaseKHX( |
| 7151 | VkCommandBuffer commandBuffer, |
| 7152 | u32 baseGroupX, |
| 7153 | u32 baseGroupY, |
| 7154 | u32 baseGroupZ, |
| 7155 | u32 groupCountX, |
| 7156 | u32 groupCountY, |
| 7157 | u32 groupCountZ) { |
| 7158 | } |
| 7159 | |
| 7160 | @extension("VK_KHX_device_group") // 61 |
| 7161 | cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX( |
| 7162 | VkPhysicalDevice physicalDevice, |
| 7163 | VkSurfaceKHR surface, |
| 7164 | u32* pRectCount, |
| 7165 | VkRect2D* pRects) { |
| 7166 | return ? |
| 7167 | } |
| 7168 | |
| 7169 | @extension("VK_NN_vi_surface") // 63 |
| 7170 | cmd VkResult vkCreateViSurfaceNN( |
| 7171 | VkInstance instance, |
| 7172 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 7173 | const VkAllocationCallbacks* pAllocator, |
| 7174 | VkSurfaceKHR* pSurface) { |
| 7175 | return ? |
| 7176 | } |
| 7177 | |
| 7178 | @extension("VK_KHR_maintenance1") // 70 |
| 7179 | cmd void vkTrimCommandPoolKHR( |
| 7180 | VkDevice device, |
| 7181 | VkCommandPool commandPool, |
| 7182 | VkCommandPoolTrimFlagsKHR flags) { |
| 7183 | } |
| 7184 | |
| 7185 | @extension("VK_KHX_device_group_creation") // 71 |
| 7186 | cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX( |
| 7187 | VkInstance instance, |
| 7188 | u32* pPhysicalDeviceGroupCount, |
| 7189 | VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) { |
| 7190 | return ? |
| 7191 | } |
| 7192 | |
| 7193 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7194 | cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX( |
| 7195 | VkPhysicalDevice physicalDevice, |
| 7196 | const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, |
| 7197 | VkExternalBufferPropertiesKHX* pExternalBufferProperties) { |
| 7198 | } |
| 7199 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7200 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7201 | cmd VkResult vkGetMemoryWin32HandleKHX( |
| 7202 | VkDevice device, |
| 7203 | VkDeviceMemory memory, |
| 7204 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7205 | platform.HANDLE* pHandle) { |
| 7206 | return ? |
| 7207 | } |
| 7208 | |
| 7209 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7210 | cmd VkResult vkGetMemoryWin32HandlePropertiesKHX( |
| 7211 | VkDevice device, |
| 7212 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7213 | platform.HANDLE handle, |
| 7214 | VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) { |
| 7215 | return ? |
| 7216 | } |
| 7217 | |
| 7218 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7219 | cmd VkResult vkGetMemoryFdKHX( |
| 7220 | VkDevice device, |
| 7221 | VkDeviceMemory memory, |
| 7222 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7223 | s32* pFd) { |
| 7224 | return ? |
| 7225 | } |
| 7226 | |
| 7227 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7228 | cmd VkResult vkGetMemoryFdPropertiesKHX( |
| 7229 | VkDevice device, |
| 7230 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7231 | s32 fd, |
| 7232 | VkMemoryFdPropertiesKHX* pMemoryFdProperties) { |
| 7233 | return ? |
| 7234 | } |
| 7235 | |
| 7236 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 7237 | cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX( |
| 7238 | VkPhysicalDevice physicalDevice, |
| 7239 | const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, |
| 7240 | VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) { |
| 7241 | } |
| 7242 | |
| 7243 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7244 | cmd VkResult vkImportSemaphoreWin32HandleKHX( |
| 7245 | VkDevice device, |
| 7246 | const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) { |
| 7247 | return ? |
| 7248 | } |
| 7249 | |
| 7250 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7251 | cmd VkResult vkGetSemaphoreWin32HandleKHX( |
| 7252 | VkDevice device, |
| 7253 | VkSemaphore semaphore, |
| 7254 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7255 | platform.HANDLE* pHandle) { |
| 7256 | return ? |
| 7257 | } |
| 7258 | |
| 7259 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7260 | cmd VkResult vkImportSemaphoreFdKHX( |
| 7261 | VkDevice device, |
| 7262 | const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) { |
| 7263 | return ? |
| 7264 | } |
| 7265 | |
| 7266 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7267 | cmd VkResult vkGetSemaphoreFdKHX( |
| 7268 | VkDevice device, |
| 7269 | VkSemaphore semaphore, |
| 7270 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7271 | s32* pFd) { |
| 7272 | return ? |
| 7273 | } |
| 7274 | |
| 7275 | @extension("VK_KHR_push_descriptor") // 81 |
| 7276 | cmd void vkCmdPushDescriptorSetKHR( |
| 7277 | VkCommandBuffer commandBuffer, |
| 7278 | VkPipelineBindPoint pipelineBindPoint, |
| 7279 | VkPipelineLayout layout, |
| 7280 | u32 set, |
| 7281 | u32 descriptorWriteCount, |
| 7282 | const VkWriteDescriptorSet* pDescriptorWrites) { |
| 7283 | } |
| 7284 | |
| 7285 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7286 | cmd VkResult vkCreateDescriptorUpdateTemplateKHR( |
| 7287 | VkDevice device, |
| 7288 | const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, |
| 7289 | const VkAllocationCallbacks* pAllocator, |
| 7290 | VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) { |
| 7291 | return ? |
| 7292 | } |
| 7293 | |
| 7294 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7295 | cmd void vkDestroyDescriptorUpdateTemplateKHR( |
| 7296 | VkDevice device, |
| 7297 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7298 | const VkAllocationCallbacks* pAllocator) { |
| 7299 | } |
| 7300 | |
| 7301 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7302 | cmd void vkUpdateDescriptorSetWithTemplateKHR( |
| 7303 | VkDevice device, |
| 7304 | VkDescriptorSet descriptorSet, |
| 7305 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7306 | const void* pData) { |
| 7307 | } |
| 7308 | |
| 7309 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7310 | cmd void vkCmdPushDescriptorSetWithTemplateKHR( |
| 7311 | VkCommandBuffer commandBuffer, |
| 7312 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7313 | VkPipelineLayout layout, |
| 7314 | u32 set, |
| 7315 | const void* pData) { |
| 7316 | } |
| 7317 | |
| 7318 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7319 | cmd void vkCmdProcessCommandsNVX( |
| 7320 | VkCommandBuffer commandBuffer, |
| 7321 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 7322 | } |
| 7323 | |
| 7324 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7325 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 7326 | VkCommandBuffer commandBuffer, |
| 7327 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 7328 | } |
| 7329 | |
| 7330 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7331 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 7332 | VkDevice device, |
| 7333 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 7334 | const VkAllocationCallbacks* pAllocator, |
| 7335 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 7336 | return ? |
| 7337 | } |
| 7338 | |
| 7339 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7340 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 7341 | VkDevice device, |
| 7342 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 7343 | const VkAllocationCallbacks* pAllocator) { |
| 7344 | } |
| 7345 | |
| 7346 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7347 | cmd VkResult vkCreateObjectTableNVX( |
| 7348 | VkDevice device, |
| 7349 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 7350 | const VkAllocationCallbacks* pAllocator, |
| 7351 | VkObjectTableNVX* pObjectTable) { |
| 7352 | return ? |
| 7353 | } |
| 7354 | |
| 7355 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7356 | cmd void vkDestroyObjectTableNVX( |
| 7357 | VkDevice device, |
| 7358 | VkObjectTableNVX objectTable, |
| 7359 | const VkAllocationCallbacks* pAllocator) { |
| 7360 | } |
| 7361 | |
| 7362 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7363 | cmd VkResult vkRegisterObjectsNVX( |
| 7364 | VkDevice device, |
| 7365 | VkObjectTableNVX objectTable, |
| 7366 | u32 objectCount, |
| 7367 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 7368 | const u32* pObjectIndices) { |
| 7369 | return ? |
| 7370 | } |
| 7371 | |
| 7372 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7373 | cmd VkResult vkUnregisterObjectsNVX( |
| 7374 | VkDevice device, |
| 7375 | VkObjectTableNVX objectTable, |
| 7376 | u32 objectCount, |
| 7377 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 7378 | const u32* pObjectIndices) { |
| 7379 | return ? |
| 7380 | } |
| 7381 | |
| 7382 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7383 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 7384 | VkPhysicalDevice physicalDevice, |
| 7385 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 7386 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 7387 | } |
| 7388 | |
| 7389 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 7390 | cmd void vkCmdSetViewportWScalingNV( |
| 7391 | VkCommandBuffer commandBuffer, |
| 7392 | u32 firstViewport, |
| 7393 | u32 viewportCount, |
| 7394 | const VkViewportWScalingNV* pViewportWScalings) { |
| 7395 | } |
| 7396 | |
| 7397 | @extension("VK_EXT_direct_mode_display") // 89 |
| 7398 | cmd VkResult vkReleaseDisplayEXT( |
| 7399 | VkPhysicalDevice physicalDevice, |
| 7400 | VkDisplayKHR display) { |
| 7401 | return ? |
| 7402 | } |
| 7403 | |
| 7404 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7405 | cmd VkResult vkAcquireXlibDisplayEXT( |
| 7406 | VkPhysicalDevice physicalDevice, |
| 7407 | platform.Display* dpy, |
| 7408 | VkDisplayKHR display) { |
| 7409 | return ? |
| 7410 | } |
| 7411 | |
| 7412 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7413 | cmd VkResult vkGetRandROutputDisplayEXT( |
| 7414 | VkPhysicalDevice physicalDevice, |
| 7415 | platform.Display* dpy, |
| 7416 | platform.RROutput rrOutput, |
| 7417 | VkDisplayKHR* pDisplay) { |
| 7418 | return ? |
| 7419 | } |
| 7420 | |
| 7421 | @extension("VK_EXT_display_surface_counter") // 91 |
| 7422 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 7423 | VkPhysicalDevice physicalDevice, |
| 7424 | VkSurfaceKHR surface, |
| 7425 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 7426 | return ? |
| 7427 | } |
| 7428 | |
| 7429 | @extension("VK_EXT_display_control") // 92 |
| 7430 | cmd VkResult vkDisplayPowerControlEXT( |
| 7431 | VkDevice device, |
| 7432 | VkDisplayKHR display, |
| 7433 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 7434 | return ? |
| 7435 | } |
| 7436 | |
| 7437 | @extension("VK_EXT_display_control") // 92 |
| 7438 | cmd VkResult vkRegisterDeviceEventEXT( |
| 7439 | VkDevice device, |
| 7440 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 7441 | const VkAllocationCallbacks* pAllocator, |
| 7442 | VkFence* pFence) { |
| 7443 | return ? |
| 7444 | } |
| 7445 | |
| 7446 | @extension("VK_EXT_display_control") // 92 |
| 7447 | cmd VkResult vkRegisterDisplayEventEXT( |
| 7448 | VkDevice device, |
| 7449 | VkDisplayKHR display, |
| 7450 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 7451 | const VkAllocationCallbacks* pAllocator, |
| 7452 | VkFence* pFence) { |
| 7453 | return ? |
| 7454 | } |
| 7455 | |
| 7456 | @extension("VK_EXT_display_control") // 92 |
| 7457 | cmd VkResult vkGetSwapchainCounterEXT( |
| 7458 | VkDevice device, |
| 7459 | VkSwapchainKHR swapchain, |
| 7460 | VkSurfaceCounterFlagBitsEXT counter, |
| 7461 | u64* pCounterValue) { |
| 7462 | return ? |
| 7463 | } |
| 7464 | |
| 7465 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7466 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7467 | VkDevice device, |
| 7468 | VkSwapchainKHR swapchain, |
| 7469 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7470 | deviceObject := GetDevice(device) |
| 7471 | swapchainObject := GetSwapchain(swapchain) |
| 7472 | |
| 7473 | displayTimingProperties := ? |
| 7474 | pDisplayTimingProperties[0] = displayTimingProperties |
| 7475 | |
| 7476 | return ? |
| 7477 | } |
| 7478 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7479 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7480 | cmd VkResult vkGetPastPresentationTimingGOOGLE( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7481 | VkDevice device, |
| 7482 | VkSwapchainKHR swapchain, |
| 7483 | u32* pPresentationTimingCount, |
| 7484 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7485 | return ? |
| 7486 | } |
| 7487 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7488 | @extension("VK_EXT_discard_rectangles") // 100 |
| 7489 | cmd void vkCmdSetDiscardRectangleEXT( |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7490 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7491 | u32 firstDiscardRectangle, |
| 7492 | u32 discardRectangleCount, |
| 7493 | const VkRect2D* pDiscardRectangles) { |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7494 | } |
| 7495 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7496 | @extension("VK_EXT_hdr_metadata") // 106 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7497 | cmd void vkSetHdrMetadataEXT( |
Jesse Hall | fdc8ab3 | 2017-03-10 21:01:57 -0800 | [diff] [blame] | 7498 | VkDevice device, |
| 7499 | u32 swapchainCount, |
| 7500 | const VkSwapchainKHR* pSwapchains, |
| 7501 | const VkHdrMetadataEXT* pMetadata) { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7502 | } |
| 7503 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7504 | @extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 7505 | cmd VkResult vkGetSwapchainStatusKHR( |
| 7506 | VkDevice device, |
| 7507 | VkSwapchainKHR swapchain) { |
| 7508 | return ? |
| 7509 | } |
| 7510 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 7511 | @extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 7512 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( |
| 7513 | VkPhysicalDevice physicalDevice, |
| 7514 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 7515 | VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { |
| 7516 | return ? |
| 7517 | } |
| 7518 | |
Jesse Hall | 05556b1 | 2017-05-18 17:40:25 -0700 | [diff] [blame^] | 7519 | @extension("VK_KHR_get_surface_capabilities2") // 120 |
Chris Forbes | e2d3ee1 | 2017-03-16 16:10:15 +1300 | [diff] [blame] | 7520 | cmd VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( |
| 7521 | VkPhysicalDevice physicalDevice, |
| 7522 | const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, |
| 7523 | u32* pSurfaceFormatCount, |
| 7524 | VkSurfaceFormat2KHR* pSurfaceFormats) { |
| 7525 | return ? |
| 7526 | } |
| 7527 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame] | 7528 | @extension("VK_MVK_ios_surface") // 123 |
| 7529 | cmd VkResult vkCreateIOSSurfaceMVK( |
| 7530 | VkInstance instance, |
| 7531 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7532 | const VkAllocationCallbacks* pAllocator, |
| 7533 | VkSurfaceKHR* pSurface) { |
| 7534 | return ? |
| 7535 | } |
| 7536 | |
| 7537 | @extension("VK_MVK_macos_surface") // 124 |
| 7538 | cmd VkResult vkCreateMacOSSurfaceMVK( |
| 7539 | VkInstance instance, |
| 7540 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7541 | const VkAllocationCallbacks* pAllocator, |
| 7542 | VkSurfaceKHR* pSurface) { |
| 7543 | return ? |
| 7544 | } |
| 7545 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7546 | //////////////// |
| 7547 | // Validation // |
| 7548 | //////////////// |
| 7549 | |
| 7550 | extern void validate(string layerName, bool condition, string message) |
| 7551 | |
| 7552 | |
| 7553 | ///////////////////////////// |
| 7554 | // Internal State Tracking // |
| 7555 | ///////////////////////////// |
| 7556 | |
| 7557 | StateObject State |
| 7558 | |
| 7559 | @internal class StateObject { |
| 7560 | // Dispatchable objects. |
| 7561 | map!(VkInstance, ref!InstanceObject) Instances |
| 7562 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 7563 | map!(VkDevice, ref!DeviceObject) Devices |
| 7564 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7565 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7566 | |
| 7567 | // Non-dispatchable objects. |
| 7568 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 7569 | map!(VkBuffer, ref!BufferObject) Buffers |
| 7570 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 7571 | map!(VkImage, ref!ImageObject) Images |
| 7572 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7573 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7574 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 7575 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 7576 | map!(VkSampler, ref!SamplerObject) Samplers |
| 7577 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 7578 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 7579 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7580 | map!(VkFence, ref!FenceObject) Fences |
| 7581 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 7582 | map!(VkEvent, ref!EventObject) Events |
| 7583 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 7584 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 7585 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 7586 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7587 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7588 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7589 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7590 | } |
| 7591 | |
| 7592 | @internal class InstanceObject { |
| 7593 | } |
| 7594 | |
| 7595 | @internal class PhysicalDeviceObject { |
| 7596 | VkInstance instance |
| 7597 | } |
| 7598 | |
| 7599 | @internal class DeviceObject { |
| 7600 | VkPhysicalDevice physicalDevice |
| 7601 | } |
| 7602 | |
| 7603 | @internal class QueueObject { |
| 7604 | VkDevice device |
| 7605 | VkQueueFlags flags |
| 7606 | } |
| 7607 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7608 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7609 | VkDevice device |
| 7610 | map!(u64, VkDeviceMemory) boundObjects |
| 7611 | VkQueueFlags queueFlags |
| 7612 | } |
| 7613 | |
| 7614 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7615 | VkDevice device |
| 7616 | VkDeviceSize allocationSize |
| 7617 | map!(u64, VkDeviceSize) boundObjects |
| 7618 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7619 | } |
| 7620 | |
| 7621 | @internal class BufferObject { |
| 7622 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7623 | VkDeviceMemory memory |
| 7624 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7625 | } |
| 7626 | |
| 7627 | @internal class BufferViewObject { |
| 7628 | VkDevice device |
| 7629 | VkBuffer buffer |
| 7630 | } |
| 7631 | |
| 7632 | @internal class ImageObject { |
| 7633 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7634 | VkDeviceMemory memory |
| 7635 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7636 | } |
| 7637 | |
| 7638 | @internal class ImageViewObject { |
| 7639 | VkDevice device |
| 7640 | VkImage image |
| 7641 | } |
| 7642 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7643 | @internal class ShaderObject { |
| 7644 | VkDevice device |
| 7645 | } |
| 7646 | |
| 7647 | @internal class ShaderModuleObject { |
| 7648 | VkDevice device |
| 7649 | } |
| 7650 | |
| 7651 | @internal class PipelineObject { |
| 7652 | VkDevice device |
| 7653 | } |
| 7654 | |
| 7655 | @internal class PipelineLayoutObject { |
| 7656 | VkDevice device |
| 7657 | } |
| 7658 | |
| 7659 | @internal class SamplerObject { |
| 7660 | VkDevice device |
| 7661 | } |
| 7662 | |
| 7663 | @internal class DescriptorSetObject { |
| 7664 | VkDevice device |
| 7665 | } |
| 7666 | |
| 7667 | @internal class DescriptorSetLayoutObject { |
| 7668 | VkDevice device |
| 7669 | } |
| 7670 | |
| 7671 | @internal class DescriptorPoolObject { |
| 7672 | VkDevice device |
| 7673 | } |
| 7674 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7675 | @internal class FenceObject { |
| 7676 | VkDevice device |
| 7677 | bool signaled |
| 7678 | } |
| 7679 | |
| 7680 | @internal class SemaphoreObject { |
| 7681 | VkDevice device |
| 7682 | } |
| 7683 | |
| 7684 | @internal class EventObject { |
| 7685 | VkDevice device |
| 7686 | } |
| 7687 | |
| 7688 | @internal class QueryPoolObject { |
| 7689 | VkDevice device |
| 7690 | } |
| 7691 | |
| 7692 | @internal class FramebufferObject { |
| 7693 | VkDevice device |
| 7694 | } |
| 7695 | |
| 7696 | @internal class RenderPassObject { |
| 7697 | VkDevice device |
| 7698 | } |
| 7699 | |
| 7700 | @internal class PipelineCacheObject { |
| 7701 | VkDevice device |
| 7702 | } |
| 7703 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7704 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7705 | VkDevice device |
| 7706 | } |
| 7707 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7708 | @internal class SurfaceObject { |
| 7709 | VkInstance instance |
| 7710 | } |
| 7711 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7712 | @internal class SwapchainObject { |
| 7713 | VkDevice device |
| 7714 | } |
| 7715 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7716 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 7717 | assert(instance in State.Instances) |
| 7718 | return State.Instances[instance] |
| 7719 | } |
| 7720 | |
| 7721 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 7722 | assert(physicalDevice in State.PhysicalDevices) |
| 7723 | return State.PhysicalDevices[physicalDevice] |
| 7724 | } |
| 7725 | |
| 7726 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 7727 | assert(device in State.Devices) |
| 7728 | return State.Devices[device] |
| 7729 | } |
| 7730 | |
| 7731 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 7732 | assert(queue in State.Queues) |
| 7733 | return State.Queues[queue] |
| 7734 | } |
| 7735 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7736 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 7737 | assert(commandBuffer in State.CommandBuffers) |
| 7738 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7739 | } |
| 7740 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7741 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 7742 | assert(memory in State.DeviceMemories) |
| 7743 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7744 | } |
| 7745 | |
| 7746 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 7747 | assert(buffer in State.Buffers) |
| 7748 | return State.Buffers[buffer] |
| 7749 | } |
| 7750 | |
| 7751 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 7752 | assert(bufferView in State.BufferViews) |
| 7753 | return State.BufferViews[bufferView] |
| 7754 | } |
| 7755 | |
| 7756 | macro ref!ImageObject GetImage(VkImage image) { |
| 7757 | assert(image in State.Images) |
| 7758 | return State.Images[image] |
| 7759 | } |
| 7760 | |
| 7761 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 7762 | assert(imageView in State.ImageViews) |
| 7763 | return State.ImageViews[imageView] |
| 7764 | } |
| 7765 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7766 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 7767 | assert(shaderModule in State.ShaderModules) |
| 7768 | return State.ShaderModules[shaderModule] |
| 7769 | } |
| 7770 | |
| 7771 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 7772 | assert(pipeline in State.Pipelines) |
| 7773 | return State.Pipelines[pipeline] |
| 7774 | } |
| 7775 | |
| 7776 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 7777 | assert(pipelineLayout in State.PipelineLayouts) |
| 7778 | return State.PipelineLayouts[pipelineLayout] |
| 7779 | } |
| 7780 | |
| 7781 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 7782 | assert(sampler in State.Samplers) |
| 7783 | return State.Samplers[sampler] |
| 7784 | } |
| 7785 | |
| 7786 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 7787 | assert(descriptorSet in State.DescriptorSets) |
| 7788 | return State.DescriptorSets[descriptorSet] |
| 7789 | } |
| 7790 | |
| 7791 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 7792 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 7793 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 7794 | } |
| 7795 | |
| 7796 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 7797 | assert(descriptorPool in State.DescriptorPools) |
| 7798 | return State.DescriptorPools[descriptorPool] |
| 7799 | } |
| 7800 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7801 | macro ref!FenceObject GetFence(VkFence fence) { |
| 7802 | assert(fence in State.Fences) |
| 7803 | return State.Fences[fence] |
| 7804 | } |
| 7805 | |
| 7806 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 7807 | assert(semaphore in State.Semaphores) |
| 7808 | return State.Semaphores[semaphore] |
| 7809 | } |
| 7810 | |
| 7811 | macro ref!EventObject GetEvent(VkEvent event) { |
| 7812 | assert(event in State.Events) |
| 7813 | return State.Events[event] |
| 7814 | } |
| 7815 | |
| 7816 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 7817 | assert(queryPool in State.QueryPools) |
| 7818 | return State.QueryPools[queryPool] |
| 7819 | } |
| 7820 | |
| 7821 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 7822 | assert(framebuffer in State.Framebuffers) |
| 7823 | return State.Framebuffers[framebuffer] |
| 7824 | } |
| 7825 | |
| 7826 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 7827 | assert(renderPass in State.RenderPasses) |
| 7828 | return State.RenderPasses[renderPass] |
| 7829 | } |
| 7830 | |
| 7831 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 7832 | assert(pipelineCache in State.PipelineCaches) |
| 7833 | return State.PipelineCaches[pipelineCache] |
| 7834 | } |
| 7835 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7836 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 7837 | assert(commandPool in State.CommandPools) |
| 7838 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 7839 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7840 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7841 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 7842 | assert(surface in State.Surfaces) |
| 7843 | return State.Surfaces[surface] |
| 7844 | } |
| 7845 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7846 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 7847 | assert(swapchain in State.Swapchains) |
| 7848 | return State.Swapchains[swapchain] |
| 7849 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 7850 | |
| 7851 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 7852 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 7853 | } |