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 | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 31 | define VERSION_PATCH 42 |
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 | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 76 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 77 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 78 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 79 | // 8 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 80 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 81 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 82 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 83 | // 9 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 84 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 85 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 86 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 87 | // 10 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 88 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 89 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 90 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 91 | // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 92 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 93 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer" |
| 94 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 95 | // 12 |
Jesse Hall | 8f49fcb | 2017-03-06 16:02:58 -0800 | [diff] [blame] | 96 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 5 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 97 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report" |
| 98 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 99 | // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 100 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1 |
| 101 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader" |
| 102 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 103 | // 15 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 104 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 |
| 105 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge" |
| 106 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 107 | // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 108 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 |
| 109 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic" |
| 110 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 111 | // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 112 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 |
| 113 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order" |
| 114 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 115 | // 21 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 116 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 |
| 117 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" |
| 118 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 119 | // 22 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 120 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 |
| 121 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" |
| 122 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 123 | // 23 |
Jesse Hall | 8f49fcb | 2017-03-06 16:02:58 -0800 | [diff] [blame] | 124 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 125 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker" |
| 126 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 127 | // 26 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 128 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 |
| 129 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" |
| 130 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 131 | // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 132 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 |
| 133 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" |
| 134 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 135 | // 28 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 136 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 |
| 137 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" |
| 138 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 139 | // 34 |
| 140 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 |
| 141 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" |
| 142 | |
| 143 | // 36 |
| 144 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 |
| 145 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" |
| 146 | |
| 147 | // 37 |
| 148 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 |
| 149 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" |
| 150 | |
| 151 | // 38 |
| 152 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 |
| 153 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" |
| 154 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 155 | // 54 |
| 156 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_SPEC_VERSION 1 |
| 157 | @extension("VK_KHX_multiview") define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview" |
| 158 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 159 | // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 160 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 161 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" |
| 162 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 163 | // 57 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 164 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 165 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" |
| 166 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 167 | // 58 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 168 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 169 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" |
| 170 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 171 | // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 172 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 173 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" |
| 174 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 175 | // 60 |
| 176 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 |
| 177 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" |
| 178 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 179 | // 61 |
| 180 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1 |
| 181 | @extension("VK_KHX_device_group") define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group" |
| 182 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 183 | // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 184 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 |
| 185 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" |
| 186 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 187 | // 63 |
| 188 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1 |
| 189 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" |
| 190 | |
| 191 | // 64 |
| 192 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 |
| 193 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" |
| 194 | |
| 195 | // 65 |
| 196 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 |
| 197 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" |
| 198 | |
| 199 | // 66 |
| 200 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 |
| 201 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" |
| 202 | |
| 203 | // 70 |
| 204 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1 |
| 205 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" |
| 206 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 207 | // 71 |
| 208 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1 |
| 209 | @extension("VK_KHX_device_group_creation") define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation" |
| 210 | |
| 211 | // 72 |
| 212 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 213 | @extension("VK_KHX_external_memory_capabilities") define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities" |
| 214 | |
| 215 | // 73 |
| 216 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 217 | @extension("VK_KHX_external_memory") define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory" |
| 218 | |
| 219 | // 74 |
| 220 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 221 | @extension("VK_KHX_external_memory_win32") define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32" |
| 222 | |
| 223 | // 75 |
| 224 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 |
| 225 | @extension("VK_KHX_external_memory_fd") define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd" |
| 226 | |
| 227 | // 76 |
| 228 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 229 | @extension("VK_KHX_win32_keyed_mutex") define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex" |
| 230 | |
| 231 | // 77 |
| 232 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 |
| 233 | @extension("VK_KHX_external_semaphore_capabilities") define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities" |
| 234 | |
| 235 | // 78 |
| 236 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 |
| 237 | @extension("VK_KHX_external_semaphore") define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore" |
| 238 | |
| 239 | // 79 |
| 240 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 |
| 241 | @extension("VK_KHX_external_semaphore_win32") define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32" |
| 242 | |
| 243 | // 80 |
| 244 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 |
| 245 | @extension("VK_KHX_external_semaphore_fd") define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd" |
| 246 | |
| 247 | // 81 |
| 248 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1 |
| 249 | @extension("VK_KHR_push_descriptor") define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" |
| 250 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 251 | // 85 |
| 252 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 |
| 253 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present" |
| 254 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 255 | // 86 |
| 256 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 |
| 257 | @extension("VK_KHR_descriptor_update_template") define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" |
| 258 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 259 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 260 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 261 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 262 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 263 | // 88 |
| 264 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 |
| 265 | @extension("VK_NV_clip_space_w_scaling") define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" |
| 266 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 267 | // 89 |
| 268 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 |
| 269 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" |
| 270 | |
| 271 | // 90 |
| 272 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 |
| 273 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" |
| 274 | |
| 275 | // 91 |
| 276 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 |
| 277 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" |
| 278 | |
| 279 | // 92 |
| 280 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 |
| 281 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control" |
| 282 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 283 | // 93 |
| 284 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 |
| 285 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_NAME "VK_GOOGLE_display_timing" |
| 286 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 287 | // 95 |
| 288 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 |
| 289 | @extension("VK_NV_sample_mask_override_coverage") define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" |
| 290 | |
| 291 | // 96 |
| 292 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 |
| 293 | @extension("VK_NV_geometry_shader_passthrough") define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" |
| 294 | |
| 295 | // 97 |
| 296 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 |
| 297 | @extension("VK_NV_viewport_array2") define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" |
| 298 | |
| 299 | // 98 |
| 300 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 |
| 301 | @extension("VK_NVX_multiview_per_view_attributes") define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" |
| 302 | |
| 303 | // 99 |
| 304 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 |
| 305 | @extension("VK_NV_viewport_swizzle") define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" |
| 306 | |
| 307 | // 100 |
| 308 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 |
| 309 | @extension("VK_EXT_discard_rectangles") define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" |
| 310 | |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 311 | // 105 |
| 312 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 1 |
| 313 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_COUNTER_EXTENSION_NAME "VK_EXT_swapchain_colorspace" |
| 314 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 315 | // 106 |
| 316 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1 |
| 317 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" |
| 318 | |
| 319 | // 112 |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 320 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 |
| 321 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 322 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 323 | // 123 |
| 324 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_SPEC_VERSION 1 |
| 325 | @extension("VK_MVK_ios_surface") define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" |
| 326 | |
| 327 | // 124 |
| 328 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_SPEC_VERSION 1 |
| 329 | @extension("VK_MVK_macos_surface") define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" |
| 330 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 331 | ///////////// |
| 332 | // Types // |
| 333 | ///////////// |
| 334 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 335 | type u32 VkBool32 |
| 336 | type u32 VkFlags |
| 337 | type u64 VkDeviceSize |
| 338 | type u32 VkSampleMask |
| 339 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 340 | /// Dispatchable handle types. |
| 341 | @dispatchHandle type u64 VkInstance |
| 342 | @dispatchHandle type u64 VkPhysicalDevice |
| 343 | @dispatchHandle type u64 VkDevice |
| 344 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 345 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 346 | |
| 347 | /// Non dispatchable handle types. |
| 348 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 349 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 350 | @nonDispatchHandle type u64 VkBuffer |
| 351 | @nonDispatchHandle type u64 VkBufferView |
| 352 | @nonDispatchHandle type u64 VkImage |
| 353 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 354 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 355 | @nonDispatchHandle type u64 VkPipeline |
| 356 | @nonDispatchHandle type u64 VkPipelineLayout |
| 357 | @nonDispatchHandle type u64 VkSampler |
| 358 | @nonDispatchHandle type u64 VkDescriptorSet |
| 359 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 360 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 361 | @nonDispatchHandle type u64 VkFence |
| 362 | @nonDispatchHandle type u64 VkSemaphore |
| 363 | @nonDispatchHandle type u64 VkEvent |
| 364 | @nonDispatchHandle type u64 VkQueryPool |
| 365 | @nonDispatchHandle type u64 VkFramebuffer |
| 366 | @nonDispatchHandle type u64 VkRenderPass |
| 367 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 368 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 369 | // 1 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 370 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 371 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 372 | // 2 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 373 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 374 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 375 | // 3 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 376 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 377 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 378 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 379 | // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 380 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 381 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 382 | // 86 |
| 383 | @extension("VK_KHR_descriptor_update_template") @nonDispatchHandle type u64 VkDescriptorUpdateTemplateKHR |
| 384 | |
| 385 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 386 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 387 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 388 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 389 | |
| 390 | ///////////// |
| 391 | // Enums // |
| 392 | ///////////// |
| 393 | |
| 394 | enum VkImageLayout { |
| 395 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 396 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 397 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 398 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 399 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 400 | VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 401 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 402 | VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 403 | VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 404 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 405 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 406 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 407 | |
| 408 | //@extension("VK_KHR_shared_presentable_image") |
| 409 | VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 410 | } |
| 411 | |
| 412 | enum VkAttachmentLoadOp { |
| 413 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 414 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 415 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 416 | } |
| 417 | |
| 418 | enum VkAttachmentStoreOp { |
| 419 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 420 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 421 | } |
| 422 | |
| 423 | enum VkImageType { |
| 424 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 425 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 426 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 427 | } |
| 428 | |
| 429 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 430 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 431 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 432 | } |
| 433 | |
| 434 | enum VkImageViewType { |
| 435 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 436 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 437 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 438 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 439 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 440 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 441 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 442 | } |
| 443 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 444 | enum VkCommandBufferLevel { |
| 445 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 446 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 447 | } |
| 448 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 449 | enum VkComponentSwizzle { |
| 450 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 451 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 452 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 453 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 454 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 455 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 456 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 457 | } |
| 458 | |
| 459 | enum VkDescriptorType { |
| 460 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 461 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 462 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 463 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 464 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 465 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 466 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 467 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 468 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 469 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 470 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 471 | } |
| 472 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 473 | enum VkQueryType { |
| 474 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 475 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 476 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 477 | } |
| 478 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 479 | enum VkBorderColor { |
| 480 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 481 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 482 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 483 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 484 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 485 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 486 | } |
| 487 | |
| 488 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 489 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 490 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 491 | } |
| 492 | |
| 493 | enum VkPrimitiveTopology { |
| 494 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 495 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 496 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 497 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 498 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 499 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 500 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 501 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 502 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 503 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 504 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 505 | } |
| 506 | |
| 507 | enum VkSharingMode { |
| 508 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 509 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 510 | } |
| 511 | |
| 512 | enum VkIndexType { |
| 513 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 514 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 515 | } |
| 516 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 517 | enum VkFilter { |
| 518 | VK_FILTER_NEAREST = 0x00000000, |
| 519 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 520 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 521 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 522 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 523 | } |
| 524 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 525 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 526 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 527 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 528 | } |
| 529 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 530 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 531 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 532 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 533 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 534 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 535 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | enum VkCompareOp { |
| 539 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 540 | VK_COMPARE_OP_LESS = 0x00000001, |
| 541 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 542 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 543 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 544 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 545 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 546 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 547 | } |
| 548 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 549 | enum VkPolygonMode { |
| 550 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 551 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 552 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 553 | } |
| 554 | |
| 555 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 556 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 557 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 558 | } |
| 559 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 560 | enum VkBlendFactor { |
| 561 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 562 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 563 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 564 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 565 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 566 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 567 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 568 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 569 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 570 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 571 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 572 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 573 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 574 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 575 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 576 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 577 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 578 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 579 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 580 | } |
| 581 | |
| 582 | enum VkBlendOp { |
| 583 | VK_BLEND_OP_ADD = 0x00000000, |
| 584 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 585 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 586 | VK_BLEND_OP_MIN = 0x00000003, |
| 587 | VK_BLEND_OP_MAX = 0x00000004, |
| 588 | } |
| 589 | |
| 590 | enum VkStencilOp { |
| 591 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 592 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 593 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 594 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 595 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 596 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 597 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 598 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 599 | } |
| 600 | |
| 601 | enum VkLogicOp { |
| 602 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 603 | VK_LOGIC_OP_AND = 0x00000001, |
| 604 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 605 | VK_LOGIC_OP_COPY = 0x00000003, |
| 606 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 607 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 608 | VK_LOGIC_OP_XOR = 0x00000006, |
| 609 | VK_LOGIC_OP_OR = 0x00000007, |
| 610 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 611 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 612 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 613 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 614 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 615 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 616 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 617 | VK_LOGIC_OP_SET = 0x0000000f, |
| 618 | } |
| 619 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 620 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 621 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 622 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 623 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 624 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 625 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 626 | } |
| 627 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 628 | enum VkInternalAllocationType { |
| 629 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 630 | } |
| 631 | |
| 632 | enum VkPhysicalDeviceType { |
| 633 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 634 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 635 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 636 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 637 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 638 | } |
| 639 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 640 | enum VkVertexInputRate { |
| 641 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 642 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 643 | } |
| 644 | |
| 645 | /// Vulkan format definitions |
| 646 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 647 | VK_FORMAT_UNDEFINED = 0, |
| 648 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 649 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 650 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 651 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 652 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 653 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 654 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 655 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 656 | VK_FORMAT_R8_UNORM = 9, |
| 657 | VK_FORMAT_R8_SNORM = 10, |
| 658 | VK_FORMAT_R8_USCALED = 11, |
| 659 | VK_FORMAT_R8_SSCALED = 12, |
| 660 | VK_FORMAT_R8_UINT = 13, |
| 661 | VK_FORMAT_R8_SINT = 14, |
| 662 | VK_FORMAT_R8_SRGB = 15, |
| 663 | VK_FORMAT_R8G8_UNORM = 16, |
| 664 | VK_FORMAT_R8G8_SNORM = 17, |
| 665 | VK_FORMAT_R8G8_USCALED = 18, |
| 666 | VK_FORMAT_R8G8_SSCALED = 19, |
| 667 | VK_FORMAT_R8G8_UINT = 20, |
| 668 | VK_FORMAT_R8G8_SINT = 21, |
| 669 | VK_FORMAT_R8G8_SRGB = 22, |
| 670 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 671 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 672 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 673 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 674 | VK_FORMAT_R8G8B8_UINT = 27, |
| 675 | VK_FORMAT_R8G8B8_SINT = 28, |
| 676 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 677 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 678 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 679 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 680 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 681 | VK_FORMAT_B8G8R8_UINT = 34, |
| 682 | VK_FORMAT_B8G8R8_SINT = 35, |
| 683 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 684 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 685 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 686 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 687 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 688 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 689 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 690 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 691 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 692 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 693 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 694 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 695 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 696 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 697 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 698 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 699 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 700 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 701 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 702 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 703 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 704 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 705 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 706 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 707 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 708 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 709 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 710 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 711 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 712 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 713 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 714 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 715 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 716 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 717 | VK_FORMAT_R16_UNORM = 70, |
| 718 | VK_FORMAT_R16_SNORM = 71, |
| 719 | VK_FORMAT_R16_USCALED = 72, |
| 720 | VK_FORMAT_R16_SSCALED = 73, |
| 721 | VK_FORMAT_R16_UINT = 74, |
| 722 | VK_FORMAT_R16_SINT = 75, |
| 723 | VK_FORMAT_R16_SFLOAT = 76, |
| 724 | VK_FORMAT_R16G16_UNORM = 77, |
| 725 | VK_FORMAT_R16G16_SNORM = 78, |
| 726 | VK_FORMAT_R16G16_USCALED = 79, |
| 727 | VK_FORMAT_R16G16_SSCALED = 80, |
| 728 | VK_FORMAT_R16G16_UINT = 81, |
| 729 | VK_FORMAT_R16G16_SINT = 82, |
| 730 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 731 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 732 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 733 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 734 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 735 | VK_FORMAT_R16G16B16_UINT = 88, |
| 736 | VK_FORMAT_R16G16B16_SINT = 89, |
| 737 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 738 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 739 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 740 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 741 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 742 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 743 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 744 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 745 | VK_FORMAT_R32_UINT = 98, |
| 746 | VK_FORMAT_R32_SINT = 99, |
| 747 | VK_FORMAT_R32_SFLOAT = 100, |
| 748 | VK_FORMAT_R32G32_UINT = 101, |
| 749 | VK_FORMAT_R32G32_SINT = 102, |
| 750 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 751 | VK_FORMAT_R32G32B32_UINT = 104, |
| 752 | VK_FORMAT_R32G32B32_SINT = 105, |
| 753 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 754 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 755 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 756 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 757 | VK_FORMAT_R64_UINT = 110, |
| 758 | VK_FORMAT_R64_SINT = 111, |
| 759 | VK_FORMAT_R64_SFLOAT = 112, |
| 760 | VK_FORMAT_R64G64_UINT = 113, |
| 761 | VK_FORMAT_R64G64_SINT = 114, |
| 762 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 763 | VK_FORMAT_R64G64B64_UINT = 116, |
| 764 | VK_FORMAT_R64G64B64_SINT = 117, |
| 765 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 766 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 767 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 768 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 769 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 770 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 771 | VK_FORMAT_D16_UNORM = 124, |
| 772 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 773 | VK_FORMAT_D32_SFLOAT = 126, |
| 774 | VK_FORMAT_S8_UINT = 127, |
| 775 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 776 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 777 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 778 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 779 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 780 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 781 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 782 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 783 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 784 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 785 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 786 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 787 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 788 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 789 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 790 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 791 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 792 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 793 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 794 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 795 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 796 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 797 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 798 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 799 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 800 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 801 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 802 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 803 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 804 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 805 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 806 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 807 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 808 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 809 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 810 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 811 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 812 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 813 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 814 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 815 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 816 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 817 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 818 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 819 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 820 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 821 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 822 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 823 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 824 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 825 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 826 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 827 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 828 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 829 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 830 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 831 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 832 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 833 | //@extension("VK_IMG_format_pvrtc") // 28 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 834 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 835 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 836 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 837 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 838 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 839 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 840 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 841 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 842 | } |
| 843 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 844 | /// Structure type enumerant |
| 845 | enum VkStructureType { |
| 846 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 847 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 848 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 849 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 850 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 851 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 852 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 853 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 854 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 855 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 856 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 857 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 858 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 859 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 860 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 861 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 862 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 863 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 864 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 865 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 866 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 867 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 868 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 869 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 870 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 871 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 872 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 873 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 874 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 875 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 876 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 877 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 878 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 879 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 880 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 881 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 882 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 883 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 884 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 885 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 886 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 887 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 888 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 889 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 890 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 891 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 892 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 893 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 894 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 895 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 896 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 897 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 898 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 899 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 900 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 901 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 902 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 903 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 904 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 905 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 906 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 907 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 908 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 909 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 910 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 911 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 912 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 913 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 914 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 915 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 916 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 917 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 918 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 919 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 920 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 921 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 922 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 923 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 924 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 925 | //@extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 926 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 927 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 928 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 929 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 930 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 931 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 932 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 933 | //@extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 934 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 935 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 936 | //@extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 937 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 938 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 939 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 940 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 941 | //@extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 942 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 943 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 944 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 945 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 946 | //@extension("VK_KHX_multiview") // 54 |
| 947 | VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000, |
| 948 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001, |
| 949 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002, |
| 950 | |
| 951 | //@extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 952 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 953 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 954 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 955 | //@extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 956 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 957 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 958 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 959 | //@extension("VK_NV_win32_keyed_mutex") // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 960 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 961 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 962 | //@extension("VK_KHR_get_physical_device_properties2") // 60 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 963 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 964 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 965 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 966 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 967 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 968 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 969 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 970 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 971 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 972 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 973 | //@extension("VK_KHX_device_group") // 61 |
| 974 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, |
| 975 | VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, |
| 976 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, |
| 977 | VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, |
| 978 | VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, |
| 979 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, |
| 980 | VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, |
| 981 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, |
| 982 | VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, |
| 983 | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, |
| 984 | VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, |
| 985 | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, |
| 986 | VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, |
| 987 | |
| 988 | //@extension("VK_EXT_validation_flags") // 62 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 989 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 990 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 991 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 992 | VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, |
| 993 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 994 | //@extension("VK_KHX_device_group_creation") // 71 |
| 995 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000, |
| 996 | VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001, |
| 997 | |
| 998 | //@extension("VK_KHX_external_memory_capabilities") // 72 |
| 999 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000, |
| 1000 | VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001, |
| 1001 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002, |
| 1002 | VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003, |
| 1003 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004, |
| 1004 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005, |
| 1005 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006, |
| 1006 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007, |
| 1007 | |
| 1008 | //@extension("VK_KHX_external_memory") // 73 |
| 1009 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000, |
| 1010 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001, |
| 1011 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002, |
| 1012 | |
| 1013 | //@extension("VK_KHX_external_memory_win32") // 74 |
| 1014 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000, |
| 1015 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001, |
| 1016 | VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002, |
| 1017 | |
| 1018 | //@extension("VK_KHX_external_memory_fd") // 75 |
| 1019 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000, |
| 1020 | VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001, |
| 1021 | |
| 1022 | //@extension("VK_KHX_win32_keyed_mutex") // 76 |
| 1023 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000, |
| 1024 | |
| 1025 | //@extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1026 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000, |
| 1027 | VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001, |
| 1028 | |
| 1029 | //@extension("VK_KHX_external_semaphore") // 78 |
| 1030 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000, |
| 1031 | |
| 1032 | //@extension("VK_KHX_external_semaphore_win32") // 79 |
| 1033 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000, |
| 1034 | VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001, |
| 1035 | VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002, |
| 1036 | |
| 1037 | //@extension("VK_KHX_external_semaphore_fd") // 80 |
| 1038 | VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000, |
| 1039 | |
| 1040 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1041 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, |
| 1042 | |
| 1043 | //@extension("VK_KHR_incremental_present") // 85 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1044 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1045 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1046 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 1047 | VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, |
| 1048 | |
| 1049 | //@extension("VK_NVX_device_generated_commands") // 87 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1050 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 1051 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 1052 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 1053 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 1054 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 1055 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1056 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1057 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1058 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, |
| 1059 | |
| 1060 | //@extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1061 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, |
| 1062 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1063 | //@extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1064 | VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, |
| 1065 | VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, |
| 1066 | VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, |
| 1067 | VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1068 | |
| 1069 | //@extension("VK_GOOGLE_display_timing") // 93 |
| 1070 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, |
| 1071 | |
| 1072 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1073 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, |
| 1074 | |
| 1075 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 1076 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, |
| 1077 | |
| 1078 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1079 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, |
| 1080 | VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, |
| 1081 | |
| 1082 | //@extension("VK_MVK_ios_surface") // 123 |
| 1083 | VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, |
| 1084 | |
| 1085 | //@extension("VK_MVK_macos_surface") // 124 |
| 1086 | VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1087 | } |
| 1088 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1089 | enum VkSubpassContents { |
| 1090 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 1091 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1092 | } |
| 1093 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1094 | enum VkPipelineCacheHeaderVersion { |
| 1095 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 1096 | } |
| 1097 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1098 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1099 | /// Error and return codes |
| 1100 | enum VkResult { |
| 1101 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1102 | VK_SUCCESS = 0, |
| 1103 | VK_NOT_READY = 1, |
| 1104 | VK_TIMEOUT = 2, |
| 1105 | VK_EVENT_SET = 3, |
| 1106 | VK_EVENT_RESET = 4, |
| 1107 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1108 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1109 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1110 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1111 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1112 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1113 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 1114 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 1115 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 1116 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 1117 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 1118 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 1119 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 1120 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 1121 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 1122 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 1123 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 1124 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1125 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1126 | //@extension("VK_KHR_surface") // 1 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1127 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1128 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000000001 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1129 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1130 | //@extension("VK_KHR_swapchain") // 2 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1131 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1132 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1133 | //@extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 1134 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1135 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1136 | //@extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1137 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1138 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1139 | //@extension("VK_NV_glsl_shader") // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1140 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1141 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1142 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1143 | VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000 |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1144 | |
| 1145 | //@extension("VK_KHX_external_memory") // 73 |
| 1146 | VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = 0xC4641CBD, // -1000072003 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1147 | } |
| 1148 | |
| 1149 | enum VkDynamicState { |
| 1150 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 1151 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 1152 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 1153 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 1154 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 1155 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 1156 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 1157 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 1158 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1159 | |
| 1160 | //@extension("VK_NV_clip_space_w_scaling") // 88 |
| 1161 | VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, |
| 1162 | |
| 1163 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 1164 | VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1165 | } |
| 1166 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1167 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1168 | enum VkPresentModeKHR { |
| 1169 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 1170 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 1171 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1172 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1173 | |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 1174 | //@extension("VK_KHR_shared_presentable_image") |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1175 | VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, |
| 1176 | VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1177 | } |
| 1178 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1179 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1180 | enum VkColorSpaceKHR { |
| 1181 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1182 | |
| 1183 | //@extension("VK_EXT_swapchain_colorspace") |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1184 | VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001, |
Courtney Goeltzenleuchter | 7f558ed | 2017-01-23 17:15:24 -0700 | [diff] [blame] | 1185 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002, |
| 1186 | VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003, |
| 1187 | VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004, |
| 1188 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005, |
| 1189 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006, |
| 1190 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007, |
| 1191 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008, |
| 1192 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009, |
| 1193 | VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010, |
| 1194 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 1195 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1196 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1197 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1198 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1199 | enum VkDebugReportObjectTypeEXT { |
| 1200 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 1201 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 1202 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 1203 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 1204 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 1205 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 1206 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 1207 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 1208 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 1209 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 1210 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 1211 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 1212 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 1213 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 1214 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 1215 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 1216 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 1217 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 1218 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 1219 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 1220 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 1221 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 1222 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 1223 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 1224 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 1225 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 1226 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 1227 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 1228 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1229 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 1230 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 1231 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 1232 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1233 | } |
| 1234 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1235 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1236 | enum VkDebugReportErrorEXT { |
| 1237 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 1238 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 1239 | } |
| 1240 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1241 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1242 | enum VkRasterizationOrderAMD { |
| 1243 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 1244 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 1245 | } |
| 1246 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1247 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1248 | enum VkValidationCheckEXT { |
| 1249 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 1250 | } |
| 1251 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1252 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 1253 | enum VkDescriptorUpdateTemplateTypeKHR { |
| 1254 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0, |
| 1255 | VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, |
| 1256 | } |
| 1257 | |
| 1258 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1259 | enum VkIndirectCommandsTokenTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1260 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1261 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1262 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1263 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1264 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1265 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1266 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1267 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1268 | } |
| 1269 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1270 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1271 | enum VkObjectEntryTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1272 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1273 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1274 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1275 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1276 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1277 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1278 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1279 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1280 | enum VkDisplayPowerStateEXT { |
| 1281 | VK_DISPLAY_POWER_STATE_OFF_EXT = 0, |
| 1282 | VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, |
| 1283 | VK_DISPLAY_POWER_STATE_ON_EXT = 2, |
| 1284 | } |
| 1285 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1286 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1287 | enum VkDeviceEventTypeEXT { |
| 1288 | VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, |
| 1289 | } |
| 1290 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1291 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1292 | enum VkDisplayEventTypeEXT { |
| 1293 | VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, |
| 1294 | } |
| 1295 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1296 | @extension("VK_NV_viewport_swizzle") // 99 |
| 1297 | enum VkViewportCoordinateSwizzleNV { |
| 1298 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, |
| 1299 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, |
| 1300 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, |
| 1301 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, |
| 1302 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, |
| 1303 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, |
| 1304 | VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, |
| 1305 | VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, |
| 1306 | } |
| 1307 | |
| 1308 | @extension("VK_EXT_discard_rectangles") // 100 |
| 1309 | enum VkDiscardRectangleModeEXT { |
| 1310 | VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, |
| 1311 | VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, |
| 1312 | } |
| 1313 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1314 | ///////////////// |
| 1315 | // Bitfields // |
| 1316 | ///////////////// |
| 1317 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1318 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1319 | type VkFlags VkQueueFlags |
| 1320 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1321 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1322 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1323 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1324 | 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] | 1325 | } |
| 1326 | |
| 1327 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1328 | type VkFlags VkMemoryPropertyFlags |
| 1329 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1330 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1331 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1332 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1333 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1334 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1335 | } |
| 1336 | |
| 1337 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1338 | type VkFlags VkMemoryHeapFlags |
| 1339 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1340 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1341 | |
| 1342 | //@extension("VK_KHX_device_group_creation") // 71 |
| 1343 | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1344 | } |
| 1345 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1346 | /// Access flags |
| 1347 | type VkFlags VkAccessFlags |
| 1348 | bitfield VkAccessFlagBits { |
| 1349 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1350 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1351 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1352 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1353 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1354 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1355 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1356 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1357 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1358 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1359 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1360 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1361 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1362 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1363 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1364 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1365 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1366 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1367 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1368 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1369 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1370 | } |
| 1371 | |
| 1372 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1373 | type VkFlags VkBufferUsageFlags |
| 1374 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1375 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1376 | 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] | 1377 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1378 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1379 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1380 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1381 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1382 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1383 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1384 | } |
| 1385 | |
| 1386 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1387 | type VkFlags VkBufferCreateFlags |
| 1388 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1389 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1390 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1391 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1392 | } |
| 1393 | |
| 1394 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1395 | type VkFlags VkShaderStageFlags |
| 1396 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1397 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1398 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1399 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1400 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1401 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1402 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1403 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1404 | |
| 1405 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1406 | } |
| 1407 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1408 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1409 | type VkFlags VkDescriptorPoolCreateFlags |
| 1410 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1411 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1412 | } |
| 1413 | |
| 1414 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1415 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1416 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1417 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1418 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1419 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1420 | type VkFlags VkImageUsageFlags |
| 1421 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1422 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1423 | 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] | 1424 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1425 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1426 | 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] | 1427 | 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] | 1428 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1429 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1430 | } |
| 1431 | |
| 1432 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1433 | type VkFlags VkImageCreateFlags |
| 1434 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1435 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1436 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1437 | 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] | 1438 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1439 | 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] | 1440 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1441 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1442 | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1443 | |
| 1444 | //@extension("VK_KHX_device_group") // 61 |
| 1445 | VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1446 | } |
| 1447 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1448 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1449 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1450 | //bitfield VkImageViewCreateFlagBits { |
| 1451 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1452 | |
| 1453 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1454 | type VkFlags VkPipelineCreateFlags |
| 1455 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1456 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1457 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1458 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1459 | |
| 1460 | //@extension("VK_KHX_device_group") // 61 |
| 1461 | VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008, |
| 1462 | VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1463 | } |
| 1464 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1465 | /// Color component flags |
| 1466 | type VkFlags VkColorComponentFlags |
| 1467 | bitfield VkColorComponentFlagBits { |
| 1468 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1469 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1470 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1471 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1472 | } |
| 1473 | |
| 1474 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1475 | type VkFlags VkFenceCreateFlags |
| 1476 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1477 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1478 | } |
| 1479 | |
| 1480 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1481 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1482 | //bitfield VkSemaphoreCreateFlagBits { |
| 1483 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1484 | |
| 1485 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1486 | type VkFlags VkFormatFeatureFlags |
| 1487 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1488 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1489 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1490 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1491 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1492 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1493 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1494 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1495 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1496 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1497 | 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] | 1498 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1499 | 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] | 1500 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1501 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1502 | //@extension("VK_IMG_filter_cubic") // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1503 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1504 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1505 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1506 | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, |
| 1507 | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1508 | } |
| 1509 | |
| 1510 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1511 | type VkFlags VkQueryControlFlags |
| 1512 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1513 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1514 | } |
| 1515 | |
| 1516 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1517 | type VkFlags VkQueryResultFlags |
| 1518 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1519 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1520 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1521 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1522 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1523 | } |
| 1524 | |
| 1525 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1526 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1527 | //bitfield VkShaderModuleCreateFlagBits { |
| 1528 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1529 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1530 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1531 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1532 | //bitfield VkEventCreateFlagBits { |
| 1533 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1534 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1535 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1536 | type VkFlags VkCommandBufferUsageFlags |
| 1537 | bitfield VkCommandBufferUsageFlagBits { |
| 1538 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1539 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1540 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1541 | } |
| 1542 | |
| 1543 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1544 | type VkFlags VkQueryPipelineStatisticFlags |
| 1545 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1546 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1547 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1548 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1549 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1550 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1551 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1552 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1553 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1554 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1555 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1556 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1557 | } |
| 1558 | |
| 1559 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1560 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1561 | //bitfield VkMemoryMapFlagBits { |
| 1562 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1563 | |
| 1564 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1565 | type VkFlags VkImageAspectFlags |
| 1566 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1567 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1568 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1569 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1570 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1571 | } |
| 1572 | |
| 1573 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1574 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1575 | bitfield VkSparseMemoryBindFlagBits { |
| 1576 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1577 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1578 | |
| 1579 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1580 | type VkFlags VkSparseImageFormatFlags |
| 1581 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1582 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1583 | 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. |
| 1584 | 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] | 1585 | } |
| 1586 | |
| 1587 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1588 | type VkFlags VkPipelineStageFlags |
| 1589 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1590 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1591 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1592 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1593 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1594 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1595 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1596 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1597 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1598 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1599 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1600 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1601 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1602 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1603 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1604 | 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] | 1605 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1606 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1607 | 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] | 1608 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1609 | //@extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1610 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1611 | } |
| 1612 | |
| 1613 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1614 | type VkFlags VkAttachmentDescriptionFlags |
| 1615 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1616 | 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] | 1617 | } |
| 1618 | |
| 1619 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1620 | type VkFlags VkSubpassDescriptionFlags |
| 1621 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1622 | //@extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 1623 | VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, |
| 1624 | VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1625 | } |
| 1626 | |
| 1627 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1628 | type VkFlags VkCommandPoolCreateFlags |
| 1629 | bitfield VkCommandPoolCreateFlagBits { |
| 1630 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1631 | 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] | 1632 | } |
| 1633 | |
| 1634 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1635 | type VkFlags VkCommandPoolResetFlags |
| 1636 | bitfield VkCommandPoolResetFlagBits { |
| 1637 | 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] | 1638 | } |
| 1639 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1640 | type VkFlags VkCommandBufferResetFlags |
| 1641 | bitfield VkCommandBufferResetFlagBits { |
| 1642 | 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] | 1643 | } |
| 1644 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1645 | type VkFlags VkSampleCountFlags |
| 1646 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1647 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1648 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1649 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1650 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1651 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1652 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1653 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1654 | } |
| 1655 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1656 | type VkFlags VkStencilFaceFlags |
| 1657 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1658 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1659 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1660 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1661 | } |
| 1662 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1663 | /// Instance creation flags |
| 1664 | type VkFlags VkInstanceCreateFlags |
| 1665 | //bitfield VkInstanceCreateFlagBits { |
| 1666 | //} |
| 1667 | |
| 1668 | /// Device creation flags |
| 1669 | type VkFlags VkDeviceCreateFlags |
| 1670 | //bitfield VkDeviceCreateFlagBits { |
| 1671 | //} |
| 1672 | |
| 1673 | /// Device queue creation flags |
| 1674 | type VkFlags VkDeviceQueueCreateFlags |
| 1675 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1676 | //} |
| 1677 | |
| 1678 | /// Query pool creation flags |
| 1679 | type VkFlags VkQueryPoolCreateFlags |
| 1680 | //bitfield VkQueryPoolCreateFlagBits { |
| 1681 | //} |
| 1682 | |
| 1683 | /// Buffer view creation flags |
| 1684 | type VkFlags VkBufferViewCreateFlags |
| 1685 | //bitfield VkBufferViewCreateFlagBits { |
| 1686 | //} |
| 1687 | |
| 1688 | /// Pipeline cache creation flags |
| 1689 | type VkFlags VkPipelineCacheCreateFlags |
| 1690 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1691 | //} |
| 1692 | |
| 1693 | /// Pipeline shader stage creation flags |
| 1694 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1695 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1696 | //} |
| 1697 | |
| 1698 | /// Descriptor set layout creation flags |
| 1699 | type VkFlags VkDescriptorSetLayoutCreateFlags |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1700 | bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1701 | //@extension("VK_KHR_push_descriptor") // 81 |
| 1702 | VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, |
| 1703 | } |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1704 | |
| 1705 | /// Pipeline vertex input state creation flags |
| 1706 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1707 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1708 | //} |
| 1709 | |
| 1710 | /// Pipeline input assembly state creation flags |
| 1711 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1712 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1713 | //} |
| 1714 | |
| 1715 | /// Tessellation state creation flags |
| 1716 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1717 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1718 | //} |
| 1719 | |
| 1720 | /// Viewport state creation flags |
| 1721 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1722 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1723 | //} |
| 1724 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1725 | /// Rasterization state creation flags |
| 1726 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1727 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1728 | //} |
| 1729 | |
| 1730 | /// Multisample state creation flags |
| 1731 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1732 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1733 | //} |
| 1734 | |
| 1735 | /// Color blend state creation flags |
| 1736 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1737 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1738 | //} |
| 1739 | |
| 1740 | /// Depth/stencil state creation flags |
| 1741 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1742 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1743 | //} |
| 1744 | |
| 1745 | /// Dynamic state creation flags |
| 1746 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1747 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1748 | //} |
| 1749 | |
| 1750 | /// Pipeline layout creation flags |
| 1751 | type VkFlags VkPipelineLayoutCreateFlags |
| 1752 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1753 | //} |
| 1754 | |
| 1755 | /// Sampler creation flags |
| 1756 | type VkFlags VkSamplerCreateFlags |
| 1757 | //bitfield VkSamplerCreateFlagBits { |
| 1758 | //} |
| 1759 | |
| 1760 | /// Render pass creation flags |
| 1761 | type VkFlags VkRenderPassCreateFlags |
| 1762 | //bitfield VkRenderPassCreateFlagBits { |
| 1763 | //} |
| 1764 | |
| 1765 | /// Framebuffer creation flags |
| 1766 | type VkFlags VkFramebufferCreateFlags |
| 1767 | //bitfield VkFramebufferCreateFlagBits { |
| 1768 | //} |
| 1769 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1770 | /// Dependency flags |
| 1771 | type VkFlags VkDependencyFlags |
| 1772 | bitfield VkDependencyFlagBits { |
| 1773 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1774 | |
| 1775 | //@extension("VK_KHX_multiview") // 54 |
| 1776 | VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002, |
| 1777 | |
| 1778 | //@extension("VK_KHX_device_group") // 61 |
| 1779 | VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1780 | } |
| 1781 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1782 | /// Cull mode flags |
| 1783 | type VkFlags VkCullModeFlags |
| 1784 | bitfield VkCullModeFlagBits { |
| 1785 | VK_CULL_MODE_NONE = 0x00000000, |
| 1786 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1787 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1788 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1789 | } |
| 1790 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1791 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1792 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1793 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1794 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1795 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1796 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1797 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1798 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1799 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1800 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1801 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1802 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1803 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1804 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1805 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1806 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1807 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1808 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1809 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1810 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1811 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1812 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1813 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1814 | } |
| 1815 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1816 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1817 | type VkFlags VkSwapchainCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1818 | @extension("VK_KHR_swapchain") // 2 |
| 1819 | bitfield VkSwapchainCreateFlagBitsKHR { |
| 1820 | //@extension("VK_KHX_device_group") // 61 |
| 1821 | VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001, |
| 1822 | } |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1823 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1824 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1825 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1826 | @extension("VK_KHR_display") // 3 |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1827 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1828 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1829 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1830 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1831 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1832 | } |
| 1833 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1834 | @extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1835 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1836 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1837 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1838 | //} |
| 1839 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1840 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1841 | type VkFlags VkDisplayModeCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1842 | //@extension("VK_KHR_display") // 3 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1843 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1844 | //} |
| 1845 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1846 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1847 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1848 | //@extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1849 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1850 | //} |
| 1851 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1852 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1853 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1854 | //@extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1855 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1856 | //} |
| 1857 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1858 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1859 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1860 | //@extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1861 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1862 | //} |
| 1863 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1864 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1865 | type VkFlags VkMirSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1866 | //@extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1867 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1868 | //} |
| 1869 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1870 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1871 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1872 | //@extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1873 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1874 | //} |
| 1875 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1876 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1877 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1878 | //@extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1879 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1880 | //} |
| 1881 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1882 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1883 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1884 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1885 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1886 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001, |
| 1887 | } |
| 1888 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1889 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1890 | type VkFlags VkDebugReportFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1891 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1892 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1893 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1894 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1895 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1896 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1897 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1898 | } |
| 1899 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1900 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1901 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1902 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1903 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1904 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1905 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1906 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1907 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1908 | } |
| 1909 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1910 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1911 | type VkFlags VkExternalMemoryFeatureFlagsNV |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1912 | @extension("VK_NV_external_memory_capabilities") // 56 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1913 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1914 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1915 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1916 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1917 | } |
| 1918 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1919 | @extension("VK_KHX_device_group") // 61 |
| 1920 | type VkFlags VkPeerMemoryFeatureFlagsKHX |
| 1921 | @extension("VK_KHX_device_group") // 61 |
| 1922 | bitfield VkPeerMemoryFeatureFlagBitsKHX { |
| 1923 | VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001, |
| 1924 | VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002, |
| 1925 | VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004, |
| 1926 | VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008, |
| 1927 | } |
| 1928 | |
| 1929 | @extension("VK_KHX_device_group") // 61 |
| 1930 | type VkFlags VkMemoryAllocateFlagsKHX |
| 1931 | @extension("VK_KHX_device_group") // 61 |
| 1932 | bitfield VkMemoryAllocateFlagBitsKHX { |
| 1933 | VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001, |
| 1934 | } |
| 1935 | |
| 1936 | @extension("VK_KHX_device_group") // 61 |
| 1937 | type VkFlags VkDeviceGroupPresentModeFlagsKHX |
| 1938 | @extension("VK_KHX_device_group") // 61 |
| 1939 | bitfield VkDeviceGroupPresentModeFlagBitsKHX { |
| 1940 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001, |
| 1941 | VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002, |
| 1942 | VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004, |
| 1943 | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008, |
| 1944 | } |
| 1945 | |
| 1946 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1947 | type VkFlags VkViSurfaceCreateFlagsNN |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1948 | //@extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1949 | //bitfield VkViSurfaceCreateFlagBitsNN { |
| 1950 | //} |
| 1951 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1952 | @extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1953 | type VkFlags VkCommandPoolTrimFlagsKHR |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1954 | //@extension("VK_KHR_maintenance1") // 70 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 1955 | //bitfield VkCommandPoolTrimFlagBitsKHR { |
| 1956 | //} |
| 1957 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 1958 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1959 | type VkFlags VkExternalMemoryHandleTypeFlagsKHX |
| 1960 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1961 | bitfield VkExternalMemoryHandleTypeFlagBitsKHX { |
| 1962 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, |
| 1963 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, |
| 1964 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, |
| 1965 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008, |
| 1966 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010, |
| 1967 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020, |
| 1968 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040, |
| 1969 | } |
| 1970 | |
| 1971 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1972 | type VkFlags VkExternalMemoryFeatureFlagsKHX |
| 1973 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 1974 | bitfield VkExternalMemoryFeatureFlagBitsKHX { |
| 1975 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001, |
| 1976 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002, |
| 1977 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004, |
| 1978 | } |
| 1979 | |
| 1980 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1981 | type VkFlags VkExternalSemaphoreHandleTypeFlagsKHX |
| 1982 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1983 | bitfield VkExternalSemaphoreHandleTypeFlagBitsKHX { |
| 1984 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001 |
| 1985 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002 |
| 1986 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004 |
| 1987 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008 |
| 1988 | VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010 |
| 1989 | } |
| 1990 | |
| 1991 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1992 | type VkFlags VkExternalSemaphoreFeatureFlagsKHX |
| 1993 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 1994 | bitfield VkExternalSemaphoreFeatureFlagBitsKHX { |
| 1995 | VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001, |
| 1996 | VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002, |
| 1997 | } |
| 1998 | |
| 1999 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 2000 | type VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR |
| 2001 | //@extension("VK_KHR_descriptor_update_template") // 86 |
| 2002 | //bitfield VkDescriptorUpdateTemplateCreateFlagBitsKHR { |
| 2003 | //} |
| 2004 | |
| 2005 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2006 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2007 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2008 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2009 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 2010 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 2011 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 2012 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2013 | } |
| 2014 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2015 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2016 | type VkFlags VkObjectEntryUsageFlagsNVX |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2017 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2018 | bitfield VkObjectEntryUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2019 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 2020 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 2021 | } |
| 2022 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2023 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2024 | type VkFlags VkSurfaceCounterFlagsEXT |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2025 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 2026 | bitfield VkSurfaceCounterFlagBitsEXT { |
| 2027 | VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, |
| 2028 | } |
| 2029 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 2030 | @extension("VK_NV_viewport_swizzle") // 99 |
| 2031 | type VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV |
| 2032 | //@extension("VK_NV_viewport_swizzle") // 99 |
| 2033 | //bitfield VkPipelineViewportSwizzleStateCreateFlagBitsNV { |
| 2034 | //} |
| 2035 | |
| 2036 | @extension("VK_EXT_discard_rectangles") // 100 |
| 2037 | type VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT |
| 2038 | //@extension("VK_EXT_discard_rectangles") // 100 |
| 2039 | //bitfield VkPipelineDiscardRectangleStateCreateFlagBitsEXT { |
| 2040 | //} |
| 2041 | |
| 2042 | @extension("VK_MVK_ios_surface") // 123 |
| 2043 | type VkFlags VkIOSSurfaceCreateFlagsMVK |
| 2044 | //@extension("VK_MVK_ios_surface") // 123 |
| 2045 | //bitfield VkIOSSurfaceCreateFlagBitsMVK { |
| 2046 | //} |
| 2047 | |
| 2048 | @extension("VK_MVK_macos_surface") // 124 |
| 2049 | type VkFlags VkMacOSSurfaceCreateFlagsMVK |
| 2050 | //@extension("VK_MVK_macos_surface") // 124 |
| 2051 | //bitfield VkMacOSSurfaceCreateFlagBitsMVK { |
| 2052 | //} |
| 2053 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2054 | ////////////////// |
| 2055 | // Structures // |
| 2056 | ////////////////// |
| 2057 | |
| 2058 | class VkOffset2D { |
| 2059 | s32 x |
| 2060 | s32 y |
| 2061 | } |
| 2062 | |
| 2063 | class VkOffset3D { |
| 2064 | s32 x |
| 2065 | s32 y |
| 2066 | s32 z |
| 2067 | } |
| 2068 | |
| 2069 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2070 | u32 width |
| 2071 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2072 | } |
| 2073 | |
| 2074 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2075 | u32 width |
| 2076 | u32 height |
| 2077 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2078 | } |
| 2079 | |
| 2080 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2081 | f32 x |
| 2082 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2083 | f32 width |
| 2084 | f32 height |
| 2085 | f32 minDepth |
| 2086 | f32 maxDepth |
| 2087 | } |
| 2088 | |
| 2089 | class VkRect2D { |
| 2090 | VkOffset2D offset |
| 2091 | VkExtent2D extent |
| 2092 | } |
| 2093 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2094 | class VkClearRect { |
| 2095 | VkRect2D rect |
| 2096 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2097 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2098 | } |
| 2099 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2100 | class VkComponentMapping { |
| 2101 | VkComponentSwizzle r |
| 2102 | VkComponentSwizzle g |
| 2103 | VkComponentSwizzle b |
| 2104 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2105 | } |
| 2106 | |
| 2107 | class VkPhysicalDeviceProperties { |
| 2108 | u32 apiVersion |
| 2109 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2110 | u32 vendorID |
| 2111 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2112 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2113 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 2114 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2115 | VkPhysicalDeviceLimits limits |
| 2116 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2117 | } |
| 2118 | |
| 2119 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2120 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2121 | u32 specVersion /// version of the extension specification implemented |
| 2122 | } |
| 2123 | |
| 2124 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2125 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2126 | u32 specVersion /// version of the layer specification implemented |
| 2127 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2128 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2129 | } |
| 2130 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2131 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2132 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 2133 | const void* pNext /// Next structure in chain |
| 2134 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2135 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2136 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2137 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2138 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2139 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 2140 | const VkSemaphore* pSignalSemaphores |
| 2141 | } |
| 2142 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2143 | class VkApplicationInfo { |
| 2144 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 2145 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2146 | const char* pApplicationName |
| 2147 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | const char* pEngineName |
| 2149 | u32 engineVersion |
| 2150 | u32 apiVersion |
| 2151 | } |
| 2152 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2153 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2154 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2155 | PFN_vkAllocationFunction pfnAllocation |
| 2156 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2157 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2158 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2159 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2160 | } |
| 2161 | |
| 2162 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2163 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 2164 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2165 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2166 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2167 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2168 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2169 | } |
| 2170 | |
| 2171 | class VkDeviceCreateInfo { |
| 2172 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 2173 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2174 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2175 | u32 queueCreateInfoCount |
| 2176 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2177 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2178 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2179 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2180 | const char* const* ppEnabledExtensionNames |
| 2181 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2182 | } |
| 2183 | |
| 2184 | class VkInstanceCreateInfo { |
| 2185 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 2186 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2187 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2188 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2189 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2190 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2191 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2192 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 2193 | } |
| 2194 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2195 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2196 | VkQueueFlags queueFlags /// Queue flags |
| 2197 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2198 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2199 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2200 | } |
| 2201 | |
| 2202 | class VkPhysicalDeviceMemoryProperties { |
| 2203 | u32 memoryTypeCount |
| 2204 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 2205 | u32 memoryHeapCount |
| 2206 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 2207 | } |
| 2208 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2209 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2210 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2211 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2212 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2213 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 2214 | } |
| 2215 | |
| 2216 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2217 | VkDeviceSize size /// Specified in bytes |
| 2218 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2219 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 2220 | } |
| 2221 | |
| 2222 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2223 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2224 | VkExtent3D imageGranularity |
| 2225 | VkSparseImageFormatFlags flags |
| 2226 | } |
| 2227 | |
| 2228 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2229 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2230 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2231 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 2232 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 2233 | 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] | 2234 | } |
| 2235 | |
| 2236 | class VkMemoryType { |
| 2237 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 2238 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 2239 | } |
| 2240 | |
| 2241 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2242 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2243 | VkMemoryHeapFlags flags /// Flags for the heap |
| 2244 | } |
| 2245 | |
| 2246 | class VkMappedMemoryRange { |
| 2247 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 2248 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2249 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2250 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 2251 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2252 | } |
| 2253 | |
| 2254 | class VkFormatProperties { |
| 2255 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 2256 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2257 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2258 | } |
| 2259 | |
| 2260 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2261 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 2262 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2263 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2264 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 2265 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 2266 | } |
| 2267 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2268 | class VkDescriptorImageInfo { |
| 2269 | VkSampler sampler |
| 2270 | VkImageView imageView |
| 2271 | VkImageLayout imageLayout |
| 2272 | } |
| 2273 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2274 | class VkDescriptorBufferInfo { |
| 2275 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 2276 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 2277 | 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] | 2278 | } |
| 2279 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2280 | class VkWriteDescriptorSet { |
| 2281 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 2282 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2283 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2284 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 2285 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2286 | 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] | 2287 | 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] | 2288 | const VkDescriptorImageInfo* pImageInfo |
| 2289 | const VkDescriptorBufferInfo* pBufferInfo |
| 2290 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2291 | } |
| 2292 | |
| 2293 | class VkCopyDescriptorSet { |
| 2294 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 2295 | const void* pNext /// Pointer to next structure |
| 2296 | VkDescriptorSet srcSet /// Source descriptor set |
| 2297 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 2298 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2299 | VkDescriptorSet dstSet /// Destination descriptor set |
| 2300 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 2301 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2302 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2303 | } |
| 2304 | |
| 2305 | class VkBufferCreateInfo { |
| 2306 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 2307 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2308 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2309 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2310 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2311 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2312 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | const u32* pQueueFamilyIndices |
| 2314 | } |
| 2315 | |
| 2316 | class VkBufferViewCreateInfo { |
| 2317 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 2318 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2319 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2320 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2321 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2322 | VkDeviceSize offset /// Specified in bytes |
| 2323 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2324 | } |
| 2325 | |
| 2326 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2327 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2328 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2329 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2330 | } |
| 2331 | |
| 2332 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2333 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2334 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2335 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2336 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2337 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2338 | } |
| 2339 | |
| 2340 | class VkMemoryBarrier { |
| 2341 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 2342 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2343 | VkAccessFlags srcAccessMask |
| 2344 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2345 | } |
| 2346 | |
| 2347 | class VkBufferMemoryBarrier { |
| 2348 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 2349 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2350 | VkAccessFlags srcAccessMask |
| 2351 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2352 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2353 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2354 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2355 | VkDeviceSize offset /// Offset within the buffer to sync |
| 2356 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2357 | } |
| 2358 | |
| 2359 | class VkImageMemoryBarrier { |
| 2360 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 2361 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2362 | VkAccessFlags srcAccessMask |
| 2363 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2364 | VkImageLayout oldLayout /// Current layout of the image |
| 2365 | VkImageLayout newLayout /// New layout to transition the image to |
| 2366 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2367 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2368 | VkImage image /// Image to sync |
| 2369 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 2370 | } |
| 2371 | |
| 2372 | class VkImageCreateInfo { |
| 2373 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 2374 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2375 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2376 | VkImageType imageType |
| 2377 | VkFormat format |
| 2378 | VkExtent3D extent |
| 2379 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2380 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2381 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2382 | VkImageTiling tiling |
| 2383 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2384 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2385 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2386 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2387 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2388 | } |
| 2389 | |
| 2390 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2391 | VkDeviceSize offset /// Specified in bytes |
| 2392 | VkDeviceSize size /// Specified in bytes |
| 2393 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2394 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2395 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2396 | } |
| 2397 | |
| 2398 | class VkImageViewCreateInfo { |
| 2399 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 2400 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2401 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2402 | VkImage image |
| 2403 | VkImageViewType viewType |
| 2404 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2405 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2406 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2407 | } |
| 2408 | |
| 2409 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2410 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2411 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2412 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2413 | } |
| 2414 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2415 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2416 | VkDeviceSize resourceOffset /// Specified in bytes |
| 2417 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2418 | VkDeviceMemory memory |
| 2419 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2420 | VkSparseMemoryBindFlags flags |
| 2421 | } |
| 2422 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2423 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2424 | VkImageSubresource subresource |
| 2425 | VkOffset3D offset |
| 2426 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2427 | VkDeviceMemory memory |
| 2428 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2429 | VkSparseMemoryBindFlags flags |
| 2430 | } |
| 2431 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2432 | class VkSparseBufferMemoryBindInfo { |
| 2433 | VkBuffer buffer |
| 2434 | u32 bindCount |
| 2435 | const VkSparseMemoryBind* pBinds |
| 2436 | } |
| 2437 | |
| 2438 | class VkSparseImageOpaqueMemoryBindInfo { |
| 2439 | VkImage image |
| 2440 | u32 bindCount |
| 2441 | const VkSparseMemoryBind* pBinds |
| 2442 | } |
| 2443 | |
| 2444 | class VkSparseImageMemoryBindInfo { |
| 2445 | VkImage image |
| 2446 | u32 bindCount |
| 2447 | const VkSparseMemoryBind* pBinds |
| 2448 | } |
| 2449 | |
| 2450 | class VkBindSparseInfo { |
| 2451 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2452 | const void* pNext |
| 2453 | u32 waitSemaphoreCount |
| 2454 | const VkSemaphore* pWaitSemaphores |
| 2455 | u32 numBufferBinds |
| 2456 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2457 | u32 numImageOpaqueBinds |
| 2458 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2459 | u32 numImageBinds |
| 2460 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2461 | u32 signalSemaphoreCount |
| 2462 | const VkSemaphore* pSignalSemaphores |
| 2463 | } |
| 2464 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2465 | class VkImageSubresourceLayers { |
| 2466 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2467 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2468 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2469 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2470 | } |
| 2471 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2472 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2473 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2474 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2475 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2476 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2477 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2478 | } |
| 2479 | |
| 2480 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2481 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2482 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2483 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2484 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2485 | } |
| 2486 | |
| 2487 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2488 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2489 | u32 bufferRowLength /// Specified in texels |
| 2490 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2491 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2492 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2493 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2494 | } |
| 2495 | |
| 2496 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2497 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2498 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2499 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2500 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2501 | VkExtent3D extent |
| 2502 | } |
| 2503 | |
| 2504 | class VkShaderModuleCreateInfo { |
| 2505 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2506 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2507 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2508 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2509 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2510 | } |
| 2511 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2512 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2513 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2514 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2515 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2516 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2517 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2518 | } |
| 2519 | |
| 2520 | class VkDescriptorSetLayoutCreateInfo { |
| 2521 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2522 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2523 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2524 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2525 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2526 | } |
| 2527 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2528 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2529 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2530 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2531 | } |
| 2532 | |
| 2533 | class VkDescriptorPoolCreateInfo { |
| 2534 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2535 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2536 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2537 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2538 | u32 poolSizeCount |
| 2539 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2540 | } |
| 2541 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2542 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2543 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2544 | const void* pNext /// Pointer to next structure |
| 2545 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2546 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2547 | const VkDescriptorSetLayout* pSetLayouts |
| 2548 | } |
| 2549 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2550 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2551 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2552 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2553 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2554 | } |
| 2555 | |
| 2556 | class VkSpecializationInfo { |
| 2557 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2558 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2559 | platform.size_t dataSize /// Size in bytes of pData |
| 2560 | const void* pData /// Pointer to SpecConstant data |
| 2561 | } |
| 2562 | |
| 2563 | class VkPipelineShaderStageCreateInfo { |
| 2564 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2565 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2566 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2567 | VkShaderStageFlagBits stage |
| 2568 | VkShaderModule module |
| 2569 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2570 | const VkSpecializationInfo* pSpecializationInfo |
| 2571 | } |
| 2572 | |
| 2573 | class VkComputePipelineCreateInfo { |
| 2574 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2575 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2576 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2577 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2578 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2579 | 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 |
| 2580 | 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 |
| 2581 | } |
| 2582 | |
| 2583 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2584 | u32 binding /// Vertex buffer binding id |
| 2585 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2586 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2587 | } |
| 2588 | |
| 2589 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2590 | u32 location /// location of the shader vertex attrib |
| 2591 | u32 binding /// Vertex buffer binding id |
| 2592 | VkFormat format /// format of source data |
| 2593 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2594 | } |
| 2595 | |
| 2596 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2597 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2598 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2599 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2600 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2601 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2602 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2603 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2604 | } |
| 2605 | |
| 2606 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2607 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2608 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2609 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2610 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2611 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2612 | } |
| 2613 | |
| 2614 | class VkPipelineTessellationStateCreateInfo { |
| 2615 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2616 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2617 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2618 | u32 patchControlPoints |
| 2619 | } |
| 2620 | |
| 2621 | class VkPipelineViewportStateCreateInfo { |
| 2622 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2623 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2624 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2625 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2626 | const VkViewport* pViewports |
| 2627 | u32 scissorCount |
| 2628 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2629 | } |
| 2630 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2631 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2632 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2633 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2634 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2635 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2636 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2637 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2638 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2639 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2640 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2641 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2642 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2643 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2644 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2645 | } |
| 2646 | |
| 2647 | class VkPipelineMultisampleStateCreateInfo { |
| 2648 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2649 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2650 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2651 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2652 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2653 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2654 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2655 | VkBool32 alphaToCoverageEnable |
| 2656 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2657 | } |
| 2658 | |
| 2659 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2660 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2661 | VkBlendFactor srcColorBlendFactor |
| 2662 | VkBlendFactor dstColorBlendFactor |
| 2663 | VkBlendOp colorBlendOp |
| 2664 | VkBlendFactor srcAlphaBlendFactor |
| 2665 | VkBlendFactor dstAlphaBlendFactor |
| 2666 | VkBlendOp alphaBlendOp |
| 2667 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2668 | } |
| 2669 | |
| 2670 | class VkPipelineColorBlendStateCreateInfo { |
| 2671 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2672 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2673 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2674 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2675 | VkLogicOp logicOp |
| 2676 | u32 attachmentCount /// # of pAttachments |
| 2677 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2678 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2679 | } |
| 2680 | |
| 2681 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2682 | VkStencilOp failOp |
| 2683 | VkStencilOp passOp |
| 2684 | VkStencilOp depthFailOp |
| 2685 | VkCompareOp compareOp |
| 2686 | u32 compareMask |
| 2687 | u32 writeMask |
| 2688 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2689 | } |
| 2690 | |
| 2691 | class VkPipelineDepthStencilStateCreateInfo { |
| 2692 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2693 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2694 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2695 | VkBool32 depthTestEnable |
| 2696 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2697 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2698 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2699 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2700 | VkStencilOpState front |
| 2701 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2702 | f32 minDepthBounds |
| 2703 | f32 maxDepthBounds |
| 2704 | } |
| 2705 | |
| 2706 | class VkPipelineDynamicStateCreateInfo { |
| 2707 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2708 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2709 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2710 | u32 dynamicStateCount |
| 2711 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2712 | } |
| 2713 | |
| 2714 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2715 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2716 | const void* pNext /// Pointer to next structure |
| 2717 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2718 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2719 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2720 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2721 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2722 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2723 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2724 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2725 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2726 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2727 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2728 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2729 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2730 | VkRenderPass renderPass |
| 2731 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2732 | 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 |
| 2733 | 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] | 2734 | } |
| 2735 | |
| 2736 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2737 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2738 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2739 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2740 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2741 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2742 | } |
| 2743 | |
| 2744 | class VkPushConstantRange { |
| 2745 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2746 | u32 offset /// Start of the range, in bytes |
| 2747 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2748 | } |
| 2749 | |
| 2750 | class VkPipelineLayoutCreateInfo { |
| 2751 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2752 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2753 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2754 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2755 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2756 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2757 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2758 | } |
| 2759 | |
| 2760 | class VkSamplerCreateInfo { |
| 2761 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2762 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2763 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2764 | VkFilter magFilter /// Filter mode for magnification |
| 2765 | VkFilter minFilter /// Filter mode for minifiation |
| 2766 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2767 | VkSamplerAddressMode addressModeU |
| 2768 | VkSamplerAddressMode addressModeV |
| 2769 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2770 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2771 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2772 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2773 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2774 | VkCompareOp compareOp |
| 2775 | f32 minLod |
| 2776 | f32 maxLod |
| 2777 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2778 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2779 | } |
| 2780 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2781 | class VkCommandPoolCreateInfo { |
| 2782 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2783 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2784 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2785 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2786 | } |
| 2787 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2788 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2789 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2790 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2791 | VkCommandPool commandPool |
| 2792 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2793 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2794 | } |
| 2795 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2796 | class VkCommandBufferInheritanceInfo { |
| 2797 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2798 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2799 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2800 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2801 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2802 | VkBool32 occlusionQueryEnable |
| 2803 | VkQueryControlFlags queryFlags |
| 2804 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2805 | } |
| 2806 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2807 | class VkCommandBufferBeginInfo { |
| 2808 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2809 | const void* pNext /// Pointer to next structure |
| 2810 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2811 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2812 | } |
| 2813 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2814 | class VkRenderPassBeginInfo { |
| 2815 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2816 | const void* pNext /// Pointer to next structure |
| 2817 | VkRenderPass renderPass |
| 2818 | VkFramebuffer framebuffer |
| 2819 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2820 | u32 clearValueCount |
| 2821 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2822 | } |
| 2823 | |
| 2824 | @union |
| 2825 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2826 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2827 | f32[4] float32 |
| 2828 | s32[4] int32 |
| 2829 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2830 | } |
| 2831 | |
| 2832 | class VkClearDepthStencilValue { |
| 2833 | f32 depth |
| 2834 | u32 stencil |
| 2835 | } |
| 2836 | |
| 2837 | @union |
| 2838 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2839 | class VkClearValue { |
| 2840 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2841 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2842 | } |
| 2843 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2844 | class VkClearAttachment { |
| 2845 | VkImageAspectFlags aspectMask |
| 2846 | u32 colorAttachment |
| 2847 | VkClearValue clearValue |
| 2848 | } |
| 2849 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2850 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2851 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2852 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2853 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2854 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2855 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2856 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2857 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2858 | VkImageLayout initialLayout |
| 2859 | VkImageLayout finalLayout |
| 2860 | } |
| 2861 | |
| 2862 | class VkAttachmentReference { |
| 2863 | u32 attachment |
| 2864 | VkImageLayout layout |
| 2865 | } |
| 2866 | |
| 2867 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2868 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2869 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2870 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2871 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2872 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2873 | const VkAttachmentReference* pColorAttachments |
| 2874 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2875 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2876 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2877 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2878 | } |
| 2879 | |
| 2880 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2881 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2882 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2883 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2884 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2885 | VkAccessFlags srcAccessMask |
| 2886 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2887 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2888 | } |
| 2889 | |
| 2890 | class VkRenderPassCreateInfo { |
| 2891 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2892 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2893 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2894 | u32 attachmentCount |
| 2895 | const VkAttachmentDescription* pAttachments |
| 2896 | u32 subpassCount |
| 2897 | const VkSubpassDescription* pSubpasses |
| 2898 | u32 dependencyCount |
| 2899 | const VkSubpassDependency* pDependencies |
| 2900 | } |
| 2901 | |
| 2902 | class VkEventCreateInfo { |
| 2903 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2904 | const void* pNext /// Pointer to next structure |
| 2905 | VkEventCreateFlags flags /// Event creation flags |
| 2906 | } |
| 2907 | |
| 2908 | class VkFenceCreateInfo { |
| 2909 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2910 | const void* pNext /// Pointer to next structure |
| 2911 | VkFenceCreateFlags flags /// Fence creation flags |
| 2912 | } |
| 2913 | |
| 2914 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2915 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2916 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2917 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2918 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2919 | VkBool32 geometryShader /// geometry stage |
| 2920 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2921 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2922 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2923 | VkBool32 logicOp /// logic operations |
| 2924 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2925 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2926 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2927 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2928 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2929 | VkBool32 depthBounds /// depth bounds test |
| 2930 | VkBool32 wideLines /// lines with width greater than 1 |
| 2931 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2932 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2933 | VkBool32 multiViewport |
| 2934 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2935 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2936 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2937 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2938 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2939 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2940 | VkBool32 vertexPipelineStoresAndAtomics |
| 2941 | VkBool32 fragmentStoresAndAtomics |
| 2942 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2943 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2944 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2945 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2946 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2947 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2948 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2949 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2950 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2951 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2952 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2953 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2954 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2955 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2956 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2957 | 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] | 2958 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2959 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2960 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2961 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2962 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2963 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2964 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2965 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2966 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2967 | 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] | 2968 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2969 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2970 | } |
| 2971 | |
| 2972 | class VkPhysicalDeviceLimits { |
| 2973 | /// resource maximum sizes |
| 2974 | u32 maxImageDimension1D /// max 1D image dimension |
| 2975 | u32 maxImageDimension2D /// max 2D image dimension |
| 2976 | u32 maxImageDimension3D /// max 3D image dimension |
| 2977 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2978 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2979 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2980 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 2981 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2982 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 2983 | /// memory limits |
| 2984 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2985 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2986 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 2987 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2988 | /// descriptor set limits |
| 2989 | 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] | 2990 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 2991 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 2992 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 2993 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 2994 | 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] | 2995 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2996 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2997 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 2998 | 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] | 2999 | 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] | 3000 | 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] | 3001 | 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] | 3002 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 3003 | 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] | 3004 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3005 | /// vertex stage limits |
| 3006 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3007 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3008 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 3009 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 3010 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 3011 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3012 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 3013 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 3014 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 3015 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 3016 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 3017 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 3018 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 3019 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3020 | /// geometry stage limits |
| 3021 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 3022 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 3023 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 3024 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 3025 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 3026 | /// fragment stage limits |
| 3027 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3028 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3029 | 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] | 3030 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 3031 | /// compute stage limits |
| 3032 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 3033 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 3034 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 3035 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 3036 | |
| 3037 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 3038 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 3039 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 3040 | |
| 3041 | 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] | 3042 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3043 | |
| 3044 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 3045 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 3046 | |
| 3047 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3048 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 3049 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 3050 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 3051 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 3052 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 3053 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 3054 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 3055 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3056 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3057 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3058 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3059 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3060 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 3061 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 3062 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 3063 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 3064 | |
| 3065 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 3066 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 3067 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3068 | VkSampleCountFlags framebufferColorSampleCounts |
| 3069 | VkSampleCountFlags framebufferDepthSampleCounts |
| 3070 | VkSampleCountFlags framebufferStencilSampleCounts |
| 3071 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3072 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 3073 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3074 | VkSampleCountFlags sampledImageColorSampleCounts |
| 3075 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 3076 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 3077 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 3078 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3079 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3080 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3081 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3082 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3083 | |
| 3084 | u32 maxClipDistances /// max number of clip distances |
| 3085 | u32 maxCullDistances /// max number of cull distances |
| 3086 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 3087 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3088 | u32 discreteQueuePriorities |
| 3089 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3090 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 3091 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3092 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 3093 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3094 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3095 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3096 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 3097 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 3098 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 3099 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3100 | } |
| 3101 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3102 | class VkPhysicalDeviceSparseProperties { |
| 3103 | 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] | 3104 | 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] | 3105 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 3106 | 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] | 3107 | 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 |
| 3108 | } |
| 3109 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3110 | class VkSemaphoreCreateInfo { |
| 3111 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 3112 | const void* pNext /// Pointer to next structure |
| 3113 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 3114 | } |
| 3115 | |
| 3116 | class VkQueryPoolCreateInfo { |
| 3117 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 3118 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3119 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3120 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3121 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3122 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 3123 | } |
| 3124 | |
| 3125 | class VkFramebufferCreateInfo { |
| 3126 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 3127 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3128 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3129 | VkRenderPass renderPass |
| 3130 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3131 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3132 | u32 width |
| 3133 | u32 height |
| 3134 | u32 layers |
| 3135 | } |
| 3136 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3137 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3138 | u32 vertexCount |
| 3139 | u32 instanceCount |
| 3140 | u32 firstVertex |
| 3141 | u32 firstInstance |
| 3142 | } |
| 3143 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3144 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3145 | u32 indexCount |
| 3146 | u32 instanceCount |
| 3147 | u32 firstIndex |
| 3148 | s32 vertexOffset |
| 3149 | u32 firstInstance |
| 3150 | } |
| 3151 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3152 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3153 | u32 x |
| 3154 | u32 y |
| 3155 | u32 z |
| 3156 | } |
| 3157 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3158 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3159 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3160 | u32 minImageCount |
| 3161 | u32 maxImageCount |
| 3162 | VkExtent2D currentExtent |
| 3163 | VkExtent2D minImageExtent |
| 3164 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3165 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3166 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3167 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3168 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3169 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3170 | } |
| 3171 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3172 | @extension("VK_KHR_surface") // 1 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3173 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3174 | VkFormat format |
| 3175 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3176 | } |
| 3177 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3178 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3179 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3180 | VkStructureType sType |
| 3181 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3182 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3183 | VkSurfaceKHR surface |
| 3184 | u32 minImageCount |
| 3185 | VkFormat imageFormat |
| 3186 | VkColorSpaceKHR imageColorSpace |
| 3187 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3188 | u32 imageArrayLayers |
| 3189 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3190 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3191 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3192 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3193 | VkSurfaceTransformFlagBitsKHR preTransform |
| 3194 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3195 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3196 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3197 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3198 | } |
| 3199 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3200 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3201 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3202 | VkStructureType sType |
| 3203 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3204 | u32 waitSemaphoreCount |
| 3205 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3206 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3207 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3208 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 3209 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3210 | } |
| 3211 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3212 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3213 | class VkDisplayPropertiesKHR { |
| 3214 | VkDisplayKHR display |
| 3215 | const char* displayName |
| 3216 | VkExtent2D physicalDimensions |
| 3217 | VkExtent2D physicalResolution |
| 3218 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3219 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3220 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3221 | } |
| 3222 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3223 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3224 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3225 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3226 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 3227 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3228 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3229 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3230 | class VkDisplayModePropertiesKHR { |
| 3231 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3232 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3233 | } |
| 3234 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3235 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3236 | class VkDisplayModeCreateInfoKHR { |
| 3237 | VkStructureType sType |
| 3238 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 3239 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3240 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3241 | } |
| 3242 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3243 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3244 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3245 | VkDisplayKHR currentDisplay |
| 3246 | u32 currentStackIndex |
| 3247 | } |
| 3248 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3249 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3250 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3251 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 3252 | VkOffset2D minSrcPosition |
| 3253 | VkOffset2D maxSrcPosition |
| 3254 | VkExtent2D minSrcExtent |
| 3255 | VkExtent2D maxSrcExtent |
| 3256 | VkOffset2D minDstPosition |
| 3257 | VkOffset2D maxDstPosition |
| 3258 | VkExtent2D minDstExtent |
| 3259 | VkExtent2D maxDstExtent |
| 3260 | } |
| 3261 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3262 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3263 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3264 | VkStructureType sType |
| 3265 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3266 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3267 | VkDisplayModeKHR displayMode |
| 3268 | u32 planeIndex |
| 3269 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3270 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3271 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3272 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 3273 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3274 | } |
| 3275 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3276 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3277 | class VkDisplayPresentInfoKHR { |
| 3278 | VkStructureType sType |
| 3279 | const void* pNext |
| 3280 | VkRect2D srcRect |
| 3281 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3282 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3283 | } |
| 3284 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3285 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3286 | class VkXlibSurfaceCreateInfoKHR { |
| 3287 | VkStructureType sType |
| 3288 | const void* pNext |
| 3289 | VkXlibSurfaceCreateFlagsKHR flags |
| 3290 | platform.Display* dpy |
| 3291 | platform.Window window |
| 3292 | } |
| 3293 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3294 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3295 | class VkXcbSurfaceCreateInfoKHR { |
| 3296 | VkStructureType sType |
| 3297 | const void* pNext |
| 3298 | VkXcbSurfaceCreateFlagsKHR flags |
| 3299 | platform.xcb_connection_t* connection |
| 3300 | platform.xcb_window_t window |
| 3301 | } |
| 3302 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3303 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3304 | class VkWaylandSurfaceCreateInfoKHR { |
| 3305 | VkStructureType sType |
| 3306 | const void* pNext |
| 3307 | VkWaylandSurfaceCreateFlagsKHR flags |
| 3308 | platform.wl_display* display |
| 3309 | platform.wl_surface* surface |
| 3310 | } |
| 3311 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3312 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3313 | class VkMirSurfaceCreateInfoKHR { |
| 3314 | VkStructureType sType |
| 3315 | const void* pNext |
| 3316 | VkMirSurfaceCreateFlagsKHR flags |
| 3317 | platform.MirConnection* connection |
| 3318 | platform.MirSurface* mirSurface |
| 3319 | } |
| 3320 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3321 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3322 | class VkAndroidSurfaceCreateInfoKHR { |
| 3323 | VkStructureType sType |
| 3324 | const void* pNext |
| 3325 | VkAndroidSurfaceCreateFlagsKHR flags |
| 3326 | platform.ANativeWindow* window |
| 3327 | } |
| 3328 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3329 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3330 | class VkWin32SurfaceCreateInfoKHR { |
| 3331 | VkStructureType sType |
| 3332 | const void* pNext |
| 3333 | VkWin32SurfaceCreateFlagsKHR flags |
| 3334 | platform.HINSTANCE hinstance |
| 3335 | platform.HWND hwnd |
| 3336 | } |
| 3337 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3338 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3339 | @internal class Gralloc1Usage { |
| 3340 | u64 consumer |
| 3341 | u64 producer |
| 3342 | } |
| 3343 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3344 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3345 | class VkNativeBufferANDROID { |
| 3346 | VkStructureType sType |
| 3347 | const void* pNext |
| 3348 | platform.buffer_handle_t handle |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 3349 | s32 stride |
| 3350 | s32 format |
| 3351 | s32 usage |
| 3352 | Gralloc1Usage usage2 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 3353 | } |
| 3354 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3355 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 3356 | class VkSwapchainImageCreateInfoANDROID { |
| 3357 | VkStructureType sType |
| 3358 | const void* pNext |
Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 3359 | VkSwapchainImageUsageFlagsANDROID flags |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 3360 | } |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 3361 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3362 | @extension("VK_ANDROID_native_buffer") // 11 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 3363 | class VkPhysicalDevicePresentationPropertiesANDROID { |
| 3364 | VkStructureType sType |
| 3365 | void* pNext |
| 3366 | VkBool32 sharedImage |
| 3367 | } |
| 3368 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3369 | @extension("VK_EXT_debug_report") // 12 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 3370 | class VkDebugReportCallbackCreateInfoEXT { |
| 3371 | VkStructureType sType |
| 3372 | const void* pNext |
| 3373 | VkDebugReportFlagsEXT flags |
| 3374 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 3375 | void* pUserData |
| 3376 | } |
| 3377 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3378 | @extension("VK_AMD_rasterization_order") // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3379 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 3380 | VkStructureType sType |
| 3381 | const void* pNext |
| 3382 | VkRasterizationOrderAMD rasterizationOrder |
| 3383 | } |
| 3384 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3385 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3386 | class VkDebugMarkerObjectNameInfoEXT { |
| 3387 | VkStructureType sType |
| 3388 | const void* pNext |
| 3389 | VkDebugReportObjectTypeEXT objectType |
| 3390 | u64 object |
| 3391 | const char* pObjectName |
| 3392 | } |
| 3393 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3394 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3395 | class VkDebugMarkerObjectTagInfoEXT { |
| 3396 | VkStructureType sType |
| 3397 | const void* pNext |
| 3398 | VkDebugReportObjectTypeEXT objectType |
| 3399 | u64 object |
| 3400 | u64 tagName |
| 3401 | platform.size_t tagSize |
| 3402 | const void* pTag |
| 3403 | } |
| 3404 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3405 | @extension("VK_EXT_debug_marker") // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 3406 | class VkDebugMarkerMarkerInfoEXT { |
| 3407 | VkStructureType sType |
| 3408 | const void* pNext |
| 3409 | const char* pMarkerName |
| 3410 | f32[4] color |
| 3411 | } |
| 3412 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3413 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3414 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3415 | VkStructureType sType |
| 3416 | const void* pNext |
| 3417 | VkBool32 dedicatedAllocation |
| 3418 | } |
| 3419 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3420 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3421 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3422 | VkStructureType sType |
| 3423 | const void* pNext |
| 3424 | VkBool32 dedicatedAllocation |
| 3425 | } |
| 3426 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3427 | @extension("VK_NV_dedicated_allocation") // 27 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3428 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3429 | VkStructureType sType |
| 3430 | const void* pNext |
| 3431 | VkImage image |
| 3432 | VkBuffer buffer |
| 3433 | } |
| 3434 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3435 | @extension("VK_KHX_multiview") // 54 |
| 3436 | class VkRenderPassMultiviewCreateInfoKHX { |
| 3437 | VkStructureType sType |
| 3438 | const void* pNext |
| 3439 | u32 subpassCount |
| 3440 | const u32* pViewMasks |
| 3441 | u32 dependencyCount |
| 3442 | const s32* pViewOffsets |
| 3443 | u32 correlationMaskCount |
| 3444 | const u32* pCorrelationMasks |
| 3445 | } |
| 3446 | |
| 3447 | @extension("VK_KHX_multiview") // 54 |
| 3448 | class VkPhysicalDeviceMultiviewFeaturesKHX { |
| 3449 | VkStructureType sType |
| 3450 | void* pNext |
| 3451 | VkBool32 multiview |
| 3452 | VkBool32 multiviewGeometryShader |
| 3453 | VkBool32 multiviewTessellationShader |
| 3454 | } |
| 3455 | |
| 3456 | @extension("VK_KHX_multiview") // 54 |
| 3457 | class VkPhysicalDeviceMultiviewPropertiesKHX { |
| 3458 | VkStructureType sType |
| 3459 | void* pNext |
| 3460 | u32 maxMultiviewViewCount |
| 3461 | u32 maxMultiviewInstanceIndex |
| 3462 | } |
| 3463 | |
| 3464 | @extension("VK_NV_external_memory_capabilities") // 56 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3465 | class VkExternalImageFormatPropertiesNV { |
| 3466 | VkImageFormatProperties imageFormatProperties |
| 3467 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3468 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3469 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3470 | } |
| 3471 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3472 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3473 | class VkExternalMemoryImageCreateInfoNV { |
| 3474 | VkStructureType sType |
| 3475 | const void* pNext |
| 3476 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3477 | } |
| 3478 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3479 | @extension("VK_NV_external_memory") // 57 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3480 | class VkExportMemoryAllocateInfoNV { |
| 3481 | VkStructureType sType |
| 3482 | const void* pNext |
| 3483 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3484 | } |
| 3485 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3486 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3487 | class VkImportMemoryWin32HandleInfoNV { |
| 3488 | VkStructureType sType |
| 3489 | const void* pNext |
| 3490 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3491 | platform.HANDLE handle |
| 3492 | } |
| 3493 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3494 | @extension("VK_NV_external_memory_win32") // 58 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3495 | class VkExportMemoryWin32HandleInfoNV { |
| 3496 | VkStructureType sType |
| 3497 | const void* pNext |
| 3498 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3499 | platform.DWORD dwAccess |
| 3500 | } |
| 3501 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3502 | @extension("VK_NV_win32_keyed_mutex") // 59 |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3503 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3504 | VkStructureType sType |
| 3505 | const void* pNext |
| 3506 | u32 acquireCount |
| 3507 | const VkDeviceMemory* pAcquireSyncs |
| 3508 | const u64* pAcquireKeys |
| 3509 | const u32* pAcquireTimeoutMilliseconds |
| 3510 | u32 releaseCount |
| 3511 | const VkDeviceMemory* pReleaseSyncs |
| 3512 | const u64* pReleaseKeys |
| 3513 | } |
| 3514 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3515 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3516 | class VkPhysicalDeviceFeatures2KHR { |
| 3517 | VkStructureType sType |
| 3518 | void* pNext |
| 3519 | VkPhysicalDeviceFeatures features |
| 3520 | } |
| 3521 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3522 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3523 | class VkPhysicalDeviceProperties2KHR { |
| 3524 | VkStructureType sType |
| 3525 | void* pNext |
| 3526 | VkPhysicalDeviceProperties properties |
| 3527 | } |
| 3528 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3529 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3530 | class VkFormatProperties2KHR { |
| 3531 | VkStructureType sType |
| 3532 | void* pNext |
| 3533 | VkFormatProperties formatProperties |
| 3534 | } |
| 3535 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3536 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3537 | class VkImageFormatProperties2KHR { |
| 3538 | VkStructureType sType |
| 3539 | void* pNext |
| 3540 | VkImageFormatProperties imageFormatProperties |
| 3541 | } |
| 3542 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3543 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3544 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3545 | VkStructureType sType |
| 3546 | const void* pNext |
| 3547 | VkFormat format |
| 3548 | VkImageType type |
| 3549 | VkImageTiling tiling |
| 3550 | VkImageUsageFlags usage |
| 3551 | VkImageCreateFlags flags |
| 3552 | } |
| 3553 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3554 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3555 | class VkQueueFamilyProperties2KHR { |
| 3556 | VkStructureType sType |
| 3557 | void* pNext |
| 3558 | VkQueueFamilyProperties queueFamilyProperties |
| 3559 | } |
| 3560 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3561 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3562 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3563 | VkStructureType sType |
| 3564 | void* pNext |
| 3565 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3566 | } |
| 3567 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3568 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3569 | class VkSparseImageFormatProperties2KHR { |
| 3570 | VkStructureType sType |
| 3571 | void* pNext |
| 3572 | VkSparseImageFormatProperties properties |
| 3573 | } |
| 3574 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3575 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3576 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3577 | VkStructureType sType |
| 3578 | const void* pNext |
| 3579 | VkFormat format |
| 3580 | VkImageType type |
| 3581 | VkSampleCountFlagBits samples |
| 3582 | VkImageUsageFlags usage |
| 3583 | VkImageTiling tiling |
| 3584 | } |
| 3585 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3586 | @extension("VK_KHX_device_group") // 61 |
| 3587 | class VkMemoryAllocateFlagsInfoKHX { |
| 3588 | VkStructureType sType |
| 3589 | const void* pNext |
| 3590 | VkMemoryAllocateFlagsKHX flags |
| 3591 | u32 deviceMask |
| 3592 | } |
| 3593 | |
| 3594 | @extension("VK_KHX_device_group") // 61 |
| 3595 | class VkBindBufferMemoryInfoKHX { |
| 3596 | VkStructureType sType |
| 3597 | const void* pNext |
| 3598 | VkBuffer buffer |
| 3599 | VkDeviceMemory memory |
| 3600 | VkDeviceSize memoryOffset |
| 3601 | u32 deviceIndexCount |
| 3602 | const u32* pDeviceIndices |
| 3603 | } |
| 3604 | |
| 3605 | @extension("VK_KHX_device_group") // 61 |
| 3606 | class VkBindImageMemoryInfoKHX { |
| 3607 | VkStructureType sType |
| 3608 | const void* pNext |
| 3609 | VkImage image |
| 3610 | VkDeviceMemory memory |
| 3611 | VkDeviceSize memoryOffset |
| 3612 | u32 deviceIndexCount |
| 3613 | const u32* pDeviceIndices |
| 3614 | u32 SFRRectCount |
| 3615 | const VkRect2D* pSFRRects |
| 3616 | } |
| 3617 | |
| 3618 | @extension("VK_KHX_device_group") // 61 |
| 3619 | class VkDeviceGroupRenderPassBeginInfoKHX { |
| 3620 | VkStructureType sType |
| 3621 | const void* pNext |
| 3622 | u32 deviceMask |
| 3623 | u32 deviceRenderAreaCount |
| 3624 | const VkRect2D* pDeviceRenderAreas |
| 3625 | } |
| 3626 | |
| 3627 | @extension("VK_KHX_device_group") // 61 |
| 3628 | class VkDeviceGroupCommandBufferBeginInfoKHX { |
| 3629 | VkStructureType sType |
| 3630 | const void* pNext |
| 3631 | u32 deviceMask |
| 3632 | } |
| 3633 | |
| 3634 | @extension("VK_KHX_device_group") // 61 |
| 3635 | class VkDeviceGroupSubmitInfoKHX { |
| 3636 | VkStructureType sType |
| 3637 | const void* pNext |
| 3638 | u32 waitSemaphoreCount |
| 3639 | const u32* pWaitSemaphoreDeviceIndices |
| 3640 | u32 commandBufferCount |
| 3641 | const u32* pCommandBufferDeviceMasks |
| 3642 | u32 signalSemaphoreCount |
| 3643 | const u32* pSignalSemaphoreDeviceIndices |
| 3644 | } |
| 3645 | |
| 3646 | @extension("VK_KHX_device_group") // 61 |
| 3647 | class VkDeviceGroupBindSparseInfoKHX { |
| 3648 | VkStructureType sType |
| 3649 | const void* pNext |
| 3650 | u32 resourceDeviceIndex |
| 3651 | u32 memoryDeviceIndex |
| 3652 | } |
| 3653 | |
| 3654 | @extension("VK_KHX_device_group") // 61 |
| 3655 | class VkDeviceGroupPresentCapabilitiesKHX { |
| 3656 | VkStructureType sType |
| 3657 | const void* pNext |
| 3658 | u32[VK_MAX_DEVICE_GROUP_SIZE_KHX] presentMask |
| 3659 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3660 | } |
| 3661 | |
| 3662 | @extension("VK_KHX_device_group") // 61 |
| 3663 | class VkImageSwapchainCreateInfoKHX { |
| 3664 | VkStructureType sType |
| 3665 | const void* pNext |
| 3666 | VkSwapchainKHR swapchain |
| 3667 | } |
| 3668 | |
| 3669 | @extension("VK_KHX_device_group") // 61 |
| 3670 | class VkBindImageMemorySwapchainInfoKHX { |
| 3671 | VkStructureType sType |
| 3672 | const void* pNext |
| 3673 | VkSwapchainKHR swapchain |
| 3674 | u32 imageIndex |
| 3675 | } |
| 3676 | |
| 3677 | @extension("VK_KHX_device_group") // 61 |
| 3678 | class VkAcquireNextImageInfoKHX { |
| 3679 | VkStructureType sType |
| 3680 | const void* pNext |
| 3681 | VkSwapchainKHR swapchain |
| 3682 | u64 timeout |
| 3683 | VkSemaphore semaphore |
| 3684 | VkFence fence |
| 3685 | u32 deviceMask |
| 3686 | } |
| 3687 | |
| 3688 | @extension("VK_KHX_device_group") // 61 |
| 3689 | class VkDeviceGroupPresentInfoKHX { |
| 3690 | VkStructureType sType |
| 3691 | const void* pNext |
| 3692 | u32 swapchainCount |
| 3693 | const u32* pDeviceMasks |
| 3694 | VkDeviceGroupPresentModeFlagBitsKHX mode |
| 3695 | } |
| 3696 | |
| 3697 | @extension("VK_KHX_device_group") // 61 |
| 3698 | class VkDeviceGroupSwapchainCreateInfoKHX { |
| 3699 | VkStructureType sType |
| 3700 | const void* pNext |
| 3701 | VkDeviceGroupPresentModeFlagsKHX modes |
| 3702 | } |
| 3703 | |
| 3704 | @extension("VK_EXT_validation_flags") // 62 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3705 | class VkValidationFlagsEXT { |
| 3706 | VkStructureType sType |
| 3707 | const void* pNext |
| 3708 | u32 disabledValidationCheckCount |
| 3709 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3710 | } |
| 3711 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3712 | @extension("VK_NN_vi_surface") // 63 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 3713 | class VkViSurfaceCreateInfoNN { |
| 3714 | VkStructureType sType |
| 3715 | const void* pNext |
| 3716 | VkViSurfaceCreateFlagsNN flags |
| 3717 | void* window |
| 3718 | } |
| 3719 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 3720 | @extension("VK_KHX_device_group_creation") // 71 |
| 3721 | class VkPhysicalDeviceGroupPropertiesKHX { |
| 3722 | VkStructureType sType |
| 3723 | const void* pNext |
| 3724 | u32 physicalDeviceCount |
| 3725 | VkPhysicalDevice[VK_MAX_DEVICE_GROUP_SIZE_KHX] physicalDevices |
| 3726 | VkBool32 subsetAllocation |
| 3727 | } |
| 3728 | |
| 3729 | @extension("VK_KHX_device_group_creation") // 71 |
| 3730 | class VkDeviceGroupDeviceCreateInfoKHX { |
| 3731 | VkStructureType sType |
| 3732 | const void* pNext |
| 3733 | u32 physicalDeviceCount |
| 3734 | const VkPhysicalDevice* pPhysicalDevices |
| 3735 | } |
| 3736 | |
| 3737 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3738 | class VkExternalMemoryPropertiesKHX { |
| 3739 | VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures |
| 3740 | VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3741 | VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes |
| 3742 | } |
| 3743 | |
| 3744 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3745 | class VkPhysicalDeviceExternalImageFormatInfoKHX { |
| 3746 | VkStructureType sType |
| 3747 | const void* pNext |
| 3748 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3749 | } |
| 3750 | |
| 3751 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3752 | class VkExternalImageFormatPropertiesKHX { |
| 3753 | VkStructureType sType |
| 3754 | void* pNext |
| 3755 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3756 | } |
| 3757 | |
| 3758 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3759 | class VkPhysicalDeviceExternalBufferInfoKHX { |
| 3760 | VkStructureType sType |
| 3761 | const void* pNext |
| 3762 | VkBufferCreateFlags flags |
| 3763 | VkBufferUsageFlags usage |
| 3764 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3765 | } |
| 3766 | |
| 3767 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3768 | class VkExternalBufferPropertiesKHX { |
| 3769 | VkStructureType sType |
| 3770 | void* pNext |
| 3771 | VkExternalMemoryPropertiesKHX externalMemoryProperties |
| 3772 | } |
| 3773 | |
| 3774 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3775 | class VkPhysicalDeviceIDPropertiesKHX { |
| 3776 | VkStructureType sType |
| 3777 | void* pNext |
| 3778 | u8[VK_UUID_SIZE] deviceUUID |
| 3779 | u8[VK_UUID_SIZE] driverUUID |
| 3780 | u8[VK_LUID_SIZE_KHX] deviceLUID |
| 3781 | VkBool32 deviceLUIDValid |
| 3782 | } |
| 3783 | |
| 3784 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3785 | class VkPhysicalDeviceProperties2KHX { |
| 3786 | VkStructureType sType |
| 3787 | void* pNext |
| 3788 | VkPhysicalDeviceProperties properties |
| 3789 | } |
| 3790 | |
| 3791 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3792 | class VkImageFormatProperties2KHX { |
| 3793 | VkStructureType sType |
| 3794 | void* pNext |
| 3795 | VkImageFormatProperties imageFormatProperties |
| 3796 | } |
| 3797 | |
| 3798 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 3799 | class VkPhysicalDeviceImageFormatInfo2KHX { |
| 3800 | VkStructureType sType |
| 3801 | const void* pNext |
| 3802 | VkFormat format |
| 3803 | VkImageType type |
| 3804 | VkImageTiling tiling |
| 3805 | VkImageUsageFlags usage |
| 3806 | VkImageCreateFlags flags |
| 3807 | } |
| 3808 | |
| 3809 | @extension("VK_KHX_external_memory") // 73 |
| 3810 | class VkExternalMemoryImageCreateInfoKHX { |
| 3811 | VkStructureType sType |
| 3812 | const void* pNext |
| 3813 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3814 | } |
| 3815 | |
| 3816 | @extension("VK_KHX_external_memory") // 73 |
| 3817 | class VkExternalMemoryBufferCreateInfoKHX { |
| 3818 | VkStructureType sType |
| 3819 | const void* pNext |
| 3820 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3821 | } |
| 3822 | |
| 3823 | @extension("VK_KHX_external_memory") // 73 |
| 3824 | class VkExportMemoryAllocateInfoKHX { |
| 3825 | VkStructureType sType |
| 3826 | const void* pNext |
| 3827 | VkExternalMemoryHandleTypeFlagsKHX handleTypes |
| 3828 | } |
| 3829 | |
| 3830 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3831 | class VkImportMemoryWin32HandleInfoKHX { |
| 3832 | VkStructureType sType |
| 3833 | const void* pNext |
| 3834 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3835 | platform.HANDLE handle |
| 3836 | } |
| 3837 | |
| 3838 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3839 | class VkExportMemoryWin32HandleInfoKHX { |
| 3840 | VkStructureType sType |
| 3841 | const void* pNext |
| 3842 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3843 | platform.DWORD dwAccess |
| 3844 | platform.LPCWSTR name |
| 3845 | } |
| 3846 | |
| 3847 | @extension("VK_KHX_external_memory_win32") // 74 |
| 3848 | class VkMemoryWin32HandlePropertiesKHX { |
| 3849 | VkStructureType sType |
| 3850 | void* pNext |
| 3851 | u32 memoryTypeBits |
| 3852 | } |
| 3853 | |
| 3854 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3855 | class VkImportMemoryFdInfoKHX { |
| 3856 | VkStructureType sType |
| 3857 | const void* pNext |
| 3858 | VkExternalMemoryHandleTypeFlagBitsKHX handleType |
| 3859 | int fd |
| 3860 | } |
| 3861 | |
| 3862 | @extension("VK_KHX_external_memory_fd") // 75 |
| 3863 | class VkMemoryFdPropertiesKHX { |
| 3864 | VkStructureType sType |
| 3865 | void* pNext |
| 3866 | u32 memoryTypeBits |
| 3867 | } |
| 3868 | |
| 3869 | @extension("VK_KHX_win32_keyed_mutex") // 76 |
| 3870 | class VkWin32KeyedMutexAcquireReleaseInfoKHX { |
| 3871 | VkStructureType sType |
| 3872 | const void* pNext |
| 3873 | u32 acquireCount |
| 3874 | const VkDeviceMemory* pAcquireSyncs |
| 3875 | const u64* pAcquireKeys |
| 3876 | const u32* pAcquireTimeouts |
| 3877 | u32 releaseCount |
| 3878 | const VkDeviceMemory* pReleaseSyncs |
| 3879 | const u64* pReleaseKeys |
| 3880 | } |
| 3881 | |
| 3882 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3883 | class VkPhysicalDeviceExternalSemaphoreInfoKHX { |
| 3884 | VkStructureType sType |
| 3885 | const void* pNext |
| 3886 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3887 | } |
| 3888 | |
| 3889 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 3890 | class VkExternalSemaphorePropertiesKHX { |
| 3891 | VkStructureType sType |
| 3892 | void* pNext |
| 3893 | VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes |
| 3894 | VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes |
| 3895 | VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures |
| 3896 | } |
| 3897 | |
| 3898 | @extension("VK_KHX_external_semaphore") // 78 |
| 3899 | class VkExportSemaphoreCreateInfoKHX { |
| 3900 | VkStructureType sType |
| 3901 | const void* pNext |
| 3902 | VkExternalSemaphoreHandleTypeFlagsKHX handleTypes |
| 3903 | } |
| 3904 | |
| 3905 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3906 | class VkImportSemaphoreWin32HandleInfoKHX { |
| 3907 | VkStructureType sType |
| 3908 | const void* pNext |
| 3909 | VkSemaphore semaphore |
| 3910 | VkExternalSemaphoreHandleTypeFlagsKHX handleType |
| 3911 | platform.HANDLE handle |
| 3912 | } |
| 3913 | |
| 3914 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3915 | class VkExportSemaphoreWin32HandleInfoKHX { |
| 3916 | VkStructureType sType |
| 3917 | const void* pNext |
| 3918 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3919 | platform.DWORD dwAccess |
| 3920 | platform.LPCWSTR name |
| 3921 | } |
| 3922 | |
| 3923 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 3924 | class VkD3D12FenceSubmitInfoKHX { |
| 3925 | VkStructureType sType |
| 3926 | const void* pNext |
| 3927 | u32 waitSemaphoreValuesCount |
| 3928 | const u64* pWaitSemaphoreValues |
| 3929 | u32 signalSemaphoreValuesCount |
| 3930 | const u64* pSignalSemaphoreValues |
| 3931 | } |
| 3932 | |
| 3933 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 3934 | class VkImportSemaphoreFdInfoKHX { |
| 3935 | VkStructureType sType |
| 3936 | const void* pNext |
| 3937 | VkSemaphore semaphore |
| 3938 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType |
| 3939 | s32 fd |
| 3940 | } |
| 3941 | |
| 3942 | @extension("VK_KHR_push_descriptor") // 81 |
| 3943 | class VkPhysicalDevicePushDescriptorPropertiesKHR { |
| 3944 | VkStructureType sType |
| 3945 | void* pNext |
| 3946 | u32 maxPushDescriptors |
| 3947 | } |
| 3948 | |
| 3949 | @extension("VK_KHR_incremental_present") // 85 |
| 3950 | class VkRectLayerKHR { |
| 3951 | VkOffset2D offset |
| 3952 | VkExtent2D extent |
| 3953 | u32 layer |
| 3954 | } |
| 3955 | |
| 3956 | @extension("VK_KHR_incremental_present") // 85 |
| 3957 | class VkPresentRegionKHR { |
| 3958 | u32 rectangleCount |
| 3959 | const VkRectLayerKHR* pRectangles |
| 3960 | } |
| 3961 | |
| 3962 | @extension("VK_KHR_incremental_present") // 85 |
| 3963 | class VkPresentRegionsKHR { |
| 3964 | VkStructureType sType |
| 3965 | const void* pNext |
| 3966 | u32 swapchainCount |
| 3967 | const VkPresentRegionKHR* pRegions |
| 3968 | } |
| 3969 | |
| 3970 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3971 | class VkDescriptorUpdateTemplateEntryKHR { |
| 3972 | u32 dstBinding |
| 3973 | u32 dstArrayElement |
| 3974 | u32 descriptorCount |
| 3975 | VkDescriptorType descriptorType |
| 3976 | platform.size_t offset |
| 3977 | platform.size_t stride |
| 3978 | } |
| 3979 | |
| 3980 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 3981 | class VkDescriptorUpdateTemplateCreateInfoKHR { |
| 3982 | VkStructureType sType |
| 3983 | void* pNext |
| 3984 | VkDescriptorUpdateTemplateCreateFlagsKHR flags |
| 3985 | u32 descriptorUpdateEntryCount |
| 3986 | const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries |
| 3987 | VkDescriptorUpdateTemplateTypeKHR templateType |
| 3988 | VkDescriptorSetLayout descriptorSetLayout |
| 3989 | VkPipelineBindPoint pipelineBindPoint |
| 3990 | VkPipelineLayout pipelineLayout |
| 3991 | u32 set |
| 3992 | } |
| 3993 | |
| 3994 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3995 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3996 | VkStructureType sType |
| 3997 | const void* pNext |
| 3998 | VkBool32 computeBindingPointSupport |
| 3999 | } |
| 4000 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4001 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4002 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 4003 | VkStructureType sType |
| 4004 | const void* pNext |
| 4005 | u32 maxIndirectCommandsLayoutTokenCount |
| 4006 | u32 maxObjectEntryCounts |
| 4007 | u32 minSequenceCountBufferOffsetAlignment |
| 4008 | u32 minSequenceIndexBufferOffsetAlignment |
| 4009 | u32 minCommandsTokenBufferOffsetAlignment |
| 4010 | } |
| 4011 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4012 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4013 | class VkIndirectCommandsTokenNVX { |
| 4014 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4015 | VkBuffer buffer |
| 4016 | VkDeviceSize offset |
| 4017 | } |
| 4018 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4019 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4020 | class VkIndirectCommandsLayoutTokenNVX { |
| 4021 | VkIndirectCommandsTokenTypeNVX tokenType |
| 4022 | u32 bindingUnit |
| 4023 | u32 dynamicCount |
| 4024 | u32 divisor |
| 4025 | } |
| 4026 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4027 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4028 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 4029 | VkStructureType sType |
| 4030 | const void* pNext |
| 4031 | VkPipelineBindPoint pipelineBindPoint |
| 4032 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 4033 | u32 tokenCount |
| 4034 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 4035 | } |
| 4036 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4037 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4038 | class VkCmdProcessCommandsInfoNVX { |
| 4039 | VkStructureType sType |
| 4040 | const void* pNext |
| 4041 | VkObjectTableNVX objectTable |
| 4042 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4043 | u32 indirectCommandsTokenCount |
| 4044 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 4045 | u32 maxSequencesCount |
| 4046 | VkCommandBuffer targetCommandBuffer |
| 4047 | VkBuffer sequencesCountBuffer |
| 4048 | VkDeviceSize sequencesCountOffset |
| 4049 | VkBuffer sequencesIndexBuffer |
| 4050 | VkDeviceSize sequencesIndexOffset |
| 4051 | } |
| 4052 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4053 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4054 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 4055 | VkStructureType sType |
| 4056 | const void* pNext |
| 4057 | VkObjectTableNVX objectTable |
| 4058 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 4059 | u32 maxSequencesCount |
| 4060 | } |
| 4061 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4062 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4063 | class VkObjectTableCreateInfoNVX { |
| 4064 | VkStructureType sType |
| 4065 | const void* pNext |
| 4066 | u32 objectCount |
| 4067 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 4068 | const u32* pObjectEntryCounts |
| 4069 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 4070 | u32 maxUniformBuffersPerDescriptor |
| 4071 | u32 maxStorageBuffersPerDescriptor |
| 4072 | u32 maxStorageImagesPerDescriptor |
| 4073 | u32 maxSampledImagesPerDescriptor |
| 4074 | u32 maxPipelineLayouts |
| 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 VkObjectTableEntryNVX { |
| 4079 | VkObjectEntryTypeNVX type |
| 4080 | VkObjectEntryUsageFlagsNVX flags |
| 4081 | } |
| 4082 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4083 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4084 | class VkObjectTablePipelineEntryNVX { |
| 4085 | VkObjectEntryTypeNVX type |
| 4086 | VkObjectEntryUsageFlagsNVX flags |
| 4087 | VkPipeline pipeline |
| 4088 | } |
| 4089 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4090 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4091 | class VkObjectTableDescriptorSetEntryNVX { |
| 4092 | VkObjectEntryTypeNVX type |
| 4093 | VkObjectEntryUsageFlagsNVX flags |
| 4094 | VkPipelineLayout pipelineLayout |
| 4095 | VkDescriptorSet descriptorSet |
| 4096 | } |
| 4097 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4098 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4099 | class VkObjectTableVertexBufferEntryNVX { |
| 4100 | VkObjectEntryTypeNVX type |
| 4101 | VkObjectEntryUsageFlagsNVX flags |
| 4102 | VkBuffer buffer |
| 4103 | } |
| 4104 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4105 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4106 | class VkObjectTableIndexBufferEntryNVX { |
| 4107 | VkObjectEntryTypeNVX type |
| 4108 | VkObjectEntryUsageFlagsNVX flags |
| 4109 | VkBuffer buffer |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4110 | VkIndexType indexType |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4111 | } |
| 4112 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4113 | @extension("VK_NVX_device_generated_commands") // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 4114 | class VkObjectTablePushConstantEntryNVX { |
| 4115 | VkObjectEntryTypeNVX type |
| 4116 | VkObjectEntryUsageFlagsNVX flags |
| 4117 | VkPipelineLayout pipelineLayout |
| 4118 | VkShaderStageFlags stageFlags |
| 4119 | } |
| 4120 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4121 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4122 | class VkViewportWScalingNV { |
| 4123 | f32 xcoeff |
| 4124 | f32 ycoeff |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4125 | } |
| 4126 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4127 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 4128 | class VkPipelineViewportWScalingStateCreateInfoNV { |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4129 | VkStructureType sType |
| 4130 | const void* pNext |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4131 | VkBool32 viewportWScalingEnable |
| 4132 | u32 viewportCount |
| 4133 | const VkViewportWScalingNV* pViewportWScalings |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 4134 | } |
| 4135 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4136 | @extension("VK_EXT_display_surface_counter") // 91 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4137 | class VkSurfaceCapabilities2EXT { |
| 4138 | VkStructureType sType |
| 4139 | void* pNext |
| 4140 | u32 minImageCount |
| 4141 | u32 maxImageCount |
| 4142 | VkExtent2D currentExtent |
| 4143 | VkExtent2D minImageExtent |
| 4144 | VkExtent2D maxImageExtent |
| 4145 | u32 maxImageArrayLayers |
| 4146 | VkSurfaceTransformFlagsKHR supportedTransforms |
| 4147 | VkSurfaceTransformFlagBitsKHR currentTransform |
| 4148 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
| 4149 | VkImageUsageFlags supportedUsageFlags |
| 4150 | VkSurfaceCounterFlagsEXT supportedSurfaceCounters |
| 4151 | } |
| 4152 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4153 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4154 | class VkDisplayPowerInfoEXT { |
| 4155 | VkStructureType sType |
| 4156 | const void* pNext |
| 4157 | VkDisplayPowerStateEXT powerState |
| 4158 | } |
| 4159 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4160 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4161 | class VkDeviceEventInfoEXT { |
| 4162 | VkStructureType sType |
| 4163 | const void* pNext |
| 4164 | VkDeviceEventTypeEXT deviceEvent |
| 4165 | } |
| 4166 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4167 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4168 | class VkDisplayEventInfoEXT { |
| 4169 | VkStructureType sType |
| 4170 | const void* pNext |
| 4171 | VkDisplayEventTypeEXT displayEvent |
| 4172 | } |
| 4173 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4174 | @extension("VK_EXT_display_control") // 92 |
Jesse Hall | 77ad05b | 2017-03-10 22:02:20 -0800 | [diff] [blame] | 4175 | class VkSwapchainCounterCreateInfoEXT { |
| 4176 | VkStructureType sType |
| 4177 | const void* pNext |
| 4178 | VkSurfaceCounterFlagsEXT surfaceCounters |
| 4179 | } |
| 4180 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4181 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4182 | class VkRefreshCycleDurationGOOGLE { |
| 4183 | u64 minRefreshDuration |
| 4184 | u64 maxRefreshDuration |
| 4185 | } |
| 4186 | |
| 4187 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4188 | class VkPastPresentationTimingGOOGLE { |
| 4189 | u32 presentID |
| 4190 | u64 desiredPresentTime |
| 4191 | u64 actualPresentTime |
| 4192 | u64 earliestPresentTime |
| 4193 | u64 presentMargin |
| 4194 | } |
| 4195 | |
| 4196 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4197 | class VkPresentTimeGOOGLE { |
| 4198 | u32 presentID |
| 4199 | u64 desiredPresentTime |
| 4200 | } |
| 4201 | |
| 4202 | @extension("VK_GOOGLE_display_timing") // 93 |
| 4203 | class VkPresentTimesInfoGOOGLE { |
| 4204 | VkStructureType sType |
| 4205 | const void* pNext |
| 4206 | u32 swapchainCount |
| 4207 | const VkPresentTimeGOOGLE* pTimes |
| 4208 | } |
| 4209 | |
| 4210 | @extension("VK_NVX_multiview_per_view_attributes") // 98 |
| 4211 | class VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { |
| 4212 | VkStructureType sType |
| 4213 | void* pNext |
| 4214 | VkBool32 perViewPositionAllComponents |
| 4215 | } |
| 4216 | |
| 4217 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4218 | class VkViewportSwizzleNV { |
| 4219 | VkViewportCoordinateSwizzleNV x |
| 4220 | VkViewportCoordinateSwizzleNV y |
| 4221 | VkViewportCoordinateSwizzleNV z |
| 4222 | VkViewportCoordinateSwizzleNV w |
| 4223 | } |
| 4224 | |
| 4225 | @extension("VK_NV_viewport_swizzle") // 99 |
| 4226 | class VkPipelineViewportSwizzleStateCreateInfoNV { |
| 4227 | VkStructureType sType |
| 4228 | const void* pNext |
| 4229 | VkPipelineViewportSwizzleStateCreateFlagsNV flags |
| 4230 | u32 viewportCount |
| 4231 | const VkViewportSwizzleNV* pViewportSwizzles |
| 4232 | } |
| 4233 | |
| 4234 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4235 | class VkPhysicalDeviceDiscardRectanglePropertiesEXT { |
| 4236 | VkStructureType sType |
| 4237 | const void* pNext |
| 4238 | u32 maxDiscardRectangles |
| 4239 | } |
| 4240 | |
| 4241 | @extension("VK_EXT_discard_rectangles") // 100 |
| 4242 | class VkPipelineDiscardRectangleStateCreateInfoEXT { |
| 4243 | VkStructureType sType |
| 4244 | const void* pNext |
| 4245 | VkPipelineDiscardRectangleStateCreateFlagsEXT flags |
| 4246 | VkDiscardRectangleModeEXT discardRectangleMode |
| 4247 | u32 discardRectangleCount |
| 4248 | const VkRect2D* pDiscardRectangles |
| 4249 | } |
| 4250 | |
| 4251 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4252 | class VkXYColorEXT { |
| 4253 | f32 x |
| 4254 | f32 y |
| 4255 | } |
| 4256 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4257 | @extension("VK_EXT_hdr_metadata") // 106 |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 4258 | class VkHdrMetadataEXT { |
| 4259 | VkXYColorEXT displayPrimaryRed |
| 4260 | VkXYColorEXT displayPrimaryGreen |
| 4261 | VkXYColorEXT displayPrimaryBlue |
| 4262 | VkXYColorEXT whitePoint |
| 4263 | f32 maxLuminance |
| 4264 | f32 minLuminance |
| 4265 | f32 maxContentLightLevel |
| 4266 | f32 maxFrameAverageLightLevel |
| 4267 | } |
| 4268 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 4269 | @extension("VK_MVK_ios_surface") // 123 |
| 4270 | class VkIOSSurfaceCreateInfoMVK { |
| 4271 | VkStructureType sType |
| 4272 | const void* pNext |
| 4273 | VkIOSSurfaceCreateFlagsMVK flags |
| 4274 | const void* pView |
| 4275 | } |
| 4276 | |
| 4277 | @extension("VK_MVK_macos_surface") // 124 |
| 4278 | class VkMacOSSurfaceCreateInfoMVK { |
| 4279 | VkStructureType sType |
| 4280 | const void* pNext |
| 4281 | VkMacOSSurfaceCreateFlagsMVK flags |
| 4282 | const void* pView |
| 4283 | } |
| 4284 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4285 | //////////////// |
| 4286 | // Commands // |
| 4287 | //////////////// |
| 4288 | |
| 4289 | // Function pointers. TODO: add support for function pointers. |
| 4290 | |
| 4291 | @external type void* PFN_vkVoidFunction |
| 4292 | @pfn cmd void vkVoidFunction() { |
| 4293 | } |
| 4294 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4295 | @external type void* PFN_vkAllocationFunction |
| 4296 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4297 | void* pUserData, |
| 4298 | platform.size_t size, |
| 4299 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4300 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4301 | return ? |
| 4302 | } |
| 4303 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4304 | @external type void* PFN_vkReallocationFunction |
| 4305 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4306 | void* pUserData, |
| 4307 | void* pOriginal, |
| 4308 | platform.size_t size, |
| 4309 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4310 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4311 | return ? |
| 4312 | } |
| 4313 | |
| 4314 | @external type void* PFN_vkFreeFunction |
| 4315 | @pfn cmd void vkFreeFunction( |
| 4316 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4317 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4318 | } |
| 4319 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4320 | @external type void* PFN_vkInternalAllocationNotification |
| 4321 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4322 | void* pUserData, |
| 4323 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4324 | VkInternalAllocationType allocationType, |
| 4325 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4326 | } |
| 4327 | |
| 4328 | @external type void* PFN_vkInternalFreeNotification |
| 4329 | @pfn cmd void vkInternalFreeNotification( |
| 4330 | void* pUserData, |
| 4331 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4332 | VkInternalAllocationType allocationType, |
| 4333 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4334 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4335 | |
| 4336 | // Global functions |
| 4337 | |
| 4338 | @threadSafety("system") |
| 4339 | cmd VkResult vkCreateInstance( |
| 4340 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4341 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4342 | VkInstance* pInstance) { |
| 4343 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 4344 | |
| 4345 | instance := ? |
| 4346 | pInstance[0] = instance |
| 4347 | State.Instances[instance] = new!InstanceObject() |
| 4348 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4349 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 4350 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4351 | |
| 4352 | return ? |
| 4353 | } |
| 4354 | |
| 4355 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4356 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4357 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4358 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4359 | instanceObject := GetInstance(instance) |
| 4360 | |
| 4361 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4362 | } |
| 4363 | |
| 4364 | @threadSafety("system") |
| 4365 | cmd VkResult vkEnumeratePhysicalDevices( |
| 4366 | VkInstance instance, |
| 4367 | u32* pPhysicalDeviceCount, |
| 4368 | VkPhysicalDevice* pPhysicalDevices) { |
| 4369 | instanceObject := GetInstance(instance) |
| 4370 | |
| 4371 | physicalDeviceCount := as!u32(?) |
| 4372 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 4373 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 4374 | |
| 4375 | for i in (0 .. physicalDeviceCount) { |
| 4376 | physicalDevice := ? |
| 4377 | physicalDevices[i] = physicalDevice |
| 4378 | if !(physicalDevice in State.PhysicalDevices) { |
| 4379 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 4380 | } |
| 4381 | } |
| 4382 | |
| 4383 | return ? |
| 4384 | } |
| 4385 | |
| 4386 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 4387 | VkDevice device, |
| 4388 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4389 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4390 | device := GetDevice(device) |
| 4391 | } |
| 4392 | |
| 4393 | return ? |
| 4394 | } |
| 4395 | |
| 4396 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 4397 | VkInstance instance, |
| 4398 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4399 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4400 | instanceObject := GetInstance(instance) |
| 4401 | } |
| 4402 | |
| 4403 | return ? |
| 4404 | } |
| 4405 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4406 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4407 | VkPhysicalDevice physicalDevice, |
| 4408 | VkPhysicalDeviceProperties* pProperties) { |
| 4409 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4410 | |
| 4411 | properties := ? |
| 4412 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4413 | } |
| 4414 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4415 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4416 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4417 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4418 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4419 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4420 | // TODO: Figure out how to express fetch-count-or-properties |
| 4421 | // This version fails 'apic validate' with 'fence not allowed in |
| 4422 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 4423 | // errors. |
| 4424 | // if pQueueFamilyProperties != null { |
| 4425 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 4426 | // for i in (0 .. pCount[0]) { |
| 4427 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 4428 | // queuesProperties[i] = queueProperties |
| 4429 | // } |
| 4430 | // } else { |
| 4431 | // count := ? |
| 4432 | // pCount[0] = count |
| 4433 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4434 | } |
| 4435 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4436 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4437 | VkPhysicalDevice physicalDevice, |
| 4438 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 4439 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4440 | |
| 4441 | memoryProperties := ? |
| 4442 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4443 | } |
| 4444 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4445 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4446 | VkPhysicalDevice physicalDevice, |
| 4447 | VkPhysicalDeviceFeatures* pFeatures) { |
| 4448 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4449 | |
| 4450 | features := ? |
| 4451 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4452 | } |
| 4453 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4454 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4455 | VkPhysicalDevice physicalDevice, |
| 4456 | VkFormat format, |
| 4457 | VkFormatProperties* pFormatProperties) { |
| 4458 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4459 | |
| 4460 | formatProperties := ? |
| 4461 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4462 | } |
| 4463 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4464 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4465 | VkPhysicalDevice physicalDevice, |
| 4466 | VkFormat format, |
| 4467 | VkImageType type, |
| 4468 | VkImageTiling tiling, |
| 4469 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4470 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4471 | VkImageFormatProperties* pImageFormatProperties) { |
| 4472 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4473 | |
| 4474 | imageFormatProperties := ? |
| 4475 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 4476 | |
| 4477 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4478 | } |
| 4479 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4480 | |
| 4481 | // Device functions |
| 4482 | |
| 4483 | @threadSafety("system") |
| 4484 | cmd VkResult vkCreateDevice( |
| 4485 | VkPhysicalDevice physicalDevice, |
| 4486 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4487 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4488 | VkDevice* pDevice) { |
| 4489 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 4490 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4491 | |
| 4492 | device := ? |
| 4493 | pDevice[0] = device |
| 4494 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 4495 | |
| 4496 | return ? |
| 4497 | } |
| 4498 | |
| 4499 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4500 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4501 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4502 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4503 | deviceObject := GetDevice(device) |
| 4504 | |
| 4505 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4506 | } |
| 4507 | |
| 4508 | |
| 4509 | // Extension discovery functions |
| 4510 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4511 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4512 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4513 | VkLayerProperties* pProperties) { |
| 4514 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4515 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4516 | |
| 4517 | properties := pProperties[0:count] |
| 4518 | for i in (0 .. count) { |
| 4519 | property := ? |
| 4520 | properties[i] = property |
| 4521 | } |
| 4522 | |
| 4523 | return ? |
| 4524 | } |
| 4525 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4526 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4527 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4528 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4529 | VkExtensionProperties* pProperties) { |
| 4530 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4531 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4532 | |
| 4533 | properties := pProperties[0:count] |
| 4534 | for i in (0 .. count) { |
| 4535 | property := ? |
| 4536 | properties[i] = property |
| 4537 | } |
| 4538 | |
| 4539 | return ? |
| 4540 | } |
| 4541 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4542 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4543 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4544 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4545 | VkLayerProperties* pProperties) { |
| 4546 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4547 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4548 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4549 | |
| 4550 | properties := pProperties[0:count] |
| 4551 | for i in (0 .. count) { |
| 4552 | property := ? |
| 4553 | properties[i] = property |
| 4554 | } |
| 4555 | |
| 4556 | return ? |
| 4557 | } |
| 4558 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4559 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4560 | VkPhysicalDevice physicalDevice, |
| 4561 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4562 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4563 | VkExtensionProperties* pProperties) { |
| 4564 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 4565 | |
| 4566 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4567 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4568 | |
| 4569 | properties := pProperties[0:count] |
| 4570 | for i in (0 .. count) { |
| 4571 | property := ? |
| 4572 | properties[i] = property |
| 4573 | } |
| 4574 | |
| 4575 | return ? |
| 4576 | } |
| 4577 | |
| 4578 | |
| 4579 | // Queue functions |
| 4580 | |
| 4581 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4582 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4583 | VkDevice device, |
| 4584 | u32 queueFamilyIndex, |
| 4585 | u32 queueIndex, |
| 4586 | VkQueue* pQueue) { |
| 4587 | deviceObject := GetDevice(device) |
| 4588 | |
| 4589 | queue := ? |
| 4590 | pQueue[0] = queue |
| 4591 | |
| 4592 | if !(queue in State.Queues) { |
| 4593 | State.Queues[queue] = new!QueueObject(device: device) |
| 4594 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4595 | } |
| 4596 | |
| 4597 | @threadSafety("app") |
| 4598 | cmd VkResult vkQueueSubmit( |
| 4599 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4600 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4601 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4602 | VkFence fence) { |
| 4603 | queueObject := GetQueue(queue) |
| 4604 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4605 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4606 | fenceObject := GetFence(fence) |
| 4607 | assert(fenceObject.device == queueObject.device) |
| 4608 | } |
| 4609 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4610 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 4611 | // for i in (0 .. commandBufferCount) { |
| 4612 | // commandBuffer := commandBuffers[i] |
| 4613 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4614 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4615 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4616 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 4617 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 4618 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4619 | |
| 4620 | return ? |
| 4621 | } |
| 4622 | |
| 4623 | @threadSafety("system") |
| 4624 | cmd VkResult vkQueueWaitIdle( |
| 4625 | VkQueue queue) { |
| 4626 | queueObject := GetQueue(queue) |
| 4627 | |
| 4628 | return ? |
| 4629 | } |
| 4630 | |
| 4631 | @threadSafety("system") |
| 4632 | cmd VkResult vkDeviceWaitIdle( |
| 4633 | VkDevice device) { |
| 4634 | deviceObject := GetDevice(device) |
| 4635 | |
| 4636 | return ? |
| 4637 | } |
| 4638 | |
| 4639 | |
| 4640 | // Memory functions |
| 4641 | |
| 4642 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4643 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4644 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4645 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 4646 | const VkAllocationCallbacks* pAllocator, |
| 4647 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4648 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4649 | deviceObject := GetDevice(device) |
| 4650 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4651 | memory := ? |
| 4652 | pMemory[0] = memory |
| 4653 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4654 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4655 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4656 | |
| 4657 | return ? |
| 4658 | } |
| 4659 | |
| 4660 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4661 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4662 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4663 | VkDeviceMemory memory, |
| 4664 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4665 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4666 | memoryObject := GetDeviceMemory(memory) |
| 4667 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4668 | |
| 4669 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4670 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4671 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4672 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 4673 | "vkFreeMemory: commandBuffers still bound") |
| 4674 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4675 | } |
| 4676 | |
| 4677 | @threadSafety("app") |
| 4678 | cmd VkResult vkMapMemory( |
| 4679 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4680 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4681 | VkDeviceSize offset, |
| 4682 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4683 | VkMemoryMapFlags flags, |
| 4684 | void** ppData) { |
| 4685 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4686 | memoryObject := GetDeviceMemory(memory) |
| 4687 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4688 | |
| 4689 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4690 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4691 | |
| 4692 | return ? |
| 4693 | } |
| 4694 | |
| 4695 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4696 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4697 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4698 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4699 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4700 | memoryObject := GetDeviceMemory(memory) |
| 4701 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4702 | } |
| 4703 | |
| 4704 | cmd VkResult vkFlushMappedMemoryRanges( |
| 4705 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4706 | u32 memoryRangeCount |
| 4707 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4708 | deviceObject := GetDevice(device) |
| 4709 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4710 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4711 | for i in (0 .. memoryRangeCount) { |
| 4712 | memoryRange := memoryRanges[i] |
| 4713 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4714 | assert(memoryObject.device == device) |
| 4715 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4716 | } |
| 4717 | |
| 4718 | return ? |
| 4719 | } |
| 4720 | |
| 4721 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 4722 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4723 | u32 memoryRangeCount, |
| 4724 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4725 | deviceObject := GetDevice(device) |
| 4726 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4727 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 4728 | for i in (0 .. memoryRangeCount) { |
| 4729 | memoryRange := memoryRanges[i] |
| 4730 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 4731 | assert(memoryObject.device == device) |
| 4732 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4733 | } |
| 4734 | |
| 4735 | return ? |
| 4736 | } |
| 4737 | |
| 4738 | |
| 4739 | // Memory management API functions |
| 4740 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4741 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4742 | VkDevice device, |
| 4743 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4744 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4745 | deviceObject := GetDevice(device) |
| 4746 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4747 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4748 | memoryObject := GetDeviceMemory(memory) |
| 4749 | assert(memoryObject.device == device) |
| 4750 | } |
| 4751 | |
| 4752 | committedMemoryInBytes := ? |
| 4753 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4754 | } |
| 4755 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4756 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4757 | VkDevice device, |
| 4758 | VkBuffer buffer, |
| 4759 | VkMemoryRequirements* pMemoryRequirements) { |
| 4760 | deviceObject := GetDevice(device) |
| 4761 | bufferObject := GetBuffer(buffer) |
| 4762 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4763 | } |
| 4764 | |
| 4765 | cmd VkResult vkBindBufferMemory( |
| 4766 | VkDevice device, |
| 4767 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4768 | VkDeviceMemory memory, |
| 4769 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4770 | deviceObject := GetDevice(device) |
| 4771 | bufferObject := GetBuffer(buffer) |
| 4772 | assert(bufferObject.device == device) |
| 4773 | |
| 4774 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4775 | if bufferObject.memory != NULL_HANDLE { |
| 4776 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 4777 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4778 | } |
| 4779 | |
| 4780 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4781 | if memory != NULL_HANDLE { |
| 4782 | memoryObject := GetDeviceMemory(memory) |
| 4783 | assert(memoryObject.device == device) |
| 4784 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4786 | bufferObject.memory = memory |
| 4787 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4788 | |
| 4789 | return ? |
| 4790 | } |
| 4791 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4792 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4793 | VkDevice device, |
| 4794 | VkImage image, |
| 4795 | VkMemoryRequirements* pMemoryRequirements) { |
| 4796 | deviceObject := GetDevice(device) |
| 4797 | imageObject := GetImage(image) |
| 4798 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4799 | } |
| 4800 | |
| 4801 | cmd VkResult vkBindImageMemory( |
| 4802 | VkDevice device, |
| 4803 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4804 | VkDeviceMemory memory, |
| 4805 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4806 | deviceObject := GetDevice(device) |
| 4807 | imageObject := GetImage(image) |
| 4808 | assert(imageObject.device == device) |
| 4809 | |
| 4810 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4811 | if imageObject.memory != NULL_HANDLE { |
| 4812 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 4813 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4814 | } |
| 4815 | |
| 4816 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4817 | if memory != NULL_HANDLE { |
| 4818 | memoryObject := GetDeviceMemory(memory) |
| 4819 | assert(memoryObject.device == device) |
| 4820 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4821 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4822 | imageObject.memory = memory |
| 4823 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4824 | |
| 4825 | return ? |
| 4826 | } |
| 4827 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4828 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4829 | VkDevice device, |
| 4830 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4831 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4832 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 4833 | deviceObject := GetDevice(device) |
| 4834 | imageObject := GetImage(image) |
| 4835 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4836 | } |
| 4837 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4838 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4839 | VkPhysicalDevice physicalDevice, |
| 4840 | VkFormat format, |
| 4841 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 4842 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4843 | VkImageUsageFlags usage, |
| 4844 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4845 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4846 | VkSparseImageFormatProperties* pProperties) { |
| 4847 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4848 | } |
| 4849 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4850 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4851 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4852 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4853 | const VkBindSparseInfo* pBindInfo, |
| 4854 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4855 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4856 | |
| 4857 | return ? |
| 4858 | } |
| 4859 | |
| 4860 | |
| 4861 | // Fence functions |
| 4862 | |
| 4863 | @threadSafety("system") |
| 4864 | cmd VkResult vkCreateFence( |
| 4865 | VkDevice device, |
| 4866 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4867 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | VkFence* pFence) { |
| 4869 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 4870 | deviceObject := GetDevice(device) |
| 4871 | |
| 4872 | fence := ? |
| 4873 | pFence[0] = fence |
| 4874 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4875 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4876 | |
| 4877 | return ? |
| 4878 | } |
| 4879 | |
| 4880 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4881 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4882 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4883 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4884 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4885 | deviceObject := GetDevice(device) |
| 4886 | fenceObject := GetFence(fence) |
| 4887 | assert(fenceObject.device == device) |
| 4888 | |
| 4889 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4890 | } |
| 4891 | |
| 4892 | @threadSafety("system") |
| 4893 | cmd VkResult vkResetFences( |
| 4894 | VkDevice device, |
| 4895 | u32 fenceCount, |
| 4896 | const VkFence* pFences) { |
| 4897 | deviceObject := GetDevice(device) |
| 4898 | |
| 4899 | fences := pFences[0:fenceCount] |
| 4900 | for i in (0 .. fenceCount) { |
| 4901 | fence := fences[i] |
| 4902 | fenceObject := GetFence(fence) |
| 4903 | assert(fenceObject.device == device) |
| 4904 | fenceObject.signaled = false |
| 4905 | } |
| 4906 | |
| 4907 | return ? |
| 4908 | } |
| 4909 | |
| 4910 | @threadSafety("system") |
| 4911 | cmd VkResult vkGetFenceStatus( |
| 4912 | VkDevice device, |
| 4913 | VkFence fence) { |
| 4914 | deviceObject := GetDevice(device) |
| 4915 | fenceObject := GetFence(fence) |
| 4916 | assert(fenceObject.device == device) |
| 4917 | |
| 4918 | return ? |
| 4919 | } |
| 4920 | |
| 4921 | @threadSafety("system") |
| 4922 | cmd VkResult vkWaitForFences( |
| 4923 | VkDevice device, |
| 4924 | u32 fenceCount, |
| 4925 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4926 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4927 | u64 timeout) { /// timeout in nanoseconds |
| 4928 | deviceObject := GetDevice(device) |
| 4929 | |
| 4930 | fences := pFences[0:fenceCount] |
| 4931 | for i in (0 .. fenceCount) { |
| 4932 | fence := fences[i] |
| 4933 | fenceObject := GetFence(fence) |
| 4934 | assert(fenceObject.device == device) |
| 4935 | } |
| 4936 | |
| 4937 | return ? |
| 4938 | } |
| 4939 | |
| 4940 | |
| 4941 | // Queue semaphore functions |
| 4942 | |
| 4943 | @threadSafety("system") |
| 4944 | cmd VkResult vkCreateSemaphore( |
| 4945 | VkDevice device, |
| 4946 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4947 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4948 | VkSemaphore* pSemaphore) { |
| 4949 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 4950 | deviceObject := GetDevice(device) |
| 4951 | |
| 4952 | semaphore := ? |
| 4953 | pSemaphore[0] = semaphore |
| 4954 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 4955 | |
| 4956 | return ? |
| 4957 | } |
| 4958 | |
| 4959 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4960 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4961 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4962 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4963 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4964 | deviceObject := GetDevice(device) |
| 4965 | semaphoreObject := GetSemaphore(semaphore) |
| 4966 | assert(semaphoreObject.device == device) |
| 4967 | |
| 4968 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4969 | } |
| 4970 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | |
| 4972 | // Event functions |
| 4973 | |
| 4974 | @threadSafety("system") |
| 4975 | cmd VkResult vkCreateEvent( |
| 4976 | VkDevice device, |
| 4977 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4978 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4979 | VkEvent* pEvent) { |
| 4980 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 4981 | deviceObject := GetDevice(device) |
| 4982 | |
| 4983 | event := ? |
| 4984 | pEvent[0] = event |
| 4985 | State.Events[event] = new!EventObject(device: device) |
| 4986 | |
| 4987 | return ? |
| 4988 | } |
| 4989 | |
| 4990 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4991 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4992 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4993 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4994 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4995 | deviceObject := GetDevice(device) |
| 4996 | eventObject := GetEvent(event) |
| 4997 | assert(eventObject.device == device) |
| 4998 | |
| 4999 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5000 | } |
| 5001 | |
| 5002 | @threadSafety("system") |
| 5003 | cmd VkResult vkGetEventStatus( |
| 5004 | VkDevice device, |
| 5005 | VkEvent event) { |
| 5006 | deviceObject := GetDevice(device) |
| 5007 | eventObject := GetEvent(event) |
| 5008 | assert(eventObject.device == device) |
| 5009 | |
| 5010 | return ? |
| 5011 | } |
| 5012 | |
| 5013 | @threadSafety("system") |
| 5014 | cmd VkResult vkSetEvent( |
| 5015 | VkDevice device, |
| 5016 | VkEvent event) { |
| 5017 | deviceObject := GetDevice(device) |
| 5018 | eventObject := GetEvent(event) |
| 5019 | assert(eventObject.device == device) |
| 5020 | |
| 5021 | return ? |
| 5022 | } |
| 5023 | |
| 5024 | @threadSafety("system") |
| 5025 | cmd VkResult vkResetEvent( |
| 5026 | VkDevice device, |
| 5027 | VkEvent event) { |
| 5028 | deviceObject := GetDevice(device) |
| 5029 | eventObject := GetEvent(event) |
| 5030 | assert(eventObject.device == device) |
| 5031 | |
| 5032 | return ? |
| 5033 | } |
| 5034 | |
| 5035 | |
| 5036 | // Query functions |
| 5037 | |
| 5038 | @threadSafety("system") |
| 5039 | cmd VkResult vkCreateQueryPool( |
| 5040 | VkDevice device, |
| 5041 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5042 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5043 | VkQueryPool* pQueryPool) { |
| 5044 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 5045 | deviceObject := GetDevice(device) |
| 5046 | |
| 5047 | queryPool := ? |
| 5048 | pQueryPool[0] = queryPool |
| 5049 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 5050 | |
| 5051 | return ? |
| 5052 | } |
| 5053 | |
| 5054 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5055 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5056 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5057 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5058 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5059 | deviceObject := GetDevice(device) |
| 5060 | queryPoolObject := GetQueryPool(queryPool) |
| 5061 | assert(queryPoolObject.device == device) |
| 5062 | |
| 5063 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5064 | } |
| 5065 | |
| 5066 | @threadSafety("system") |
| 5067 | cmd VkResult vkGetQueryPoolResults( |
| 5068 | VkDevice device, |
| 5069 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5070 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5071 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5072 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5073 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5074 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5075 | VkQueryResultFlags flags) { |
| 5076 | deviceObject := GetDevice(device) |
| 5077 | queryPoolObject := GetQueryPool(queryPool) |
| 5078 | assert(queryPoolObject.device == device) |
| 5079 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5080 | data := pData[0:dataSize] |
| 5081 | |
| 5082 | return ? |
| 5083 | } |
| 5084 | |
| 5085 | // Buffer functions |
| 5086 | |
| 5087 | @threadSafety("system") |
| 5088 | cmd VkResult vkCreateBuffer( |
| 5089 | VkDevice device, |
| 5090 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5091 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5092 | VkBuffer* pBuffer) { |
| 5093 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 5094 | deviceObject := GetDevice(device) |
| 5095 | |
| 5096 | buffer := ? |
| 5097 | pBuffer[0] = buffer |
| 5098 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 5099 | |
| 5100 | return ? |
| 5101 | } |
| 5102 | |
| 5103 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5104 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5105 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5106 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5107 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5108 | deviceObject := GetDevice(device) |
| 5109 | bufferObject := GetBuffer(buffer) |
| 5110 | assert(bufferObject.device == device) |
| 5111 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5112 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5113 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5114 | } |
| 5115 | |
| 5116 | |
| 5117 | // Buffer view functions |
| 5118 | |
| 5119 | @threadSafety("system") |
| 5120 | cmd VkResult vkCreateBufferView( |
| 5121 | VkDevice device, |
| 5122 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5123 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5124 | VkBufferView* pView) { |
| 5125 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 5126 | deviceObject := GetDevice(device) |
| 5127 | |
| 5128 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 5129 | assert(bufferObject.device == device) |
| 5130 | |
| 5131 | view := ? |
| 5132 | pView[0] = view |
| 5133 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 5134 | |
| 5135 | return ? |
| 5136 | } |
| 5137 | |
| 5138 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5139 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5140 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5141 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5142 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5143 | deviceObject := GetDevice(device) |
| 5144 | bufferViewObject := GetBufferView(bufferView) |
| 5145 | assert(bufferViewObject.device == device) |
| 5146 | |
| 5147 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5148 | } |
| 5149 | |
| 5150 | |
| 5151 | // Image functions |
| 5152 | |
| 5153 | @threadSafety("system") |
| 5154 | cmd VkResult vkCreateImage( |
| 5155 | VkDevice device, |
| 5156 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5157 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5158 | VkImage* pImage) { |
| 5159 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 5160 | deviceObject := GetDevice(device) |
| 5161 | |
| 5162 | image := ? |
| 5163 | pImage[0] = image |
| 5164 | State.Images[image] = new!ImageObject(device: device) |
| 5165 | |
| 5166 | return ? |
| 5167 | } |
| 5168 | |
| 5169 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5170 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5171 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5172 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5173 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5174 | deviceObject := GetDevice(device) |
| 5175 | imageObject := GetImage(image) |
| 5176 | assert(imageObject.device == device) |
| 5177 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5178 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5179 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5180 | } |
| 5181 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5182 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5183 | VkDevice device, |
| 5184 | VkImage image, |
| 5185 | const VkImageSubresource* pSubresource, |
| 5186 | VkSubresourceLayout* pLayout) { |
| 5187 | deviceObject := GetDevice(device) |
| 5188 | imageObject := GetImage(image) |
| 5189 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5190 | } |
| 5191 | |
| 5192 | |
| 5193 | // Image view functions |
| 5194 | |
| 5195 | @threadSafety("system") |
| 5196 | cmd VkResult vkCreateImageView( |
| 5197 | VkDevice device, |
| 5198 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5199 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5200 | VkImageView* pView) { |
| 5201 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 5202 | deviceObject := GetDevice(device) |
| 5203 | |
| 5204 | imageObject := GetImage(pCreateInfo.image) |
| 5205 | assert(imageObject.device == device) |
| 5206 | |
| 5207 | view := ? |
| 5208 | pView[0] = view |
| 5209 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 5210 | |
| 5211 | return ? |
| 5212 | } |
| 5213 | |
| 5214 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5215 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5216 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5217 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5218 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5219 | deviceObject := GetDevice(device) |
| 5220 | imageViewObject := GetImageView(imageView) |
| 5221 | assert(imageViewObject.device == device) |
| 5222 | |
| 5223 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5224 | } |
| 5225 | |
| 5226 | |
| 5227 | // Shader functions |
| 5228 | |
| 5229 | cmd VkResult vkCreateShaderModule( |
| 5230 | VkDevice device, |
| 5231 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5232 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5233 | VkShaderModule* pShaderModule) { |
| 5234 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 5235 | deviceObject := GetDevice(device) |
| 5236 | |
| 5237 | shaderModule := ? |
| 5238 | pShaderModule[0] = shaderModule |
| 5239 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 5240 | |
| 5241 | return ? |
| 5242 | } |
| 5243 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5244 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5245 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5246 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5247 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5248 | deviceObject := GetDevice(device) |
| 5249 | shaderModuleObject := GetShaderModule(shaderModule) |
| 5250 | assert(shaderModuleObject.device == device) |
| 5251 | |
| 5252 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5253 | } |
| 5254 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5255 | |
| 5256 | // Pipeline functions |
| 5257 | |
| 5258 | cmd VkResult vkCreatePipelineCache( |
| 5259 | VkDevice device, |
| 5260 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5261 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5262 | VkPipelineCache* pPipelineCache) { |
| 5263 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 5264 | deviceObject := GetDevice(device) |
| 5265 | |
| 5266 | pipelineCache := ? |
| 5267 | pPipelineCache[0] = pipelineCache |
| 5268 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 5269 | |
| 5270 | return ? |
| 5271 | } |
| 5272 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5273 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5274 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5275 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5276 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5277 | deviceObject := GetDevice(device) |
| 5278 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5279 | assert(pipelineCacheObject.device == device) |
| 5280 | |
| 5281 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5282 | } |
| 5283 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5284 | cmd VkResult vkGetPipelineCacheData( |
| 5285 | VkDevice device, |
| 5286 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5287 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5288 | void* pData) { |
| 5289 | deviceObject := GetDevice(device) |
| 5290 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5291 | assert(pipelineCacheObject.device == device) |
| 5292 | |
| 5293 | return ? |
| 5294 | } |
| 5295 | |
| 5296 | cmd VkResult vkMergePipelineCaches( |
| 5297 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5298 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5299 | u32 srcCacheCount, |
| 5300 | const VkPipelineCache* pSrcCaches) { |
| 5301 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5302 | dstCacheObject := GetPipelineCache(dstCache) |
| 5303 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5304 | |
| 5305 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 5306 | for i in (0 .. srcCacheCount) { |
| 5307 | srcCache := srcCaches[i] |
| 5308 | srcCacheObject := GetPipelineCache(srcCache) |
| 5309 | assert(srcCacheObject.device == device) |
| 5310 | } |
| 5311 | |
| 5312 | return ? |
| 5313 | } |
| 5314 | |
| 5315 | cmd VkResult vkCreateGraphicsPipelines( |
| 5316 | VkDevice device, |
| 5317 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5318 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5319 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5320 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5321 | VkPipeline* pPipelines) { |
| 5322 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5323 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5324 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5325 | assert(pipelineCacheObject.device == device) |
| 5326 | } |
| 5327 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5328 | createInfos := pCreateInfos[0:createInfoCount] |
| 5329 | pipelines := pPipelines[0:createInfoCount] |
| 5330 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5331 | pipeline := ? |
| 5332 | pipelines[i] = pipeline |
| 5333 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5334 | } |
| 5335 | |
| 5336 | return ? |
| 5337 | } |
| 5338 | |
| 5339 | cmd VkResult vkCreateComputePipelines( |
| 5340 | VkDevice device, |
| 5341 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5342 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5343 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5344 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5345 | VkPipeline* pPipelines) { |
| 5346 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5347 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5348 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 5349 | assert(pipelineCacheObject.device == device) |
| 5350 | } |
| 5351 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5352 | createInfos := pCreateInfos[0:createInfoCount] |
| 5353 | pipelines := pPipelines[0:createInfoCount] |
| 5354 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5355 | pipeline := ? |
| 5356 | pipelines[i] = pipeline |
| 5357 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 5358 | } |
| 5359 | |
| 5360 | return ? |
| 5361 | } |
| 5362 | |
| 5363 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5364 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5365 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5366 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5367 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5368 | deviceObject := GetDevice(device) |
| 5369 | pipelineObjects := GetPipeline(pipeline) |
| 5370 | assert(pipelineObjects.device == device) |
| 5371 | |
| 5372 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5373 | } |
| 5374 | |
| 5375 | |
| 5376 | // Pipeline layout functions |
| 5377 | |
| 5378 | @threadSafety("system") |
| 5379 | cmd VkResult vkCreatePipelineLayout( |
| 5380 | VkDevice device, |
| 5381 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5382 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5383 | VkPipelineLayout* pPipelineLayout) { |
| 5384 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 5385 | deviceObject := GetDevice(device) |
| 5386 | |
| 5387 | pipelineLayout := ? |
| 5388 | pPipelineLayout[0] = pipelineLayout |
| 5389 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 5390 | |
| 5391 | return ? |
| 5392 | } |
| 5393 | |
| 5394 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5395 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5396 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5397 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5398 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5399 | deviceObject := GetDevice(device) |
| 5400 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 5401 | assert(pipelineLayoutObjects.device == device) |
| 5402 | |
| 5403 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5404 | } |
| 5405 | |
| 5406 | |
| 5407 | // Sampler functions |
| 5408 | |
| 5409 | @threadSafety("system") |
| 5410 | cmd VkResult vkCreateSampler( |
| 5411 | VkDevice device, |
| 5412 | const VkSamplerCreateInfo* pCreateInfo, |
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 | VkSampler* pSampler) { |
| 5415 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 5416 | deviceObject := GetDevice(device) |
| 5417 | |
| 5418 | sampler := ? |
| 5419 | pSampler[0] = sampler |
| 5420 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 5421 | |
| 5422 | return ? |
| 5423 | } |
| 5424 | |
| 5425 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5426 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5427 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5428 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5429 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5430 | deviceObject := GetDevice(device) |
| 5431 | samplerObject := GetSampler(sampler) |
| 5432 | assert(samplerObject.device == device) |
| 5433 | |
| 5434 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5435 | } |
| 5436 | |
| 5437 | |
| 5438 | // Descriptor set functions |
| 5439 | |
| 5440 | @threadSafety("system") |
| 5441 | cmd VkResult vkCreateDescriptorSetLayout( |
| 5442 | VkDevice device, |
| 5443 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5444 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5445 | VkDescriptorSetLayout* pSetLayout) { |
| 5446 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 5447 | deviceObject := GetDevice(device) |
| 5448 | |
| 5449 | setLayout := ? |
| 5450 | pSetLayout[0] = setLayout |
| 5451 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 5452 | |
| 5453 | return ? |
| 5454 | } |
| 5455 | |
| 5456 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5457 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5458 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5459 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5460 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5461 | deviceObject := GetDevice(device) |
| 5462 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 5463 | assert(descriptorSetLayoutObject.device == device) |
| 5464 | |
| 5465 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5466 | } |
| 5467 | |
| 5468 | @threadSafety("system") |
| 5469 | cmd VkResult vkCreateDescriptorPool( |
| 5470 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5471 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5472 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5473 | VkDescriptorPool* pDescriptorPool) { |
| 5474 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 5475 | deviceObject := GetDevice(device) |
| 5476 | |
| 5477 | descriptorPool := ? |
| 5478 | pDescriptorPool[0] = descriptorPool |
| 5479 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 5480 | |
| 5481 | return ? |
| 5482 | } |
| 5483 | |
| 5484 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5485 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5486 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5487 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5488 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5489 | deviceObject := GetDevice(device) |
| 5490 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5491 | assert(descriptorPoolObject.device == device) |
| 5492 | |
| 5493 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5494 | } |
| 5495 | |
| 5496 | @threadSafety("app") |
| 5497 | cmd VkResult vkResetDescriptorPool( |
| 5498 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5499 | VkDescriptorPool descriptorPool, |
| 5500 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5501 | deviceObject := GetDevice(device) |
| 5502 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5503 | assert(descriptorPoolObject.device == device) |
| 5504 | |
| 5505 | return ? |
| 5506 | } |
| 5507 | |
| 5508 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5509 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5510 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5511 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5512 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5513 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5514 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5515 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5516 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5517 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 5518 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5519 | setLayout := setLayouts[i] |
| 5520 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 5521 | assert(setLayoutObject.device == device) |
| 5522 | } |
| 5523 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5524 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 5525 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5526 | descriptorSet := ? |
| 5527 | descriptorSets[i] = descriptorSet |
| 5528 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 5529 | } |
| 5530 | |
| 5531 | return ? |
| 5532 | } |
| 5533 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5534 | cmd VkResult vkFreeDescriptorSets( |
| 5535 | VkDevice device, |
| 5536 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5537 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5538 | const VkDescriptorSet* pDescriptorSets) { |
| 5539 | deviceObject := GetDevice(device) |
| 5540 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 5541 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5542 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5543 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5544 | descriptorSet := descriptorSets[i] |
| 5545 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 5546 | assert(descriptorSetObject.device == device) |
| 5547 | State.DescriptorSets[descriptorSet] = null |
| 5548 | } |
| 5549 | |
| 5550 | return ? |
| 5551 | } |
| 5552 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5553 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5554 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5555 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5556 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5557 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5558 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 5559 | deviceObject := GetDevice(device) |
| 5560 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5561 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 5562 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5563 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5564 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5565 | assert(descriptorWriteObject.device == device) |
| 5566 | } |
| 5567 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5568 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 5569 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5570 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5571 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5572 | assert(descriptorCopyObject.device == device) |
| 5573 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5574 | } |
| 5575 | |
| 5576 | |
| 5577 | // Framebuffer functions |
| 5578 | |
| 5579 | @threadSafety("system") |
| 5580 | cmd VkResult vkCreateFramebuffer( |
| 5581 | VkDevice device, |
| 5582 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5583 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5584 | VkFramebuffer* pFramebuffer) { |
| 5585 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 5586 | deviceObject := GetDevice(device) |
| 5587 | |
| 5588 | framebuffer := ? |
| 5589 | pFramebuffer[0] = framebuffer |
| 5590 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 5591 | |
| 5592 | return ? |
| 5593 | } |
| 5594 | |
| 5595 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5596 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5597 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5598 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5599 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5600 | deviceObject := GetDevice(device) |
| 5601 | framebufferObject := GetFramebuffer(framebuffer) |
| 5602 | assert(framebufferObject.device == device) |
| 5603 | |
| 5604 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5605 | } |
| 5606 | |
| 5607 | |
| 5608 | // Renderpass functions |
| 5609 | |
| 5610 | @threadSafety("system") |
| 5611 | cmd VkResult vkCreateRenderPass( |
| 5612 | VkDevice device, |
| 5613 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5614 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5615 | VkRenderPass* pRenderPass) { |
| 5616 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 5617 | deviceObject := GetDevice(device) |
| 5618 | |
| 5619 | renderpass := ? |
| 5620 | pRenderPass[0] = renderpass |
| 5621 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 5622 | |
| 5623 | return ? |
| 5624 | } |
| 5625 | |
| 5626 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5627 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5628 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5629 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5630 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5631 | deviceObject := GetDevice(device) |
| 5632 | renderPassObject := GetRenderPass(renderPass) |
| 5633 | assert(renderPassObject.device == device) |
| 5634 | |
| 5635 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5636 | } |
| 5637 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 5638 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5639 | VkDevice device, |
| 5640 | VkRenderPass renderPass, |
| 5641 | VkExtent2D* pGranularity) { |
| 5642 | deviceObject := GetDevice(device) |
| 5643 | renderPassObject := GetRenderPass(renderPass) |
| 5644 | |
| 5645 | granularity := ? |
| 5646 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5647 | } |
| 5648 | |
| 5649 | // Command pool functions |
| 5650 | |
| 5651 | cmd VkResult vkCreateCommandPool( |
| 5652 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5653 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 5654 | const VkAllocationCallbacks* pAllocator, |
| 5655 | VkCommandPool* pCommandPool) { |
| 5656 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5657 | deviceObject := GetDevice(device) |
| 5658 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5659 | commandPool := ? |
| 5660 | pCommandPool[0] = commandPool |
| 5661 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5662 | |
| 5663 | return ? |
| 5664 | } |
| 5665 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5666 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5667 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5668 | VkCommandPool commandPool, |
| 5669 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5670 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5671 | commandPoolObject := GetCommandPool(commandPool) |
| 5672 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5673 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5674 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5675 | } |
| 5676 | |
| 5677 | cmd VkResult vkResetCommandPool( |
| 5678 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5679 | VkCommandPool commandPool, |
| 5680 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5681 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5682 | commandPoolObject := GetCommandPool(commandPool) |
| 5683 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5684 | |
| 5685 | return ? |
| 5686 | } |
| 5687 | |
| 5688 | // Command buffer functions |
| 5689 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5690 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5691 | memoryObject := GetDeviceMemory(memory) |
| 5692 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5693 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5694 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5695 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5696 | } |
| 5697 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5698 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 5699 | memoryObject := GetDeviceMemory(memory) |
| 5700 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5701 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5702 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5703 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5704 | } |
| 5705 | |
| 5706 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5707 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5708 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5709 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 5710 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5711 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5712 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5713 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5714 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5715 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5716 | commandBuffer := ? |
| 5717 | commandBuffers[i] = commandBuffer |
| 5718 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5719 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5720 | |
| 5721 | return ? |
| 5722 | } |
| 5723 | |
| 5724 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5725 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5726 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5727 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5728 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5729 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5730 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5731 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5732 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5733 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5734 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 5735 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5736 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5737 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 5738 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5739 | } |
| 5740 | |
| 5741 | @threadSafety("app") |
| 5742 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5743 | VkCommandBuffer commandBuffer, |
| 5744 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 5745 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 5746 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5747 | |
| 5748 | // TODO: iterate over boundObjects and clear memory bindings |
| 5749 | |
| 5750 | return ? |
| 5751 | } |
| 5752 | |
| 5753 | @threadSafety("app") |
| 5754 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5755 | VkCommandBuffer commandBuffer) { |
| 5756 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5757 | |
| 5758 | return ? |
| 5759 | } |
| 5760 | |
| 5761 | @threadSafety("app") |
| 5762 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5763 | VkCommandBuffer commandBuffer, |
| 5764 | VkCommandBufferResetFlags flags) { |
| 5765 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5766 | |
| 5767 | // TODO: iterate over boundObjects and clear memory bindings |
| 5768 | |
| 5769 | return ? |
| 5770 | } |
| 5771 | |
| 5772 | |
| 5773 | // Command buffer building functions |
| 5774 | |
| 5775 | @threadSafety("app") |
| 5776 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5777 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5778 | VkPipelineBindPoint pipelineBindPoint, |
| 5779 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5780 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5781 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5782 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5783 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5784 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5785 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5786 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5787 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5788 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5789 | } |
| 5790 | |
| 5791 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5792 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5793 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5794 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5795 | u32 viewportCount, |
| 5796 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5797 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5798 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5799 | } |
| 5800 | |
| 5801 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5802 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5803 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5804 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5805 | u32 scissorCount, |
| 5806 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5807 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5808 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5809 | } |
| 5810 | |
| 5811 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5812 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5813 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5814 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5815 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5816 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5817 | } |
| 5818 | |
| 5819 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5820 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5821 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5822 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5823 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5824 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5825 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5826 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5827 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5828 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5829 | @threadSafety("app") |
| 5830 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5831 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5832 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 5833 | // an annotation as a quick hack to pass this to the template without |
| 5834 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5835 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5836 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5837 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5838 | } |
| 5839 | |
| 5840 | @threadSafety("app") |
| 5841 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5842 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5843 | f32 minDepthBounds, |
| 5844 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5845 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5846 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5847 | } |
| 5848 | |
| 5849 | @threadSafety("app") |
| 5850 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5851 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5852 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5853 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5854 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5855 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5856 | } |
| 5857 | |
| 5858 | @threadSafety("app") |
| 5859 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5860 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5861 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5862 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5863 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5864 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5865 | } |
| 5866 | |
| 5867 | @threadSafety("app") |
| 5868 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5869 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5870 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5871 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5872 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5873 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5874 | } |
| 5875 | |
| 5876 | @threadSafety("app") |
| 5877 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5878 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5879 | VkPipelineBindPoint pipelineBindPoint, |
| 5880 | VkPipelineLayout layout, |
| 5881 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5882 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5883 | const VkDescriptorSet* pDescriptorSets, |
| 5884 | u32 dynamicOffsetCount, |
| 5885 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5886 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5887 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5888 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 5889 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5890 | descriptorSet := descriptorSets[i] |
| 5891 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5892 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5893 | } |
| 5894 | |
| 5895 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 5896 | for i in (0 .. dynamicOffsetCount) { |
| 5897 | dynamicOffset := dynamicOffsets[i] |
| 5898 | } |
| 5899 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5900 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5901 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 5902 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 5903 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5904 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5905 | } |
| 5906 | |
| 5907 | @threadSafety("app") |
| 5908 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5909 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5910 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5911 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5912 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5913 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5914 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5915 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5916 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5917 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5918 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5919 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5920 | } |
| 5921 | |
| 5922 | @threadSafety("app") |
| 5923 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5924 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5925 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5926 | u32 bindingCount, |
| 5927 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5928 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5929 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5930 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5931 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5932 | buffers := pBuffers[0:bindingCount] |
| 5933 | offsets := pOffsets[0:bindingCount] |
| 5934 | for i in (0 .. bindingCount) { |
| 5935 | buffer := buffers[i] |
| 5936 | offset := offsets[i] |
| 5937 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5938 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5939 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5940 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5941 | } |
| 5942 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5943 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5944 | } |
| 5945 | |
| 5946 | @threadSafety("app") |
| 5947 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5948 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5949 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5950 | u32 instanceCount, |
| 5951 | u32 firstVertex, |
| 5952 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5953 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5954 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5955 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5956 | } |
| 5957 | |
| 5958 | @threadSafety("app") |
| 5959 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5960 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5961 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5962 | u32 instanceCount, |
| 5963 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5964 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5965 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5966 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5967 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5968 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5969 | } |
| 5970 | |
| 5971 | @threadSafety("app") |
| 5972 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5973 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5974 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5975 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5976 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5977 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5978 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5979 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5980 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5981 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5982 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5983 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5984 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5985 | } |
| 5986 | |
| 5987 | @threadSafety("app") |
| 5988 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5989 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5990 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5991 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5992 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5993 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5994 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5995 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5996 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5997 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5998 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5999 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6000 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6001 | } |
| 6002 | |
| 6003 | @threadSafety("app") |
| 6004 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6005 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6006 | u32 groupCountX, |
| 6007 | u32 groupCountY, |
| 6008 | u32 groupCountZ) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6009 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6010 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6011 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6012 | } |
| 6013 | |
| 6014 | @threadSafety("app") |
| 6015 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6016 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6017 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6018 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6019 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6020 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6021 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6022 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6023 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6024 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6025 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6026 | } |
| 6027 | |
| 6028 | @threadSafety("app") |
| 6029 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6030 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6031 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6032 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6033 | u32 regionCount, |
| 6034 | const VkBufferCopy* pRegions) { |
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 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6037 | dstBufferObject := GetBuffer(dstBuffer) |
| 6038 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6039 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6040 | |
| 6041 | regions := pRegions[0:regionCount] |
| 6042 | for i in (0 .. regionCount) { |
| 6043 | region := regions[i] |
| 6044 | } |
| 6045 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6046 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6047 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6048 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6049 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6050 | } |
| 6051 | |
| 6052 | @threadSafety("app") |
| 6053 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6054 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6055 | VkImage srcImage, |
| 6056 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6057 | VkImage dstImage, |
| 6058 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6059 | u32 regionCount, |
| 6060 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6061 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6062 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6063 | dstImageObject := GetImage(dstImage) |
| 6064 | assert(commandBufferObject.device == srcImageObject.device) |
| 6065 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6066 | |
| 6067 | regions := pRegions[0:regionCount] |
| 6068 | for i in (0 .. regionCount) { |
| 6069 | region := regions[i] |
| 6070 | } |
| 6071 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6072 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6073 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6074 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6075 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6076 | } |
| 6077 | |
| 6078 | @threadSafety("app") |
| 6079 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6080 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6081 | VkImage srcImage, |
| 6082 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6083 | VkImage dstImage, |
| 6084 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6085 | u32 regionCount, |
| 6086 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 6087 | VkFilter filter) { |
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 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6090 | dstImageObject := GetImage(dstImage) |
| 6091 | assert(commandBufferObject.device == srcImageObject.device) |
| 6092 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6093 | |
| 6094 | regions := pRegions[0:regionCount] |
| 6095 | for i in (0 .. regionCount) { |
| 6096 | region := regions[i] |
| 6097 | } |
| 6098 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6099 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6100 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6101 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6102 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6103 | } |
| 6104 | |
| 6105 | @threadSafety("app") |
| 6106 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6107 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6108 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6109 | VkImage dstImage, |
| 6110 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6111 | u32 regionCount, |
| 6112 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6113 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6114 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6115 | dstImageObject := GetImage(dstImage) |
| 6116 | assert(commandBufferObject.device == srcBufferObject.device) |
| 6117 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6118 | |
| 6119 | regions := pRegions[0:regionCount] |
| 6120 | for i in (0 .. regionCount) { |
| 6121 | region := regions[i] |
| 6122 | } |
| 6123 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6124 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 6125 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6126 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6127 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6128 | } |
| 6129 | |
| 6130 | @threadSafety("app") |
| 6131 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6132 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6133 | VkImage srcImage, |
| 6134 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6135 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6136 | u32 regionCount, |
| 6137 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6138 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6139 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6140 | dstBufferObject := GetBuffer(dstBuffer) |
| 6141 | assert(commandBufferObject.device == srcImageObject.device) |
| 6142 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6143 | |
| 6144 | regions := pRegions[0:regionCount] |
| 6145 | for i in (0 .. regionCount) { |
| 6146 | region := regions[i] |
| 6147 | } |
| 6148 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6149 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6150 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6151 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6152 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6153 | } |
| 6154 | |
| 6155 | @threadSafety("app") |
| 6156 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6157 | VkCommandBuffer commandBuffer, |
| 6158 | VkBuffer dstBuffer, |
| 6159 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6160 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 6161 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6162 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6163 | dstBufferObject := GetBuffer(dstBuffer) |
| 6164 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6165 | |
| 6166 | data := pData[0:dataSize] |
| 6167 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6168 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6169 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6170 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6171 | } |
| 6172 | |
| 6173 | @threadSafety("app") |
| 6174 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6175 | VkCommandBuffer commandBuffer, |
| 6176 | VkBuffer dstBuffer, |
| 6177 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6178 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6179 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6180 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 6181 | dstBufferObject := GetBuffer(dstBuffer) |
| 6182 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6183 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6184 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6185 | } |
| 6186 | |
| 6187 | @threadSafety("app") |
| 6188 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6189 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6190 | VkImage image, |
| 6191 | VkImageLayout imageLayout, |
| 6192 | const VkClearColorValue* pColor, |
| 6193 | u32 rangeCount, |
| 6194 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6195 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6196 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6197 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6198 | |
| 6199 | ranges := pRanges[0:rangeCount] |
| 6200 | for i in (0 .. rangeCount) { |
| 6201 | range := ranges[i] |
| 6202 | } |
| 6203 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6204 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6205 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6206 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6207 | } |
| 6208 | |
| 6209 | @threadSafety("app") |
| 6210 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6211 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6212 | VkImage image, |
| 6213 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 6214 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6215 | u32 rangeCount, |
| 6216 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6217 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6218 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6219 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6220 | |
| 6221 | ranges := pRanges[0:rangeCount] |
| 6222 | for i in (0 .. rangeCount) { |
| 6223 | range := ranges[i] |
| 6224 | } |
| 6225 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6226 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6227 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6228 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6229 | } |
| 6230 | |
| 6231 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6232 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6233 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 6234 | u32 attachmentCount, |
| 6235 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6236 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 6237 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6238 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6239 | |
| 6240 | rects := pRects[0:rectCount] |
| 6241 | for i in (0 .. rectCount) { |
| 6242 | rect := rects[i] |
| 6243 | } |
| 6244 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6245 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6246 | } |
| 6247 | |
| 6248 | @threadSafety("app") |
| 6249 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6250 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6251 | VkImage srcImage, |
| 6252 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6253 | VkImage dstImage, |
| 6254 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6255 | u32 regionCount, |
| 6256 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6257 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6258 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6259 | dstImageObject := GetImage(dstImage) |
| 6260 | assert(commandBufferObject.device == srcImageObject.device) |
| 6261 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6262 | |
| 6263 | regions := pRegions[0:regionCount] |
| 6264 | for i in (0 .. regionCount) { |
| 6265 | region := regions[i] |
| 6266 | } |
| 6267 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6268 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 6269 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6270 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6271 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6272 | } |
| 6273 | |
| 6274 | @threadSafety("app") |
| 6275 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6276 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6277 | VkEvent event, |
| 6278 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6279 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6280 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6281 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6282 | } |
| 6283 | |
| 6284 | @threadSafety("app") |
| 6285 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6286 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6287 | VkEvent event, |
| 6288 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6289 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6290 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6291 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6292 | } |
| 6293 | |
| 6294 | @threadSafety("app") |
| 6295 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6296 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6297 | u32 eventCount, |
| 6298 | const VkEvent* pEvents, |
| 6299 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6300 | VkPipelineStageFlags dstStageMask, |
| 6301 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6302 | const VkMemoryBarrier* pMemoryBarriers, |
| 6303 | u32 bufferMemoryBarrierCount, |
| 6304 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6305 | u32 imageMemoryBarrierCount, |
| 6306 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
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 | events := pEvents[0:eventCount] |
| 6310 | for i in (0 .. eventCount) { |
| 6311 | event := events[i] |
| 6312 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6313 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6314 | } |
| 6315 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6316 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6317 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6318 | memoryBarrier := memoryBarriers[i] |
| 6319 | } |
| 6320 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6321 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6322 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6323 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6324 | assert(bufferObject.device == commandBufferObject.device) |
| 6325 | } |
| 6326 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6327 | for i in (0 .. imageMemoryBarrierCount) { |
| 6328 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6329 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6330 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6331 | } |
| 6332 | } |
| 6333 | |
| 6334 | @threadSafety("app") |
| 6335 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6336 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6337 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6338 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 6339 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6340 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6341 | const VkMemoryBarrier* pMemoryBarriers, |
| 6342 | u32 bufferMemoryBarrierCount, |
| 6343 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 6344 | u32 imageMemoryBarrierCount, |
| 6345 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6346 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6347 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6348 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6349 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6350 | memoryBarrier := memoryBarriers[i] |
| 6351 | } |
| 6352 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 6353 | for i in (0 .. bufferMemoryBarrierCount) { |
| 6354 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 6355 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 6356 | assert(bufferObject.device == commandBufferObject.device) |
| 6357 | } |
| 6358 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 6359 | for i in (0 .. imageMemoryBarrierCount) { |
| 6360 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 6361 | imageObject := GetImage(imageMemoryBarrier.image) |
| 6362 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6363 | } |
| 6364 | } |
| 6365 | |
| 6366 | @threadSafety("app") |
| 6367 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6368 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6369 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6370 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6371 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6372 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6373 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6374 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6375 | } |
| 6376 | |
| 6377 | @threadSafety("app") |
| 6378 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6379 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6380 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6381 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6382 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6383 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6384 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6385 | } |
| 6386 | |
| 6387 | @threadSafety("app") |
| 6388 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6389 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6390 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6391 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6392 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6393 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6394 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6395 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6396 | } |
| 6397 | |
| 6398 | @threadSafety("app") |
| 6399 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6400 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 6401 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6402 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6403 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6404 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 6405 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6406 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6407 | } |
| 6408 | |
| 6409 | @threadSafety("app") |
| 6410 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6411 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6412 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6413 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6414 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6415 | VkBuffer dstBuffer, |
| 6416 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 6417 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6418 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6419 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6420 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6421 | dstBufferObject := GetBuffer(dstBuffer) |
| 6422 | assert(commandBufferObject.device == queryPoolObject.device) |
| 6423 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6424 | } |
| 6425 | |
| 6426 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6427 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6428 | VkPipelineLayout layout, |
| 6429 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6430 | u32 offset, |
| 6431 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6432 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6433 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6434 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6435 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6436 | } |
| 6437 | |
| 6438 | @threadSafety("app") |
| 6439 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6440 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6441 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6442 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6443 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6444 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 6445 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6446 | assert(commandBufferObject.device == renderPassObject.device) |
| 6447 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6448 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6449 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6450 | } |
| 6451 | |
| 6452 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6453 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6454 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6455 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6456 | } |
| 6457 | |
| 6458 | @threadSafety("app") |
| 6459 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6460 | VkCommandBuffer commandBuffer) { |
| 6461 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6462 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6463 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6464 | } |
| 6465 | |
| 6466 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6467 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6468 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6469 | const VkCommandBuffer* pCommandBuffers) { |
| 6470 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6471 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6472 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 6473 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6474 | secondaryCommandBuffer := commandBuffers[i] |
| 6475 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 6476 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6477 | } |
| 6478 | } |
| 6479 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6480 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6481 | cmd void vkDestroySurfaceKHR( |
| 6482 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6483 | VkSurfaceKHR surface, |
| 6484 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6485 | instanceObject := GetInstance(instance) |
| 6486 | surfaceObject := GetSurface(surface) |
| 6487 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6488 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6489 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 6490 | } |
| 6491 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6492 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6493 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6494 | VkPhysicalDevice physicalDevice, |
| 6495 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6496 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6497 | VkBool32* pSupported) { |
| 6498 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6499 | |
| 6500 | return ? |
| 6501 | } |
| 6502 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6503 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6504 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 6505 | VkPhysicalDevice physicalDevice, |
| 6506 | VkSurfaceKHR surface, |
| 6507 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 6508 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6509 | |
| 6510 | surfaceCapabilities := ? |
| 6511 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 6512 | |
| 6513 | return ? |
| 6514 | } |
| 6515 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6516 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6517 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 6518 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6519 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6520 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6521 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6522 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6523 | |
| 6524 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6525 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6526 | surfaceFormats := pSurfaceFormats[0:count] |
| 6527 | |
| 6528 | for i in (0 .. count) { |
| 6529 | surfaceFormat := ? |
| 6530 | surfaceFormats[i] = surfaceFormat |
| 6531 | } |
| 6532 | |
| 6533 | return ? |
| 6534 | } |
| 6535 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6536 | @extension("VK_KHR_surface") // 1 |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6537 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 6538 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6539 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6540 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6541 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 6542 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6543 | |
| 6544 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6545 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6546 | presentModes := pPresentModes[0:count] |
| 6547 | |
| 6548 | for i in (0 .. count) { |
| 6549 | presentMode := ? |
| 6550 | presentModes[i] = presentMode |
| 6551 | } |
| 6552 | |
| 6553 | return ? |
| 6554 | } |
| 6555 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6556 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6557 | cmd VkResult vkCreateSwapchainKHR( |
| 6558 | VkDevice device, |
| 6559 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6560 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6561 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6562 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6563 | deviceObject := GetDevice(device) |
| 6564 | |
| 6565 | swapchain := ? |
| 6566 | pSwapchain[0] = swapchain |
| 6567 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 6568 | |
| 6569 | return ? |
| 6570 | } |
| 6571 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6572 | @extension("VK_KHR_swapchain") // 2 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6573 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6574 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6575 | VkSwapchainKHR swapchain, |
| 6576 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6577 | deviceObject := GetDevice(device) |
| 6578 | swapchainObject := GetSwapchain(swapchain) |
| 6579 | assert(swapchainObject.device == device) |
| 6580 | |
| 6581 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6582 | } |
| 6583 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6584 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6585 | cmd VkResult vkGetSwapchainImagesKHR( |
| 6586 | VkDevice device, |
| 6587 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6588 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6589 | VkImage* pSwapchainImages) { |
| 6590 | deviceObject := GetDevice(device) |
| 6591 | |
| 6592 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6593 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6594 | swapchainImages := pSwapchainImages[0:count] |
| 6595 | |
| 6596 | for i in (0 .. count) { |
| 6597 | swapchainImage := ? |
| 6598 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6599 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6600 | } |
| 6601 | |
| 6602 | return ? |
| 6603 | } |
| 6604 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6605 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6606 | cmd VkResult vkAcquireNextImageKHR( |
| 6607 | VkDevice device, |
| 6608 | VkSwapchainKHR swapchain, |
| 6609 | u64 timeout, |
| 6610 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6611 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6612 | u32* pImageIndex) { |
| 6613 | deviceObject := GetDevice(device) |
| 6614 | swapchainObject := GetSwapchain(swapchain) |
| 6615 | |
| 6616 | imageIndex := ? |
| 6617 | pImageIndex[0] = imageIndex |
| 6618 | |
| 6619 | return ? |
| 6620 | } |
| 6621 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6622 | @extension("VK_KHR_swapchain") // 2 |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6623 | cmd VkResult vkQueuePresentKHR( |
| 6624 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6625 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6626 | queueObject := GetQueue(queue) |
| 6627 | |
| 6628 | presentInfo := ? |
| 6629 | pPresentInfo[0] = presentInfo |
| 6630 | |
| 6631 | return ? |
| 6632 | } |
| 6633 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6634 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6635 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 6636 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6637 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6638 | VkDisplayPropertiesKHR* pProperties) { |
| 6639 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6640 | return ? |
| 6641 | } |
| 6642 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6643 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6644 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 6645 | VkPhysicalDevice physicalDevice, |
| 6646 | u32* pPropertyCount, |
| 6647 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 6648 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6649 | return ? |
| 6650 | } |
| 6651 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6652 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6653 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 6654 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 6655 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 6656 | u32* pDisplayCount, |
| 6657 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6658 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6659 | return ? |
| 6660 | } |
| 6661 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6662 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6663 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 6664 | VkPhysicalDevice physicalDevice, |
| 6665 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 6666 | u32* pPropertyCount, |
| 6667 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6668 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6669 | return ? |
| 6670 | } |
| 6671 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6672 | @extension("VK_KHR_display") // 3 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6673 | cmd VkResult vkCreateDisplayModeKHR( |
| 6674 | VkPhysicalDevice physicalDevice, |
| 6675 | VkDisplayKHR display, |
| 6676 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6677 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6678 | VkDisplayModeKHR* pMode) { |
| 6679 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6680 | return ? |
| 6681 | } |
| 6682 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6683 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6684 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6685 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6686 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6687 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6688 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6689 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6690 | return ? |
| 6691 | } |
| 6692 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6693 | @extension("VK_KHR_display") // 3 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6694 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 6695 | VkInstance instance, |
| 6696 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6697 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6698 | VkSurfaceKHR* pSurface) { |
| 6699 | return ? |
| 6700 | } |
| 6701 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6702 | @extension("VK_KHR_display_swapchain") // 4 |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 6703 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 6704 | VkDevice device, |
| 6705 | u32 swapchainCount, |
| 6706 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 6707 | const VkAllocationCallbacks* pAllocator, |
| 6708 | VkSwapchainKHR* pSwapchains) { |
| 6709 | return ? |
| 6710 | } |
| 6711 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6712 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6713 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6714 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6715 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6716 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6717 | VkSurfaceKHR* pSurface) { |
| 6718 | instanceObject := GetInstance(instance) |
| 6719 | return ? |
| 6720 | } |
| 6721 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6722 | @extension("VK_KHR_xlib_surface") // 5 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6723 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 6724 | VkPhysicalDevice physicalDevice, |
| 6725 | u32 queueFamilyIndex, |
| 6726 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 6727 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6728 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6729 | return ? |
| 6730 | } |
| 6731 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6732 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6733 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6734 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6735 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6736 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6737 | VkSurfaceKHR* pSurface) { |
| 6738 | instanceObject := GetInstance(instance) |
| 6739 | return ? |
| 6740 | } |
| 6741 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6742 | @extension("VK_KHR_xcb_surface") // 6 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6743 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 6744 | VkPhysicalDevice physicalDevice, |
| 6745 | u32 queueFamilyIndex, |
| 6746 | platform.xcb_connection_t* connection, |
| 6747 | platform.xcb_visualid_t visual_id) { |
| 6748 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6749 | return ? |
| 6750 | } |
| 6751 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6752 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6753 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 6754 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6755 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6756 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6757 | VkSurfaceKHR* pSurface) { |
| 6758 | instanceObject := GetInstance(instance) |
| 6759 | return ? |
| 6760 | } |
| 6761 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6762 | @extension("VK_KHR_wayland_surface") // 7 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6763 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 6764 | VkPhysicalDevice physicalDevice, |
| 6765 | u32 queueFamilyIndex, |
| 6766 | platform.wl_display* display) { |
| 6767 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6768 | return ? |
| 6769 | } |
| 6770 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6771 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6772 | cmd VkResult vkCreateMirSurfaceKHR( |
| 6773 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6774 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6775 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6776 | VkSurfaceKHR* pSurface) { |
| 6777 | instanceObject := GetInstance(instance) |
| 6778 | return ? |
| 6779 | } |
| 6780 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6781 | @extension("VK_KHR_mir_surface") // 8 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6782 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 6783 | VkPhysicalDevice physicalDevice, |
| 6784 | u32 queueFamilyIndex, |
| 6785 | platform.MirConnection* connection) { |
| 6786 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 6787 | return ? |
| 6788 | } |
| 6789 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6790 | @extension("VK_KHR_android_surface") // 9 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6791 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 6792 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6793 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6794 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6795 | VkSurfaceKHR* pSurface) { |
| 6796 | instanceObject := GetInstance(instance) |
| 6797 | return ? |
| 6798 | } |
| 6799 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6800 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6801 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 6802 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 6803 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 6804 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6805 | VkSurfaceKHR* pSurface) { |
| 6806 | instanceObject := GetInstance(instance) |
| 6807 | return ? |
| 6808 | } |
| 6809 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6810 | @extension("VK_KHR_win32_surface") // 10 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6811 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 6812 | VkPhysicalDevice physicalDevice, |
| 6813 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 6814 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 6815 | return ? |
| 6816 | } |
| 6817 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6818 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6819 | @optional |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6820 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 6821 | VkDevice device, |
| 6822 | VkFormat format, |
| 6823 | VkImageUsageFlags imageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6824 | s32* grallocUsage) { |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6825 | return ? |
| 6826 | } |
| 6827 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6828 | @extension("VK_ANDROID_native_buffer") // 11 |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6829 | @optional |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6830 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 6831 | VkDevice device, |
| 6832 | VkFormat format, |
| 6833 | VkImageUsageFlags imageUsage, |
| 6834 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 6835 | u64* grallocConsumerUsage, |
| 6836 | u64* grallocProducerUsage) { |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 6837 | return ? |
| 6838 | } |
| 6839 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6840 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6841 | cmd VkResult vkAcquireImageANDROID( |
| 6842 | VkDevice device, |
| 6843 | VkImage image, |
| 6844 | int nativeFenceFd, |
| 6845 | VkSemaphore semaphore, |
| 6846 | VkFence fence) { |
| 6847 | return ? |
| 6848 | } |
| 6849 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6850 | @extension("VK_ANDROID_native_buffer") // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 6851 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 6852 | VkQueue queue, |
| 6853 | u32 waitSemaphoreCount, |
| 6854 | const VkSemaphore* pWaitSemaphores, |
| 6855 | VkImage image, |
| 6856 | int* pNativeFenceFd) { |
| 6857 | return ? |
| 6858 | } |
| 6859 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 6860 | @extension("VK_EXT_debug_report") // 12 |
| 6861 | @external type void* PFN_vkDebugReportCallbackEXT |
| 6862 | @extension("VK_EXT_debug_report") // 12 |
| 6863 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 6864 | VkDebugReportFlagsEXT flags, |
| 6865 | VkDebugReportObjectTypeEXT objectType, |
| 6866 | u64 object, |
| 6867 | platform.size_t location, |
| 6868 | s32 messageCode, |
| 6869 | const char* pLayerPrefix, |
| 6870 | const char* pMessage, |
| 6871 | void* pUserData) { |
| 6872 | return ? |
| 6873 | } |
| 6874 | |
| 6875 | @extension("VK_EXT_debug_report") // 12 |
| 6876 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 6877 | VkInstance instance, |
| 6878 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 6879 | const VkAllocationCallbacks* pAllocator, |
| 6880 | VkDebugReportCallbackEXT* pCallback) { |
| 6881 | return ? |
| 6882 | } |
| 6883 | |
| 6884 | @extension("VK_EXT_debug_report") // 12 |
| 6885 | cmd void vkDestroyDebugReportCallbackEXT( |
| 6886 | VkInstance instance, |
| 6887 | VkDebugReportCallbackEXT callback, |
| 6888 | const VkAllocationCallbacks* pAllocator) { |
| 6889 | } |
| 6890 | |
| 6891 | @extension("VK_EXT_debug_report") // 12 |
| 6892 | cmd void vkDebugReportMessageEXT( |
| 6893 | VkInstance instance, |
| 6894 | VkDebugReportFlagsEXT flags, |
| 6895 | VkDebugReportObjectTypeEXT objectType, |
| 6896 | u64 object, |
| 6897 | platform.size_t location, |
| 6898 | s32 messageCode, |
| 6899 | const char* pLayerPrefix, |
| 6900 | const char* pMessage) { |
| 6901 | } |
| 6902 | |
| 6903 | @extension("VK_EXT_debug_marker") // 23 |
| 6904 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 6905 | VkDevice device, |
| 6906 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 6907 | return ? |
| 6908 | } |
| 6909 | |
| 6910 | @extension("VK_EXT_debug_marker") // 23 |
| 6911 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 6912 | VkDevice device, |
| 6913 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 6914 | return ? |
| 6915 | } |
| 6916 | |
| 6917 | @extension("VK_EXT_debug_marker") // 23 |
| 6918 | cmd void vkCmdDebugMarkerBeginEXT( |
| 6919 | VkCommandBuffer commandBuffer, |
| 6920 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6921 | } |
| 6922 | |
| 6923 | @extension("VK_EXT_debug_marker") // 23 |
| 6924 | cmd void vkCmdDebugMarkerEndEXT( |
| 6925 | VkCommandBuffer commandBuffer) { |
| 6926 | } |
| 6927 | |
| 6928 | @extension("VK_EXT_debug_marker") // 23 |
| 6929 | cmd void vkCmdDebugMarkerInsertEXT( |
| 6930 | VkCommandBuffer commandBuffer, |
| 6931 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 6932 | } |
| 6933 | |
| 6934 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6935 | cmd void vkCmdDrawIndirectCountAMD( |
| 6936 | VkCommandBuffer commandBuffer, |
| 6937 | VkBuffer buffer, |
| 6938 | VkDeviceSize offset, |
| 6939 | VkBuffer countBuffer, |
| 6940 | VkDeviceSize countBufferOffset, |
| 6941 | u32 maxDrawCount, |
| 6942 | u32 stride) { |
| 6943 | } |
| 6944 | |
| 6945 | @extension("VK_AMD_draw_indirect_count") // 34 |
| 6946 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 6947 | VkCommandBuffer commandBuffer, |
| 6948 | VkBuffer buffer, |
| 6949 | VkDeviceSize offset, |
| 6950 | VkBuffer countBuffer, |
| 6951 | VkDeviceSize countBufferOffset, |
| 6952 | u32 maxDrawCount, |
| 6953 | u32 stride) { |
| 6954 | } |
| 6955 | |
| 6956 | @extension("VK_NV_external_memory_capabilities") // 56 |
| 6957 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 6958 | VkPhysicalDevice physicalDevice, |
| 6959 | VkFormat format, |
| 6960 | VkImageType type, |
| 6961 | VkImageTiling tiling, |
| 6962 | VkImageUsageFlags usage, |
| 6963 | VkImageCreateFlags flags, |
| 6964 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 6965 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 6966 | return ? |
| 6967 | } |
| 6968 | |
| 6969 | @extension("VK_NV_external_memory_win32") // 58 |
| 6970 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 6971 | VkDevice device, |
| 6972 | VkDeviceMemory memory, |
| 6973 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6974 | platform.HANDLE* pHandle) { |
| 6975 | return ? |
| 6976 | } |
| 6977 | |
| 6978 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6979 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 6980 | VkPhysicalDevice physicalDevice, |
| 6981 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 6982 | } |
| 6983 | |
| 6984 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6985 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 6986 | VkPhysicalDevice physicalDevice, |
| 6987 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 6988 | } |
| 6989 | |
| 6990 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6991 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 6992 | VkPhysicalDevice physicalDevice, |
| 6993 | VkFormat format, |
| 6994 | VkFormatProperties2KHR* pFormatProperties) { |
| 6995 | } |
| 6996 | |
| 6997 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 6998 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 6999 | VkPhysicalDevice physicalDevice, |
| 7000 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 7001 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 7002 | return ? |
| 7003 | } |
| 7004 | |
| 7005 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7006 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 7007 | VkPhysicalDevice physicalDevice, |
| 7008 | u32* pQueueFamilyPropertyCount, |
| 7009 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 7010 | } |
| 7011 | |
| 7012 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7013 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 7014 | VkPhysicalDevice physicalDevice, |
| 7015 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 7016 | } |
| 7017 | |
| 7018 | @extension("VK_KHR_get_physical_device_properties2") // 60 |
| 7019 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 7020 | VkPhysicalDevice physicalDevice, |
| 7021 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 7022 | u32* pPropertyCount, |
| 7023 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 7024 | } |
| 7025 | |
| 7026 | @extension("VK_KHX_device_group") // 61 |
| 7027 | cmd void vkGetDeviceGroupPeerMemoryFeaturesKHX( |
| 7028 | VkDevice device, |
| 7029 | u32 heapIndex, |
| 7030 | u32 localDeviceIndex, |
| 7031 | u32 remoteDeviceIndex, |
| 7032 | VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures) { |
| 7033 | } |
| 7034 | |
| 7035 | @extension("VK_KHX_device_group") // 61 |
| 7036 | cmd VkResult vkBindBufferMemory2KHX( |
| 7037 | VkDevice device, |
| 7038 | u32 bindInfoCount, |
| 7039 | const VkBindBufferMemoryInfoKHX* pBindInfos) { |
| 7040 | return ? |
| 7041 | } |
| 7042 | |
| 7043 | @extension("VK_KHX_device_group") // 61 |
| 7044 | cmd VkResult vkBindImageMemory2KHX( |
| 7045 | VkDevice device, |
| 7046 | u32 bindInfoCount, |
| 7047 | const VkBindImageMemoryInfoKHX* pBindInfos) { |
| 7048 | return ? |
| 7049 | } |
| 7050 | |
| 7051 | @extension("VK_KHX_device_group") // 61 |
| 7052 | cmd void vkCmdSetDeviceMaskKHX( |
| 7053 | VkCommandBuffer commandBuffer, |
| 7054 | u32 deviceMask) { |
| 7055 | } |
| 7056 | |
| 7057 | @extension("VK_KHX_device_group") // 61 |
| 7058 | cmd VkResult vkGetDeviceGroupPresentCapabilitiesKHX( |
| 7059 | VkDevice device, |
| 7060 | VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) { |
| 7061 | return ? |
| 7062 | } |
| 7063 | |
| 7064 | @extension("VK_KHX_device_group") // 61 |
| 7065 | cmd VkResult vkGetDeviceGroupSurfacePresentModesKHX( |
| 7066 | VkDevice device, |
| 7067 | VkSurfaceKHR surface, |
| 7068 | VkDeviceGroupPresentModeFlagsKHX* pModes) { |
| 7069 | return ? |
| 7070 | } |
| 7071 | |
| 7072 | @extension("VK_KHX_device_group") // 61 |
| 7073 | cmd VkResult vkAcquireNextImage2KHX( |
| 7074 | VkDevice device, |
| 7075 | const VkAcquireNextImageInfoKHX* pAcquireInfo, |
| 7076 | u32* pImageIndex) { |
| 7077 | return ? |
| 7078 | } |
| 7079 | |
| 7080 | @extension("VK_KHX_device_group") // 61 |
| 7081 | cmd void vkCmdDispatchBaseKHX( |
| 7082 | VkCommandBuffer commandBuffer, |
| 7083 | u32 baseGroupX, |
| 7084 | u32 baseGroupY, |
| 7085 | u32 baseGroupZ, |
| 7086 | u32 groupCountX, |
| 7087 | u32 groupCountY, |
| 7088 | u32 groupCountZ) { |
| 7089 | } |
| 7090 | |
| 7091 | @extension("VK_KHX_device_group") // 61 |
| 7092 | cmd VkResult vkGetPhysicalDevicePresentRectanglesKHX( |
| 7093 | VkPhysicalDevice physicalDevice, |
| 7094 | VkSurfaceKHR surface, |
| 7095 | u32* pRectCount, |
| 7096 | VkRect2D* pRects) { |
| 7097 | return ? |
| 7098 | } |
| 7099 | |
| 7100 | @extension("VK_NN_vi_surface") // 63 |
| 7101 | cmd VkResult vkCreateViSurfaceNN( |
| 7102 | VkInstance instance, |
| 7103 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 7104 | const VkAllocationCallbacks* pAllocator, |
| 7105 | VkSurfaceKHR* pSurface) { |
| 7106 | return ? |
| 7107 | } |
| 7108 | |
| 7109 | @extension("VK_KHR_maintenance1") // 70 |
| 7110 | cmd void vkTrimCommandPoolKHR( |
| 7111 | VkDevice device, |
| 7112 | VkCommandPool commandPool, |
| 7113 | VkCommandPoolTrimFlagsKHR flags) { |
| 7114 | } |
| 7115 | |
| 7116 | @extension("VK_KHX_device_group_creation") // 71 |
| 7117 | cmd VkResult vkEnumeratePhysicalDeviceGroupsKHX( |
| 7118 | VkInstance instance, |
| 7119 | u32* pPhysicalDeviceGroupCount, |
| 7120 | VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties) { |
| 7121 | return ? |
| 7122 | } |
| 7123 | |
| 7124 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7125 | cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHX( |
| 7126 | VkPhysicalDevice physicalDevice, |
| 7127 | const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, |
| 7128 | VkExternalBufferPropertiesKHX* pExternalBufferProperties) { |
| 7129 | } |
| 7130 | |
| 7131 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7132 | cmd void vkGetPhysicalDeviceProperties2KHX( |
| 7133 | VkPhysicalDevice physicalDevice, |
| 7134 | VkPhysicalDeviceProperties2KHX* pProperties) { |
| 7135 | } |
| 7136 | |
| 7137 | @extension("VK_KHX_external_memory_capabilities") // 72 |
| 7138 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHX( |
| 7139 | VkPhysicalDevice physicalDevice, |
| 7140 | const VkPhysicalDeviceImageFormatInfo2KHX* pImageFormatInfo, |
| 7141 | VkImageFormatProperties2KHX* pImageFormatProperties) { |
| 7142 | return ? |
| 7143 | } |
| 7144 | |
| 7145 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7146 | cmd VkResult vkGetMemoryWin32HandleKHX( |
| 7147 | VkDevice device, |
| 7148 | VkDeviceMemory memory, |
| 7149 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7150 | platform.HANDLE* pHandle) { |
| 7151 | return ? |
| 7152 | } |
| 7153 | |
| 7154 | @extension("VK_KHX_external_memory_win32") // 74 |
| 7155 | cmd VkResult vkGetMemoryWin32HandlePropertiesKHX( |
| 7156 | VkDevice device, |
| 7157 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7158 | platform.HANDLE handle, |
| 7159 | VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties) { |
| 7160 | return ? |
| 7161 | } |
| 7162 | |
| 7163 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7164 | cmd VkResult vkGetMemoryFdKHX( |
| 7165 | VkDevice device, |
| 7166 | VkDeviceMemory memory, |
| 7167 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7168 | s32* pFd) { |
| 7169 | return ? |
| 7170 | } |
| 7171 | |
| 7172 | @extension("VK_KHX_external_memory_fd") // 75 |
| 7173 | cmd VkResult vkGetMemoryFdPropertiesKHX( |
| 7174 | VkDevice device, |
| 7175 | VkExternalMemoryHandleTypeFlagBitsKHX handleType, |
| 7176 | s32 fd, |
| 7177 | VkMemoryFdPropertiesKHX* pMemoryFdProperties) { |
| 7178 | return ? |
| 7179 | } |
| 7180 | |
| 7181 | @extension("VK_KHX_external_semaphore_capabilities") // 77 |
| 7182 | cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX( |
| 7183 | VkPhysicalDevice physicalDevice, |
| 7184 | const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, |
| 7185 | VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties) { |
| 7186 | } |
| 7187 | |
| 7188 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7189 | cmd VkResult vkImportSemaphoreWin32HandleKHX( |
| 7190 | VkDevice device, |
| 7191 | const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo) { |
| 7192 | return ? |
| 7193 | } |
| 7194 | |
| 7195 | @extension("VK_KHX_external_semaphore_win32") // 79 |
| 7196 | cmd VkResult vkGetSemaphoreWin32HandleKHX( |
| 7197 | VkDevice device, |
| 7198 | VkSemaphore semaphore, |
| 7199 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7200 | platform.HANDLE* pHandle) { |
| 7201 | return ? |
| 7202 | } |
| 7203 | |
| 7204 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7205 | cmd VkResult vkImportSemaphoreFdKHX( |
| 7206 | VkDevice device, |
| 7207 | const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo) { |
| 7208 | return ? |
| 7209 | } |
| 7210 | |
| 7211 | @extension("VK_KHX_external_semaphore_fd") // 80 |
| 7212 | cmd VkResult vkGetSemaphoreFdKHX( |
| 7213 | VkDevice device, |
| 7214 | VkSemaphore semaphore, |
| 7215 | VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, |
| 7216 | s32* pFd) { |
| 7217 | return ? |
| 7218 | } |
| 7219 | |
| 7220 | @extension("VK_KHR_push_descriptor") // 81 |
| 7221 | cmd void vkCmdPushDescriptorSetKHR( |
| 7222 | VkCommandBuffer commandBuffer, |
| 7223 | VkPipelineBindPoint pipelineBindPoint, |
| 7224 | VkPipelineLayout layout, |
| 7225 | u32 set, |
| 7226 | u32 descriptorWriteCount, |
| 7227 | const VkWriteDescriptorSet* pDescriptorWrites) { |
| 7228 | } |
| 7229 | |
| 7230 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7231 | cmd VkResult vkCreateDescriptorUpdateTemplateKHR( |
| 7232 | VkDevice device, |
| 7233 | const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, |
| 7234 | const VkAllocationCallbacks* pAllocator, |
| 7235 | VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate) { |
| 7236 | return ? |
| 7237 | } |
| 7238 | |
| 7239 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7240 | cmd void vkDestroyDescriptorUpdateTemplateKHR( |
| 7241 | VkDevice device, |
| 7242 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7243 | const VkAllocationCallbacks* pAllocator) { |
| 7244 | } |
| 7245 | |
| 7246 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7247 | cmd void vkUpdateDescriptorSetWithTemplateKHR( |
| 7248 | VkDevice device, |
| 7249 | VkDescriptorSet descriptorSet, |
| 7250 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7251 | const void* pData) { |
| 7252 | } |
| 7253 | |
| 7254 | @extension("VK_KHR_descriptor_update_template") // 86 |
| 7255 | cmd void vkCmdPushDescriptorSetWithTemplateKHR( |
| 7256 | VkCommandBuffer commandBuffer, |
| 7257 | VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, |
| 7258 | VkPipelineLayout layout, |
| 7259 | u32 set, |
| 7260 | const void* pData) { |
| 7261 | } |
| 7262 | |
| 7263 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7264 | cmd void vkCmdProcessCommandsNVX( |
| 7265 | VkCommandBuffer commandBuffer, |
| 7266 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 7267 | } |
| 7268 | |
| 7269 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7270 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 7271 | VkCommandBuffer commandBuffer, |
| 7272 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 7273 | } |
| 7274 | |
| 7275 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7276 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 7277 | VkDevice device, |
| 7278 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 7279 | const VkAllocationCallbacks* pAllocator, |
| 7280 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 7281 | return ? |
| 7282 | } |
| 7283 | |
| 7284 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7285 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 7286 | VkDevice device, |
| 7287 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 7288 | const VkAllocationCallbacks* pAllocator) { |
| 7289 | } |
| 7290 | |
| 7291 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7292 | cmd VkResult vkCreateObjectTableNVX( |
| 7293 | VkDevice device, |
| 7294 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 7295 | const VkAllocationCallbacks* pAllocator, |
| 7296 | VkObjectTableNVX* pObjectTable) { |
| 7297 | return ? |
| 7298 | } |
| 7299 | |
| 7300 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7301 | cmd void vkDestroyObjectTableNVX( |
| 7302 | VkDevice device, |
| 7303 | VkObjectTableNVX objectTable, |
| 7304 | const VkAllocationCallbacks* pAllocator) { |
| 7305 | } |
| 7306 | |
| 7307 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7308 | cmd VkResult vkRegisterObjectsNVX( |
| 7309 | VkDevice device, |
| 7310 | VkObjectTableNVX objectTable, |
| 7311 | u32 objectCount, |
| 7312 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 7313 | const u32* pObjectIndices) { |
| 7314 | return ? |
| 7315 | } |
| 7316 | |
| 7317 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7318 | cmd VkResult vkUnregisterObjectsNVX( |
| 7319 | VkDevice device, |
| 7320 | VkObjectTableNVX objectTable, |
| 7321 | u32 objectCount, |
| 7322 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 7323 | const u32* pObjectIndices) { |
| 7324 | return ? |
| 7325 | } |
| 7326 | |
| 7327 | @extension("VK_NVX_device_generated_commands") // 87 |
| 7328 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 7329 | VkPhysicalDevice physicalDevice, |
| 7330 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 7331 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 7332 | } |
| 7333 | |
| 7334 | @extension("VK_NV_clip_space_w_scaling") // 88 |
| 7335 | cmd void vkCmdSetViewportWScalingNV( |
| 7336 | VkCommandBuffer commandBuffer, |
| 7337 | u32 firstViewport, |
| 7338 | u32 viewportCount, |
| 7339 | const VkViewportWScalingNV* pViewportWScalings) { |
| 7340 | } |
| 7341 | |
| 7342 | @extension("VK_EXT_direct_mode_display") // 89 |
| 7343 | cmd VkResult vkReleaseDisplayEXT( |
| 7344 | VkPhysicalDevice physicalDevice, |
| 7345 | VkDisplayKHR display) { |
| 7346 | return ? |
| 7347 | } |
| 7348 | |
| 7349 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7350 | cmd VkResult vkAcquireXlibDisplayEXT( |
| 7351 | VkPhysicalDevice physicalDevice, |
| 7352 | platform.Display* dpy, |
| 7353 | VkDisplayKHR display) { |
| 7354 | return ? |
| 7355 | } |
| 7356 | |
| 7357 | @extension("VK_EXT_acquire_xlib_display") // 90 |
| 7358 | cmd VkResult vkGetRandROutputDisplayEXT( |
| 7359 | VkPhysicalDevice physicalDevice, |
| 7360 | platform.Display* dpy, |
| 7361 | platform.RROutput rrOutput, |
| 7362 | VkDisplayKHR* pDisplay) { |
| 7363 | return ? |
| 7364 | } |
| 7365 | |
| 7366 | @extension("VK_EXT_display_surface_counter") // 91 |
| 7367 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 7368 | VkPhysicalDevice physicalDevice, |
| 7369 | VkSurfaceKHR surface, |
| 7370 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 7371 | return ? |
| 7372 | } |
| 7373 | |
| 7374 | @extension("VK_EXT_display_control") // 92 |
| 7375 | cmd VkResult vkDisplayPowerControlEXT( |
| 7376 | VkDevice device, |
| 7377 | VkDisplayKHR display, |
| 7378 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 7379 | return ? |
| 7380 | } |
| 7381 | |
| 7382 | @extension("VK_EXT_display_control") // 92 |
| 7383 | cmd VkResult vkRegisterDeviceEventEXT( |
| 7384 | VkDevice device, |
| 7385 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 7386 | const VkAllocationCallbacks* pAllocator, |
| 7387 | VkFence* pFence) { |
| 7388 | return ? |
| 7389 | } |
| 7390 | |
| 7391 | @extension("VK_EXT_display_control") // 92 |
| 7392 | cmd VkResult vkRegisterDisplayEventEXT( |
| 7393 | VkDevice device, |
| 7394 | VkDisplayKHR display, |
| 7395 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 7396 | const VkAllocationCallbacks* pAllocator, |
| 7397 | VkFence* pFence) { |
| 7398 | return ? |
| 7399 | } |
| 7400 | |
| 7401 | @extension("VK_EXT_display_control") // 92 |
| 7402 | cmd VkResult vkGetSwapchainCounterEXT( |
| 7403 | VkDevice device, |
| 7404 | VkSwapchainKHR swapchain, |
| 7405 | VkSurfaceCounterFlagBitsEXT counter, |
| 7406 | u64* pCounterValue) { |
| 7407 | return ? |
| 7408 | } |
| 7409 | |
| 7410 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7411 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( |
| 7412 | VkDevice device, |
| 7413 | VkSwapchainKHR swapchain, |
| 7414 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
| 7415 | deviceObject := GetDevice(device) |
| 7416 | swapchainObject := GetSwapchain(swapchain) |
| 7417 | |
| 7418 | displayTimingProperties := ? |
| 7419 | pDisplayTimingProperties[0] = displayTimingProperties |
| 7420 | |
| 7421 | return ? |
| 7422 | } |
| 7423 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7424 | @extension("VK_GOOGLE_display_timing") // 93 |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7425 | cmd VkResult vkGetPastPresentationTimingGOOGLE( |
| 7426 | VkDevice device, |
| 7427 | VkSwapchainKHR swapchain, |
| 7428 | u32* pPresentationTimingCount, |
| 7429 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 7430 | return ? |
| 7431 | } |
| 7432 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7433 | @extension("VK_EXT_discard_rectangles") // 100 |
| 7434 | cmd void vkCmdSetDiscardRectangleEXT( |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7435 | VkCommandBuffer commandBuffer, |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7436 | u32 firstDiscardRectangle, |
| 7437 | u32 discardRectangleCount, |
| 7438 | const VkRect2D* pDiscardRectangles) { |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 7439 | } |
| 7440 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7441 | @extension("VK_EXT_hdr_metadata") // 106 |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 7442 | cmd void vkSetHdrMetadataEXT( |
| 7443 | VkDevice device, |
| 7444 | u32 swapchainCount, |
| 7445 | const VkSwapchainKHR* pSwapchains, |
| 7446 | const VkHdrMetadataEXT* pMetadata) { |
| 7447 | } |
| 7448 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7449 | @extension("VK_KHR_shared_presentable_image") // 112 |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 7450 | cmd VkResult vkGetSwapchainStatusKHR( |
| 7451 | VkDevice device, |
| 7452 | VkSwapchainKHR swapchain) { |
| 7453 | return ? |
| 7454 | } |
| 7455 | |
Jesse Hall | ad25084 | 2017-03-10 18:35:38 -0800 | [diff] [blame^] | 7456 | @extension("VK_MVK_ios_surface") // 123 |
| 7457 | cmd VkResult vkCreateIOSSurfaceMVK( |
| 7458 | VkInstance instance, |
| 7459 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7460 | const VkAllocationCallbacks* pAllocator, |
| 7461 | VkSurfaceKHR* pSurface) { |
| 7462 | return ? |
| 7463 | } |
| 7464 | |
| 7465 | @extension("VK_MVK_macos_surface") // 124 |
| 7466 | cmd VkResult vkCreateMacOSSurfaceMVK( |
| 7467 | VkInstance instance, |
| 7468 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, |
| 7469 | const VkAllocationCallbacks* pAllocator, |
| 7470 | VkSurfaceKHR* pSurface) { |
| 7471 | return ? |
| 7472 | } |
| 7473 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7474 | //////////////// |
| 7475 | // Validation // |
| 7476 | //////////////// |
| 7477 | |
| 7478 | extern void validate(string layerName, bool condition, string message) |
| 7479 | |
| 7480 | |
| 7481 | ///////////////////////////// |
| 7482 | // Internal State Tracking // |
| 7483 | ///////////////////////////// |
| 7484 | |
| 7485 | StateObject State |
| 7486 | |
| 7487 | @internal class StateObject { |
| 7488 | // Dispatchable objects. |
| 7489 | map!(VkInstance, ref!InstanceObject) Instances |
| 7490 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 7491 | map!(VkDevice, ref!DeviceObject) Devices |
| 7492 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7493 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7494 | |
| 7495 | // Non-dispatchable objects. |
| 7496 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 7497 | map!(VkBuffer, ref!BufferObject) Buffers |
| 7498 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 7499 | map!(VkImage, ref!ImageObject) Images |
| 7500 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7501 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7502 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 7503 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 7504 | map!(VkSampler, ref!SamplerObject) Samplers |
| 7505 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 7506 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 7507 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7508 | map!(VkFence, ref!FenceObject) Fences |
| 7509 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 7510 | map!(VkEvent, ref!EventObject) Events |
| 7511 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 7512 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 7513 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 7514 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7515 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7516 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7517 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7518 | } |
| 7519 | |
| 7520 | @internal class InstanceObject { |
| 7521 | } |
| 7522 | |
| 7523 | @internal class PhysicalDeviceObject { |
| 7524 | VkInstance instance |
| 7525 | } |
| 7526 | |
| 7527 | @internal class DeviceObject { |
| 7528 | VkPhysicalDevice physicalDevice |
| 7529 | } |
| 7530 | |
| 7531 | @internal class QueueObject { |
| 7532 | VkDevice device |
| 7533 | VkQueueFlags flags |
| 7534 | } |
| 7535 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7536 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7537 | VkDevice device |
| 7538 | map!(u64, VkDeviceMemory) boundObjects |
| 7539 | VkQueueFlags queueFlags |
| 7540 | } |
| 7541 | |
| 7542 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7543 | VkDevice device |
| 7544 | VkDeviceSize allocationSize |
| 7545 | map!(u64, VkDeviceSize) boundObjects |
| 7546 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7547 | } |
| 7548 | |
| 7549 | @internal class BufferObject { |
| 7550 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7551 | VkDeviceMemory memory |
| 7552 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7553 | } |
| 7554 | |
| 7555 | @internal class BufferViewObject { |
| 7556 | VkDevice device |
| 7557 | VkBuffer buffer |
| 7558 | } |
| 7559 | |
| 7560 | @internal class ImageObject { |
| 7561 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7562 | VkDeviceMemory memory |
| 7563 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7564 | } |
| 7565 | |
| 7566 | @internal class ImageViewObject { |
| 7567 | VkDevice device |
| 7568 | VkImage image |
| 7569 | } |
| 7570 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7571 | @internal class ShaderObject { |
| 7572 | VkDevice device |
| 7573 | } |
| 7574 | |
| 7575 | @internal class ShaderModuleObject { |
| 7576 | VkDevice device |
| 7577 | } |
| 7578 | |
| 7579 | @internal class PipelineObject { |
| 7580 | VkDevice device |
| 7581 | } |
| 7582 | |
| 7583 | @internal class PipelineLayoutObject { |
| 7584 | VkDevice device |
| 7585 | } |
| 7586 | |
| 7587 | @internal class SamplerObject { |
| 7588 | VkDevice device |
| 7589 | } |
| 7590 | |
| 7591 | @internal class DescriptorSetObject { |
| 7592 | VkDevice device |
| 7593 | } |
| 7594 | |
| 7595 | @internal class DescriptorSetLayoutObject { |
| 7596 | VkDevice device |
| 7597 | } |
| 7598 | |
| 7599 | @internal class DescriptorPoolObject { |
| 7600 | VkDevice device |
| 7601 | } |
| 7602 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7603 | @internal class FenceObject { |
| 7604 | VkDevice device |
| 7605 | bool signaled |
| 7606 | } |
| 7607 | |
| 7608 | @internal class SemaphoreObject { |
| 7609 | VkDevice device |
| 7610 | } |
| 7611 | |
| 7612 | @internal class EventObject { |
| 7613 | VkDevice device |
| 7614 | } |
| 7615 | |
| 7616 | @internal class QueryPoolObject { |
| 7617 | VkDevice device |
| 7618 | } |
| 7619 | |
| 7620 | @internal class FramebufferObject { |
| 7621 | VkDevice device |
| 7622 | } |
| 7623 | |
| 7624 | @internal class RenderPassObject { |
| 7625 | VkDevice device |
| 7626 | } |
| 7627 | |
| 7628 | @internal class PipelineCacheObject { |
| 7629 | VkDevice device |
| 7630 | } |
| 7631 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7632 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7633 | VkDevice device |
| 7634 | } |
| 7635 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7636 | @internal class SurfaceObject { |
| 7637 | VkInstance instance |
| 7638 | } |
| 7639 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7640 | @internal class SwapchainObject { |
| 7641 | VkDevice device |
| 7642 | } |
| 7643 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7644 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 7645 | assert(instance in State.Instances) |
| 7646 | return State.Instances[instance] |
| 7647 | } |
| 7648 | |
| 7649 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 7650 | assert(physicalDevice in State.PhysicalDevices) |
| 7651 | return State.PhysicalDevices[physicalDevice] |
| 7652 | } |
| 7653 | |
| 7654 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 7655 | assert(device in State.Devices) |
| 7656 | return State.Devices[device] |
| 7657 | } |
| 7658 | |
| 7659 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 7660 | assert(queue in State.Queues) |
| 7661 | return State.Queues[queue] |
| 7662 | } |
| 7663 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7664 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 7665 | assert(commandBuffer in State.CommandBuffers) |
| 7666 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7667 | } |
| 7668 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7669 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 7670 | assert(memory in State.DeviceMemories) |
| 7671 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7672 | } |
| 7673 | |
| 7674 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 7675 | assert(buffer in State.Buffers) |
| 7676 | return State.Buffers[buffer] |
| 7677 | } |
| 7678 | |
| 7679 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 7680 | assert(bufferView in State.BufferViews) |
| 7681 | return State.BufferViews[bufferView] |
| 7682 | } |
| 7683 | |
| 7684 | macro ref!ImageObject GetImage(VkImage image) { |
| 7685 | assert(image in State.Images) |
| 7686 | return State.Images[image] |
| 7687 | } |
| 7688 | |
| 7689 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 7690 | assert(imageView in State.ImageViews) |
| 7691 | return State.ImageViews[imageView] |
| 7692 | } |
| 7693 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7694 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 7695 | assert(shaderModule in State.ShaderModules) |
| 7696 | return State.ShaderModules[shaderModule] |
| 7697 | } |
| 7698 | |
| 7699 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 7700 | assert(pipeline in State.Pipelines) |
| 7701 | return State.Pipelines[pipeline] |
| 7702 | } |
| 7703 | |
| 7704 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 7705 | assert(pipelineLayout in State.PipelineLayouts) |
| 7706 | return State.PipelineLayouts[pipelineLayout] |
| 7707 | } |
| 7708 | |
| 7709 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 7710 | assert(sampler in State.Samplers) |
| 7711 | return State.Samplers[sampler] |
| 7712 | } |
| 7713 | |
| 7714 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 7715 | assert(descriptorSet in State.DescriptorSets) |
| 7716 | return State.DescriptorSets[descriptorSet] |
| 7717 | } |
| 7718 | |
| 7719 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 7720 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 7721 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 7722 | } |
| 7723 | |
| 7724 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 7725 | assert(descriptorPool in State.DescriptorPools) |
| 7726 | return State.DescriptorPools[descriptorPool] |
| 7727 | } |
| 7728 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 7729 | macro ref!FenceObject GetFence(VkFence fence) { |
| 7730 | assert(fence in State.Fences) |
| 7731 | return State.Fences[fence] |
| 7732 | } |
| 7733 | |
| 7734 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 7735 | assert(semaphore in State.Semaphores) |
| 7736 | return State.Semaphores[semaphore] |
| 7737 | } |
| 7738 | |
| 7739 | macro ref!EventObject GetEvent(VkEvent event) { |
| 7740 | assert(event in State.Events) |
| 7741 | return State.Events[event] |
| 7742 | } |
| 7743 | |
| 7744 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 7745 | assert(queryPool in State.QueryPools) |
| 7746 | return State.QueryPools[queryPool] |
| 7747 | } |
| 7748 | |
| 7749 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 7750 | assert(framebuffer in State.Framebuffers) |
| 7751 | return State.Framebuffers[framebuffer] |
| 7752 | } |
| 7753 | |
| 7754 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 7755 | assert(renderPass in State.RenderPasses) |
| 7756 | return State.RenderPasses[renderPass] |
| 7757 | } |
| 7758 | |
| 7759 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 7760 | assert(pipelineCache in State.PipelineCaches) |
| 7761 | return State.PipelineCaches[pipelineCache] |
| 7762 | } |
| 7763 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 7764 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 7765 | assert(commandPool in State.CommandPools) |
| 7766 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 7767 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7768 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 7769 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 7770 | assert(surface in State.Surfaces) |
| 7771 | return State.Surfaces[surface] |
| 7772 | } |
| 7773 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 7774 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 7775 | assert(swapchain in State.Swapchains) |
| 7776 | return State.Swapchains[swapchain] |
| 7777 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 7778 | |
| 7779 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 7780 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 7781 | } |