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 | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 31 | define VERSION_PATCH 39 |
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 | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 40 | |
| 41 | // API keywords |
| 42 | define VK_TRUE 1 |
| 43 | define VK_FALSE 0 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 44 | |
| 45 | // API keyword, but needs special handling by some templates |
| 46 | define NULL_HANDLE 0 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 47 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 48 | // 1 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 49 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 50 | @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] | 51 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 52 | // 2 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 53 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 54 | @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] | 55 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 56 | // 3 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 57 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 58 | @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] | 59 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 60 | // 4 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 61 | @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] | 62 | @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] | 63 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 64 | // 5 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 65 | @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] | 66 | @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] | 67 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 68 | // 6 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 69 | @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] | 70 | @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] | 71 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 72 | // 7 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 73 | @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] | 74 | @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] | 75 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 76 | // 8 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 77 | @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] | 78 | @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] | 79 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 80 | // 9 |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 81 | @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] | 82 | @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] | 83 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 84 | // 10 |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 85 | @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] | 86 | @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] | 87 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 88 | // 11 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 89 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 5 |
| 90 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer" |
| 91 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 92 | // 12 |
| 93 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION 4 |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 94 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report" |
| 95 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 96 | // 13 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 97 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1 |
| 98 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader" |
| 99 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 100 | // 15 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 101 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 |
| 102 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge" |
| 103 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 104 | // 16 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 105 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 |
| 106 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic" |
| 107 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 108 | // 19 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 109 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 |
| 110 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order" |
| 111 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 112 | // 21 |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 113 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 |
| 114 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" |
| 115 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 116 | // 22 |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 117 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 |
| 118 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" |
| 119 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 120 | // 23 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 121 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3 |
| 122 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker" |
| 123 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 124 | // 26 |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 125 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 |
| 126 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" |
| 127 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 128 | // 27 |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 129 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 |
| 130 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" |
| 131 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 132 | // 28 |
| 133 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 |
| 134 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" |
| 135 | |
| 136 | // 34 |
| 137 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 |
| 138 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" |
| 139 | |
| 140 | // 36 |
| 141 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 |
| 142 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" |
| 143 | |
| 144 | // 37 |
| 145 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 |
| 146 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" |
| 147 | |
| 148 | // 38 |
| 149 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 |
| 150 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" |
| 151 | |
| 152 | // 56 |
| 153 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 154 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" |
| 155 | |
| 156 | // 57 |
| 157 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 158 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" |
| 159 | |
| 160 | // 58 |
| 161 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 162 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" |
| 163 | |
| 164 | // 59 |
| 165 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 166 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" |
| 167 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 168 | // 60 |
| 169 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 |
| 170 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" |
| 171 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 172 | // 62 |
| 173 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 |
| 174 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" |
| 175 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 176 | // 63 |
| 177 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_SPEC_VERSION 1 |
| 178 | @extension("VK_NN_vi_surface") define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" |
| 179 | |
| 180 | // 64 |
| 181 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 |
| 182 | @extension("VK_KHR_shader_draw_parameters") define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" |
| 183 | |
| 184 | // 65 |
| 185 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 |
| 186 | @extension("VK_EXT_shader_subgroup_ballot") define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" |
| 187 | |
| 188 | // 66 |
| 189 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 |
| 190 | @extension("VK_EXT_shader_subgroup_vote") define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" |
| 191 | |
| 192 | // 70 |
| 193 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_SPEC_VERSION 1 |
| 194 | @extension("VK_KHR_maintenance1") define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" |
| 195 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 196 | // 87 |
| 197 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 198 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 199 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 200 | // 89 |
| 201 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 |
| 202 | @extension("VK_EXT_direct_mode_display") define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" |
| 203 | |
| 204 | // 90 |
| 205 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 |
| 206 | @extension("VK_EXT_acquire_xlib_display") define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" |
| 207 | |
| 208 | // 91 |
| 209 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 |
| 210 | @extension("VK_EXT_display_surface_counter") define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" |
| 211 | |
| 212 | // 92 |
| 213 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 |
| 214 | @extension("VK_EXT_display_control") define VK_EXT_DISPLAY_CONTROL_COUNTER_EXTENSION_NAME "VK_EXT_display_control" |
| 215 | |
| 216 | // 105 |
| 217 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_SPEC_VERSION 1 |
| 218 | @extension("VK_EXT_swapchain_colorspace") define VK_EXT_SWAPCHAIN_COLORSPACE_COUNTER_EXTENSION_NAME "VK_EXT_swapchain_colorspace" |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 219 | |
| 220 | ///////////// |
| 221 | // Types // |
| 222 | ///////////// |
| 223 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 224 | type u32 VkBool32 |
| 225 | type u32 VkFlags |
| 226 | type u64 VkDeviceSize |
| 227 | type u32 VkSampleMask |
| 228 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 229 | /// Dispatchable handle types. |
| 230 | @dispatchHandle type u64 VkInstance |
| 231 | @dispatchHandle type u64 VkPhysicalDevice |
| 232 | @dispatchHandle type u64 VkDevice |
| 233 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 234 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 235 | |
| 236 | /// Non dispatchable handle types. |
| 237 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 238 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 239 | @nonDispatchHandle type u64 VkBuffer |
| 240 | @nonDispatchHandle type u64 VkBufferView |
| 241 | @nonDispatchHandle type u64 VkImage |
| 242 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 243 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 244 | @nonDispatchHandle type u64 VkPipeline |
| 245 | @nonDispatchHandle type u64 VkPipelineLayout |
| 246 | @nonDispatchHandle type u64 VkSampler |
| 247 | @nonDispatchHandle type u64 VkDescriptorSet |
| 248 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 249 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 250 | @nonDispatchHandle type u64 VkFence |
| 251 | @nonDispatchHandle type u64 VkSemaphore |
| 252 | @nonDispatchHandle type u64 VkEvent |
| 253 | @nonDispatchHandle type u64 VkQueryPool |
| 254 | @nonDispatchHandle type u64 VkFramebuffer |
| 255 | @nonDispatchHandle type u64 VkRenderPass |
| 256 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 257 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 258 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 259 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 260 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 261 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 262 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 263 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 264 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 265 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 266 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 267 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 268 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 269 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 270 | |
| 271 | ///////////// |
| 272 | // Enums // |
| 273 | ///////////// |
| 274 | |
| 275 | enum VkImageLayout { |
| 276 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 277 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 278 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 279 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 280 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 281 | 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] | 282 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 283 | 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] | 284 | 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] | 285 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 286 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 287 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | enum VkAttachmentLoadOp { |
| 291 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 292 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 293 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 294 | } |
| 295 | |
| 296 | enum VkAttachmentStoreOp { |
| 297 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 298 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 299 | } |
| 300 | |
| 301 | enum VkImageType { |
| 302 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 303 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 304 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 305 | } |
| 306 | |
| 307 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 308 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 309 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 310 | } |
| 311 | |
| 312 | enum VkImageViewType { |
| 313 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 314 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 315 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 316 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 317 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 318 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 319 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 320 | } |
| 321 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 322 | enum VkCommandBufferLevel { |
| 323 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 324 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 325 | } |
| 326 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 327 | enum VkComponentSwizzle { |
| 328 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 329 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 330 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 331 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 332 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 333 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 334 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 335 | } |
| 336 | |
| 337 | enum VkDescriptorType { |
| 338 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 339 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 340 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 341 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 342 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 343 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 344 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 345 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 346 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 347 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 348 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 349 | } |
| 350 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 351 | enum VkQueryType { |
| 352 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 353 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 354 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 355 | } |
| 356 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 357 | enum VkBorderColor { |
| 358 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 359 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 360 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 361 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 362 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 363 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 364 | } |
| 365 | |
| 366 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 367 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 368 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 369 | } |
| 370 | |
| 371 | enum VkPrimitiveTopology { |
| 372 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 373 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 374 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 375 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 376 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 377 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 378 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 379 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 380 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 381 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 382 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 383 | } |
| 384 | |
| 385 | enum VkSharingMode { |
| 386 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 387 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 388 | } |
| 389 | |
| 390 | enum VkIndexType { |
| 391 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 392 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 393 | } |
| 394 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 395 | enum VkFilter { |
| 396 | VK_FILTER_NEAREST = 0x00000000, |
| 397 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 398 | |
| 399 | //@extension("VK_IMG_filter_cubic") |
| 400 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 401 | } |
| 402 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 403 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 404 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 405 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 406 | } |
| 407 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 408 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 409 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 410 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 411 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 412 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 413 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | enum VkCompareOp { |
| 417 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 418 | VK_COMPARE_OP_LESS = 0x00000001, |
| 419 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 420 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 421 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 422 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 423 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 424 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 425 | } |
| 426 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 427 | enum VkPolygonMode { |
| 428 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 429 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 430 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 434 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 435 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 436 | } |
| 437 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 438 | enum VkBlendFactor { |
| 439 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 440 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 441 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 442 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 443 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 444 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 445 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 446 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 447 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 448 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 449 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 450 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 451 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 452 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 453 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 454 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 455 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 456 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 457 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 458 | } |
| 459 | |
| 460 | enum VkBlendOp { |
| 461 | VK_BLEND_OP_ADD = 0x00000000, |
| 462 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 463 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 464 | VK_BLEND_OP_MIN = 0x00000003, |
| 465 | VK_BLEND_OP_MAX = 0x00000004, |
| 466 | } |
| 467 | |
| 468 | enum VkStencilOp { |
| 469 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 470 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 471 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 472 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 473 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 474 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 475 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 476 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 477 | } |
| 478 | |
| 479 | enum VkLogicOp { |
| 480 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 481 | VK_LOGIC_OP_AND = 0x00000001, |
| 482 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 483 | VK_LOGIC_OP_COPY = 0x00000003, |
| 484 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 485 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 486 | VK_LOGIC_OP_XOR = 0x00000006, |
| 487 | VK_LOGIC_OP_OR = 0x00000007, |
| 488 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 489 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 490 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 491 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 492 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 493 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 494 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 495 | VK_LOGIC_OP_SET = 0x0000000f, |
| 496 | } |
| 497 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 498 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 499 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 500 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 501 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 502 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 503 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 504 | } |
| 505 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 506 | enum VkInternalAllocationType { |
| 507 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 508 | } |
| 509 | |
| 510 | enum VkPhysicalDeviceType { |
| 511 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 512 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 513 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 514 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 515 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 516 | } |
| 517 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 518 | enum VkVertexInputRate { |
| 519 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 520 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 521 | } |
| 522 | |
| 523 | /// Vulkan format definitions |
| 524 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 525 | VK_FORMAT_UNDEFINED = 0, |
| 526 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 527 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 528 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 529 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 530 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 531 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 532 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 533 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 534 | VK_FORMAT_R8_UNORM = 9, |
| 535 | VK_FORMAT_R8_SNORM = 10, |
| 536 | VK_FORMAT_R8_USCALED = 11, |
| 537 | VK_FORMAT_R8_SSCALED = 12, |
| 538 | VK_FORMAT_R8_UINT = 13, |
| 539 | VK_FORMAT_R8_SINT = 14, |
| 540 | VK_FORMAT_R8_SRGB = 15, |
| 541 | VK_FORMAT_R8G8_UNORM = 16, |
| 542 | VK_FORMAT_R8G8_SNORM = 17, |
| 543 | VK_FORMAT_R8G8_USCALED = 18, |
| 544 | VK_FORMAT_R8G8_SSCALED = 19, |
| 545 | VK_FORMAT_R8G8_UINT = 20, |
| 546 | VK_FORMAT_R8G8_SINT = 21, |
| 547 | VK_FORMAT_R8G8_SRGB = 22, |
| 548 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 549 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 550 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 551 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 552 | VK_FORMAT_R8G8B8_UINT = 27, |
| 553 | VK_FORMAT_R8G8B8_SINT = 28, |
| 554 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 555 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 556 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 557 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 558 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 559 | VK_FORMAT_B8G8R8_UINT = 34, |
| 560 | VK_FORMAT_B8G8R8_SINT = 35, |
| 561 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 562 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 563 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 564 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 565 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 566 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 567 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 568 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 569 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 570 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 571 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 572 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 573 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 574 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 575 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 576 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 577 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 578 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 579 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 580 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 581 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 582 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 583 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 584 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 585 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 586 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 587 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 588 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 589 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 590 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 591 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 592 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 593 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 594 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 595 | VK_FORMAT_R16_UNORM = 70, |
| 596 | VK_FORMAT_R16_SNORM = 71, |
| 597 | VK_FORMAT_R16_USCALED = 72, |
| 598 | VK_FORMAT_R16_SSCALED = 73, |
| 599 | VK_FORMAT_R16_UINT = 74, |
| 600 | VK_FORMAT_R16_SINT = 75, |
| 601 | VK_FORMAT_R16_SFLOAT = 76, |
| 602 | VK_FORMAT_R16G16_UNORM = 77, |
| 603 | VK_FORMAT_R16G16_SNORM = 78, |
| 604 | VK_FORMAT_R16G16_USCALED = 79, |
| 605 | VK_FORMAT_R16G16_SSCALED = 80, |
| 606 | VK_FORMAT_R16G16_UINT = 81, |
| 607 | VK_FORMAT_R16G16_SINT = 82, |
| 608 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 609 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 610 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 611 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 612 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 613 | VK_FORMAT_R16G16B16_UINT = 88, |
| 614 | VK_FORMAT_R16G16B16_SINT = 89, |
| 615 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 616 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 617 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 618 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 619 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 620 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 621 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 622 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 623 | VK_FORMAT_R32_UINT = 98, |
| 624 | VK_FORMAT_R32_SINT = 99, |
| 625 | VK_FORMAT_R32_SFLOAT = 100, |
| 626 | VK_FORMAT_R32G32_UINT = 101, |
| 627 | VK_FORMAT_R32G32_SINT = 102, |
| 628 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 629 | VK_FORMAT_R32G32B32_UINT = 104, |
| 630 | VK_FORMAT_R32G32B32_SINT = 105, |
| 631 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 632 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 633 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 634 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 635 | VK_FORMAT_R64_UINT = 110, |
| 636 | VK_FORMAT_R64_SINT = 111, |
| 637 | VK_FORMAT_R64_SFLOAT = 112, |
| 638 | VK_FORMAT_R64G64_UINT = 113, |
| 639 | VK_FORMAT_R64G64_SINT = 114, |
| 640 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 641 | VK_FORMAT_R64G64B64_UINT = 116, |
| 642 | VK_FORMAT_R64G64B64_SINT = 117, |
| 643 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 644 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 645 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 646 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 647 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 648 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 649 | VK_FORMAT_D16_UNORM = 124, |
| 650 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 651 | VK_FORMAT_D32_SFLOAT = 126, |
| 652 | VK_FORMAT_S8_UINT = 127, |
| 653 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 654 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 655 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 656 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 657 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 658 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 659 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 660 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 661 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 662 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 663 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 664 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 665 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 666 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 667 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 668 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 669 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 670 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 671 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 672 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 673 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 674 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 675 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 676 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 677 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 678 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 679 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 680 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 681 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 682 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 683 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 684 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 685 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 686 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 687 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 688 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 689 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 690 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 691 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 692 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 693 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 694 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 695 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 696 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 697 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 698 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 699 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 700 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 701 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 702 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 703 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 704 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 705 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 706 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 707 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 708 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 709 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 710 | |
| 711 | //@extension("VK_IMG_format_pvrtc") |
| 712 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 713 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 714 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 715 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 716 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 717 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 718 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 719 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 720 | } |
| 721 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 722 | /// Structure type enumerant |
| 723 | enum VkStructureType { |
| 724 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 725 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 726 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 727 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 728 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 729 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 730 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 731 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 732 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 733 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 734 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 735 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 736 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 737 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 738 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 739 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 740 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 741 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 742 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 743 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 744 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 745 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 746 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 747 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 748 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 749 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 750 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 751 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 752 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 753 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 754 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 755 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 756 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 757 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 758 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 759 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 760 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 761 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 762 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 763 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 764 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 765 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 766 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 767 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 768 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 769 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 770 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 771 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 772 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 773 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 774 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 775 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 776 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 777 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 778 | //@extension("VK_KHR_display") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 779 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 780 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 781 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 782 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 783 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 784 | |
| 785 | //@extension("VK_KHR_xlib_surface") |
| 786 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 787 | |
| 788 | //@extension("VK_KHR_xcb_surface") |
| 789 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 790 | |
| 791 | //@extension("VK_KHR_wayland_surface") |
| 792 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 793 | |
| 794 | //@extension("VK_KHR_mir_surface") |
| 795 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 796 | |
| 797 | //@extension("VK_KHR_android_surface") |
| 798 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 799 | |
| 800 | //@extension("VK_KHR_win32_surface") |
| 801 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 802 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 803 | //@extension("VK_ANDROID_native_buffer") |
| 804 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
| 805 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 806 | //@extension("VK_EXT_debug_report") |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 807 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 808 | |
| 809 | //@extension("VK_AMD_rasterization_order") |
| 810 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 811 | |
| 812 | //@extension("VK_EXT_debug_marker") |
| 813 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 814 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 815 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 816 | |
| 817 | //@extension("VK_NV_dedicated_allocation") |
| 818 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 819 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 820 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 821 | |
| 822 | //@extension("VK_NV_external_memory") |
| 823 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 824 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
| 825 | |
| 826 | //@extension("VK_NV_external_memory_win32") |
| 827 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 828 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
| 829 | |
| 830 | //@extension("VK_NV_win32_keyed_mutex") |
| 831 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 832 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 833 | //@extension("VK_KHR_get_physical_device_properties2") |
| 834 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 835 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 836 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 837 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 838 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 839 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 840 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 841 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
| 842 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 843 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 844 | //@extension("VK_EXT_validation_flags") |
| 845 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
| 846 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 847 | //@extension("VK_NN_vi_surface") |
| 848 | VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, |
| 849 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 850 | //@extension("VK_NVX_device_generated_commands") |
| 851 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 852 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 853 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 854 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 855 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 856 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 857 | |
| 858 | //@extension("VK_EXT_display_surface_counter") |
| 859 | VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, |
| 860 | |
| 861 | //@extension("VK_EXT_display_control") |
| 862 | VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, |
| 863 | VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, |
| 864 | VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, |
| 865 | VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 866 | } |
| 867 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 868 | enum VkSubpassContents { |
| 869 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 870 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 871 | } |
| 872 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 873 | enum VkPipelineCacheHeaderVersion { |
| 874 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 875 | } |
| 876 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 877 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 878 | /// Error and return codes |
| 879 | enum VkResult { |
| 880 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 881 | VK_SUCCESS = 0, |
| 882 | VK_NOT_READY = 1, |
| 883 | VK_TIMEOUT = 2, |
| 884 | VK_EVENT_SET = 3, |
| 885 | VK_EVENT_RESET = 4, |
| 886 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 887 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 888 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 889 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 890 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 891 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 892 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 893 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 894 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 895 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 896 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 897 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 898 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 899 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 900 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 901 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 902 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 903 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 904 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 905 | //@extension("VK_KHR_surface") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 906 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 907 | |
Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 908 | //@extension("VK_KHR_surface") |
| 909 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000008001 |
| 910 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 911 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 912 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 913 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 914 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 915 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 916 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 917 | //@extension("VK_EXT_debug_report") |
| 918 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 919 | |
| 920 | //@extension("VK_NV_glsl_shader") |
| 921 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 922 | |
| 923 | //@extension("VK_KHR_maintenance1") |
| 924 | VK_ERROR_OUT_OF_POOL_MEMORY_KHR = 0xC4642878, // -1000069000 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 925 | } |
| 926 | |
| 927 | enum VkDynamicState { |
| 928 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 929 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 930 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 931 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 932 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 933 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 934 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 935 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 936 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 937 | } |
| 938 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 939 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 940 | enum VkPresentModeKHR { |
| 941 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 942 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 943 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 944 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 945 | } |
| 946 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 947 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 948 | enum VkColorSpaceKHR { |
| 949 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 950 | |
| 951 | //@extension("VK_EXT_swapchain_colorspace") |
| 952 | VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001, |
| 953 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002, |
| 954 | VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003, |
| 955 | VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004, |
| 956 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005, |
| 957 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006, |
| 958 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007, |
| 959 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008, |
| 960 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009, |
| 961 | VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010, |
| 962 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 963 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 964 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 965 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 966 | @extension("VK_EXT_debug_report") |
| 967 | enum VkDebugReportObjectTypeEXT { |
| 968 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 969 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 970 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 971 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 972 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 973 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 974 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 975 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 976 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 977 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 978 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 979 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 980 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 981 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 982 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 983 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 984 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 985 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 986 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 987 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 988 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 989 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 990 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 991 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 992 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 993 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 994 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 995 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 996 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 997 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 998 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 999 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 1000 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1001 | } |
| 1002 | |
| 1003 | @extension("VK_EXT_debug_report") |
| 1004 | enum VkDebugReportErrorEXT { |
| 1005 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 1006 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 1007 | } |
| 1008 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1009 | @extension("VK_AMD_rasterization_order") |
| 1010 | enum VkRasterizationOrderAMD { |
| 1011 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 1012 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 1013 | } |
| 1014 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1015 | @extension("VK_EXT_validation_flags") |
| 1016 | enum VkValidationCheckEXT { |
| 1017 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 1018 | } |
| 1019 | |
| 1020 | @extension("VK_NVX_device_generated_commands") |
| 1021 | enum VkIndirectCommandsTokenTypeNVX { |
| 1022 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1023 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1024 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1025 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1026 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1027 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1028 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1029 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
| 1030 | } |
| 1031 | |
| 1032 | @extension("VK_NVX_device_generated_commands") |
| 1033 | enum VkObjectEntryTypeNVX { |
| 1034 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1035 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1036 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1037 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1038 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
| 1039 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1040 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 1041 | @extension("VK_EXT_display_control") |
| 1042 | enum VkDisplayPowerStateEXT { |
| 1043 | VK_DISPLAY_POWER_STATE_OFF_EXT = 0, |
| 1044 | VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, |
| 1045 | VK_DISPLAY_POWER_STATE_ON_EXT = 2, |
| 1046 | } |
| 1047 | |
| 1048 | @extension("VK_EXT_display_control") |
| 1049 | enum VkDeviceEventTypeEXT { |
| 1050 | VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, |
| 1051 | } |
| 1052 | |
| 1053 | @extension("VK_EXT_display_control") |
| 1054 | enum VkDisplayEventTypeEXT { |
| 1055 | VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, |
| 1056 | } |
| 1057 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1058 | ///////////////// |
| 1059 | // Bitfields // |
| 1060 | ///////////////// |
| 1061 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1062 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1063 | type VkFlags VkQueueFlags |
| 1064 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1065 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1066 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1067 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1068 | 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] | 1069 | } |
| 1070 | |
| 1071 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1072 | type VkFlags VkMemoryPropertyFlags |
| 1073 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1074 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1075 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1076 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1077 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1078 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1079 | } |
| 1080 | |
| 1081 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1082 | type VkFlags VkMemoryHeapFlags |
| 1083 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1084 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1085 | } |
| 1086 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1087 | /// Access flags |
| 1088 | type VkFlags VkAccessFlags |
| 1089 | bitfield VkAccessFlagBits { |
| 1090 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1091 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1092 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1093 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1094 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1095 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1096 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1097 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1098 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1099 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1100 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1101 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1102 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1103 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1104 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1105 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1106 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1107 | |
| 1108 | //@extension("VK_NVX_device_generated_commands") |
| 1109 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
| 1110 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1111 | } |
| 1112 | |
| 1113 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1114 | type VkFlags VkBufferUsageFlags |
| 1115 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1116 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1117 | 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] | 1118 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1119 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1120 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1121 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1122 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1123 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1124 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1125 | } |
| 1126 | |
| 1127 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1128 | type VkFlags VkBufferCreateFlags |
| 1129 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1130 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1131 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1132 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1133 | } |
| 1134 | |
| 1135 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1136 | type VkFlags VkShaderStageFlags |
| 1137 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1138 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1139 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1140 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1141 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1142 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1143 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1144 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1145 | |
| 1146 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1147 | } |
| 1148 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1149 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1150 | type VkFlags VkDescriptorPoolCreateFlags |
| 1151 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1152 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1153 | } |
| 1154 | |
| 1155 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1156 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1157 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1158 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1159 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1160 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1161 | type VkFlags VkImageUsageFlags |
| 1162 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1163 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1164 | 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] | 1165 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1166 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1167 | 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] | 1168 | 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] | 1169 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1170 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1171 | } |
| 1172 | |
| 1173 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1174 | type VkFlags VkImageCreateFlags |
| 1175 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1176 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1177 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1178 | 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] | 1179 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1180 | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 1181 | |
| 1182 | //@extension("VK_KHR_maintenance1") |
| 1183 | VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1184 | } |
| 1185 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1186 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1187 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1188 | //bitfield VkImageViewCreateFlagBits { |
| 1189 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1190 | |
| 1191 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1192 | type VkFlags VkPipelineCreateFlags |
| 1193 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1194 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1195 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1196 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
| 1197 | } |
| 1198 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1199 | /// Color component flags |
| 1200 | type VkFlags VkColorComponentFlags |
| 1201 | bitfield VkColorComponentFlagBits { |
| 1202 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1203 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1204 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1205 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1206 | } |
| 1207 | |
| 1208 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1209 | type VkFlags VkFenceCreateFlags |
| 1210 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1211 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1212 | } |
| 1213 | |
| 1214 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1215 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1216 | //bitfield VkSemaphoreCreateFlagBits { |
| 1217 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1218 | |
| 1219 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1220 | type VkFlags VkFormatFeatureFlags |
| 1221 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1222 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1223 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1224 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1225 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1226 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1227 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1228 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1229 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1230 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1231 | 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] | 1232 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1233 | 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] | 1234 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1235 | |
| 1236 | //@extension("VK_IMG_filter_cubic") |
| 1237 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 1238 | |
| 1239 | //@extension("VK_KHR_maintenance1") |
| 1240 | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, |
| 1241 | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1242 | } |
| 1243 | |
| 1244 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1245 | type VkFlags VkQueryControlFlags |
| 1246 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1247 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1248 | } |
| 1249 | |
| 1250 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1251 | type VkFlags VkQueryResultFlags |
| 1252 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1253 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1254 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1255 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1256 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1257 | } |
| 1258 | |
| 1259 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1260 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1261 | //bitfield VkShaderModuleCreateFlagBits { |
| 1262 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1263 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1264 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1265 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1266 | //bitfield VkEventCreateFlagBits { |
| 1267 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1268 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1269 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1270 | type VkFlags VkCommandBufferUsageFlags |
| 1271 | bitfield VkCommandBufferUsageFlagBits { |
| 1272 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1273 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1274 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1275 | } |
| 1276 | |
| 1277 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1278 | type VkFlags VkQueryPipelineStatisticFlags |
| 1279 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1280 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1281 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1282 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1283 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1284 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1285 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1286 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1287 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1288 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1289 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1290 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1291 | } |
| 1292 | |
| 1293 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1294 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1295 | //bitfield VkMemoryMapFlagBits { |
| 1296 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1297 | |
| 1298 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1299 | type VkFlags VkImageAspectFlags |
| 1300 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1301 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1302 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1303 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1304 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1305 | } |
| 1306 | |
| 1307 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1308 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1309 | bitfield VkSparseMemoryBindFlagBits { |
| 1310 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1311 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1312 | |
| 1313 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1314 | type VkFlags VkSparseImageFormatFlags |
| 1315 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1316 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1317 | 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. |
| 1318 | 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] | 1319 | } |
| 1320 | |
| 1321 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1322 | type VkFlags VkPipelineStageFlags |
| 1323 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1324 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1325 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1326 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1327 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1328 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1329 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1330 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1331 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1332 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1333 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1334 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1335 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1336 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1337 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1338 | 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] | 1339 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1340 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1341 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1342 | |
| 1343 | //@extension("VK_NVX_device_generated_commands") |
| 1344 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1345 | } |
| 1346 | |
| 1347 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1348 | type VkFlags VkAttachmentDescriptionFlags |
| 1349 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1350 | 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] | 1351 | } |
| 1352 | |
| 1353 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1354 | type VkFlags VkSubpassDescriptionFlags |
| 1355 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1356 | } |
| 1357 | |
| 1358 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1359 | type VkFlags VkCommandPoolCreateFlags |
| 1360 | bitfield VkCommandPoolCreateFlagBits { |
| 1361 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1362 | 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] | 1363 | } |
| 1364 | |
| 1365 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1366 | type VkFlags VkCommandPoolResetFlags |
| 1367 | bitfield VkCommandPoolResetFlagBits { |
| 1368 | 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] | 1369 | } |
| 1370 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1371 | type VkFlags VkCommandBufferResetFlags |
| 1372 | bitfield VkCommandBufferResetFlagBits { |
| 1373 | 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] | 1374 | } |
| 1375 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1376 | type VkFlags VkSampleCountFlags |
| 1377 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1378 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1379 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1380 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1381 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1382 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1383 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1384 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1385 | } |
| 1386 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1387 | type VkFlags VkStencilFaceFlags |
| 1388 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1389 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1390 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1391 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1392 | } |
| 1393 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1394 | /// Instance creation flags |
| 1395 | type VkFlags VkInstanceCreateFlags |
| 1396 | //bitfield VkInstanceCreateFlagBits { |
| 1397 | //} |
| 1398 | |
| 1399 | /// Device creation flags |
| 1400 | type VkFlags VkDeviceCreateFlags |
| 1401 | //bitfield VkDeviceCreateFlagBits { |
| 1402 | //} |
| 1403 | |
| 1404 | /// Device queue creation flags |
| 1405 | type VkFlags VkDeviceQueueCreateFlags |
| 1406 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1407 | //} |
| 1408 | |
| 1409 | /// Query pool creation flags |
| 1410 | type VkFlags VkQueryPoolCreateFlags |
| 1411 | //bitfield VkQueryPoolCreateFlagBits { |
| 1412 | //} |
| 1413 | |
| 1414 | /// Buffer view creation flags |
| 1415 | type VkFlags VkBufferViewCreateFlags |
| 1416 | //bitfield VkBufferViewCreateFlagBits { |
| 1417 | //} |
| 1418 | |
| 1419 | /// Pipeline cache creation flags |
| 1420 | type VkFlags VkPipelineCacheCreateFlags |
| 1421 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1422 | //} |
| 1423 | |
| 1424 | /// Pipeline shader stage creation flags |
| 1425 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1426 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1427 | //} |
| 1428 | |
| 1429 | /// Descriptor set layout creation flags |
| 1430 | type VkFlags VkDescriptorSetLayoutCreateFlags |
| 1431 | //bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1432 | //} |
| 1433 | |
| 1434 | /// Pipeline vertex input state creation flags |
| 1435 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1436 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1437 | //} |
| 1438 | |
| 1439 | /// Pipeline input assembly state creation flags |
| 1440 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1441 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1442 | //} |
| 1443 | |
| 1444 | /// Tessellation state creation flags |
| 1445 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1446 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1447 | //} |
| 1448 | |
| 1449 | /// Viewport state creation flags |
| 1450 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1451 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1452 | //} |
| 1453 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1454 | /// Rasterization state creation flags |
| 1455 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1456 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1457 | //} |
| 1458 | |
| 1459 | /// Multisample state creation flags |
| 1460 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1461 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1462 | //} |
| 1463 | |
| 1464 | /// Color blend state creation flags |
| 1465 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1466 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1467 | //} |
| 1468 | |
| 1469 | /// Depth/stencil state creation flags |
| 1470 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1471 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1472 | //} |
| 1473 | |
| 1474 | /// Dynamic state creation flags |
| 1475 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1476 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1477 | //} |
| 1478 | |
| 1479 | /// Pipeline layout creation flags |
| 1480 | type VkFlags VkPipelineLayoutCreateFlags |
| 1481 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1482 | //} |
| 1483 | |
| 1484 | /// Sampler creation flags |
| 1485 | type VkFlags VkSamplerCreateFlags |
| 1486 | //bitfield VkSamplerCreateFlagBits { |
| 1487 | //} |
| 1488 | |
| 1489 | /// Render pass creation flags |
| 1490 | type VkFlags VkRenderPassCreateFlags |
| 1491 | //bitfield VkRenderPassCreateFlagBits { |
| 1492 | //} |
| 1493 | |
| 1494 | /// Framebuffer creation flags |
| 1495 | type VkFlags VkFramebufferCreateFlags |
| 1496 | //bitfield VkFramebufferCreateFlagBits { |
| 1497 | //} |
| 1498 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1499 | /// Dependency flags |
| 1500 | type VkFlags VkDependencyFlags |
| 1501 | bitfield VkDependencyFlagBits { |
| 1502 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
| 1503 | } |
| 1504 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1505 | /// Cull mode flags |
| 1506 | type VkFlags VkCullModeFlags |
| 1507 | bitfield VkCullModeFlagBits { |
| 1508 | VK_CULL_MODE_NONE = 0x00000000, |
| 1509 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1510 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1511 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1512 | } |
| 1513 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1514 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1515 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1516 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1517 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1518 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1519 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1520 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1521 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1522 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1523 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1524 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1525 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1526 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1527 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1528 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1529 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1530 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1531 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1532 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1533 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1534 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1535 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1536 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1537 | } |
| 1538 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1539 | @extension("VK_KHR_swapchain") |
| 1540 | type VkFlags VkSwapchainCreateFlagsKHR |
| 1541 | //@extension("VK_KHR_swapchain") |
| 1542 | //bitfield VkSwapchainCreateFlagBitsKHR { |
| 1543 | //} |
| 1544 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1545 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1546 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1547 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1548 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1549 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1550 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1551 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1552 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1553 | } |
| 1554 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1555 | @extension("VK_KHR_display") |
| 1556 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
| 1557 | //@extension("VK_KHR_display") |
| 1558 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1559 | //} |
| 1560 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1561 | @extension("VK_KHR_display") |
| 1562 | type VkFlags VkDisplayModeCreateFlagsKHR |
| 1563 | //@extension("VK_KHR_display") |
| 1564 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1565 | //} |
| 1566 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1567 | @extension("VK_KHR_xlib_surface") |
| 1568 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
| 1569 | //@extension("VK_KHR_xlib_surface") |
| 1570 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1571 | //} |
| 1572 | |
| 1573 | @extension("VK_KHR_xcb_surface") |
| 1574 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
| 1575 | //@extension("VK_KHR_xcb_surface") |
| 1576 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1577 | //} |
| 1578 | |
| 1579 | @extension("VK_KHR_wayland_surface") |
| 1580 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
| 1581 | //@extension("VK_KHR_wayland_surface") |
| 1582 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1583 | //} |
| 1584 | |
| 1585 | @extension("VK_KHR_mir_surface") |
| 1586 | type VkFlags VkMirSurfaceCreateFlagsKHR |
| 1587 | //@extension("VK_KHR_mir_surface") |
| 1588 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1589 | //} |
| 1590 | |
| 1591 | @extension("VK_KHR_android_surface") |
| 1592 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
| 1593 | //@extension("VK_KHR_android_surface") |
| 1594 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1595 | //} |
| 1596 | |
| 1597 | @extension("VK_KHR_win32_surface") |
| 1598 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
| 1599 | //@extension("VK_KHR_win32_surface") |
| 1600 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1601 | //} |
| 1602 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1603 | @extension("VK_EXT_debug_report") |
| 1604 | type VkFlags VkDebugReportFlagsEXT |
| 1605 | @extension("VK_EXT_debug_report") |
| 1606 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1607 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1608 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1609 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1610 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1611 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1612 | } |
| 1613 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1614 | @extension("VK_NV_external_memory_capabilities") |
| 1615 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
| 1616 | @extension("VK_NV_external_memory_capabilities") |
| 1617 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
| 1618 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1619 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1620 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1621 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
| 1622 | } |
| 1623 | |
| 1624 | @extension("VK_NV_external_memory_capabilities") |
| 1625 | type VkFlags VkExternalMemoryFeatureFlagsNV |
| 1626 | @extension("VK_NV_external_memory_capabilities") |
| 1627 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
| 1628 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1629 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1630 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
| 1631 | } |
| 1632 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 1633 | @extension("VK_NN_vi_surface") |
| 1634 | type VkFlags VkViSurfaceCreateFlagsNN |
| 1635 | //@extension("VK_NN_vi_surface") |
| 1636 | //bitfield VkViSurfaceCreateFlagBitsNN { |
| 1637 | //} |
| 1638 | |
| 1639 | @extension("VK_KHR_maintenance1") |
| 1640 | type VkFlags VkCommandPoolTrimFlagsKHR |
| 1641 | //@extension("VK_KHR_maintenance1") |
| 1642 | //bitfield VkCommandPoolTrimFlagBitsKHR { |
| 1643 | //} |
| 1644 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1645 | @extension("VK_NVX_device_generated_commands") |
| 1646 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
| 1647 | @extension("VK_NVX_device_generated_commands") |
| 1648 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
| 1649 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 1650 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 1651 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 1652 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
| 1653 | } |
| 1654 | |
| 1655 | @extension("VK_NVX_device_generated_commands") |
| 1656 | type VkFlags VkObjectEntryUsageFlagsNVX |
| 1657 | @extension("VK_NVX_device_generated_commands") |
| 1658 | bitfield VkObjectEntryUsageFlagBitsNVX { |
| 1659 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 1660 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
| 1661 | } |
| 1662 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 1663 | @extension("VK_EXT_display_surface_counter") |
| 1664 | type VkFlags VkSurfaceCounterFlagsEXT |
| 1665 | @extension("VK_EXT_display_surface_counter") |
| 1666 | bitfield VkSurfaceCounterFlagBitsEXT { |
| 1667 | VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, |
| 1668 | } |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1669 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1670 | ////////////////// |
| 1671 | // Structures // |
| 1672 | ////////////////// |
| 1673 | |
| 1674 | class VkOffset2D { |
| 1675 | s32 x |
| 1676 | s32 y |
| 1677 | } |
| 1678 | |
| 1679 | class VkOffset3D { |
| 1680 | s32 x |
| 1681 | s32 y |
| 1682 | s32 z |
| 1683 | } |
| 1684 | |
| 1685 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1686 | u32 width |
| 1687 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1688 | } |
| 1689 | |
| 1690 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1691 | u32 width |
| 1692 | u32 height |
| 1693 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1694 | } |
| 1695 | |
| 1696 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1697 | f32 x |
| 1698 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1699 | f32 width |
| 1700 | f32 height |
| 1701 | f32 minDepth |
| 1702 | f32 maxDepth |
| 1703 | } |
| 1704 | |
| 1705 | class VkRect2D { |
| 1706 | VkOffset2D offset |
| 1707 | VkExtent2D extent |
| 1708 | } |
| 1709 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1710 | class VkClearRect { |
| 1711 | VkRect2D rect |
| 1712 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1713 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1714 | } |
| 1715 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1716 | class VkComponentMapping { |
| 1717 | VkComponentSwizzle r |
| 1718 | VkComponentSwizzle g |
| 1719 | VkComponentSwizzle b |
| 1720 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1721 | } |
| 1722 | |
| 1723 | class VkPhysicalDeviceProperties { |
| 1724 | u32 apiVersion |
| 1725 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1726 | u32 vendorID |
| 1727 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1728 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1729 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 1730 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1731 | VkPhysicalDeviceLimits limits |
| 1732 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1733 | } |
| 1734 | |
| 1735 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1736 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1737 | u32 specVersion /// version of the extension specification implemented |
| 1738 | } |
| 1739 | |
| 1740 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1741 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1742 | u32 specVersion /// version of the layer specification implemented |
| 1743 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1744 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1745 | } |
| 1746 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1747 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1748 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 1749 | const void* pNext /// Next structure in chain |
| 1750 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1751 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1752 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1753 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1754 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1755 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1756 | const VkSemaphore* pSignalSemaphores |
| 1757 | } |
| 1758 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1759 | class VkApplicationInfo { |
| 1760 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 1761 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1762 | const char* pApplicationName |
| 1763 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1764 | const char* pEngineName |
| 1765 | u32 engineVersion |
| 1766 | u32 apiVersion |
| 1767 | } |
| 1768 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1769 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1770 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1771 | PFN_vkAllocationFunction pfnAllocation |
| 1772 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1773 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1774 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1775 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1776 | } |
| 1777 | |
| 1778 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1779 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 1780 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1781 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1782 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1783 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1784 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1785 | } |
| 1786 | |
| 1787 | class VkDeviceCreateInfo { |
| 1788 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 1789 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1790 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1791 | u32 queueCreateInfoCount |
| 1792 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1793 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1794 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1795 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1796 | const char* const* ppEnabledExtensionNames |
| 1797 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1798 | } |
| 1799 | |
| 1800 | class VkInstanceCreateInfo { |
| 1801 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 1802 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1803 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1804 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1805 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1806 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1807 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1808 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 1809 | } |
| 1810 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1811 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1812 | VkQueueFlags queueFlags /// Queue flags |
| 1813 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1814 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1815 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1816 | } |
| 1817 | |
| 1818 | class VkPhysicalDeviceMemoryProperties { |
| 1819 | u32 memoryTypeCount |
| 1820 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 1821 | u32 memoryHeapCount |
| 1822 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 1823 | } |
| 1824 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1825 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1826 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1827 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1828 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1829 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 1830 | } |
| 1831 | |
| 1832 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1833 | VkDeviceSize size /// Specified in bytes |
| 1834 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1835 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 1836 | } |
| 1837 | |
| 1838 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1839 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1840 | VkExtent3D imageGranularity |
| 1841 | VkSparseImageFormatFlags flags |
| 1842 | } |
| 1843 | |
| 1844 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1845 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1846 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1847 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 1848 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 1849 | 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] | 1850 | } |
| 1851 | |
| 1852 | class VkMemoryType { |
| 1853 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 1854 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 1855 | } |
| 1856 | |
| 1857 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1858 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1859 | VkMemoryHeapFlags flags /// Flags for the heap |
| 1860 | } |
| 1861 | |
| 1862 | class VkMappedMemoryRange { |
| 1863 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 1864 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1865 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1866 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 1867 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1868 | } |
| 1869 | |
| 1870 | class VkFormatProperties { |
| 1871 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 1872 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1873 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1874 | } |
| 1875 | |
| 1876 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1877 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 1878 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1879 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1880 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 1881 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 1882 | } |
| 1883 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1884 | class VkDescriptorImageInfo { |
| 1885 | VkSampler sampler |
| 1886 | VkImageView imageView |
| 1887 | VkImageLayout imageLayout |
| 1888 | } |
| 1889 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1890 | class VkDescriptorBufferInfo { |
| 1891 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 1892 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 1893 | 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] | 1894 | } |
| 1895 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1896 | class VkWriteDescriptorSet { |
| 1897 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 1898 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1899 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1900 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 1901 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1902 | 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] | 1903 | 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] | 1904 | const VkDescriptorImageInfo* pImageInfo |
| 1905 | const VkDescriptorBufferInfo* pBufferInfo |
| 1906 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1907 | } |
| 1908 | |
| 1909 | class VkCopyDescriptorSet { |
| 1910 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 1911 | const void* pNext /// Pointer to next structure |
| 1912 | VkDescriptorSet srcSet /// Source descriptor set |
| 1913 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 1914 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1915 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1916 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 1917 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1918 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1919 | } |
| 1920 | |
| 1921 | class VkBufferCreateInfo { |
| 1922 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 1923 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1924 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1925 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1926 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1927 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1928 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1929 | const u32* pQueueFamilyIndices |
| 1930 | } |
| 1931 | |
| 1932 | class VkBufferViewCreateInfo { |
| 1933 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 1934 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1935 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1936 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1937 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1938 | VkDeviceSize offset /// Specified in bytes |
| 1939 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1940 | } |
| 1941 | |
| 1942 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1943 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1944 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1945 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1946 | } |
| 1947 | |
| 1948 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1949 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1950 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1951 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1952 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1953 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1954 | } |
| 1955 | |
| 1956 | class VkMemoryBarrier { |
| 1957 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 1958 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1959 | VkAccessFlags srcAccessMask |
| 1960 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1961 | } |
| 1962 | |
| 1963 | class VkBufferMemoryBarrier { |
| 1964 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 1965 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1966 | VkAccessFlags srcAccessMask |
| 1967 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1968 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1969 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1970 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1971 | VkDeviceSize offset /// Offset within the buffer to sync |
| 1972 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1973 | } |
| 1974 | |
| 1975 | class VkImageMemoryBarrier { |
| 1976 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 1977 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1978 | VkAccessFlags srcAccessMask |
| 1979 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1980 | VkImageLayout oldLayout /// Current layout of the image |
| 1981 | VkImageLayout newLayout /// New layout to transition the image to |
| 1982 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1983 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1984 | VkImage image /// Image to sync |
| 1985 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 1986 | } |
| 1987 | |
| 1988 | class VkImageCreateInfo { |
| 1989 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 1990 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1991 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1992 | VkImageType imageType |
| 1993 | VkFormat format |
| 1994 | VkExtent3D extent |
| 1995 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1996 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1997 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1998 | VkImageTiling tiling |
| 1999 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2000 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2001 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2002 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2003 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2004 | } |
| 2005 | |
| 2006 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2007 | VkDeviceSize offset /// Specified in bytes |
| 2008 | VkDeviceSize size /// Specified in bytes |
| 2009 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2010 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2011 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2012 | } |
| 2013 | |
| 2014 | class VkImageViewCreateInfo { |
| 2015 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 2016 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2017 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2018 | VkImage image |
| 2019 | VkImageViewType viewType |
| 2020 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2021 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2022 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2023 | } |
| 2024 | |
| 2025 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2026 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2027 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2028 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2029 | } |
| 2030 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2031 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2032 | VkDeviceSize resourceOffset /// Specified in bytes |
| 2033 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2034 | VkDeviceMemory memory |
| 2035 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2036 | VkSparseMemoryBindFlags flags |
| 2037 | } |
| 2038 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2039 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2040 | VkImageSubresource subresource |
| 2041 | VkOffset3D offset |
| 2042 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2043 | VkDeviceMemory memory |
| 2044 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2045 | VkSparseMemoryBindFlags flags |
| 2046 | } |
| 2047 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2048 | class VkSparseBufferMemoryBindInfo { |
| 2049 | VkBuffer buffer |
| 2050 | u32 bindCount |
| 2051 | const VkSparseMemoryBind* pBinds |
| 2052 | } |
| 2053 | |
| 2054 | class VkSparseImageOpaqueMemoryBindInfo { |
| 2055 | VkImage image |
| 2056 | u32 bindCount |
| 2057 | const VkSparseMemoryBind* pBinds |
| 2058 | } |
| 2059 | |
| 2060 | class VkSparseImageMemoryBindInfo { |
| 2061 | VkImage image |
| 2062 | u32 bindCount |
| 2063 | const VkSparseMemoryBind* pBinds |
| 2064 | } |
| 2065 | |
| 2066 | class VkBindSparseInfo { |
| 2067 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2068 | const void* pNext |
| 2069 | u32 waitSemaphoreCount |
| 2070 | const VkSemaphore* pWaitSemaphores |
| 2071 | u32 numBufferBinds |
| 2072 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2073 | u32 numImageOpaqueBinds |
| 2074 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2075 | u32 numImageBinds |
| 2076 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2077 | u32 signalSemaphoreCount |
| 2078 | const VkSemaphore* pSignalSemaphores |
| 2079 | } |
| 2080 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2081 | class VkImageSubresourceLayers { |
| 2082 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2083 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2084 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2085 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2086 | } |
| 2087 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2088 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2089 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2090 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2091 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2092 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2093 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2094 | } |
| 2095 | |
| 2096 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2097 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2098 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2099 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2100 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2101 | } |
| 2102 | |
| 2103 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2104 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2105 | u32 bufferRowLength /// Specified in texels |
| 2106 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2107 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2108 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2109 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2110 | } |
| 2111 | |
| 2112 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2113 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2114 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2115 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2116 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2117 | VkExtent3D extent |
| 2118 | } |
| 2119 | |
| 2120 | class VkShaderModuleCreateInfo { |
| 2121 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2122 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2123 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2124 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2125 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2126 | } |
| 2127 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2128 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2129 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2130 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2131 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2132 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2133 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2134 | } |
| 2135 | |
| 2136 | class VkDescriptorSetLayoutCreateInfo { |
| 2137 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2138 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2139 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2140 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2141 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2142 | } |
| 2143 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2144 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2145 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2146 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2147 | } |
| 2148 | |
| 2149 | class VkDescriptorPoolCreateInfo { |
| 2150 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2151 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2152 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2153 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2154 | u32 poolSizeCount |
| 2155 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2156 | } |
| 2157 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2158 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2159 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2160 | const void* pNext /// Pointer to next structure |
| 2161 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2162 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2163 | const VkDescriptorSetLayout* pSetLayouts |
| 2164 | } |
| 2165 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2166 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2167 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2168 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2169 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2170 | } |
| 2171 | |
| 2172 | class VkSpecializationInfo { |
| 2173 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2174 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2175 | platform.size_t dataSize /// Size in bytes of pData |
| 2176 | const void* pData /// Pointer to SpecConstant data |
| 2177 | } |
| 2178 | |
| 2179 | class VkPipelineShaderStageCreateInfo { |
| 2180 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2181 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2182 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2183 | VkShaderStageFlagBits stage |
| 2184 | VkShaderModule module |
| 2185 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2186 | const VkSpecializationInfo* pSpecializationInfo |
| 2187 | } |
| 2188 | |
| 2189 | class VkComputePipelineCreateInfo { |
| 2190 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2191 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2192 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2193 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2194 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2195 | 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 |
| 2196 | 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 |
| 2197 | } |
| 2198 | |
| 2199 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2200 | u32 binding /// Vertex buffer binding id |
| 2201 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2202 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2203 | } |
| 2204 | |
| 2205 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2206 | u32 location /// location of the shader vertex attrib |
| 2207 | u32 binding /// Vertex buffer binding id |
| 2208 | VkFormat format /// format of source data |
| 2209 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2210 | } |
| 2211 | |
| 2212 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2213 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2214 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2215 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2216 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2217 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2218 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2219 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2220 | } |
| 2221 | |
| 2222 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2223 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2224 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2225 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2226 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2227 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2228 | } |
| 2229 | |
| 2230 | class VkPipelineTessellationStateCreateInfo { |
| 2231 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2232 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2233 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2234 | u32 patchControlPoints |
| 2235 | } |
| 2236 | |
| 2237 | class VkPipelineViewportStateCreateInfo { |
| 2238 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2239 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2240 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2241 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2242 | const VkViewport* pViewports |
| 2243 | u32 scissorCount |
| 2244 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2245 | } |
| 2246 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2247 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2248 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2249 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2250 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2251 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2252 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2253 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2254 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2255 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2256 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2257 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2258 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2259 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2260 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2261 | } |
| 2262 | |
| 2263 | class VkPipelineMultisampleStateCreateInfo { |
| 2264 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2265 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2266 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2267 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2268 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2269 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2270 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2271 | VkBool32 alphaToCoverageEnable |
| 2272 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2273 | } |
| 2274 | |
| 2275 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2276 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2277 | VkBlendFactor srcColorBlendFactor |
| 2278 | VkBlendFactor dstColorBlendFactor |
| 2279 | VkBlendOp colorBlendOp |
| 2280 | VkBlendFactor srcAlphaBlendFactor |
| 2281 | VkBlendFactor dstAlphaBlendFactor |
| 2282 | VkBlendOp alphaBlendOp |
| 2283 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2284 | } |
| 2285 | |
| 2286 | class VkPipelineColorBlendStateCreateInfo { |
| 2287 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2288 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2289 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2290 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2291 | VkLogicOp logicOp |
| 2292 | u32 attachmentCount /// # of pAttachments |
| 2293 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2294 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2295 | } |
| 2296 | |
| 2297 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2298 | VkStencilOp failOp |
| 2299 | VkStencilOp passOp |
| 2300 | VkStencilOp depthFailOp |
| 2301 | VkCompareOp compareOp |
| 2302 | u32 compareMask |
| 2303 | u32 writeMask |
| 2304 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2305 | } |
| 2306 | |
| 2307 | class VkPipelineDepthStencilStateCreateInfo { |
| 2308 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2309 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2310 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2311 | VkBool32 depthTestEnable |
| 2312 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2314 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2315 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2316 | VkStencilOpState front |
| 2317 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2318 | f32 minDepthBounds |
| 2319 | f32 maxDepthBounds |
| 2320 | } |
| 2321 | |
| 2322 | class VkPipelineDynamicStateCreateInfo { |
| 2323 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2324 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2325 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2326 | u32 dynamicStateCount |
| 2327 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2328 | } |
| 2329 | |
| 2330 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2331 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2332 | const void* pNext /// Pointer to next structure |
| 2333 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2334 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2335 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2336 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2337 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2338 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2339 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2340 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2341 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2342 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2343 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2344 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2345 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2346 | VkRenderPass renderPass |
| 2347 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2348 | 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 |
| 2349 | 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] | 2350 | } |
| 2351 | |
| 2352 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2353 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2354 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2355 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2356 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2357 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2358 | } |
| 2359 | |
| 2360 | class VkPushConstantRange { |
| 2361 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2362 | u32 offset /// Start of the range, in bytes |
| 2363 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2364 | } |
| 2365 | |
| 2366 | class VkPipelineLayoutCreateInfo { |
| 2367 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2368 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2369 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2370 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2371 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2372 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2373 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2374 | } |
| 2375 | |
| 2376 | class VkSamplerCreateInfo { |
| 2377 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2378 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2379 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2380 | VkFilter magFilter /// Filter mode for magnification |
| 2381 | VkFilter minFilter /// Filter mode for minifiation |
| 2382 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2383 | VkSamplerAddressMode addressModeU |
| 2384 | VkSamplerAddressMode addressModeV |
| 2385 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2386 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2387 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2388 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2389 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2390 | VkCompareOp compareOp |
| 2391 | f32 minLod |
| 2392 | f32 maxLod |
| 2393 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2394 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2395 | } |
| 2396 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2397 | class VkCommandPoolCreateInfo { |
| 2398 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2399 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2400 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2401 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2402 | } |
| 2403 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2404 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2405 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2406 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2407 | VkCommandPool commandPool |
| 2408 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2409 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2410 | } |
| 2411 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2412 | class VkCommandBufferInheritanceInfo { |
| 2413 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2414 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2415 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2416 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2417 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2418 | VkBool32 occlusionQueryEnable |
| 2419 | VkQueryControlFlags queryFlags |
| 2420 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2421 | } |
| 2422 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2423 | class VkCommandBufferBeginInfo { |
| 2424 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2425 | const void* pNext /// Pointer to next structure |
| 2426 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2427 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2428 | } |
| 2429 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2430 | class VkRenderPassBeginInfo { |
| 2431 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2432 | const void* pNext /// Pointer to next structure |
| 2433 | VkRenderPass renderPass |
| 2434 | VkFramebuffer framebuffer |
| 2435 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2436 | u32 clearValueCount |
| 2437 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2438 | } |
| 2439 | |
| 2440 | @union |
| 2441 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2442 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2443 | f32[4] float32 |
| 2444 | s32[4] int32 |
| 2445 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2446 | } |
| 2447 | |
| 2448 | class VkClearDepthStencilValue { |
| 2449 | f32 depth |
| 2450 | u32 stencil |
| 2451 | } |
| 2452 | |
| 2453 | @union |
| 2454 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2455 | class VkClearValue { |
| 2456 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2457 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2458 | } |
| 2459 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2460 | class VkClearAttachment { |
| 2461 | VkImageAspectFlags aspectMask |
| 2462 | u32 colorAttachment |
| 2463 | VkClearValue clearValue |
| 2464 | } |
| 2465 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2466 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2467 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2468 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2469 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2470 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2471 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2472 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2473 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2474 | VkImageLayout initialLayout |
| 2475 | VkImageLayout finalLayout |
| 2476 | } |
| 2477 | |
| 2478 | class VkAttachmentReference { |
| 2479 | u32 attachment |
| 2480 | VkImageLayout layout |
| 2481 | } |
| 2482 | |
| 2483 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2484 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2485 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2486 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2487 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2488 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2489 | const VkAttachmentReference* pColorAttachments |
| 2490 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2491 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2492 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2493 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2494 | } |
| 2495 | |
| 2496 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2497 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2498 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2499 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2500 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2501 | VkAccessFlags srcAccessMask |
| 2502 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2503 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2504 | } |
| 2505 | |
| 2506 | class VkRenderPassCreateInfo { |
| 2507 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2508 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2509 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2510 | u32 attachmentCount |
| 2511 | const VkAttachmentDescription* pAttachments |
| 2512 | u32 subpassCount |
| 2513 | const VkSubpassDescription* pSubpasses |
| 2514 | u32 dependencyCount |
| 2515 | const VkSubpassDependency* pDependencies |
| 2516 | } |
| 2517 | |
| 2518 | class VkEventCreateInfo { |
| 2519 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2520 | const void* pNext /// Pointer to next structure |
| 2521 | VkEventCreateFlags flags /// Event creation flags |
| 2522 | } |
| 2523 | |
| 2524 | class VkFenceCreateInfo { |
| 2525 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2526 | const void* pNext /// Pointer to next structure |
| 2527 | VkFenceCreateFlags flags /// Fence creation flags |
| 2528 | } |
| 2529 | |
| 2530 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2531 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2532 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2533 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2534 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2535 | VkBool32 geometryShader /// geometry stage |
| 2536 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2537 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2538 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2539 | VkBool32 logicOp /// logic operations |
| 2540 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2541 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2542 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2543 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2544 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2545 | VkBool32 depthBounds /// depth bounds test |
| 2546 | VkBool32 wideLines /// lines with width greater than 1 |
| 2547 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2548 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2549 | VkBool32 multiViewport |
| 2550 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2551 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2552 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2553 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2554 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2555 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2556 | VkBool32 vertexPipelineStoresAndAtomics |
| 2557 | VkBool32 fragmentStoresAndAtomics |
| 2558 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2559 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2560 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2561 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2562 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2563 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2564 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2565 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2566 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2567 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2568 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2569 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2570 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2571 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2572 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2573 | 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] | 2574 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2575 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2576 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2577 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2578 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2579 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2580 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2581 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2582 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2583 | 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] | 2584 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2585 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2586 | } |
| 2587 | |
| 2588 | class VkPhysicalDeviceLimits { |
| 2589 | /// resource maximum sizes |
| 2590 | u32 maxImageDimension1D /// max 1D image dimension |
| 2591 | u32 maxImageDimension2D /// max 2D image dimension |
| 2592 | u32 maxImageDimension3D /// max 3D image dimension |
| 2593 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2594 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2595 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2596 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 2597 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2598 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 2599 | /// memory limits |
| 2600 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2601 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2602 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 2603 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2604 | /// descriptor set limits |
| 2605 | 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] | 2606 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 2607 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 2608 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 2609 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 2610 | 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] | 2611 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2612 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2613 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 2614 | 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] | 2615 | 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] | 2616 | 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] | 2617 | 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] | 2618 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 2619 | 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] | 2620 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2621 | /// vertex stage limits |
| 2622 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2623 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2624 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 2625 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 2626 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 2627 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2628 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2629 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 2630 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 2631 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 2632 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 2633 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 2634 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 2635 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2636 | /// geometry stage limits |
| 2637 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 2638 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 2639 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 2640 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 2641 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 2642 | /// fragment stage limits |
| 2643 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2644 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2645 | 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] | 2646 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 2647 | /// compute stage limits |
| 2648 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 2649 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 2650 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 2651 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 2652 | |
| 2653 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 2654 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 2655 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 2656 | |
| 2657 | 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] | 2658 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2659 | |
| 2660 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 2661 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 2662 | |
| 2663 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2664 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 2665 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 2666 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 2667 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2668 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 2669 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 2670 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 2671 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2672 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2673 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2674 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2675 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2676 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 2677 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 2678 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 2679 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 2680 | |
| 2681 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 2682 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 2683 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2684 | VkSampleCountFlags framebufferColorSampleCounts |
| 2685 | VkSampleCountFlags framebufferDepthSampleCounts |
| 2686 | VkSampleCountFlags framebufferStencilSampleCounts |
| 2687 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2688 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 2689 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2690 | VkSampleCountFlags sampledImageColorSampleCounts |
| 2691 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 2692 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 2693 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 2694 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2695 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2696 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2697 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2698 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2699 | |
| 2700 | u32 maxClipDistances /// max number of clip distances |
| 2701 | u32 maxCullDistances /// max number of cull distances |
| 2702 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 2703 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2704 | u32 discreteQueuePriorities |
| 2705 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2706 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 2707 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2708 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 2709 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2710 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2711 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2712 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2713 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 2714 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2715 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2716 | } |
| 2717 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2718 | class VkPhysicalDeviceSparseProperties { |
| 2719 | 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] | 2720 | 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] | 2721 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 2722 | 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] | 2723 | 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 |
| 2724 | } |
| 2725 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2726 | class VkSemaphoreCreateInfo { |
| 2727 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 2728 | const void* pNext /// Pointer to next structure |
| 2729 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 2730 | } |
| 2731 | |
| 2732 | class VkQueryPoolCreateInfo { |
| 2733 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 2734 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2735 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2736 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2737 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2738 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 2739 | } |
| 2740 | |
| 2741 | class VkFramebufferCreateInfo { |
| 2742 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 2743 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2744 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2745 | VkRenderPass renderPass |
| 2746 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2747 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2748 | u32 width |
| 2749 | u32 height |
| 2750 | u32 layers |
| 2751 | } |
| 2752 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2753 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2754 | u32 vertexCount |
| 2755 | u32 instanceCount |
| 2756 | u32 firstVertex |
| 2757 | u32 firstInstance |
| 2758 | } |
| 2759 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2760 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2761 | u32 indexCount |
| 2762 | u32 instanceCount |
| 2763 | u32 firstIndex |
| 2764 | s32 vertexOffset |
| 2765 | u32 firstInstance |
| 2766 | } |
| 2767 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2768 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2769 | u32 x |
| 2770 | u32 y |
| 2771 | u32 z |
| 2772 | } |
| 2773 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2774 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2775 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2776 | u32 minImageCount |
| 2777 | u32 maxImageCount |
| 2778 | VkExtent2D currentExtent |
| 2779 | VkExtent2D minImageExtent |
| 2780 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2781 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2782 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2783 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2784 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2785 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2786 | } |
| 2787 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2788 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2789 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2790 | VkFormat format |
| 2791 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2792 | } |
| 2793 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2794 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2795 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2796 | VkStructureType sType |
| 2797 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2798 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2799 | VkSurfaceKHR surface |
| 2800 | u32 minImageCount |
| 2801 | VkFormat imageFormat |
| 2802 | VkColorSpaceKHR imageColorSpace |
| 2803 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2804 | u32 imageArrayLayers |
| 2805 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2806 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2807 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2808 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2809 | VkSurfaceTransformFlagBitsKHR preTransform |
| 2810 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2811 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2812 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2813 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2814 | } |
| 2815 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2816 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2817 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2818 | VkStructureType sType |
| 2819 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2820 | u32 waitSemaphoreCount |
| 2821 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2822 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2823 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2824 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2825 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2826 | } |
| 2827 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2828 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2829 | class VkDisplayPropertiesKHR { |
| 2830 | VkDisplayKHR display |
| 2831 | const char* displayName |
| 2832 | VkExtent2D physicalDimensions |
| 2833 | VkExtent2D physicalResolution |
| 2834 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2835 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2836 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2837 | } |
| 2838 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2839 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2840 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2841 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2842 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2843 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2844 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2845 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2846 | class VkDisplayModePropertiesKHR { |
| 2847 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2848 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2849 | } |
| 2850 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2851 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2852 | class VkDisplayModeCreateInfoKHR { |
| 2853 | VkStructureType sType |
| 2854 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2855 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2856 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2857 | } |
| 2858 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2859 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2860 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2861 | VkDisplayKHR currentDisplay |
| 2862 | u32 currentStackIndex |
| 2863 | } |
| 2864 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2865 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2866 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2867 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 2868 | VkOffset2D minSrcPosition |
| 2869 | VkOffset2D maxSrcPosition |
| 2870 | VkExtent2D minSrcExtent |
| 2871 | VkExtent2D maxSrcExtent |
| 2872 | VkOffset2D minDstPosition |
| 2873 | VkOffset2D maxDstPosition |
| 2874 | VkExtent2D minDstExtent |
| 2875 | VkExtent2D maxDstExtent |
| 2876 | } |
| 2877 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2878 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2879 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2880 | VkStructureType sType |
| 2881 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2882 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2883 | VkDisplayModeKHR displayMode |
| 2884 | u32 planeIndex |
| 2885 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2886 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2887 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2888 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 2889 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2890 | } |
| 2891 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2892 | @extension("VK_KHR_display_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2893 | class VkDisplayPresentInfoKHR { |
| 2894 | VkStructureType sType |
| 2895 | const void* pNext |
| 2896 | VkRect2D srcRect |
| 2897 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2898 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2899 | } |
| 2900 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2901 | @extension("VK_KHR_xlib_surface") |
| 2902 | class VkXlibSurfaceCreateInfoKHR { |
| 2903 | VkStructureType sType |
| 2904 | const void* pNext |
| 2905 | VkXlibSurfaceCreateFlagsKHR flags |
| 2906 | platform.Display* dpy |
| 2907 | platform.Window window |
| 2908 | } |
| 2909 | |
| 2910 | @extension("VK_KHR_xcb_surface") |
| 2911 | class VkXcbSurfaceCreateInfoKHR { |
| 2912 | VkStructureType sType |
| 2913 | const void* pNext |
| 2914 | VkXcbSurfaceCreateFlagsKHR flags |
| 2915 | platform.xcb_connection_t* connection |
| 2916 | platform.xcb_window_t window |
| 2917 | } |
| 2918 | |
| 2919 | @extension("VK_KHR_wayland_surface") |
| 2920 | class VkWaylandSurfaceCreateInfoKHR { |
| 2921 | VkStructureType sType |
| 2922 | const void* pNext |
| 2923 | VkWaylandSurfaceCreateFlagsKHR flags |
| 2924 | platform.wl_display* display |
| 2925 | platform.wl_surface* surface |
| 2926 | } |
| 2927 | |
| 2928 | @extension("VK_KHR_mir_surface") |
| 2929 | class VkMirSurfaceCreateInfoKHR { |
| 2930 | VkStructureType sType |
| 2931 | const void* pNext |
| 2932 | VkMirSurfaceCreateFlagsKHR flags |
| 2933 | platform.MirConnection* connection |
| 2934 | platform.MirSurface* mirSurface |
| 2935 | } |
| 2936 | |
| 2937 | @extension("VK_KHR_android_surface") |
| 2938 | class VkAndroidSurfaceCreateInfoKHR { |
| 2939 | VkStructureType sType |
| 2940 | const void* pNext |
| 2941 | VkAndroidSurfaceCreateFlagsKHR flags |
| 2942 | platform.ANativeWindow* window |
| 2943 | } |
| 2944 | |
| 2945 | @extension("VK_KHR_win32_surface") |
| 2946 | class VkWin32SurfaceCreateInfoKHR { |
| 2947 | VkStructureType sType |
| 2948 | const void* pNext |
| 2949 | VkWin32SurfaceCreateFlagsKHR flags |
| 2950 | platform.HINSTANCE hinstance |
| 2951 | platform.HWND hwnd |
| 2952 | } |
| 2953 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2954 | @extension("VK_ANDROID_native_buffer") |
| 2955 | class VkNativeBufferANDROID { |
| 2956 | VkStructureType sType |
| 2957 | const void* pNext |
| 2958 | platform.buffer_handle_t handle |
| 2959 | int stride |
| 2960 | int format |
| 2961 | int usage |
| 2962 | } |
| 2963 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2964 | @extension("VK_EXT_debug_report") |
| 2965 | class VkDebugReportCallbackCreateInfoEXT { |
| 2966 | VkStructureType sType |
| 2967 | const void* pNext |
| 2968 | VkDebugReportFlagsEXT flags |
| 2969 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 2970 | void* pUserData |
| 2971 | } |
| 2972 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2973 | @extension("VK_AMD_rasterization_order") |
| 2974 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 2975 | VkStructureType sType |
| 2976 | const void* pNext |
| 2977 | VkRasterizationOrderAMD rasterizationOrder |
| 2978 | } |
| 2979 | |
| 2980 | @extension("VK_EXT_debug_marker") |
| 2981 | class VkDebugMarkerObjectNameInfoEXT { |
| 2982 | VkStructureType sType |
| 2983 | const void* pNext |
| 2984 | VkDebugReportObjectTypeEXT objectType |
| 2985 | u64 object |
| 2986 | const char* pObjectName |
| 2987 | } |
| 2988 | |
| 2989 | @extension("VK_EXT_debug_marker") |
| 2990 | class VkDebugMarkerObjectTagInfoEXT { |
| 2991 | VkStructureType sType |
| 2992 | const void* pNext |
| 2993 | VkDebugReportObjectTypeEXT objectType |
| 2994 | u64 object |
| 2995 | u64 tagName |
| 2996 | platform.size_t tagSize |
| 2997 | const void* pTag |
| 2998 | } |
| 2999 | |
| 3000 | @extension("VK_EXT_debug_marker") |
| 3001 | class VkDebugMarkerMarkerInfoEXT { |
| 3002 | VkStructureType sType |
| 3003 | const void* pNext |
| 3004 | const char* pMarkerName |
| 3005 | f32[4] color |
| 3006 | } |
| 3007 | |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 3008 | @extension("VK_NV_dedicated_allocation") |
| 3009 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3010 | VkStructureType sType |
| 3011 | const void* pNext |
| 3012 | VkBool32 dedicatedAllocation |
| 3013 | } |
| 3014 | |
| 3015 | @extension("VK_NV_dedicated_allocation") |
| 3016 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3017 | VkStructureType sType |
| 3018 | const void* pNext |
| 3019 | VkBool32 dedicatedAllocation |
| 3020 | } |
| 3021 | |
| 3022 | @extension("VK_NV_dedicated_allocation") |
| 3023 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3024 | VkStructureType sType |
| 3025 | const void* pNext |
| 3026 | VkImage image |
| 3027 | VkBuffer buffer |
| 3028 | } |
| 3029 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3030 | @extension("VK_NV_external_memory_capabilities") |
| 3031 | class VkExternalImageFormatPropertiesNV { |
| 3032 | VkImageFormatProperties imageFormatProperties |
| 3033 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3034 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3035 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3036 | } |
| 3037 | |
| 3038 | @extension("VK_NV_external_memory") |
| 3039 | class VkExternalMemoryImageCreateInfoNV { |
| 3040 | VkStructureType sType |
| 3041 | const void* pNext |
| 3042 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3043 | } |
| 3044 | |
| 3045 | @extension("VK_NV_external_memory") |
| 3046 | class VkExportMemoryAllocateInfoNV { |
| 3047 | VkStructureType sType |
| 3048 | const void* pNext |
| 3049 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3050 | } |
| 3051 | |
| 3052 | @extension("VK_NV_external_memory_win32") |
| 3053 | class VkImportMemoryWin32HandleInfoNV { |
| 3054 | VkStructureType sType |
| 3055 | const void* pNext |
| 3056 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3057 | platform.HANDLE handle |
| 3058 | } |
| 3059 | |
| 3060 | @extension("VK_NV_external_memory_win32") |
| 3061 | class VkExportMemoryWin32HandleInfoNV { |
| 3062 | VkStructureType sType |
| 3063 | const void* pNext |
| 3064 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3065 | platform.DWORD dwAccess |
| 3066 | } |
| 3067 | |
| 3068 | @extension("VK_NV_win32_keyed_mutex") |
| 3069 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3070 | VkStructureType sType |
| 3071 | const void* pNext |
| 3072 | u32 acquireCount |
| 3073 | const VkDeviceMemory* pAcquireSyncs |
| 3074 | const u64* pAcquireKeys |
| 3075 | const u32* pAcquireTimeoutMilliseconds |
| 3076 | u32 releaseCount |
| 3077 | const VkDeviceMemory* pReleaseSyncs |
| 3078 | const u64* pReleaseKeys |
| 3079 | } |
| 3080 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 3081 | @extension("VK_KHR_get_physical_device_properties2") |
| 3082 | class VkPhysicalDeviceFeatures2KHR { |
| 3083 | VkStructureType sType |
| 3084 | void* pNext |
| 3085 | VkPhysicalDeviceFeatures features |
| 3086 | } |
| 3087 | |
| 3088 | @extension("VK_KHR_get_physical_device_properties2") |
| 3089 | class VkPhysicalDeviceProperties2KHR { |
| 3090 | VkStructureType sType |
| 3091 | void* pNext |
| 3092 | VkPhysicalDeviceProperties properties |
| 3093 | } |
| 3094 | |
| 3095 | @extension("VK_KHR_get_physical_device_properties2") |
| 3096 | class VkFormatProperties2KHR { |
| 3097 | VkStructureType sType |
| 3098 | void* pNext |
| 3099 | VkFormatProperties formatProperties |
| 3100 | } |
| 3101 | |
| 3102 | @extension("VK_KHR_get_physical_device_properties2") |
| 3103 | class VkImageFormatProperties2KHR { |
| 3104 | VkStructureType sType |
| 3105 | void* pNext |
| 3106 | VkImageFormatProperties imageFormatProperties |
| 3107 | } |
| 3108 | |
| 3109 | @extension("VK_KHR_get_physical_device_properties2") |
| 3110 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3111 | VkStructureType sType |
| 3112 | const void* pNext |
| 3113 | VkFormat format |
| 3114 | VkImageType type |
| 3115 | VkImageTiling tiling |
| 3116 | VkImageUsageFlags usage |
| 3117 | VkImageCreateFlags flags |
| 3118 | } |
| 3119 | |
| 3120 | @extension("VK_KHR_get_physical_device_properties2") |
| 3121 | class VkQueueFamilyProperties2KHR { |
| 3122 | VkStructureType sType |
| 3123 | void* pNext |
| 3124 | VkQueueFamilyProperties queueFamilyProperties |
| 3125 | } |
| 3126 | |
| 3127 | @extension("VK_KHR_get_physical_device_properties2") |
| 3128 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3129 | VkStructureType sType |
| 3130 | void* pNext |
| 3131 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3132 | } |
| 3133 | |
| 3134 | @extension("VK_KHR_get_physical_device_properties2") |
| 3135 | class VkSparseImageFormatProperties2KHR { |
| 3136 | VkStructureType sType |
| 3137 | void* pNext |
| 3138 | VkSparseImageFormatProperties properties |
| 3139 | } |
| 3140 | |
| 3141 | @extension("VK_KHR_get_physical_device_properties2") |
| 3142 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3143 | VkStructureType sType |
| 3144 | const void* pNext |
| 3145 | VkFormat format |
| 3146 | VkImageType type |
| 3147 | VkSampleCountFlagBits samples |
| 3148 | VkImageUsageFlags usage |
| 3149 | VkImageTiling tiling |
| 3150 | } |
| 3151 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3152 | @extension("VK_EXT_validation_flags") |
| 3153 | class VkValidationFlagsEXT { |
| 3154 | VkStructureType sType |
| 3155 | const void* pNext |
| 3156 | u32 disabledValidationCheckCount |
| 3157 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3158 | } |
| 3159 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 3160 | @extension("VK_NN_vi_surface") |
| 3161 | class VkViSurfaceCreateInfoNN { |
| 3162 | VkStructureType sType |
| 3163 | const void* pNext |
| 3164 | VkViSurfaceCreateFlagsNN flags |
| 3165 | void* window |
| 3166 | } |
| 3167 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3168 | @extension("VK_NVX_device_generated_commands") |
| 3169 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3170 | VkStructureType sType |
| 3171 | const void* pNext |
| 3172 | VkBool32 computeBindingPointSupport |
| 3173 | } |
| 3174 | |
| 3175 | @extension("VK_NVX_device_generated_commands") |
| 3176 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 3177 | VkStructureType sType |
| 3178 | const void* pNext |
| 3179 | u32 maxIndirectCommandsLayoutTokenCount |
| 3180 | u32 maxObjectEntryCounts |
| 3181 | u32 minSequenceCountBufferOffsetAlignment |
| 3182 | u32 minSequenceIndexBufferOffsetAlignment |
| 3183 | u32 minCommandsTokenBufferOffsetAlignment |
| 3184 | } |
| 3185 | |
| 3186 | @extension("VK_NVX_device_generated_commands") |
| 3187 | class VkIndirectCommandsTokenNVX { |
| 3188 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3189 | VkBuffer buffer |
| 3190 | VkDeviceSize offset |
| 3191 | } |
| 3192 | |
| 3193 | @extension("VK_NVX_device_generated_commands") |
| 3194 | class VkIndirectCommandsLayoutTokenNVX { |
| 3195 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3196 | u32 bindingUnit |
| 3197 | u32 dynamicCount |
| 3198 | u32 divisor |
| 3199 | } |
| 3200 | |
| 3201 | @extension("VK_NVX_device_generated_commands") |
| 3202 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 3203 | VkStructureType sType |
| 3204 | const void* pNext |
| 3205 | VkPipelineBindPoint pipelineBindPoint |
| 3206 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 3207 | u32 tokenCount |
| 3208 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 3209 | } |
| 3210 | |
| 3211 | @extension("VK_NVX_device_generated_commands") |
| 3212 | class VkCmdProcessCommandsInfoNVX { |
| 3213 | VkStructureType sType |
| 3214 | const void* pNext |
| 3215 | VkObjectTableNVX objectTable |
| 3216 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3217 | u32 indirectCommandsTokenCount |
| 3218 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 3219 | u32 maxSequencesCount |
| 3220 | VkCommandBuffer targetCommandBuffer |
| 3221 | VkBuffer sequencesCountBuffer |
| 3222 | VkDeviceSize sequencesCountOffset |
| 3223 | VkBuffer sequencesIndexBuffer |
| 3224 | VkDeviceSize sequencesIndexOffset |
| 3225 | } |
| 3226 | |
| 3227 | @extension("VK_NVX_device_generated_commands") |
| 3228 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 3229 | VkStructureType sType |
| 3230 | const void* pNext |
| 3231 | VkObjectTableNVX objectTable |
| 3232 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3233 | u32 maxSequencesCount |
| 3234 | } |
| 3235 | |
| 3236 | @extension("VK_NVX_device_generated_commands") |
| 3237 | class VkObjectTableCreateInfoNVX { |
| 3238 | VkStructureType sType |
| 3239 | const void* pNext |
| 3240 | u32 objectCount |
| 3241 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 3242 | const u32* pObjectEntryCounts |
| 3243 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 3244 | u32 maxUniformBuffersPerDescriptor |
| 3245 | u32 maxStorageBuffersPerDescriptor |
| 3246 | u32 maxStorageImagesPerDescriptor |
| 3247 | u32 maxSampledImagesPerDescriptor |
| 3248 | u32 maxPipelineLayouts |
| 3249 | } |
| 3250 | |
| 3251 | @extension("VK_NVX_device_generated_commands") |
| 3252 | class VkObjectTableEntryNVX { |
| 3253 | VkObjectEntryTypeNVX type |
| 3254 | VkObjectEntryUsageFlagsNVX flags |
| 3255 | } |
| 3256 | |
| 3257 | @extension("VK_NVX_device_generated_commands") |
| 3258 | class VkObjectTablePipelineEntryNVX { |
| 3259 | VkObjectEntryTypeNVX type |
| 3260 | VkObjectEntryUsageFlagsNVX flags |
| 3261 | VkPipeline pipeline |
| 3262 | } |
| 3263 | |
| 3264 | @extension("VK_NVX_device_generated_commands") |
| 3265 | class VkObjectTableDescriptorSetEntryNVX { |
| 3266 | VkObjectEntryTypeNVX type |
| 3267 | VkObjectEntryUsageFlagsNVX flags |
| 3268 | VkPipelineLayout pipelineLayout |
| 3269 | VkDescriptorSet descriptorSet |
| 3270 | } |
| 3271 | |
| 3272 | @extension("VK_NVX_device_generated_commands") |
| 3273 | class VkObjectTableVertexBufferEntryNVX { |
| 3274 | VkObjectEntryTypeNVX type |
| 3275 | VkObjectEntryUsageFlagsNVX flags |
| 3276 | VkBuffer buffer |
| 3277 | } |
| 3278 | |
| 3279 | @extension("VK_NVX_device_generated_commands") |
| 3280 | class VkObjectTableIndexBufferEntryNVX { |
| 3281 | VkObjectEntryTypeNVX type |
| 3282 | VkObjectEntryUsageFlagsNVX flags |
| 3283 | VkBuffer buffer |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 3284 | VkIndexType indexType |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3285 | } |
| 3286 | |
| 3287 | @extension("VK_NVX_device_generated_commands") |
| 3288 | class VkObjectTablePushConstantEntryNVX { |
| 3289 | VkObjectEntryTypeNVX type |
| 3290 | VkObjectEntryUsageFlagsNVX flags |
| 3291 | VkPipelineLayout pipelineLayout |
| 3292 | VkShaderStageFlags stageFlags |
| 3293 | } |
| 3294 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 3295 | @extension("VK_EXT_display_surface_counter") |
| 3296 | class VkSurfaceCapabilities2EXT { |
| 3297 | VkStructureType sType |
| 3298 | void* pNext |
| 3299 | u32 minImageCount |
| 3300 | u32 maxImageCount |
| 3301 | VkExtent2D currentExtent |
| 3302 | VkExtent2D minImageExtent |
| 3303 | VkExtent2D maxImageExtent |
| 3304 | u32 maxImageArrayLayers |
| 3305 | VkSurfaceTransformFlagsKHR supportedTransforms |
| 3306 | VkSurfaceTransformFlagBitsKHR currentTransform |
| 3307 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
| 3308 | VkImageUsageFlags supportedUsageFlags |
| 3309 | VkSurfaceCounterFlagsEXT supportedSurfaceCounters |
| 3310 | } |
| 3311 | |
| 3312 | @extension("VK_EXT_display_control") |
| 3313 | class VkDisplayPowerInfoEXT { |
| 3314 | VkStructureType sType |
| 3315 | const void* pNext |
| 3316 | VkDisplayPowerStateEXT powerState |
| 3317 | } |
| 3318 | |
| 3319 | @extension("VK_EXT_display_control") |
| 3320 | class VkDeviceEventInfoEXT { |
| 3321 | VkStructureType sType |
| 3322 | const void* pNext |
| 3323 | VkDeviceEventTypeEXT deviceEvent |
| 3324 | } |
| 3325 | |
| 3326 | @extension("VK_EXT_display_control") |
| 3327 | class VkDisplayEventInfoEXT { |
| 3328 | VkStructureType sType |
| 3329 | const void* pNext |
| 3330 | VkDisplayEventTypeEXT displayEvent |
| 3331 | } |
| 3332 | |
| 3333 | @extension("VK_EXT_display_control") |
| 3334 | class VkSwapchainCounterCreateInfoEXT { |
| 3335 | VkStructureType sType |
| 3336 | const void* pNext |
| 3337 | VkSurfaceCounterFlagsEXT surfaceCounters |
| 3338 | } |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3339 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3340 | //////////////// |
| 3341 | // Commands // |
| 3342 | //////////////// |
| 3343 | |
| 3344 | // Function pointers. TODO: add support for function pointers. |
| 3345 | |
| 3346 | @external type void* PFN_vkVoidFunction |
| 3347 | @pfn cmd void vkVoidFunction() { |
| 3348 | } |
| 3349 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3350 | @external type void* PFN_vkAllocationFunction |
| 3351 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3352 | void* pUserData, |
| 3353 | platform.size_t size, |
| 3354 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3355 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3356 | return ? |
| 3357 | } |
| 3358 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3359 | @external type void* PFN_vkReallocationFunction |
| 3360 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3361 | void* pUserData, |
| 3362 | void* pOriginal, |
| 3363 | platform.size_t size, |
| 3364 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3365 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3366 | return ? |
| 3367 | } |
| 3368 | |
| 3369 | @external type void* PFN_vkFreeFunction |
| 3370 | @pfn cmd void vkFreeFunction( |
| 3371 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3372 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3373 | } |
| 3374 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3375 | @external type void* PFN_vkInternalAllocationNotification |
| 3376 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3377 | void* pUserData, |
| 3378 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3379 | VkInternalAllocationType allocationType, |
| 3380 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3381 | } |
| 3382 | |
| 3383 | @external type void* PFN_vkInternalFreeNotification |
| 3384 | @pfn cmd void vkInternalFreeNotification( |
| 3385 | void* pUserData, |
| 3386 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3387 | VkInternalAllocationType allocationType, |
| 3388 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3389 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3390 | |
| 3391 | // Global functions |
| 3392 | |
| 3393 | @threadSafety("system") |
| 3394 | cmd VkResult vkCreateInstance( |
| 3395 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3396 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3397 | VkInstance* pInstance) { |
| 3398 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 3399 | |
| 3400 | instance := ? |
| 3401 | pInstance[0] = instance |
| 3402 | State.Instances[instance] = new!InstanceObject() |
| 3403 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3404 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 3405 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3406 | |
| 3407 | return ? |
| 3408 | } |
| 3409 | |
| 3410 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3411 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3412 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3413 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3414 | instanceObject := GetInstance(instance) |
| 3415 | |
| 3416 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3417 | } |
| 3418 | |
| 3419 | @threadSafety("system") |
| 3420 | cmd VkResult vkEnumeratePhysicalDevices( |
| 3421 | VkInstance instance, |
| 3422 | u32* pPhysicalDeviceCount, |
| 3423 | VkPhysicalDevice* pPhysicalDevices) { |
| 3424 | instanceObject := GetInstance(instance) |
| 3425 | |
| 3426 | physicalDeviceCount := as!u32(?) |
| 3427 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 3428 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 3429 | |
| 3430 | for i in (0 .. physicalDeviceCount) { |
| 3431 | physicalDevice := ? |
| 3432 | physicalDevices[i] = physicalDevice |
| 3433 | if !(physicalDevice in State.PhysicalDevices) { |
| 3434 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 3435 | } |
| 3436 | } |
| 3437 | |
| 3438 | return ? |
| 3439 | } |
| 3440 | |
| 3441 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 3442 | VkDevice device, |
| 3443 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3444 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3445 | device := GetDevice(device) |
| 3446 | } |
| 3447 | |
| 3448 | return ? |
| 3449 | } |
| 3450 | |
| 3451 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 3452 | VkInstance instance, |
| 3453 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3454 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3455 | instanceObject := GetInstance(instance) |
| 3456 | } |
| 3457 | |
| 3458 | return ? |
| 3459 | } |
| 3460 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3461 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3462 | VkPhysicalDevice physicalDevice, |
| 3463 | VkPhysicalDeviceProperties* pProperties) { |
| 3464 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3465 | |
| 3466 | properties := ? |
| 3467 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3468 | } |
| 3469 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3470 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3471 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3472 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3473 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3474 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3475 | // TODO: Figure out how to express fetch-count-or-properties |
| 3476 | // This version fails 'apic validate' with 'fence not allowed in |
| 3477 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 3478 | // errors. |
| 3479 | // if pQueueFamilyProperties != null { |
| 3480 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 3481 | // for i in (0 .. pCount[0]) { |
| 3482 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 3483 | // queuesProperties[i] = queueProperties |
| 3484 | // } |
| 3485 | // } else { |
| 3486 | // count := ? |
| 3487 | // pCount[0] = count |
| 3488 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3489 | } |
| 3490 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3491 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3492 | VkPhysicalDevice physicalDevice, |
| 3493 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 3494 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3495 | |
| 3496 | memoryProperties := ? |
| 3497 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3498 | } |
| 3499 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3500 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3501 | VkPhysicalDevice physicalDevice, |
| 3502 | VkPhysicalDeviceFeatures* pFeatures) { |
| 3503 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3504 | |
| 3505 | features := ? |
| 3506 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3507 | } |
| 3508 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3509 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3510 | VkPhysicalDevice physicalDevice, |
| 3511 | VkFormat format, |
| 3512 | VkFormatProperties* pFormatProperties) { |
| 3513 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3514 | |
| 3515 | formatProperties := ? |
| 3516 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3517 | } |
| 3518 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3519 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3520 | VkPhysicalDevice physicalDevice, |
| 3521 | VkFormat format, |
| 3522 | VkImageType type, |
| 3523 | VkImageTiling tiling, |
| 3524 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3525 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3526 | VkImageFormatProperties* pImageFormatProperties) { |
| 3527 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3528 | |
| 3529 | imageFormatProperties := ? |
| 3530 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3531 | |
| 3532 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3533 | } |
| 3534 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3535 | |
| 3536 | // Device functions |
| 3537 | |
| 3538 | @threadSafety("system") |
| 3539 | cmd VkResult vkCreateDevice( |
| 3540 | VkPhysicalDevice physicalDevice, |
| 3541 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3542 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3543 | VkDevice* pDevice) { |
| 3544 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 3545 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3546 | |
| 3547 | device := ? |
| 3548 | pDevice[0] = device |
| 3549 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 3550 | |
| 3551 | return ? |
| 3552 | } |
| 3553 | |
| 3554 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3555 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3556 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3557 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3558 | deviceObject := GetDevice(device) |
| 3559 | |
| 3560 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3561 | } |
| 3562 | |
| 3563 | |
| 3564 | // Extension discovery functions |
| 3565 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3566 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3567 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3568 | VkLayerProperties* pProperties) { |
| 3569 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3570 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3571 | |
| 3572 | properties := pProperties[0:count] |
| 3573 | for i in (0 .. count) { |
| 3574 | property := ? |
| 3575 | properties[i] = property |
| 3576 | } |
| 3577 | |
| 3578 | return ? |
| 3579 | } |
| 3580 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3581 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3582 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3583 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3584 | VkExtensionProperties* pProperties) { |
| 3585 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3586 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3587 | |
| 3588 | properties := pProperties[0:count] |
| 3589 | for i in (0 .. count) { |
| 3590 | property := ? |
| 3591 | properties[i] = property |
| 3592 | } |
| 3593 | |
| 3594 | return ? |
| 3595 | } |
| 3596 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3597 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3598 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3599 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3600 | VkLayerProperties* pProperties) { |
| 3601 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3602 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3603 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3604 | |
| 3605 | properties := pProperties[0:count] |
| 3606 | for i in (0 .. count) { |
| 3607 | property := ? |
| 3608 | properties[i] = property |
| 3609 | } |
| 3610 | |
| 3611 | return ? |
| 3612 | } |
| 3613 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3614 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3615 | VkPhysicalDevice physicalDevice, |
| 3616 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3617 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3618 | VkExtensionProperties* pProperties) { |
| 3619 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3620 | |
| 3621 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3622 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3623 | |
| 3624 | properties := pProperties[0:count] |
| 3625 | for i in (0 .. count) { |
| 3626 | property := ? |
| 3627 | properties[i] = property |
| 3628 | } |
| 3629 | |
| 3630 | return ? |
| 3631 | } |
| 3632 | |
| 3633 | |
| 3634 | // Queue functions |
| 3635 | |
| 3636 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3637 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3638 | VkDevice device, |
| 3639 | u32 queueFamilyIndex, |
| 3640 | u32 queueIndex, |
| 3641 | VkQueue* pQueue) { |
| 3642 | deviceObject := GetDevice(device) |
| 3643 | |
| 3644 | queue := ? |
| 3645 | pQueue[0] = queue |
| 3646 | |
| 3647 | if !(queue in State.Queues) { |
| 3648 | State.Queues[queue] = new!QueueObject(device: device) |
| 3649 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3650 | } |
| 3651 | |
| 3652 | @threadSafety("app") |
| 3653 | cmd VkResult vkQueueSubmit( |
| 3654 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3655 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3656 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3657 | VkFence fence) { |
| 3658 | queueObject := GetQueue(queue) |
| 3659 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3660 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3661 | fenceObject := GetFence(fence) |
| 3662 | assert(fenceObject.device == queueObject.device) |
| 3663 | } |
| 3664 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3665 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 3666 | // for i in (0 .. commandBufferCount) { |
| 3667 | // commandBuffer := commandBuffers[i] |
| 3668 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 3669 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3670 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3671 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 3672 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3673 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3674 | |
| 3675 | return ? |
| 3676 | } |
| 3677 | |
| 3678 | @threadSafety("system") |
| 3679 | cmd VkResult vkQueueWaitIdle( |
| 3680 | VkQueue queue) { |
| 3681 | queueObject := GetQueue(queue) |
| 3682 | |
| 3683 | return ? |
| 3684 | } |
| 3685 | |
| 3686 | @threadSafety("system") |
| 3687 | cmd VkResult vkDeviceWaitIdle( |
| 3688 | VkDevice device) { |
| 3689 | deviceObject := GetDevice(device) |
| 3690 | |
| 3691 | return ? |
| 3692 | } |
| 3693 | |
| 3694 | |
| 3695 | // Memory functions |
| 3696 | |
| 3697 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3698 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3699 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3700 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 3701 | const VkAllocationCallbacks* pAllocator, |
| 3702 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3703 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3704 | deviceObject := GetDevice(device) |
| 3705 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3706 | memory := ? |
| 3707 | pMemory[0] = memory |
| 3708 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3709 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3710 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3711 | |
| 3712 | return ? |
| 3713 | } |
| 3714 | |
| 3715 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3716 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3717 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3718 | VkDeviceMemory memory, |
| 3719 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3720 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3721 | memoryObject := GetDeviceMemory(memory) |
| 3722 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3723 | |
| 3724 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3725 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3726 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3727 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 3728 | "vkFreeMemory: commandBuffers still bound") |
| 3729 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3730 | } |
| 3731 | |
| 3732 | @threadSafety("app") |
| 3733 | cmd VkResult vkMapMemory( |
| 3734 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3735 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3736 | VkDeviceSize offset, |
| 3737 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3738 | VkMemoryMapFlags flags, |
| 3739 | void** ppData) { |
| 3740 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3741 | memoryObject := GetDeviceMemory(memory) |
| 3742 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3743 | |
| 3744 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3745 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3746 | |
| 3747 | return ? |
| 3748 | } |
| 3749 | |
| 3750 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3751 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3752 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3753 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3754 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3755 | memoryObject := GetDeviceMemory(memory) |
| 3756 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3757 | } |
| 3758 | |
| 3759 | cmd VkResult vkFlushMappedMemoryRanges( |
| 3760 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3761 | u32 memoryRangeCount |
| 3762 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3763 | deviceObject := GetDevice(device) |
| 3764 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3765 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3766 | for i in (0 .. memoryRangeCount) { |
| 3767 | memoryRange := memoryRanges[i] |
| 3768 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3769 | assert(memoryObject.device == device) |
| 3770 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3771 | } |
| 3772 | |
| 3773 | return ? |
| 3774 | } |
| 3775 | |
| 3776 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 3777 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3778 | u32 memoryRangeCount, |
| 3779 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3780 | deviceObject := GetDevice(device) |
| 3781 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3782 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3783 | for i in (0 .. memoryRangeCount) { |
| 3784 | memoryRange := memoryRanges[i] |
| 3785 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3786 | assert(memoryObject.device == device) |
| 3787 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3788 | } |
| 3789 | |
| 3790 | return ? |
| 3791 | } |
| 3792 | |
| 3793 | |
| 3794 | // Memory management API functions |
| 3795 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3796 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3797 | VkDevice device, |
| 3798 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3799 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3800 | deviceObject := GetDevice(device) |
| 3801 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3802 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3803 | memoryObject := GetDeviceMemory(memory) |
| 3804 | assert(memoryObject.device == device) |
| 3805 | } |
| 3806 | |
| 3807 | committedMemoryInBytes := ? |
| 3808 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3809 | } |
| 3810 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3811 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3812 | VkDevice device, |
| 3813 | VkBuffer buffer, |
| 3814 | VkMemoryRequirements* pMemoryRequirements) { |
| 3815 | deviceObject := GetDevice(device) |
| 3816 | bufferObject := GetBuffer(buffer) |
| 3817 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3818 | } |
| 3819 | |
| 3820 | cmd VkResult vkBindBufferMemory( |
| 3821 | VkDevice device, |
| 3822 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3823 | VkDeviceMemory memory, |
| 3824 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3825 | deviceObject := GetDevice(device) |
| 3826 | bufferObject := GetBuffer(buffer) |
| 3827 | assert(bufferObject.device == device) |
| 3828 | |
| 3829 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3830 | if bufferObject.memory != NULL_HANDLE { |
| 3831 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 3832 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3833 | } |
| 3834 | |
| 3835 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3836 | if memory != NULL_HANDLE { |
| 3837 | memoryObject := GetDeviceMemory(memory) |
| 3838 | assert(memoryObject.device == device) |
| 3839 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3840 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3841 | bufferObject.memory = memory |
| 3842 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3843 | |
| 3844 | return ? |
| 3845 | } |
| 3846 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3847 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3848 | VkDevice device, |
| 3849 | VkImage image, |
| 3850 | VkMemoryRequirements* pMemoryRequirements) { |
| 3851 | deviceObject := GetDevice(device) |
| 3852 | imageObject := GetImage(image) |
| 3853 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3854 | } |
| 3855 | |
| 3856 | cmd VkResult vkBindImageMemory( |
| 3857 | VkDevice device, |
| 3858 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3859 | VkDeviceMemory memory, |
| 3860 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3861 | deviceObject := GetDevice(device) |
| 3862 | imageObject := GetImage(image) |
| 3863 | assert(imageObject.device == device) |
| 3864 | |
| 3865 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3866 | if imageObject.memory != NULL_HANDLE { |
| 3867 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 3868 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3869 | } |
| 3870 | |
| 3871 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3872 | if memory != NULL_HANDLE { |
| 3873 | memoryObject := GetDeviceMemory(memory) |
| 3874 | assert(memoryObject.device == device) |
| 3875 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3876 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3877 | imageObject.memory = memory |
| 3878 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3879 | |
| 3880 | return ? |
| 3881 | } |
| 3882 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3883 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3884 | VkDevice device, |
| 3885 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3886 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3887 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 3888 | deviceObject := GetDevice(device) |
| 3889 | imageObject := GetImage(image) |
| 3890 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3891 | } |
| 3892 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3893 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3894 | VkPhysicalDevice physicalDevice, |
| 3895 | VkFormat format, |
| 3896 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3897 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3898 | VkImageUsageFlags usage, |
| 3899 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3900 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3901 | VkSparseImageFormatProperties* pProperties) { |
| 3902 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3903 | } |
| 3904 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3905 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3906 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3907 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3908 | const VkBindSparseInfo* pBindInfo, |
| 3909 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3910 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3911 | |
| 3912 | return ? |
| 3913 | } |
| 3914 | |
| 3915 | |
| 3916 | // Fence functions |
| 3917 | |
| 3918 | @threadSafety("system") |
| 3919 | cmd VkResult vkCreateFence( |
| 3920 | VkDevice device, |
| 3921 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3922 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3923 | VkFence* pFence) { |
| 3924 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 3925 | deviceObject := GetDevice(device) |
| 3926 | |
| 3927 | fence := ? |
| 3928 | pFence[0] = fence |
| 3929 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3930 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3931 | |
| 3932 | return ? |
| 3933 | } |
| 3934 | |
| 3935 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3936 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3937 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3938 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3939 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3940 | deviceObject := GetDevice(device) |
| 3941 | fenceObject := GetFence(fence) |
| 3942 | assert(fenceObject.device == device) |
| 3943 | |
| 3944 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3945 | } |
| 3946 | |
| 3947 | @threadSafety("system") |
| 3948 | cmd VkResult vkResetFences( |
| 3949 | VkDevice device, |
| 3950 | u32 fenceCount, |
| 3951 | const VkFence* pFences) { |
| 3952 | deviceObject := GetDevice(device) |
| 3953 | |
| 3954 | fences := pFences[0:fenceCount] |
| 3955 | for i in (0 .. fenceCount) { |
| 3956 | fence := fences[i] |
| 3957 | fenceObject := GetFence(fence) |
| 3958 | assert(fenceObject.device == device) |
| 3959 | fenceObject.signaled = false |
| 3960 | } |
| 3961 | |
| 3962 | return ? |
| 3963 | } |
| 3964 | |
| 3965 | @threadSafety("system") |
| 3966 | cmd VkResult vkGetFenceStatus( |
| 3967 | VkDevice device, |
| 3968 | VkFence fence) { |
| 3969 | deviceObject := GetDevice(device) |
| 3970 | fenceObject := GetFence(fence) |
| 3971 | assert(fenceObject.device == device) |
| 3972 | |
| 3973 | return ? |
| 3974 | } |
| 3975 | |
| 3976 | @threadSafety("system") |
| 3977 | cmd VkResult vkWaitForFences( |
| 3978 | VkDevice device, |
| 3979 | u32 fenceCount, |
| 3980 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3981 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3982 | u64 timeout) { /// timeout in nanoseconds |
| 3983 | deviceObject := GetDevice(device) |
| 3984 | |
| 3985 | fences := pFences[0:fenceCount] |
| 3986 | for i in (0 .. fenceCount) { |
| 3987 | fence := fences[i] |
| 3988 | fenceObject := GetFence(fence) |
| 3989 | assert(fenceObject.device == device) |
| 3990 | } |
| 3991 | |
| 3992 | return ? |
| 3993 | } |
| 3994 | |
| 3995 | |
| 3996 | // Queue semaphore functions |
| 3997 | |
| 3998 | @threadSafety("system") |
| 3999 | cmd VkResult vkCreateSemaphore( |
| 4000 | VkDevice device, |
| 4001 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4002 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4003 | VkSemaphore* pSemaphore) { |
| 4004 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 4005 | deviceObject := GetDevice(device) |
| 4006 | |
| 4007 | semaphore := ? |
| 4008 | pSemaphore[0] = semaphore |
| 4009 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 4010 | |
| 4011 | return ? |
| 4012 | } |
| 4013 | |
| 4014 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4015 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4016 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4017 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4018 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4019 | deviceObject := GetDevice(device) |
| 4020 | semaphoreObject := GetSemaphore(semaphore) |
| 4021 | assert(semaphoreObject.device == device) |
| 4022 | |
| 4023 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4024 | } |
| 4025 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4026 | |
| 4027 | // Event functions |
| 4028 | |
| 4029 | @threadSafety("system") |
| 4030 | cmd VkResult vkCreateEvent( |
| 4031 | VkDevice device, |
| 4032 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4033 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4034 | VkEvent* pEvent) { |
| 4035 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 4036 | deviceObject := GetDevice(device) |
| 4037 | |
| 4038 | event := ? |
| 4039 | pEvent[0] = event |
| 4040 | State.Events[event] = new!EventObject(device: device) |
| 4041 | |
| 4042 | return ? |
| 4043 | } |
| 4044 | |
| 4045 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4046 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4047 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4048 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4049 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4050 | deviceObject := GetDevice(device) |
| 4051 | eventObject := GetEvent(event) |
| 4052 | assert(eventObject.device == device) |
| 4053 | |
| 4054 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4055 | } |
| 4056 | |
| 4057 | @threadSafety("system") |
| 4058 | cmd VkResult vkGetEventStatus( |
| 4059 | VkDevice device, |
| 4060 | VkEvent event) { |
| 4061 | deviceObject := GetDevice(device) |
| 4062 | eventObject := GetEvent(event) |
| 4063 | assert(eventObject.device == device) |
| 4064 | |
| 4065 | return ? |
| 4066 | } |
| 4067 | |
| 4068 | @threadSafety("system") |
| 4069 | cmd VkResult vkSetEvent( |
| 4070 | VkDevice device, |
| 4071 | VkEvent event) { |
| 4072 | deviceObject := GetDevice(device) |
| 4073 | eventObject := GetEvent(event) |
| 4074 | assert(eventObject.device == device) |
| 4075 | |
| 4076 | return ? |
| 4077 | } |
| 4078 | |
| 4079 | @threadSafety("system") |
| 4080 | cmd VkResult vkResetEvent( |
| 4081 | VkDevice device, |
| 4082 | VkEvent event) { |
| 4083 | deviceObject := GetDevice(device) |
| 4084 | eventObject := GetEvent(event) |
| 4085 | assert(eventObject.device == device) |
| 4086 | |
| 4087 | return ? |
| 4088 | } |
| 4089 | |
| 4090 | |
| 4091 | // Query functions |
| 4092 | |
| 4093 | @threadSafety("system") |
| 4094 | cmd VkResult vkCreateQueryPool( |
| 4095 | VkDevice device, |
| 4096 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4097 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4098 | VkQueryPool* pQueryPool) { |
| 4099 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 4100 | deviceObject := GetDevice(device) |
| 4101 | |
| 4102 | queryPool := ? |
| 4103 | pQueryPool[0] = queryPool |
| 4104 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 4105 | |
| 4106 | return ? |
| 4107 | } |
| 4108 | |
| 4109 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4110 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4111 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4112 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4113 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4114 | deviceObject := GetDevice(device) |
| 4115 | queryPoolObject := GetQueryPool(queryPool) |
| 4116 | assert(queryPoolObject.device == device) |
| 4117 | |
| 4118 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4119 | } |
| 4120 | |
| 4121 | @threadSafety("system") |
| 4122 | cmd VkResult vkGetQueryPoolResults( |
| 4123 | VkDevice device, |
| 4124 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4125 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4126 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4127 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4128 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4129 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4130 | VkQueryResultFlags flags) { |
| 4131 | deviceObject := GetDevice(device) |
| 4132 | queryPoolObject := GetQueryPool(queryPool) |
| 4133 | assert(queryPoolObject.device == device) |
| 4134 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4135 | data := pData[0:dataSize] |
| 4136 | |
| 4137 | return ? |
| 4138 | } |
| 4139 | |
| 4140 | // Buffer functions |
| 4141 | |
| 4142 | @threadSafety("system") |
| 4143 | cmd VkResult vkCreateBuffer( |
| 4144 | VkDevice device, |
| 4145 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4146 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4147 | VkBuffer* pBuffer) { |
| 4148 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 4149 | deviceObject := GetDevice(device) |
| 4150 | |
| 4151 | buffer := ? |
| 4152 | pBuffer[0] = buffer |
| 4153 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 4154 | |
| 4155 | return ? |
| 4156 | } |
| 4157 | |
| 4158 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4159 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4160 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4161 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4162 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4163 | deviceObject := GetDevice(device) |
| 4164 | bufferObject := GetBuffer(buffer) |
| 4165 | assert(bufferObject.device == device) |
| 4166 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4167 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4168 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4169 | } |
| 4170 | |
| 4171 | |
| 4172 | // Buffer view functions |
| 4173 | |
| 4174 | @threadSafety("system") |
| 4175 | cmd VkResult vkCreateBufferView( |
| 4176 | VkDevice device, |
| 4177 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4178 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4179 | VkBufferView* pView) { |
| 4180 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 4181 | deviceObject := GetDevice(device) |
| 4182 | |
| 4183 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 4184 | assert(bufferObject.device == device) |
| 4185 | |
| 4186 | view := ? |
| 4187 | pView[0] = view |
| 4188 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 4189 | |
| 4190 | return ? |
| 4191 | } |
| 4192 | |
| 4193 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4194 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4195 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4196 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4197 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4198 | deviceObject := GetDevice(device) |
| 4199 | bufferViewObject := GetBufferView(bufferView) |
| 4200 | assert(bufferViewObject.device == device) |
| 4201 | |
| 4202 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4203 | } |
| 4204 | |
| 4205 | |
| 4206 | // Image functions |
| 4207 | |
| 4208 | @threadSafety("system") |
| 4209 | cmd VkResult vkCreateImage( |
| 4210 | VkDevice device, |
| 4211 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4212 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4213 | VkImage* pImage) { |
| 4214 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 4215 | deviceObject := GetDevice(device) |
| 4216 | |
| 4217 | image := ? |
| 4218 | pImage[0] = image |
| 4219 | State.Images[image] = new!ImageObject(device: device) |
| 4220 | |
| 4221 | return ? |
| 4222 | } |
| 4223 | |
| 4224 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4225 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4226 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4227 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4228 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4229 | deviceObject := GetDevice(device) |
| 4230 | imageObject := GetImage(image) |
| 4231 | assert(imageObject.device == device) |
| 4232 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4233 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4234 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4235 | } |
| 4236 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4237 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4238 | VkDevice device, |
| 4239 | VkImage image, |
| 4240 | const VkImageSubresource* pSubresource, |
| 4241 | VkSubresourceLayout* pLayout) { |
| 4242 | deviceObject := GetDevice(device) |
| 4243 | imageObject := GetImage(image) |
| 4244 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4245 | } |
| 4246 | |
| 4247 | |
| 4248 | // Image view functions |
| 4249 | |
| 4250 | @threadSafety("system") |
| 4251 | cmd VkResult vkCreateImageView( |
| 4252 | VkDevice device, |
| 4253 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4254 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4255 | VkImageView* pView) { |
| 4256 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 4257 | deviceObject := GetDevice(device) |
| 4258 | |
| 4259 | imageObject := GetImage(pCreateInfo.image) |
| 4260 | assert(imageObject.device == device) |
| 4261 | |
| 4262 | view := ? |
| 4263 | pView[0] = view |
| 4264 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 4265 | |
| 4266 | return ? |
| 4267 | } |
| 4268 | |
| 4269 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4270 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4271 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4272 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4273 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4274 | deviceObject := GetDevice(device) |
| 4275 | imageViewObject := GetImageView(imageView) |
| 4276 | assert(imageViewObject.device == device) |
| 4277 | |
| 4278 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4279 | } |
| 4280 | |
| 4281 | |
| 4282 | // Shader functions |
| 4283 | |
| 4284 | cmd VkResult vkCreateShaderModule( |
| 4285 | VkDevice device, |
| 4286 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4287 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4288 | VkShaderModule* pShaderModule) { |
| 4289 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 4290 | deviceObject := GetDevice(device) |
| 4291 | |
| 4292 | shaderModule := ? |
| 4293 | pShaderModule[0] = shaderModule |
| 4294 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 4295 | |
| 4296 | return ? |
| 4297 | } |
| 4298 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4299 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4300 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4301 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4302 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4303 | deviceObject := GetDevice(device) |
| 4304 | shaderModuleObject := GetShaderModule(shaderModule) |
| 4305 | assert(shaderModuleObject.device == device) |
| 4306 | |
| 4307 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4308 | } |
| 4309 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4310 | |
| 4311 | // Pipeline functions |
| 4312 | |
| 4313 | cmd VkResult vkCreatePipelineCache( |
| 4314 | VkDevice device, |
| 4315 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4316 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4317 | VkPipelineCache* pPipelineCache) { |
| 4318 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 4319 | deviceObject := GetDevice(device) |
| 4320 | |
| 4321 | pipelineCache := ? |
| 4322 | pPipelineCache[0] = pipelineCache |
| 4323 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 4324 | |
| 4325 | return ? |
| 4326 | } |
| 4327 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4328 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4329 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4330 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4331 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4332 | deviceObject := GetDevice(device) |
| 4333 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4334 | assert(pipelineCacheObject.device == device) |
| 4335 | |
| 4336 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4337 | } |
| 4338 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4339 | cmd VkResult vkGetPipelineCacheData( |
| 4340 | VkDevice device, |
| 4341 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4342 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4343 | void* pData) { |
| 4344 | deviceObject := GetDevice(device) |
| 4345 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4346 | assert(pipelineCacheObject.device == device) |
| 4347 | |
| 4348 | return ? |
| 4349 | } |
| 4350 | |
| 4351 | cmd VkResult vkMergePipelineCaches( |
| 4352 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4353 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4354 | u32 srcCacheCount, |
| 4355 | const VkPipelineCache* pSrcCaches) { |
| 4356 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4357 | dstCacheObject := GetPipelineCache(dstCache) |
| 4358 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4359 | |
| 4360 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 4361 | for i in (0 .. srcCacheCount) { |
| 4362 | srcCache := srcCaches[i] |
| 4363 | srcCacheObject := GetPipelineCache(srcCache) |
| 4364 | assert(srcCacheObject.device == device) |
| 4365 | } |
| 4366 | |
| 4367 | return ? |
| 4368 | } |
| 4369 | |
| 4370 | cmd VkResult vkCreateGraphicsPipelines( |
| 4371 | VkDevice device, |
| 4372 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4373 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4374 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4375 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4376 | VkPipeline* pPipelines) { |
| 4377 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4378 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4379 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4380 | assert(pipelineCacheObject.device == device) |
| 4381 | } |
| 4382 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4383 | createInfos := pCreateInfos[0:createInfoCount] |
| 4384 | pipelines := pPipelines[0:createInfoCount] |
| 4385 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4386 | pipeline := ? |
| 4387 | pipelines[i] = pipeline |
| 4388 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4389 | } |
| 4390 | |
| 4391 | return ? |
| 4392 | } |
| 4393 | |
| 4394 | cmd VkResult vkCreateComputePipelines( |
| 4395 | VkDevice device, |
| 4396 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4397 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4398 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4399 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4400 | VkPipeline* pPipelines) { |
| 4401 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4402 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4403 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4404 | assert(pipelineCacheObject.device == device) |
| 4405 | } |
| 4406 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4407 | createInfos := pCreateInfos[0:createInfoCount] |
| 4408 | pipelines := pPipelines[0:createInfoCount] |
| 4409 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4410 | pipeline := ? |
| 4411 | pipelines[i] = pipeline |
| 4412 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4413 | } |
| 4414 | |
| 4415 | return ? |
| 4416 | } |
| 4417 | |
| 4418 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4419 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4420 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4421 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4422 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4423 | deviceObject := GetDevice(device) |
| 4424 | pipelineObjects := GetPipeline(pipeline) |
| 4425 | assert(pipelineObjects.device == device) |
| 4426 | |
| 4427 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4428 | } |
| 4429 | |
| 4430 | |
| 4431 | // Pipeline layout functions |
| 4432 | |
| 4433 | @threadSafety("system") |
| 4434 | cmd VkResult vkCreatePipelineLayout( |
| 4435 | VkDevice device, |
| 4436 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4437 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4438 | VkPipelineLayout* pPipelineLayout) { |
| 4439 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 4440 | deviceObject := GetDevice(device) |
| 4441 | |
| 4442 | pipelineLayout := ? |
| 4443 | pPipelineLayout[0] = pipelineLayout |
| 4444 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 4445 | |
| 4446 | return ? |
| 4447 | } |
| 4448 | |
| 4449 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4450 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4451 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4452 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4453 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4454 | deviceObject := GetDevice(device) |
| 4455 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 4456 | assert(pipelineLayoutObjects.device == device) |
| 4457 | |
| 4458 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4459 | } |
| 4460 | |
| 4461 | |
| 4462 | // Sampler functions |
| 4463 | |
| 4464 | @threadSafety("system") |
| 4465 | cmd VkResult vkCreateSampler( |
| 4466 | VkDevice device, |
| 4467 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4468 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4469 | VkSampler* pSampler) { |
| 4470 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 4471 | deviceObject := GetDevice(device) |
| 4472 | |
| 4473 | sampler := ? |
| 4474 | pSampler[0] = sampler |
| 4475 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 4476 | |
| 4477 | return ? |
| 4478 | } |
| 4479 | |
| 4480 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4481 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4482 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4483 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4484 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4485 | deviceObject := GetDevice(device) |
| 4486 | samplerObject := GetSampler(sampler) |
| 4487 | assert(samplerObject.device == device) |
| 4488 | |
| 4489 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4490 | } |
| 4491 | |
| 4492 | |
| 4493 | // Descriptor set functions |
| 4494 | |
| 4495 | @threadSafety("system") |
| 4496 | cmd VkResult vkCreateDescriptorSetLayout( |
| 4497 | VkDevice device, |
| 4498 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4499 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4500 | VkDescriptorSetLayout* pSetLayout) { |
| 4501 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 4502 | deviceObject := GetDevice(device) |
| 4503 | |
| 4504 | setLayout := ? |
| 4505 | pSetLayout[0] = setLayout |
| 4506 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 4507 | |
| 4508 | return ? |
| 4509 | } |
| 4510 | |
| 4511 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4512 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4513 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4514 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4515 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4516 | deviceObject := GetDevice(device) |
| 4517 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 4518 | assert(descriptorSetLayoutObject.device == device) |
| 4519 | |
| 4520 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4521 | } |
| 4522 | |
| 4523 | @threadSafety("system") |
| 4524 | cmd VkResult vkCreateDescriptorPool( |
| 4525 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4526 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4527 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4528 | VkDescriptorPool* pDescriptorPool) { |
| 4529 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 4530 | deviceObject := GetDevice(device) |
| 4531 | |
| 4532 | descriptorPool := ? |
| 4533 | pDescriptorPool[0] = descriptorPool |
| 4534 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 4535 | |
| 4536 | return ? |
| 4537 | } |
| 4538 | |
| 4539 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4540 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4541 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4542 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4543 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4544 | deviceObject := GetDevice(device) |
| 4545 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4546 | assert(descriptorPoolObject.device == device) |
| 4547 | |
| 4548 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4549 | } |
| 4550 | |
| 4551 | @threadSafety("app") |
| 4552 | cmd VkResult vkResetDescriptorPool( |
| 4553 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4554 | VkDescriptorPool descriptorPool, |
| 4555 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4556 | deviceObject := GetDevice(device) |
| 4557 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4558 | assert(descriptorPoolObject.device == device) |
| 4559 | |
| 4560 | return ? |
| 4561 | } |
| 4562 | |
| 4563 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4564 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4565 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4566 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4567 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4568 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4569 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4570 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4571 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4572 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 4573 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4574 | setLayout := setLayouts[i] |
| 4575 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 4576 | assert(setLayoutObject.device == device) |
| 4577 | } |
| 4578 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4579 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 4580 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4581 | descriptorSet := ? |
| 4582 | descriptorSets[i] = descriptorSet |
| 4583 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 4584 | } |
| 4585 | |
| 4586 | return ? |
| 4587 | } |
| 4588 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4589 | cmd VkResult vkFreeDescriptorSets( |
| 4590 | VkDevice device, |
| 4591 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4592 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4593 | const VkDescriptorSet* pDescriptorSets) { |
| 4594 | deviceObject := GetDevice(device) |
| 4595 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4596 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4597 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4598 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4599 | descriptorSet := descriptorSets[i] |
| 4600 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 4601 | assert(descriptorSetObject.device == device) |
| 4602 | State.DescriptorSets[descriptorSet] = null |
| 4603 | } |
| 4604 | |
| 4605 | return ? |
| 4606 | } |
| 4607 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4608 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4609 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4610 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4611 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4612 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4613 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 4614 | deviceObject := GetDevice(device) |
| 4615 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4616 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 4617 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4618 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4619 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4620 | assert(descriptorWriteObject.device == device) |
| 4621 | } |
| 4622 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4623 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 4624 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4625 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4626 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4627 | assert(descriptorCopyObject.device == device) |
| 4628 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4629 | } |
| 4630 | |
| 4631 | |
| 4632 | // Framebuffer functions |
| 4633 | |
| 4634 | @threadSafety("system") |
| 4635 | cmd VkResult vkCreateFramebuffer( |
| 4636 | VkDevice device, |
| 4637 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4638 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4639 | VkFramebuffer* pFramebuffer) { |
| 4640 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 4641 | deviceObject := GetDevice(device) |
| 4642 | |
| 4643 | framebuffer := ? |
| 4644 | pFramebuffer[0] = framebuffer |
| 4645 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 4646 | |
| 4647 | return ? |
| 4648 | } |
| 4649 | |
| 4650 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4651 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4652 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4653 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4654 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4655 | deviceObject := GetDevice(device) |
| 4656 | framebufferObject := GetFramebuffer(framebuffer) |
| 4657 | assert(framebufferObject.device == device) |
| 4658 | |
| 4659 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4660 | } |
| 4661 | |
| 4662 | |
| 4663 | // Renderpass functions |
| 4664 | |
| 4665 | @threadSafety("system") |
| 4666 | cmd VkResult vkCreateRenderPass( |
| 4667 | VkDevice device, |
| 4668 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4669 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4670 | VkRenderPass* pRenderPass) { |
| 4671 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 4672 | deviceObject := GetDevice(device) |
| 4673 | |
| 4674 | renderpass := ? |
| 4675 | pRenderPass[0] = renderpass |
| 4676 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 4677 | |
| 4678 | return ? |
| 4679 | } |
| 4680 | |
| 4681 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4682 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4683 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4684 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4685 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4686 | deviceObject := GetDevice(device) |
| 4687 | renderPassObject := GetRenderPass(renderPass) |
| 4688 | assert(renderPassObject.device == device) |
| 4689 | |
| 4690 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4691 | } |
| 4692 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4693 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4694 | VkDevice device, |
| 4695 | VkRenderPass renderPass, |
| 4696 | VkExtent2D* pGranularity) { |
| 4697 | deviceObject := GetDevice(device) |
| 4698 | renderPassObject := GetRenderPass(renderPass) |
| 4699 | |
| 4700 | granularity := ? |
| 4701 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4702 | } |
| 4703 | |
| 4704 | // Command pool functions |
| 4705 | |
| 4706 | cmd VkResult vkCreateCommandPool( |
| 4707 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4708 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 4709 | const VkAllocationCallbacks* pAllocator, |
| 4710 | VkCommandPool* pCommandPool) { |
| 4711 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4712 | deviceObject := GetDevice(device) |
| 4713 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4714 | commandPool := ? |
| 4715 | pCommandPool[0] = commandPool |
| 4716 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4717 | |
| 4718 | return ? |
| 4719 | } |
| 4720 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4721 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4722 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4723 | VkCommandPool commandPool, |
| 4724 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4725 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4726 | commandPoolObject := GetCommandPool(commandPool) |
| 4727 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4728 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4729 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4730 | } |
| 4731 | |
| 4732 | cmd VkResult vkResetCommandPool( |
| 4733 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4734 | VkCommandPool commandPool, |
| 4735 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4736 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4737 | commandPoolObject := GetCommandPool(commandPool) |
| 4738 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4739 | |
| 4740 | return ? |
| 4741 | } |
| 4742 | |
| 4743 | // Command buffer functions |
| 4744 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4745 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4746 | memoryObject := GetDeviceMemory(memory) |
| 4747 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4748 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4749 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4750 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4751 | } |
| 4752 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4753 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4754 | memoryObject := GetDeviceMemory(memory) |
| 4755 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4756 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4757 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4758 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4759 | } |
| 4760 | |
| 4761 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4762 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4763 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4764 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 4765 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4766 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4767 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4768 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4769 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4770 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4771 | commandBuffer := ? |
| 4772 | commandBuffers[i] = commandBuffer |
| 4773 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4774 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4775 | |
| 4776 | return ? |
| 4777 | } |
| 4778 | |
| 4779 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4780 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4781 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4782 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4783 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4784 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4786 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4787 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4788 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4789 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 4790 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4791 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4792 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4793 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4794 | } |
| 4795 | |
| 4796 | @threadSafety("app") |
| 4797 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4798 | VkCommandBuffer commandBuffer, |
| 4799 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 4800 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 4801 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4802 | |
| 4803 | // TODO: iterate over boundObjects and clear memory bindings |
| 4804 | |
| 4805 | return ? |
| 4806 | } |
| 4807 | |
| 4808 | @threadSafety("app") |
| 4809 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4810 | VkCommandBuffer commandBuffer) { |
| 4811 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4812 | |
| 4813 | return ? |
| 4814 | } |
| 4815 | |
| 4816 | @threadSafety("app") |
| 4817 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4818 | VkCommandBuffer commandBuffer, |
| 4819 | VkCommandBufferResetFlags flags) { |
| 4820 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4821 | |
| 4822 | // TODO: iterate over boundObjects and clear memory bindings |
| 4823 | |
| 4824 | return ? |
| 4825 | } |
| 4826 | |
| 4827 | |
| 4828 | // Command buffer building functions |
| 4829 | |
| 4830 | @threadSafety("app") |
| 4831 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4832 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4833 | VkPipelineBindPoint pipelineBindPoint, |
| 4834 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4835 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4836 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4837 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4838 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4839 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4840 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4841 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4842 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4843 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4844 | } |
| 4845 | |
| 4846 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4847 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4848 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4849 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4850 | u32 viewportCount, |
| 4851 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4852 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4853 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4854 | } |
| 4855 | |
| 4856 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4857 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4858 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4859 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4860 | u32 scissorCount, |
| 4861 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4862 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4863 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4864 | } |
| 4865 | |
| 4866 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4867 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4868 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4869 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4870 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4871 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4872 | } |
| 4873 | |
| 4874 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4875 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4876 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4877 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4878 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4879 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4880 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4881 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4882 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4883 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4884 | @threadSafety("app") |
| 4885 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4886 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4887 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 4888 | // an annotation as a quick hack to pass this to the template without |
| 4889 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4890 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4891 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4892 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4893 | } |
| 4894 | |
| 4895 | @threadSafety("app") |
| 4896 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4897 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4898 | f32 minDepthBounds, |
| 4899 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4900 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4901 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4902 | } |
| 4903 | |
| 4904 | @threadSafety("app") |
| 4905 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4906 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4907 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4908 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4909 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4910 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4911 | } |
| 4912 | |
| 4913 | @threadSafety("app") |
| 4914 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4915 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4916 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4917 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4918 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4919 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4920 | } |
| 4921 | |
| 4922 | @threadSafety("app") |
| 4923 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4924 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4925 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4926 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4927 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4928 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4929 | } |
| 4930 | |
| 4931 | @threadSafety("app") |
| 4932 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4933 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4934 | VkPipelineBindPoint pipelineBindPoint, |
| 4935 | VkPipelineLayout layout, |
| 4936 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4937 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4938 | const VkDescriptorSet* pDescriptorSets, |
| 4939 | u32 dynamicOffsetCount, |
| 4940 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4941 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4942 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4943 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4944 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4945 | descriptorSet := descriptorSets[i] |
| 4946 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4947 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4948 | } |
| 4949 | |
| 4950 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 4951 | for i in (0 .. dynamicOffsetCount) { |
| 4952 | dynamicOffset := dynamicOffsets[i] |
| 4953 | } |
| 4954 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4955 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4956 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4957 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4958 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4959 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4960 | } |
| 4961 | |
| 4962 | @threadSafety("app") |
| 4963 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4964 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4965 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4966 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4967 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4968 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4969 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4972 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4973 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4974 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4975 | } |
| 4976 | |
| 4977 | @threadSafety("app") |
| 4978 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4979 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4980 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4981 | u32 bindingCount, |
| 4982 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4983 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4984 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4985 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4986 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4987 | buffers := pBuffers[0:bindingCount] |
| 4988 | offsets := pOffsets[0:bindingCount] |
| 4989 | for i in (0 .. bindingCount) { |
| 4990 | buffer := buffers[i] |
| 4991 | offset := offsets[i] |
| 4992 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4993 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4994 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4995 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4996 | } |
| 4997 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4998 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4999 | } |
| 5000 | |
| 5001 | @threadSafety("app") |
| 5002 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5003 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5004 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5005 | u32 instanceCount, |
| 5006 | u32 firstVertex, |
| 5007 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5008 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5009 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5010 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5011 | } |
| 5012 | |
| 5013 | @threadSafety("app") |
| 5014 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5015 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5016 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5017 | u32 instanceCount, |
| 5018 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5019 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5020 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5021 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5022 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5023 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5024 | } |
| 5025 | |
| 5026 | @threadSafety("app") |
| 5027 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5028 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5029 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5030 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5031 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5032 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5033 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5034 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5035 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5036 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5037 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5038 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5039 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5040 | } |
| 5041 | |
| 5042 | @threadSafety("app") |
| 5043 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5044 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5045 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5046 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5047 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5048 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5049 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5050 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5051 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5052 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5053 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5054 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5055 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5056 | } |
| 5057 | |
| 5058 | @threadSafety("app") |
| 5059 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5060 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5061 | u32 x, |
| 5062 | u32 y, |
| 5063 | u32 z) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5064 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5065 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5066 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5067 | } |
| 5068 | |
| 5069 | @threadSafety("app") |
| 5070 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5071 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5072 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5073 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5074 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5075 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5076 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5077 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5078 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5079 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5080 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5081 | } |
| 5082 | |
| 5083 | @threadSafety("app") |
| 5084 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5085 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5086 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5087 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5088 | u32 regionCount, |
| 5089 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5090 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5091 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5092 | dstBufferObject := GetBuffer(dstBuffer) |
| 5093 | assert(commandBufferObject.device == srcBufferObject.device) |
| 5094 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5095 | |
| 5096 | regions := pRegions[0:regionCount] |
| 5097 | for i in (0 .. regionCount) { |
| 5098 | region := regions[i] |
| 5099 | } |
| 5100 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5101 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 5102 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5103 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5104 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5105 | } |
| 5106 | |
| 5107 | @threadSafety("app") |
| 5108 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5109 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5110 | VkImage srcImage, |
| 5111 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5112 | VkImage dstImage, |
| 5113 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5114 | u32 regionCount, |
| 5115 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5116 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5117 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5118 | dstImageObject := GetImage(dstImage) |
| 5119 | assert(commandBufferObject.device == srcImageObject.device) |
| 5120 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5121 | |
| 5122 | regions := pRegions[0:regionCount] |
| 5123 | for i in (0 .. regionCount) { |
| 5124 | region := regions[i] |
| 5125 | } |
| 5126 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5127 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5128 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5129 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5130 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5131 | } |
| 5132 | |
| 5133 | @threadSafety("app") |
| 5134 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5135 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5136 | VkImage srcImage, |
| 5137 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5138 | VkImage dstImage, |
| 5139 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5140 | u32 regionCount, |
| 5141 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 5142 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5143 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5144 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5145 | dstImageObject := GetImage(dstImage) |
| 5146 | assert(commandBufferObject.device == srcImageObject.device) |
| 5147 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5148 | |
| 5149 | regions := pRegions[0:regionCount] |
| 5150 | for i in (0 .. regionCount) { |
| 5151 | region := regions[i] |
| 5152 | } |
| 5153 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5154 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5155 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5156 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5157 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5158 | } |
| 5159 | |
| 5160 | @threadSafety("app") |
| 5161 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5162 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5163 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5164 | VkImage dstImage, |
| 5165 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5166 | u32 regionCount, |
| 5167 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5168 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5169 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5170 | dstImageObject := GetImage(dstImage) |
| 5171 | assert(commandBufferObject.device == srcBufferObject.device) |
| 5172 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5173 | |
| 5174 | regions := pRegions[0:regionCount] |
| 5175 | for i in (0 .. regionCount) { |
| 5176 | region := regions[i] |
| 5177 | } |
| 5178 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5179 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 5180 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5181 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5182 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5183 | } |
| 5184 | |
| 5185 | @threadSafety("app") |
| 5186 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5187 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5188 | VkImage srcImage, |
| 5189 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5190 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5191 | u32 regionCount, |
| 5192 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5193 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5194 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5195 | dstBufferObject := GetBuffer(dstBuffer) |
| 5196 | assert(commandBufferObject.device == srcImageObject.device) |
| 5197 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5198 | |
| 5199 | regions := pRegions[0:regionCount] |
| 5200 | for i in (0 .. regionCount) { |
| 5201 | region := regions[i] |
| 5202 | } |
| 5203 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5204 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5205 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5206 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5207 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5208 | } |
| 5209 | |
| 5210 | @threadSafety("app") |
| 5211 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5212 | VkCommandBuffer commandBuffer, |
| 5213 | VkBuffer dstBuffer, |
| 5214 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5215 | VkDeviceSize dataSize, |
Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 5216 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5217 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5218 | dstBufferObject := GetBuffer(dstBuffer) |
| 5219 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5220 | |
| 5221 | data := pData[0:dataSize] |
| 5222 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5223 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5224 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5225 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5226 | } |
| 5227 | |
| 5228 | @threadSafety("app") |
| 5229 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5230 | VkCommandBuffer commandBuffer, |
| 5231 | VkBuffer dstBuffer, |
| 5232 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5233 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5234 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5235 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5236 | dstBufferObject := GetBuffer(dstBuffer) |
| 5237 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5238 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5239 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5240 | } |
| 5241 | |
| 5242 | @threadSafety("app") |
| 5243 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5244 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5245 | VkImage image, |
| 5246 | VkImageLayout imageLayout, |
| 5247 | const VkClearColorValue* pColor, |
| 5248 | u32 rangeCount, |
| 5249 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5250 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5251 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5252 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5253 | |
| 5254 | ranges := pRanges[0:rangeCount] |
| 5255 | for i in (0 .. rangeCount) { |
| 5256 | range := ranges[i] |
| 5257 | } |
| 5258 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5259 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5260 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5261 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5262 | } |
| 5263 | |
| 5264 | @threadSafety("app") |
| 5265 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5266 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5267 | VkImage image, |
| 5268 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5269 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5270 | u32 rangeCount, |
| 5271 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5272 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5273 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5274 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5275 | |
| 5276 | ranges := pRanges[0:rangeCount] |
| 5277 | for i in (0 .. rangeCount) { |
| 5278 | range := ranges[i] |
| 5279 | } |
| 5280 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5281 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5282 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5283 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5284 | } |
| 5285 | |
| 5286 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5287 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5288 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5289 | u32 attachmentCount, |
| 5290 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5291 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5292 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5293 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5294 | |
| 5295 | rects := pRects[0:rectCount] |
| 5296 | for i in (0 .. rectCount) { |
| 5297 | rect := rects[i] |
| 5298 | } |
| 5299 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5300 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5301 | } |
| 5302 | |
| 5303 | @threadSafety("app") |
| 5304 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5305 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5306 | VkImage srcImage, |
| 5307 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5308 | VkImage dstImage, |
| 5309 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5310 | u32 regionCount, |
| 5311 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5312 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5313 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5314 | dstImageObject := GetImage(dstImage) |
| 5315 | assert(commandBufferObject.device == srcImageObject.device) |
| 5316 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5317 | |
| 5318 | regions := pRegions[0:regionCount] |
| 5319 | for i in (0 .. regionCount) { |
| 5320 | region := regions[i] |
| 5321 | } |
| 5322 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5323 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5324 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5325 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5326 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5327 | } |
| 5328 | |
| 5329 | @threadSafety("app") |
| 5330 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5331 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5332 | VkEvent event, |
| 5333 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5334 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5335 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5336 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5337 | } |
| 5338 | |
| 5339 | @threadSafety("app") |
| 5340 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5341 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5342 | VkEvent event, |
| 5343 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5344 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5345 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5346 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5347 | } |
| 5348 | |
| 5349 | @threadSafety("app") |
| 5350 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5351 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5352 | u32 eventCount, |
| 5353 | const VkEvent* pEvents, |
| 5354 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5355 | VkPipelineStageFlags dstStageMask, |
| 5356 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5357 | const VkMemoryBarrier* pMemoryBarriers, |
| 5358 | u32 bufferMemoryBarrierCount, |
| 5359 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5360 | u32 imageMemoryBarrierCount, |
| 5361 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5362 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5363 | |
| 5364 | events := pEvents[0:eventCount] |
| 5365 | for i in (0 .. eventCount) { |
| 5366 | event := events[i] |
| 5367 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5368 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5369 | } |
| 5370 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5371 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5372 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5373 | memoryBarrier := memoryBarriers[i] |
| 5374 | } |
| 5375 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5376 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5377 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5378 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5379 | assert(bufferObject.device == commandBufferObject.device) |
| 5380 | } |
| 5381 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5382 | for i in (0 .. imageMemoryBarrierCount) { |
| 5383 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5384 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5385 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5386 | } |
| 5387 | } |
| 5388 | |
| 5389 | @threadSafety("app") |
| 5390 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5391 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5392 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5393 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5394 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5395 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5396 | const VkMemoryBarrier* pMemoryBarriers, |
| 5397 | u32 bufferMemoryBarrierCount, |
| 5398 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5399 | u32 imageMemoryBarrierCount, |
| 5400 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5401 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5402 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5403 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5404 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5405 | memoryBarrier := memoryBarriers[i] |
| 5406 | } |
| 5407 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5408 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5409 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5410 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5411 | assert(bufferObject.device == commandBufferObject.device) |
| 5412 | } |
| 5413 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5414 | for i in (0 .. imageMemoryBarrierCount) { |
| 5415 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5416 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5417 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5418 | } |
| 5419 | } |
| 5420 | |
| 5421 | @threadSafety("app") |
| 5422 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5423 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5424 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5425 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5426 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5427 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5428 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5429 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5430 | } |
| 5431 | |
| 5432 | @threadSafety("app") |
| 5433 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5434 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5435 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5436 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5437 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5438 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5439 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5440 | } |
| 5441 | |
| 5442 | @threadSafety("app") |
| 5443 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5444 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5445 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5446 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5447 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5448 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5449 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5450 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5451 | } |
| 5452 | |
| 5453 | @threadSafety("app") |
| 5454 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5455 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5456 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5457 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5458 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5459 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5460 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5461 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5462 | } |
| 5463 | |
| 5464 | @threadSafety("app") |
| 5465 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5466 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5467 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5468 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5469 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5470 | VkBuffer dstBuffer, |
| 5471 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5472 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5473 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5474 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5475 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5476 | dstBufferObject := GetBuffer(dstBuffer) |
| 5477 | assert(commandBufferObject.device == queryPoolObject.device) |
| 5478 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5479 | } |
| 5480 | |
| 5481 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5482 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5483 | VkPipelineLayout layout, |
| 5484 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5485 | u32 offset, |
| 5486 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5487 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5488 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5489 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5490 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5491 | } |
| 5492 | |
| 5493 | @threadSafety("app") |
| 5494 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5495 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5496 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5497 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5498 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5499 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 5500 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5501 | assert(commandBufferObject.device == renderPassObject.device) |
| 5502 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5503 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5504 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5505 | } |
| 5506 | |
| 5507 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5508 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5509 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5510 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5511 | } |
| 5512 | |
| 5513 | @threadSafety("app") |
| 5514 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5515 | VkCommandBuffer commandBuffer) { |
| 5516 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5517 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5518 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5519 | } |
| 5520 | |
| 5521 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5522 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5523 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5524 | const VkCommandBuffer* pCommandBuffers) { |
| 5525 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5526 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5527 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 5528 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5529 | secondaryCommandBuffer := commandBuffers[i] |
| 5530 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 5531 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5532 | } |
| 5533 | } |
| 5534 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5535 | @extension("VK_KHR_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5536 | cmd void vkDestroySurfaceKHR( |
| 5537 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5538 | VkSurfaceKHR surface, |
| 5539 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5540 | instanceObject := GetInstance(instance) |
| 5541 | surfaceObject := GetSurface(surface) |
| 5542 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5543 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5544 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5545 | } |
| 5546 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5547 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5548 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5549 | VkPhysicalDevice physicalDevice, |
| 5550 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5551 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5552 | VkBool32* pSupported) { |
| 5553 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5554 | |
| 5555 | return ? |
| 5556 | } |
| 5557 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5558 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5559 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5560 | VkPhysicalDevice physicalDevice, |
| 5561 | VkSurfaceKHR surface, |
| 5562 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 5563 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5564 | |
| 5565 | surfaceCapabilities := ? |
| 5566 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 5567 | |
| 5568 | return ? |
| 5569 | } |
| 5570 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5571 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5572 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5573 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5574 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5575 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5576 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5577 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5578 | |
| 5579 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5580 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5581 | surfaceFormats := pSurfaceFormats[0:count] |
| 5582 | |
| 5583 | for i in (0 .. count) { |
| 5584 | surfaceFormat := ? |
| 5585 | surfaceFormats[i] = surfaceFormat |
| 5586 | } |
| 5587 | |
| 5588 | return ? |
| 5589 | } |
| 5590 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5591 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5592 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5593 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5594 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5595 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5596 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5597 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5598 | |
| 5599 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5600 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5601 | presentModes := pPresentModes[0:count] |
| 5602 | |
| 5603 | for i in (0 .. count) { |
| 5604 | presentMode := ? |
| 5605 | presentModes[i] = presentMode |
| 5606 | } |
| 5607 | |
| 5608 | return ? |
| 5609 | } |
| 5610 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5611 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5612 | cmd VkResult vkCreateSwapchainKHR( |
| 5613 | VkDevice device, |
| 5614 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5615 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5616 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5617 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5618 | deviceObject := GetDevice(device) |
| 5619 | |
| 5620 | swapchain := ? |
| 5621 | pSwapchain[0] = swapchain |
| 5622 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 5623 | |
| 5624 | return ? |
| 5625 | } |
| 5626 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5627 | @extension("VK_KHR_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5628 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5629 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5630 | VkSwapchainKHR swapchain, |
| 5631 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5632 | deviceObject := GetDevice(device) |
| 5633 | swapchainObject := GetSwapchain(swapchain) |
| 5634 | assert(swapchainObject.device == device) |
| 5635 | |
| 5636 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5637 | } |
| 5638 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5639 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5640 | cmd VkResult vkGetSwapchainImagesKHR( |
| 5641 | VkDevice device, |
| 5642 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5643 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5644 | VkImage* pSwapchainImages) { |
| 5645 | deviceObject := GetDevice(device) |
| 5646 | |
| 5647 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5648 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5649 | swapchainImages := pSwapchainImages[0:count] |
| 5650 | |
| 5651 | for i in (0 .. count) { |
| 5652 | swapchainImage := ? |
| 5653 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5654 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5655 | } |
| 5656 | |
| 5657 | return ? |
| 5658 | } |
| 5659 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5660 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5661 | cmd VkResult vkAcquireNextImageKHR( |
| 5662 | VkDevice device, |
| 5663 | VkSwapchainKHR swapchain, |
| 5664 | u64 timeout, |
| 5665 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5666 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5667 | u32* pImageIndex) { |
| 5668 | deviceObject := GetDevice(device) |
| 5669 | swapchainObject := GetSwapchain(swapchain) |
| 5670 | |
| 5671 | imageIndex := ? |
| 5672 | pImageIndex[0] = imageIndex |
| 5673 | |
| 5674 | return ? |
| 5675 | } |
| 5676 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5677 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5678 | cmd VkResult vkQueuePresentKHR( |
| 5679 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5680 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5681 | queueObject := GetQueue(queue) |
| 5682 | |
| 5683 | presentInfo := ? |
| 5684 | pPresentInfo[0] = presentInfo |
| 5685 | |
| 5686 | return ? |
| 5687 | } |
| 5688 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5689 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5690 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 5691 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5692 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5693 | VkDisplayPropertiesKHR* pProperties) { |
| 5694 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5695 | return ? |
| 5696 | } |
| 5697 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5698 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5699 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 5700 | VkPhysicalDevice physicalDevice, |
| 5701 | u32* pPropertyCount, |
| 5702 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 5703 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5704 | return ? |
| 5705 | } |
| 5706 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5707 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5708 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 5709 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5710 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5711 | u32* pDisplayCount, |
| 5712 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5713 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5714 | return ? |
| 5715 | } |
| 5716 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5717 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5718 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 5719 | VkPhysicalDevice physicalDevice, |
| 5720 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5721 | u32* pPropertyCount, |
| 5722 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5723 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5724 | return ? |
| 5725 | } |
| 5726 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5727 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5728 | cmd VkResult vkCreateDisplayModeKHR( |
| 5729 | VkPhysicalDevice physicalDevice, |
| 5730 | VkDisplayKHR display, |
| 5731 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5732 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5733 | VkDisplayModeKHR* pMode) { |
| 5734 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5735 | return ? |
| 5736 | } |
| 5737 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5738 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5739 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5740 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5741 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5742 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5743 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5744 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5745 | return ? |
| 5746 | } |
| 5747 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5748 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5749 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 5750 | VkInstance instance, |
| 5751 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5752 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5753 | VkSurfaceKHR* pSurface) { |
| 5754 | return ? |
| 5755 | } |
| 5756 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5757 | @extension("VK_KHR_display_swapchain") |
| 5758 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 5759 | VkDevice device, |
| 5760 | u32 swapchainCount, |
| 5761 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 5762 | const VkAllocationCallbacks* pAllocator, |
| 5763 | VkSwapchainKHR* pSwapchains) { |
| 5764 | return ? |
| 5765 | } |
| 5766 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5767 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5768 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5769 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5770 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5771 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5772 | VkSurfaceKHR* pSurface) { |
| 5773 | instanceObject := GetInstance(instance) |
| 5774 | return ? |
| 5775 | } |
| 5776 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5777 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5778 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 5779 | VkPhysicalDevice physicalDevice, |
| 5780 | u32 queueFamilyIndex, |
| 5781 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5782 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5783 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5784 | return ? |
| 5785 | } |
| 5786 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5787 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5788 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5789 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5790 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5791 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5792 | VkSurfaceKHR* pSurface) { |
| 5793 | instanceObject := GetInstance(instance) |
| 5794 | return ? |
| 5795 | } |
| 5796 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5797 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5798 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 5799 | VkPhysicalDevice physicalDevice, |
| 5800 | u32 queueFamilyIndex, |
| 5801 | platform.xcb_connection_t* connection, |
| 5802 | platform.xcb_visualid_t visual_id) { |
| 5803 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5804 | return ? |
| 5805 | } |
| 5806 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5807 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5808 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 5809 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5810 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5811 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5812 | VkSurfaceKHR* pSurface) { |
| 5813 | instanceObject := GetInstance(instance) |
| 5814 | return ? |
| 5815 | } |
| 5816 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5817 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5818 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 5819 | VkPhysicalDevice physicalDevice, |
| 5820 | u32 queueFamilyIndex, |
| 5821 | platform.wl_display* display) { |
| 5822 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5823 | return ? |
| 5824 | } |
| 5825 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5826 | @extension("VK_KHR_mir_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5827 | cmd VkResult vkCreateMirSurfaceKHR( |
| 5828 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5829 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5830 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5831 | VkSurfaceKHR* pSurface) { |
| 5832 | instanceObject := GetInstance(instance) |
| 5833 | return ? |
| 5834 | } |
| 5835 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5836 | @extension("VK_KHR_mir_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5837 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 5838 | VkPhysicalDevice physicalDevice, |
| 5839 | u32 queueFamilyIndex, |
| 5840 | platform.MirConnection* connection) { |
| 5841 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5842 | return ? |
| 5843 | } |
| 5844 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5845 | @extension("VK_KHR_android_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5846 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 5847 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5848 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5849 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5850 | VkSurfaceKHR* pSurface) { |
| 5851 | instanceObject := GetInstance(instance) |
| 5852 | return ? |
| 5853 | } |
| 5854 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5855 | @extension("VK_KHR_win32_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5856 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 5857 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5858 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5859 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5860 | VkSurfaceKHR* pSurface) { |
| 5861 | instanceObject := GetInstance(instance) |
| 5862 | return ? |
| 5863 | } |
| 5864 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5865 | @extension("VK_KHR_win32_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5866 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 5867 | VkPhysicalDevice physicalDevice, |
| 5868 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5869 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5870 | return ? |
| 5871 | } |
| 5872 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5873 | @extension("VK_ANDROID_native_buffer") |
| 5874 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 5875 | VkDevice device, |
| 5876 | VkFormat format, |
| 5877 | VkImageUsageFlags imageUsage, |
| 5878 | int* grallocUsage) { |
| 5879 | return ? |
| 5880 | } |
| 5881 | |
| 5882 | @extension("VK_ANDROID_native_buffer") |
| 5883 | cmd VkResult vkAcquireImageANDROID( |
| 5884 | VkDevice device, |
| 5885 | VkImage image, |
| 5886 | int nativeFenceFd, |
| 5887 | VkSemaphore semaphore, |
| 5888 | VkFence fence) { |
| 5889 | return ? |
| 5890 | } |
| 5891 | |
| 5892 | @extension("VK_ANDROID_native_buffer") |
| 5893 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 5894 | VkQueue queue, |
| 5895 | u32 waitSemaphoreCount, |
| 5896 | const VkSemaphore* pWaitSemaphores, |
| 5897 | VkImage image, |
| 5898 | int* pNativeFenceFd) { |
| 5899 | return ? |
| 5900 | } |
| 5901 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5902 | @extension("VK_EXT_debug_report") |
| 5903 | @external type void* PFN_vkDebugReportCallbackEXT |
| 5904 | @extension("VK_EXT_debug_report") |
| 5905 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 5906 | VkDebugReportFlagsEXT flags, |
| 5907 | VkDebugReportObjectTypeEXT objectType, |
| 5908 | u64 object, |
| 5909 | platform.size_t location, |
| 5910 | s32 messageCode, |
| 5911 | const char* pLayerPrefix, |
| 5912 | const char* pMessage, |
| 5913 | void* pUserData) { |
| 5914 | return ? |
| 5915 | } |
| 5916 | |
| 5917 | @extension("VK_EXT_debug_report") |
| 5918 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 5919 | VkInstance instance, |
| 5920 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 5921 | const VkAllocationCallbacks* pAllocator, |
| 5922 | VkDebugReportCallbackEXT* pCallback) { |
| 5923 | return ? |
| 5924 | } |
| 5925 | |
| 5926 | @extension("VK_EXT_debug_report") |
| 5927 | cmd void vkDestroyDebugReportCallbackEXT( |
| 5928 | VkInstance instance, |
| 5929 | VkDebugReportCallbackEXT callback, |
| 5930 | const VkAllocationCallbacks* pAllocator) { |
| 5931 | } |
| 5932 | |
| 5933 | @extension("VK_EXT_debug_report") |
| 5934 | cmd void vkDebugReportMessageEXT( |
| 5935 | VkInstance instance, |
| 5936 | VkDebugReportFlagsEXT flags, |
| 5937 | VkDebugReportObjectTypeEXT objectType, |
| 5938 | u64 object, |
| 5939 | platform.size_t location, |
| 5940 | s32 messageCode, |
| 5941 | const char* pLayerPrefix, |
| 5942 | const char* pMessage) { |
| 5943 | } |
| 5944 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5945 | @extension("VK_EXT_debug_marker") |
| 5946 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 5947 | VkDevice device, |
| 5948 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 5949 | return ? |
| 5950 | } |
| 5951 | |
| 5952 | @extension("VK_EXT_debug_marker") |
| 5953 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 5954 | VkDevice device, |
| 5955 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 5956 | return ? |
| 5957 | } |
| 5958 | |
| 5959 | @extension("VK_EXT_debug_marker") |
| 5960 | cmd void vkCmdDebugMarkerBeginEXT( |
| 5961 | VkCommandBuffer commandBuffer, |
| 5962 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5963 | } |
| 5964 | |
| 5965 | @extension("VK_EXT_debug_marker") |
| 5966 | cmd void vkCmdDebugMarkerEndEXT( |
| 5967 | VkCommandBuffer commandBuffer) { |
| 5968 | } |
| 5969 | |
| 5970 | @extension("VK_EXT_debug_marker") |
| 5971 | cmd void vkCmdDebugMarkerInsertEXT( |
| 5972 | VkCommandBuffer commandBuffer, |
| 5973 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5974 | } |
| 5975 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 5976 | @extension("VK_AMD_draw_indirect_count") |
| 5977 | cmd void vkCmdDrawIndirectCountAMD( |
| 5978 | VkCommandBuffer commandBuffer, |
| 5979 | VkBuffer buffer, |
| 5980 | VkDeviceSize offset, |
| 5981 | VkBuffer countBuffer, |
| 5982 | VkDeviceSize countBufferOffset, |
| 5983 | u32 maxDrawCount, |
| 5984 | u32 stride) { |
| 5985 | } |
| 5986 | |
| 5987 | @extension("VK_AMD_draw_indirect_count") |
| 5988 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 5989 | VkCommandBuffer commandBuffer, |
| 5990 | VkBuffer buffer, |
| 5991 | VkDeviceSize offset, |
| 5992 | VkBuffer countBuffer, |
| 5993 | VkDeviceSize countBufferOffset, |
| 5994 | u32 maxDrawCount, |
| 5995 | u32 stride) { |
| 5996 | } |
| 5997 | |
| 5998 | @extension("VK_NV_external_memory_capabilities") |
| 5999 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 6000 | VkPhysicalDevice physicalDevice, |
| 6001 | VkFormat format, |
| 6002 | VkImageType type, |
| 6003 | VkImageTiling tiling, |
| 6004 | VkImageUsageFlags usage, |
| 6005 | VkImageCreateFlags flags, |
| 6006 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 6007 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 6008 | return ? |
| 6009 | } |
| 6010 | |
| 6011 | @extension("VK_NV_external_memory_win32") |
| 6012 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 6013 | VkDevice device, |
| 6014 | VkDeviceMemory memory, |
| 6015 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6016 | platform.HANDLE* pHandle) { |
| 6017 | return ? |
| 6018 | } |
| 6019 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 6020 | @extension("VK_KHR_get_physical_device_properties2") |
| 6021 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 6022 | VkPhysicalDevice physicalDevice, |
| 6023 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 6024 | } |
| 6025 | |
| 6026 | @extension("VK_KHR_get_physical_device_properties2") |
| 6027 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 6028 | VkPhysicalDevice physicalDevice, |
| 6029 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 6030 | } |
| 6031 | |
| 6032 | @extension("VK_KHR_get_physical_device_properties2") |
| 6033 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 6034 | VkPhysicalDevice physicalDevice, |
| 6035 | VkFormat format, |
| 6036 | VkFormatProperties2KHR* pFormatProperties) { |
| 6037 | } |
| 6038 | |
| 6039 | @extension("VK_KHR_get_physical_device_properties2") |
| 6040 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 6041 | VkPhysicalDevice physicalDevice, |
| 6042 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 6043 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 6044 | return ? |
| 6045 | } |
| 6046 | |
| 6047 | @extension("VK_KHR_get_physical_device_properties2") |
| 6048 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 6049 | VkPhysicalDevice physicalDevice, |
| 6050 | u32* pQueueFamilyPropertyCount, |
| 6051 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 6052 | } |
| 6053 | |
| 6054 | @extension("VK_KHR_get_physical_device_properties2") |
| 6055 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 6056 | VkPhysicalDevice physicalDevice, |
| 6057 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 6058 | } |
| 6059 | |
| 6060 | @extension("VK_KHR_get_physical_device_properties2") |
| 6061 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 6062 | VkPhysicalDevice physicalDevice, |
| 6063 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 6064 | u32* pPropertyCount, |
| 6065 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 6066 | } |
| 6067 | |
| 6068 | @extension("VK_NN_vi_surface") |
| 6069 | cmd VkResult vkCreateViSurfaceNN( |
| 6070 | VkInstance instance, |
| 6071 | const VkViSurfaceCreateInfoNN* pCreateInfo, |
| 6072 | const VkAllocationCallbacks* pAllocator, |
| 6073 | VkSurfaceKHR* pSurface) { |
| 6074 | return ? |
| 6075 | } |
| 6076 | |
| 6077 | @extension("VK_KHR_maintenance1") |
| 6078 | cmd void vkTrimCommandPoolKHR( |
| 6079 | VkDevice device, |
| 6080 | VkCommandPool commandPool, |
| 6081 | VkCommandPoolTrimFlagsKHR flags) { |
| 6082 | } |
| 6083 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6084 | @extension("VK_NVX_device_generated_commands") |
| 6085 | cmd void vkCmdProcessCommandsNVX( |
| 6086 | VkCommandBuffer commandBuffer, |
| 6087 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 6088 | } |
| 6089 | |
| 6090 | @extension("VK_NVX_device_generated_commands") |
| 6091 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 6092 | VkCommandBuffer commandBuffer, |
| 6093 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 6094 | } |
| 6095 | |
| 6096 | @extension("VK_NVX_device_generated_commands") |
| 6097 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 6098 | VkDevice device, |
| 6099 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 6100 | const VkAllocationCallbacks* pAllocator, |
| 6101 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 6102 | return ? |
| 6103 | } |
| 6104 | |
| 6105 | @extension("VK_NVX_device_generated_commands") |
| 6106 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 6107 | VkDevice device, |
| 6108 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 6109 | const VkAllocationCallbacks* pAllocator) { |
| 6110 | } |
| 6111 | |
| 6112 | @extension("VK_NVX_device_generated_commands") |
| 6113 | cmd VkResult vkCreateObjectTableNVX( |
| 6114 | VkDevice device, |
| 6115 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 6116 | const VkAllocationCallbacks* pAllocator, |
| 6117 | VkObjectTableNVX* pObjectTable) { |
| 6118 | return ? |
| 6119 | } |
| 6120 | |
| 6121 | @extension("VK_NVX_device_generated_commands") |
| 6122 | cmd void vkDestroyObjectTableNVX( |
| 6123 | VkDevice device, |
| 6124 | VkObjectTableNVX objectTable, |
| 6125 | const VkAllocationCallbacks* pAllocator) { |
| 6126 | } |
| 6127 | |
| 6128 | @extension("VK_NVX_device_generated_commands") |
| 6129 | cmd VkResult vkRegisterObjectsNVX( |
| 6130 | VkDevice device, |
| 6131 | VkObjectTableNVX objectTable, |
| 6132 | u32 objectCount, |
| 6133 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 6134 | const u32* pObjectIndices) { |
| 6135 | return ? |
| 6136 | } |
| 6137 | |
| 6138 | @extension("VK_NVX_device_generated_commands") |
| 6139 | cmd VkResult vkUnregisterObjectsNVX( |
| 6140 | VkDevice device, |
| 6141 | VkObjectTableNVX objectTable, |
| 6142 | u32 objectCount, |
| 6143 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 6144 | const u32* pObjectIndices) { |
| 6145 | return ? |
| 6146 | } |
| 6147 | |
| 6148 | @extension("VK_NVX_device_generated_commands") |
| 6149 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 6150 | VkPhysicalDevice physicalDevice, |
| 6151 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 6152 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 6153 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6154 | |
Jesse Hall | 08e2f48 | 2017-03-06 15:22:17 -0800 | [diff] [blame^] | 6155 | @extension("VK_EXT_direct_mode_display") |
| 6156 | cmd VkResult vkReleaseDisplayEXT( |
| 6157 | VkPhysicalDevice physicalDevice, |
| 6158 | VkDisplayKHR display) { |
| 6159 | return ? |
| 6160 | } |
| 6161 | |
| 6162 | @extension("VK_EXT_acquire_xlib_display") |
| 6163 | cmd VkResult vkAcquireXlibDisplayEXT( |
| 6164 | VkPhysicalDevice physicalDevice, |
| 6165 | platform.Display* dpy, |
| 6166 | VkDisplayKHR display) { |
| 6167 | return ? |
| 6168 | } |
| 6169 | |
| 6170 | @extension("VK_EXT_acquire_xlib_display") |
| 6171 | cmd VkResult vkGetRandROutputDisplayEXT( |
| 6172 | VkPhysicalDevice physicalDevice, |
| 6173 | platform.Display* dpy, |
| 6174 | platform.RROutput rrOutput, |
| 6175 | VkDisplayKHR* pDisplay) { |
| 6176 | return ? |
| 6177 | } |
| 6178 | |
| 6179 | @extension("VK_EXT_display_surface_counter") |
| 6180 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( |
| 6181 | VkPhysicalDevice physicalDevice, |
| 6182 | VkSurfaceKHR surface, |
| 6183 | VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { |
| 6184 | return ? |
| 6185 | } |
| 6186 | |
| 6187 | @extension("VK_EXT_display_control") |
| 6188 | cmd VkResult vkDisplayPowerControlEXT( |
| 6189 | VkDevice device, |
| 6190 | VkDisplayKHR display, |
| 6191 | const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { |
| 6192 | return ? |
| 6193 | } |
| 6194 | |
| 6195 | @extension("VK_EXT_display_control") |
| 6196 | cmd VkResult vkRegisterDeviceEventEXT( |
| 6197 | VkDevice device, |
| 6198 | const VkDeviceEventInfoEXT* pDeviceEventInfo, |
| 6199 | const VkAllocationCallbacks* pAllocator, |
| 6200 | VkFence* pFence) { |
| 6201 | return ? |
| 6202 | } |
| 6203 | |
| 6204 | @extension("VK_EXT_display_control") |
| 6205 | cmd VkResult vkRegisterDisplayEventEXT( |
| 6206 | VkDevice device, |
| 6207 | VkDisplayKHR display, |
| 6208 | const VkDisplayEventInfoEXT* pDisplayEventInfo, |
| 6209 | const VkAllocationCallbacks* pAllocator, |
| 6210 | VkFence* pFence) { |
| 6211 | return ? |
| 6212 | } |
| 6213 | |
| 6214 | @extension("VK_EXT_display_control") |
| 6215 | cmd VkResult vkGetSwapchainCounterEXT( |
| 6216 | VkDevice device, |
| 6217 | VkSwapchainKHR swapchain, |
| 6218 | VkSurfaceCounterFlagBitsEXT counter, |
| 6219 | u64* pCounterValue) { |
| 6220 | return ? |
| 6221 | } |
| 6222 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6223 | //////////////// |
| 6224 | // Validation // |
| 6225 | //////////////// |
| 6226 | |
| 6227 | extern void validate(string layerName, bool condition, string message) |
| 6228 | |
| 6229 | |
| 6230 | ///////////////////////////// |
| 6231 | // Internal State Tracking // |
| 6232 | ///////////////////////////// |
| 6233 | |
| 6234 | StateObject State |
| 6235 | |
| 6236 | @internal class StateObject { |
| 6237 | // Dispatchable objects. |
| 6238 | map!(VkInstance, ref!InstanceObject) Instances |
| 6239 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 6240 | map!(VkDevice, ref!DeviceObject) Devices |
| 6241 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6242 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6243 | |
| 6244 | // Non-dispatchable objects. |
| 6245 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 6246 | map!(VkBuffer, ref!BufferObject) Buffers |
| 6247 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 6248 | map!(VkImage, ref!ImageObject) Images |
| 6249 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6250 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6251 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 6252 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 6253 | map!(VkSampler, ref!SamplerObject) Samplers |
| 6254 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 6255 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 6256 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6257 | map!(VkFence, ref!FenceObject) Fences |
| 6258 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 6259 | map!(VkEvent, ref!EventObject) Events |
| 6260 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 6261 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 6262 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 6263 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6264 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6265 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6266 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6267 | } |
| 6268 | |
| 6269 | @internal class InstanceObject { |
| 6270 | } |
| 6271 | |
| 6272 | @internal class PhysicalDeviceObject { |
| 6273 | VkInstance instance |
| 6274 | } |
| 6275 | |
| 6276 | @internal class DeviceObject { |
| 6277 | VkPhysicalDevice physicalDevice |
| 6278 | } |
| 6279 | |
| 6280 | @internal class QueueObject { |
| 6281 | VkDevice device |
| 6282 | VkQueueFlags flags |
| 6283 | } |
| 6284 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6285 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6286 | VkDevice device |
| 6287 | map!(u64, VkDeviceMemory) boundObjects |
| 6288 | VkQueueFlags queueFlags |
| 6289 | } |
| 6290 | |
| 6291 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6292 | VkDevice device |
| 6293 | VkDeviceSize allocationSize |
| 6294 | map!(u64, VkDeviceSize) boundObjects |
| 6295 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6296 | } |
| 6297 | |
| 6298 | @internal class BufferObject { |
| 6299 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6300 | VkDeviceMemory memory |
| 6301 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6302 | } |
| 6303 | |
| 6304 | @internal class BufferViewObject { |
| 6305 | VkDevice device |
| 6306 | VkBuffer buffer |
| 6307 | } |
| 6308 | |
| 6309 | @internal class ImageObject { |
| 6310 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6311 | VkDeviceMemory memory |
| 6312 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6313 | } |
| 6314 | |
| 6315 | @internal class ImageViewObject { |
| 6316 | VkDevice device |
| 6317 | VkImage image |
| 6318 | } |
| 6319 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6320 | @internal class ShaderObject { |
| 6321 | VkDevice device |
| 6322 | } |
| 6323 | |
| 6324 | @internal class ShaderModuleObject { |
| 6325 | VkDevice device |
| 6326 | } |
| 6327 | |
| 6328 | @internal class PipelineObject { |
| 6329 | VkDevice device |
| 6330 | } |
| 6331 | |
| 6332 | @internal class PipelineLayoutObject { |
| 6333 | VkDevice device |
| 6334 | } |
| 6335 | |
| 6336 | @internal class SamplerObject { |
| 6337 | VkDevice device |
| 6338 | } |
| 6339 | |
| 6340 | @internal class DescriptorSetObject { |
| 6341 | VkDevice device |
| 6342 | } |
| 6343 | |
| 6344 | @internal class DescriptorSetLayoutObject { |
| 6345 | VkDevice device |
| 6346 | } |
| 6347 | |
| 6348 | @internal class DescriptorPoolObject { |
| 6349 | VkDevice device |
| 6350 | } |
| 6351 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6352 | @internal class FenceObject { |
| 6353 | VkDevice device |
| 6354 | bool signaled |
| 6355 | } |
| 6356 | |
| 6357 | @internal class SemaphoreObject { |
| 6358 | VkDevice device |
| 6359 | } |
| 6360 | |
| 6361 | @internal class EventObject { |
| 6362 | VkDevice device |
| 6363 | } |
| 6364 | |
| 6365 | @internal class QueryPoolObject { |
| 6366 | VkDevice device |
| 6367 | } |
| 6368 | |
| 6369 | @internal class FramebufferObject { |
| 6370 | VkDevice device |
| 6371 | } |
| 6372 | |
| 6373 | @internal class RenderPassObject { |
| 6374 | VkDevice device |
| 6375 | } |
| 6376 | |
| 6377 | @internal class PipelineCacheObject { |
| 6378 | VkDevice device |
| 6379 | } |
| 6380 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6381 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6382 | VkDevice device |
| 6383 | } |
| 6384 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6385 | @internal class SurfaceObject { |
| 6386 | VkInstance instance |
| 6387 | } |
| 6388 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6389 | @internal class SwapchainObject { |
| 6390 | VkDevice device |
| 6391 | } |
| 6392 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6393 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 6394 | assert(instance in State.Instances) |
| 6395 | return State.Instances[instance] |
| 6396 | } |
| 6397 | |
| 6398 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 6399 | assert(physicalDevice in State.PhysicalDevices) |
| 6400 | return State.PhysicalDevices[physicalDevice] |
| 6401 | } |
| 6402 | |
| 6403 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 6404 | assert(device in State.Devices) |
| 6405 | return State.Devices[device] |
| 6406 | } |
| 6407 | |
| 6408 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 6409 | assert(queue in State.Queues) |
| 6410 | return State.Queues[queue] |
| 6411 | } |
| 6412 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6413 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 6414 | assert(commandBuffer in State.CommandBuffers) |
| 6415 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6416 | } |
| 6417 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6418 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 6419 | assert(memory in State.DeviceMemories) |
| 6420 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6421 | } |
| 6422 | |
| 6423 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 6424 | assert(buffer in State.Buffers) |
| 6425 | return State.Buffers[buffer] |
| 6426 | } |
| 6427 | |
| 6428 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 6429 | assert(bufferView in State.BufferViews) |
| 6430 | return State.BufferViews[bufferView] |
| 6431 | } |
| 6432 | |
| 6433 | macro ref!ImageObject GetImage(VkImage image) { |
| 6434 | assert(image in State.Images) |
| 6435 | return State.Images[image] |
| 6436 | } |
| 6437 | |
| 6438 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 6439 | assert(imageView in State.ImageViews) |
| 6440 | return State.ImageViews[imageView] |
| 6441 | } |
| 6442 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6443 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 6444 | assert(shaderModule in State.ShaderModules) |
| 6445 | return State.ShaderModules[shaderModule] |
| 6446 | } |
| 6447 | |
| 6448 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 6449 | assert(pipeline in State.Pipelines) |
| 6450 | return State.Pipelines[pipeline] |
| 6451 | } |
| 6452 | |
| 6453 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 6454 | assert(pipelineLayout in State.PipelineLayouts) |
| 6455 | return State.PipelineLayouts[pipelineLayout] |
| 6456 | } |
| 6457 | |
| 6458 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 6459 | assert(sampler in State.Samplers) |
| 6460 | return State.Samplers[sampler] |
| 6461 | } |
| 6462 | |
| 6463 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 6464 | assert(descriptorSet in State.DescriptorSets) |
| 6465 | return State.DescriptorSets[descriptorSet] |
| 6466 | } |
| 6467 | |
| 6468 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 6469 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 6470 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 6471 | } |
| 6472 | |
| 6473 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 6474 | assert(descriptorPool in State.DescriptorPools) |
| 6475 | return State.DescriptorPools[descriptorPool] |
| 6476 | } |
| 6477 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6478 | macro ref!FenceObject GetFence(VkFence fence) { |
| 6479 | assert(fence in State.Fences) |
| 6480 | return State.Fences[fence] |
| 6481 | } |
| 6482 | |
| 6483 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 6484 | assert(semaphore in State.Semaphores) |
| 6485 | return State.Semaphores[semaphore] |
| 6486 | } |
| 6487 | |
| 6488 | macro ref!EventObject GetEvent(VkEvent event) { |
| 6489 | assert(event in State.Events) |
| 6490 | return State.Events[event] |
| 6491 | } |
| 6492 | |
| 6493 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 6494 | assert(queryPool in State.QueryPools) |
| 6495 | return State.QueryPools[queryPool] |
| 6496 | } |
| 6497 | |
| 6498 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 6499 | assert(framebuffer in State.Framebuffers) |
| 6500 | return State.Framebuffers[framebuffer] |
| 6501 | } |
| 6502 | |
| 6503 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 6504 | assert(renderPass in State.RenderPasses) |
| 6505 | return State.RenderPasses[renderPass] |
| 6506 | } |
| 6507 | |
| 6508 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 6509 | assert(pipelineCache in State.PipelineCaches) |
| 6510 | return State.PipelineCaches[pipelineCache] |
| 6511 | } |
| 6512 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6513 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 6514 | assert(commandPool in State.CommandPools) |
| 6515 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6516 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6517 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6518 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 6519 | assert(surface in State.Surfaces) |
| 6520 | return State.Surfaces[surface] |
| 6521 | } |
| 6522 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6523 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 6524 | assert(swapchain in State.Swapchains) |
| 6525 | return State.Swapchains[swapchain] |
| 6526 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6527 | |
| 6528 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 6529 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 6530 | } |