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 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 31 | define VERSION_PATCH 38 |
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 |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 89 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 7 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 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 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | 56d386a | 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 | 56d386a | 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 | 56d386a | 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 | 56d386a | 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 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 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 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 156 | // 57 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 160 | // 58 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 164 | // 59 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | 889cd9a | 2017-02-25 22:12:23 -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 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 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 | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 176 | // 85 |
| 177 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 |
| 178 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present" |
| 179 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 180 | // 87 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 181 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 182 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 183 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 184 | // 93 |
| 185 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 |
| 186 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_NAME "VK_GOOGLE_display_timing" |
| 187 | |
| 188 | // 106 |
| 189 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_SPEC_VERSION 1 |
| 190 | @extension("VK_EXT_hdr_metadata") define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" |
| 191 | |
| 192 | // 112 |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 193 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 |
| 194 | @extension("VK_KHR_shared_presentable_image") define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 195 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 196 | ///////////// |
| 197 | // Types // |
| 198 | ///////////// |
| 199 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 200 | type u32 VkBool32 |
| 201 | type u32 VkFlags |
| 202 | type u64 VkDeviceSize |
| 203 | type u32 VkSampleMask |
| 204 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 205 | /// Dispatchable handle types. |
| 206 | @dispatchHandle type u64 VkInstance |
| 207 | @dispatchHandle type u64 VkPhysicalDevice |
| 208 | @dispatchHandle type u64 VkDevice |
| 209 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 210 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 211 | |
| 212 | /// Non dispatchable handle types. |
| 213 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 214 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 215 | @nonDispatchHandle type u64 VkBuffer |
| 216 | @nonDispatchHandle type u64 VkBufferView |
| 217 | @nonDispatchHandle type u64 VkImage |
| 218 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 219 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 220 | @nonDispatchHandle type u64 VkPipeline |
| 221 | @nonDispatchHandle type u64 VkPipelineLayout |
| 222 | @nonDispatchHandle type u64 VkSampler |
| 223 | @nonDispatchHandle type u64 VkDescriptorSet |
| 224 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 225 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 226 | @nonDispatchHandle type u64 VkFence |
| 227 | @nonDispatchHandle type u64 VkSemaphore |
| 228 | @nonDispatchHandle type u64 VkEvent |
| 229 | @nonDispatchHandle type u64 VkQueryPool |
| 230 | @nonDispatchHandle type u64 VkFramebuffer |
| 231 | @nonDispatchHandle type u64 VkRenderPass |
| 232 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 233 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 234 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 235 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 236 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 237 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 238 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 239 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 240 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 241 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 242 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 243 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 244 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 245 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 246 | |
| 247 | ///////////// |
| 248 | // Enums // |
| 249 | ///////////// |
| 250 | |
| 251 | enum VkImageLayout { |
| 252 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 253 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 254 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 255 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 256 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 257 | 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] | 258 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 259 | 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] | 260 | 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] | 261 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 262 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 263 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Chris Forbes | af3a111 | 2017-01-31 15:37:03 +1300 | [diff] [blame] | 264 | |
| 265 | //@extension("VK_KHR_shared_presentable_image") |
| 266 | VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | enum VkAttachmentLoadOp { |
| 270 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 271 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 272 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 273 | } |
| 274 | |
| 275 | enum VkAttachmentStoreOp { |
| 276 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 277 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 278 | } |
| 279 | |
| 280 | enum VkImageType { |
| 281 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 282 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 283 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 284 | } |
| 285 | |
| 286 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 287 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 288 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 289 | } |
| 290 | |
| 291 | enum VkImageViewType { |
| 292 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 293 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 294 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 295 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 296 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 297 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 298 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 299 | } |
| 300 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 301 | enum VkCommandBufferLevel { |
| 302 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 303 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 304 | } |
| 305 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 306 | enum VkComponentSwizzle { |
| 307 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 308 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 309 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 310 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 311 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 312 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 313 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 314 | } |
| 315 | |
| 316 | enum VkDescriptorType { |
| 317 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 318 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 319 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 320 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 321 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 322 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 323 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 324 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 325 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 326 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 327 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 328 | } |
| 329 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 330 | enum VkQueryType { |
| 331 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 332 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 333 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 334 | } |
| 335 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 336 | enum VkBorderColor { |
| 337 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 338 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 339 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 340 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 341 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 342 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 343 | } |
| 344 | |
| 345 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 346 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 347 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 348 | } |
| 349 | |
| 350 | enum VkPrimitiveTopology { |
| 351 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 352 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 353 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 354 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 355 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 356 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 357 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 358 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 359 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 360 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 361 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | enum VkSharingMode { |
| 365 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 366 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 367 | } |
| 368 | |
| 369 | enum VkIndexType { |
| 370 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 371 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 372 | } |
| 373 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 374 | enum VkFilter { |
| 375 | VK_FILTER_NEAREST = 0x00000000, |
| 376 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 377 | |
| 378 | //@extension("VK_IMG_filter_cubic") |
| 379 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 380 | } |
| 381 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 382 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 383 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 384 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 385 | } |
| 386 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 387 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 388 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 389 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 390 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 391 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 392 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 393 | } |
| 394 | |
| 395 | enum VkCompareOp { |
| 396 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 397 | VK_COMPARE_OP_LESS = 0x00000001, |
| 398 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 399 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 400 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 401 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 402 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 403 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 404 | } |
| 405 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 406 | enum VkPolygonMode { |
| 407 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 408 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 409 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 410 | } |
| 411 | |
| 412 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 413 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 414 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 415 | } |
| 416 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 417 | enum VkBlendFactor { |
| 418 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 419 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 420 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 421 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 422 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 423 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 424 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 425 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 426 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 427 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 428 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 429 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 430 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 431 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 432 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 433 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 434 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 435 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 436 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 437 | } |
| 438 | |
| 439 | enum VkBlendOp { |
| 440 | VK_BLEND_OP_ADD = 0x00000000, |
| 441 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 442 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 443 | VK_BLEND_OP_MIN = 0x00000003, |
| 444 | VK_BLEND_OP_MAX = 0x00000004, |
| 445 | } |
| 446 | |
| 447 | enum VkStencilOp { |
| 448 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 449 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 450 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 451 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 452 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 453 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 454 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 455 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 456 | } |
| 457 | |
| 458 | enum VkLogicOp { |
| 459 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 460 | VK_LOGIC_OP_AND = 0x00000001, |
| 461 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 462 | VK_LOGIC_OP_COPY = 0x00000003, |
| 463 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 464 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 465 | VK_LOGIC_OP_XOR = 0x00000006, |
| 466 | VK_LOGIC_OP_OR = 0x00000007, |
| 467 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 468 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 469 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 470 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 471 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 472 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 473 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 474 | VK_LOGIC_OP_SET = 0x0000000f, |
| 475 | } |
| 476 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 477 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 478 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 479 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 480 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 481 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 482 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 483 | } |
| 484 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 485 | enum VkInternalAllocationType { |
| 486 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 487 | } |
| 488 | |
| 489 | enum VkPhysicalDeviceType { |
| 490 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 491 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 492 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 493 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 494 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 495 | } |
| 496 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 497 | enum VkVertexInputRate { |
| 498 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 499 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | /// Vulkan format definitions |
| 503 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 504 | VK_FORMAT_UNDEFINED = 0, |
| 505 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 506 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 507 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 508 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 509 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 510 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 511 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 512 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 513 | VK_FORMAT_R8_UNORM = 9, |
| 514 | VK_FORMAT_R8_SNORM = 10, |
| 515 | VK_FORMAT_R8_USCALED = 11, |
| 516 | VK_FORMAT_R8_SSCALED = 12, |
| 517 | VK_FORMAT_R8_UINT = 13, |
| 518 | VK_FORMAT_R8_SINT = 14, |
| 519 | VK_FORMAT_R8_SRGB = 15, |
| 520 | VK_FORMAT_R8G8_UNORM = 16, |
| 521 | VK_FORMAT_R8G8_SNORM = 17, |
| 522 | VK_FORMAT_R8G8_USCALED = 18, |
| 523 | VK_FORMAT_R8G8_SSCALED = 19, |
| 524 | VK_FORMAT_R8G8_UINT = 20, |
| 525 | VK_FORMAT_R8G8_SINT = 21, |
| 526 | VK_FORMAT_R8G8_SRGB = 22, |
| 527 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 528 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 529 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 530 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 531 | VK_FORMAT_R8G8B8_UINT = 27, |
| 532 | VK_FORMAT_R8G8B8_SINT = 28, |
| 533 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 534 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 535 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 536 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 537 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 538 | VK_FORMAT_B8G8R8_UINT = 34, |
| 539 | VK_FORMAT_B8G8R8_SINT = 35, |
| 540 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 541 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 542 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 543 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 544 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 545 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 546 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 547 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 548 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 549 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 550 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 551 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 552 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 553 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 554 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 555 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 556 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 557 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 558 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 559 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 560 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 561 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 562 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 563 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 564 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 565 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 566 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 567 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 568 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 569 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 570 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 571 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 572 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 573 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 574 | VK_FORMAT_R16_UNORM = 70, |
| 575 | VK_FORMAT_R16_SNORM = 71, |
| 576 | VK_FORMAT_R16_USCALED = 72, |
| 577 | VK_FORMAT_R16_SSCALED = 73, |
| 578 | VK_FORMAT_R16_UINT = 74, |
| 579 | VK_FORMAT_R16_SINT = 75, |
| 580 | VK_FORMAT_R16_SFLOAT = 76, |
| 581 | VK_FORMAT_R16G16_UNORM = 77, |
| 582 | VK_FORMAT_R16G16_SNORM = 78, |
| 583 | VK_FORMAT_R16G16_USCALED = 79, |
| 584 | VK_FORMAT_R16G16_SSCALED = 80, |
| 585 | VK_FORMAT_R16G16_UINT = 81, |
| 586 | VK_FORMAT_R16G16_SINT = 82, |
| 587 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 588 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 589 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 590 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 591 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 592 | VK_FORMAT_R16G16B16_UINT = 88, |
| 593 | VK_FORMAT_R16G16B16_SINT = 89, |
| 594 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 595 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 596 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 597 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 598 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 599 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 600 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 601 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 602 | VK_FORMAT_R32_UINT = 98, |
| 603 | VK_FORMAT_R32_SINT = 99, |
| 604 | VK_FORMAT_R32_SFLOAT = 100, |
| 605 | VK_FORMAT_R32G32_UINT = 101, |
| 606 | VK_FORMAT_R32G32_SINT = 102, |
| 607 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 608 | VK_FORMAT_R32G32B32_UINT = 104, |
| 609 | VK_FORMAT_R32G32B32_SINT = 105, |
| 610 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 611 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 612 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 613 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 614 | VK_FORMAT_R64_UINT = 110, |
| 615 | VK_FORMAT_R64_SINT = 111, |
| 616 | VK_FORMAT_R64_SFLOAT = 112, |
| 617 | VK_FORMAT_R64G64_UINT = 113, |
| 618 | VK_FORMAT_R64G64_SINT = 114, |
| 619 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 620 | VK_FORMAT_R64G64B64_UINT = 116, |
| 621 | VK_FORMAT_R64G64B64_SINT = 117, |
| 622 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 623 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 624 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 625 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 626 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 627 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 628 | VK_FORMAT_D16_UNORM = 124, |
| 629 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 630 | VK_FORMAT_D32_SFLOAT = 126, |
| 631 | VK_FORMAT_S8_UINT = 127, |
| 632 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 633 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 634 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 635 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 636 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 637 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 638 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 639 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 640 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 641 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 642 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 643 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 644 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 645 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 646 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 647 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 648 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 649 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 650 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 651 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 652 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 653 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 654 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 655 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 656 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 657 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 658 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 659 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 660 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 661 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 662 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 663 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 664 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 665 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 666 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 667 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 668 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 669 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 670 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 671 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 672 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 673 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 674 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 675 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 676 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 677 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 678 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 679 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 680 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 681 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 682 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 683 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 684 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 685 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 686 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 687 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 688 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 689 | |
| 690 | //@extension("VK_IMG_format_pvrtc") |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 691 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 692 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 693 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 694 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 695 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 696 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 697 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 698 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 699 | } |
| 700 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 701 | /// Structure type enumerant |
| 702 | enum VkStructureType { |
| 703 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 704 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 705 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 706 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 707 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 708 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 709 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 710 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 711 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 712 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 713 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 714 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 715 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 716 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 717 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 718 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 719 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 720 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 721 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 722 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 723 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 724 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 725 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 726 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 727 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 728 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 729 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 730 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 731 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 732 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 733 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 734 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 735 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 736 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 737 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 738 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 739 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 740 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 741 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 742 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 743 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 744 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 745 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 746 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 747 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 748 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 749 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 750 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 751 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 752 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 753 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 754 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 755 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 756 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 757 | //@extension("VK_KHR_display") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 758 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 759 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 760 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 761 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 762 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 763 | |
| 764 | //@extension("VK_KHR_xlib_surface") |
| 765 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 766 | |
| 767 | //@extension("VK_KHR_xcb_surface") |
| 768 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 769 | |
| 770 | //@extension("VK_KHR_wayland_surface") |
| 771 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 772 | |
| 773 | //@extension("VK_KHR_mir_surface") |
| 774 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 775 | |
| 776 | //@extension("VK_KHR_android_surface") |
| 777 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 778 | |
| 779 | //@extension("VK_KHR_win32_surface") |
| 780 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 781 | |
Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame] | 782 | //@extension("VK_KHR_incremental_present") |
| 783 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
| 784 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 785 | //@extension("VK_ANDROID_native_buffer") |
| 786 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 787 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 788 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 789 | |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 790 | //@extension("VK_GOOGLE_display_timing") |
Ian Elliott | 14866bb | 2017-01-20 09:15:48 -0700 | [diff] [blame] | 791 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 792 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 793 | //@extension("VK_EXT_debug_report") |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 794 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 795 | |
| 796 | //@extension("VK_AMD_rasterization_order") |
| 797 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 798 | |
| 799 | //@extension("VK_EXT_debug_marker") |
| 800 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 801 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 802 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 803 | |
| 804 | //@extension("VK_NV_dedicated_allocation") |
| 805 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 806 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 807 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 808 | |
| 809 | //@extension("VK_NV_external_memory") |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 810 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 811 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 812 | |
| 813 | //@extension("VK_NV_external_memory_win32") |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 814 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 815 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 816 | |
| 817 | //@extension("VK_NV_win32_keyed_mutex") |
| 818 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 819 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 820 | //@extension("VK_KHR_get_physical_device_properties2") |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 821 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 822 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 823 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 824 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 825 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 826 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 827 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 828 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 829 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 830 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 831 | //@extension("VK_EXT_validation_flags") |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 832 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 833 | |
| 834 | //@extension("VK_KHR_incremental_present") |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 835 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 836 | |
| 837 | //@extension("VK_NVX_device_generated_commands") |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 838 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 839 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 840 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 841 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 842 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 843 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 844 | } |
| 845 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 846 | enum VkSubpassContents { |
| 847 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 848 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 849 | } |
| 850 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 851 | enum VkPipelineCacheHeaderVersion { |
| 852 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 853 | } |
| 854 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 855 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 856 | /// Error and return codes |
| 857 | enum VkResult { |
| 858 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 859 | VK_SUCCESS = 0, |
| 860 | VK_NOT_READY = 1, |
| 861 | VK_TIMEOUT = 2, |
| 862 | VK_EVENT_SET = 3, |
| 863 | VK_EVENT_RESET = 4, |
| 864 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 865 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 866 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 867 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 868 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 869 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 870 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 871 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 872 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 873 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 874 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 875 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 876 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 877 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 878 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 879 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 880 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 881 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 882 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 883 | //@extension("VK_KHR_surface") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 884 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 885 | |
Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 886 | //@extension("VK_KHR_surface") |
| 887 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000008001 |
| 888 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 889 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 890 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 891 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 892 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 893 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 894 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 895 | //@extension("VK_EXT_debug_report") |
| 896 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 897 | |
| 898 | //@extension("VK_NV_glsl_shader") |
| 899 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 900 | } |
| 901 | |
| 902 | enum VkDynamicState { |
| 903 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 904 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 905 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 906 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 907 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 908 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 909 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 910 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 911 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 912 | } |
| 913 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 914 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 915 | enum VkPresentModeKHR { |
| 916 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 917 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 918 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 919 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 920 | //@extension("VK_KHR_shared_presentable_image") |
| 921 | VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, |
| 922 | //@extension("VK_KHR_shared_presentable_image") |
| 923 | VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 924 | } |
| 925 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 926 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 927 | enum VkColorSpaceKHR { |
| 928 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 929 | VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104001, |
Courtney Goeltzenleuchter | 7f558ed | 2017-01-23 17:15:24 -0700 | [diff] [blame] | 930 | VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104002, |
| 931 | VK_COLOR_SPACE_SCRGB_LINEAR_EXT = 1000104003, |
| 932 | VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT = 1000104004, |
| 933 | VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104005, |
| 934 | VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104006, |
| 935 | VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104007, |
| 936 | VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104008, |
| 937 | VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104009, |
| 938 | VK_COLOR_SPACE_BT2020_NONLINEAR_EXT = 1000104010, |
| 939 | VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, |
| 940 | VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 941 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 942 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 943 | @extension("VK_EXT_debug_report") |
| 944 | enum VkDebugReportObjectTypeEXT { |
| 945 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 946 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 947 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 948 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 949 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 950 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 951 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 952 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 953 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 954 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 955 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 956 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 957 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 958 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 959 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 960 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 961 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 962 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 963 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 964 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 965 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 966 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 967 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 968 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 969 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 970 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 971 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 972 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 973 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 974 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 975 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 976 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 977 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 978 | } |
| 979 | |
| 980 | @extension("VK_EXT_debug_report") |
| 981 | enum VkDebugReportErrorEXT { |
| 982 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 983 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 984 | } |
| 985 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 986 | @extension("VK_AMD_rasterization_order") |
| 987 | enum VkRasterizationOrderAMD { |
| 988 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 989 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 990 | } |
| 991 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 992 | @extension("VK_EXT_validation_flags") |
| 993 | enum VkValidationCheckEXT { |
| 994 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 995 | } |
| 996 | |
| 997 | @extension("VK_NVX_device_generated_commands") |
| 998 | enum VkIndirectCommandsTokenTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 999 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 1000 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 1001 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 1002 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 1003 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 1004 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 1005 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 1006 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1007 | } |
| 1008 | |
| 1009 | @extension("VK_NVX_device_generated_commands") |
| 1010 | enum VkObjectEntryTypeNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1011 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 1012 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 1013 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 1014 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1015 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1016 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1017 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1018 | ///////////////// |
| 1019 | // Bitfields // |
| 1020 | ///////////////// |
| 1021 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1022 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1023 | type VkFlags VkQueueFlags |
| 1024 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1025 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1026 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1027 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1028 | 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] | 1029 | } |
| 1030 | |
| 1031 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1032 | type VkFlags VkMemoryPropertyFlags |
| 1033 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1034 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1035 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1036 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1037 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1038 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1039 | } |
| 1040 | |
| 1041 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1042 | type VkFlags VkMemoryHeapFlags |
| 1043 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1044 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1045 | } |
| 1046 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1047 | /// Access flags |
| 1048 | type VkFlags VkAccessFlags |
| 1049 | bitfield VkAccessFlagBits { |
| 1050 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1051 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1052 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1053 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1054 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1055 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1056 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1057 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1058 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1059 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1060 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1061 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1062 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1063 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1064 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1065 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1066 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1067 | |
| 1068 | //@extension("VK_NVX_device_generated_commands") |
| 1069 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1070 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1074 | type VkFlags VkBufferUsageFlags |
| 1075 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1076 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1077 | 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] | 1078 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1079 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1080 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1081 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1082 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1083 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1084 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1085 | } |
| 1086 | |
| 1087 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1088 | type VkFlags VkBufferCreateFlags |
| 1089 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1090 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1091 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1092 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1093 | } |
| 1094 | |
| 1095 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1096 | type VkFlags VkShaderStageFlags |
| 1097 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1098 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1099 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1100 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1101 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1102 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1103 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1104 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1105 | |
| 1106 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1107 | } |
| 1108 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1109 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1110 | type VkFlags VkDescriptorPoolCreateFlags |
| 1111 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1112 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1113 | } |
| 1114 | |
| 1115 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1116 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1117 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1118 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1119 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1120 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1121 | type VkFlags VkImageUsageFlags |
| 1122 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1123 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1124 | 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] | 1125 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1126 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1127 | 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] | 1128 | 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] | 1129 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1130 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1131 | } |
| 1132 | |
| 1133 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1134 | type VkFlags VkImageCreateFlags |
| 1135 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1136 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1137 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1138 | 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] | 1139 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1140 | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1141 | } |
| 1142 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1143 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1144 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1145 | //bitfield VkImageViewCreateFlagBits { |
| 1146 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1147 | |
| 1148 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1149 | type VkFlags VkPipelineCreateFlags |
| 1150 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1151 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1152 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1153 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
| 1154 | } |
| 1155 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1156 | /// Color component flags |
| 1157 | type VkFlags VkColorComponentFlags |
| 1158 | bitfield VkColorComponentFlagBits { |
| 1159 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1160 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1161 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1162 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1163 | } |
| 1164 | |
| 1165 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1166 | type VkFlags VkFenceCreateFlags |
| 1167 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1168 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1169 | } |
| 1170 | |
| 1171 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1172 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1173 | //bitfield VkSemaphoreCreateFlagBits { |
| 1174 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1175 | |
| 1176 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1177 | type VkFlags VkFormatFeatureFlags |
| 1178 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1179 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1180 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1181 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1182 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1183 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1184 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1185 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1186 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1187 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1188 | 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] | 1189 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1190 | 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] | 1191 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1192 | |
| 1193 | //@extension("VK_IMG_filter_cubic") |
| 1194 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1195 | } |
| 1196 | |
| 1197 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1198 | type VkFlags VkQueryControlFlags |
| 1199 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1200 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1201 | } |
| 1202 | |
| 1203 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1204 | type VkFlags VkQueryResultFlags |
| 1205 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1206 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1207 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1208 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1209 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1210 | } |
| 1211 | |
| 1212 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1213 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1214 | //bitfield VkShaderModuleCreateFlagBits { |
| 1215 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1216 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1217 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1218 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1219 | //bitfield VkEventCreateFlagBits { |
| 1220 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1221 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1222 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1223 | type VkFlags VkCommandBufferUsageFlags |
| 1224 | bitfield VkCommandBufferUsageFlagBits { |
| 1225 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1226 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1227 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1228 | } |
| 1229 | |
| 1230 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1231 | type VkFlags VkQueryPipelineStatisticFlags |
| 1232 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1233 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1234 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1235 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1236 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1237 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1238 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1239 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1240 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1241 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1242 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1243 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1244 | } |
| 1245 | |
| 1246 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1247 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1248 | //bitfield VkMemoryMapFlagBits { |
| 1249 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1250 | |
| 1251 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1252 | type VkFlags VkImageAspectFlags |
| 1253 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1254 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1255 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1256 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1257 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1258 | } |
| 1259 | |
| 1260 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1261 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1262 | bitfield VkSparseMemoryBindFlagBits { |
| 1263 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1264 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1265 | |
| 1266 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1267 | type VkFlags VkSparseImageFormatFlags |
| 1268 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1269 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1270 | 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. |
| 1271 | 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] | 1272 | } |
| 1273 | |
| 1274 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1275 | type VkFlags VkPipelineStageFlags |
| 1276 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1277 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1278 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1279 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1280 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1281 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1282 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1283 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1284 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1285 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1286 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1287 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1288 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1289 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1290 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1291 | 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] | 1292 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1293 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1294 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, /// All graphics, compute, copy, and transition commands |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1295 | |
| 1296 | //@extension("VK_NVX_device_generated_commands") |
| 1297 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1298 | } |
| 1299 | |
| 1300 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1301 | type VkFlags VkAttachmentDescriptionFlags |
| 1302 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1303 | 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] | 1304 | } |
| 1305 | |
| 1306 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1307 | type VkFlags VkSubpassDescriptionFlags |
| 1308 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1309 | } |
| 1310 | |
| 1311 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1312 | type VkFlags VkCommandPoolCreateFlags |
| 1313 | bitfield VkCommandPoolCreateFlagBits { |
| 1314 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1315 | 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] | 1316 | } |
| 1317 | |
| 1318 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1319 | type VkFlags VkCommandPoolResetFlags |
| 1320 | bitfield VkCommandPoolResetFlagBits { |
| 1321 | 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] | 1322 | } |
| 1323 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1324 | type VkFlags VkCommandBufferResetFlags |
| 1325 | bitfield VkCommandBufferResetFlagBits { |
| 1326 | 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] | 1327 | } |
| 1328 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1329 | type VkFlags VkSampleCountFlags |
| 1330 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1331 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1332 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1333 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1334 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1335 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1336 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1337 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1338 | } |
| 1339 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1340 | type VkFlags VkStencilFaceFlags |
| 1341 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1342 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1343 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1344 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1345 | } |
| 1346 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1347 | /// Instance creation flags |
| 1348 | type VkFlags VkInstanceCreateFlags |
| 1349 | //bitfield VkInstanceCreateFlagBits { |
| 1350 | //} |
| 1351 | |
| 1352 | /// Device creation flags |
| 1353 | type VkFlags VkDeviceCreateFlags |
| 1354 | //bitfield VkDeviceCreateFlagBits { |
| 1355 | //} |
| 1356 | |
| 1357 | /// Device queue creation flags |
| 1358 | type VkFlags VkDeviceQueueCreateFlags |
| 1359 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1360 | //} |
| 1361 | |
| 1362 | /// Query pool creation flags |
| 1363 | type VkFlags VkQueryPoolCreateFlags |
| 1364 | //bitfield VkQueryPoolCreateFlagBits { |
| 1365 | //} |
| 1366 | |
| 1367 | /// Buffer view creation flags |
| 1368 | type VkFlags VkBufferViewCreateFlags |
| 1369 | //bitfield VkBufferViewCreateFlagBits { |
| 1370 | //} |
| 1371 | |
| 1372 | /// Pipeline cache creation flags |
| 1373 | type VkFlags VkPipelineCacheCreateFlags |
| 1374 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1375 | //} |
| 1376 | |
| 1377 | /// Pipeline shader stage creation flags |
| 1378 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1379 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1380 | //} |
| 1381 | |
| 1382 | /// Descriptor set layout creation flags |
| 1383 | type VkFlags VkDescriptorSetLayoutCreateFlags |
| 1384 | //bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1385 | //} |
| 1386 | |
| 1387 | /// Pipeline vertex input state creation flags |
| 1388 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1389 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1390 | //} |
| 1391 | |
| 1392 | /// Pipeline input assembly state creation flags |
| 1393 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1394 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1395 | //} |
| 1396 | |
| 1397 | /// Tessellation state creation flags |
| 1398 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1399 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1400 | //} |
| 1401 | |
| 1402 | /// Viewport state creation flags |
| 1403 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1404 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1405 | //} |
| 1406 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1407 | /// Rasterization state creation flags |
| 1408 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1409 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1410 | //} |
| 1411 | |
| 1412 | /// Multisample state creation flags |
| 1413 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1414 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1415 | //} |
| 1416 | |
| 1417 | /// Color blend state creation flags |
| 1418 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1419 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1420 | //} |
| 1421 | |
| 1422 | /// Depth/stencil state creation flags |
| 1423 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1424 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1425 | //} |
| 1426 | |
| 1427 | /// Dynamic state creation flags |
| 1428 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1429 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1430 | //} |
| 1431 | |
| 1432 | /// Pipeline layout creation flags |
| 1433 | type VkFlags VkPipelineLayoutCreateFlags |
| 1434 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1435 | //} |
| 1436 | |
| 1437 | /// Sampler creation flags |
| 1438 | type VkFlags VkSamplerCreateFlags |
| 1439 | //bitfield VkSamplerCreateFlagBits { |
| 1440 | //} |
| 1441 | |
| 1442 | /// Render pass creation flags |
| 1443 | type VkFlags VkRenderPassCreateFlags |
| 1444 | //bitfield VkRenderPassCreateFlagBits { |
| 1445 | //} |
| 1446 | |
| 1447 | /// Framebuffer creation flags |
| 1448 | type VkFlags VkFramebufferCreateFlags |
| 1449 | //bitfield VkFramebufferCreateFlagBits { |
| 1450 | //} |
| 1451 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1452 | /// Dependency flags |
| 1453 | type VkFlags VkDependencyFlags |
| 1454 | bitfield VkDependencyFlagBits { |
| 1455 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
| 1456 | } |
| 1457 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1458 | /// Cull mode flags |
| 1459 | type VkFlags VkCullModeFlags |
| 1460 | bitfield VkCullModeFlagBits { |
| 1461 | VK_CULL_MODE_NONE = 0x00000000, |
| 1462 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1463 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1464 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1465 | } |
| 1466 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1467 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1468 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1469 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1470 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1471 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1472 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1473 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1474 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1475 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1476 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1477 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1478 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1479 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1480 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1481 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1482 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1483 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1484 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1485 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1486 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1487 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1488 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1489 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1490 | } |
| 1491 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1492 | @extension("VK_KHR_swapchain") |
| 1493 | type VkFlags VkSwapchainCreateFlagsKHR |
| 1494 | //@extension("VK_KHR_swapchain") |
| 1495 | //bitfield VkSwapchainCreateFlagBitsKHR { |
| 1496 | //} |
| 1497 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1498 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1499 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1500 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1501 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1502 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1503 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1504 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1505 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1506 | } |
| 1507 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1508 | @extension("VK_KHR_display") |
| 1509 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
| 1510 | //@extension("VK_KHR_display") |
| 1511 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1512 | //} |
| 1513 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1514 | @extension("VK_KHR_display") |
| 1515 | type VkFlags VkDisplayModeCreateFlagsKHR |
| 1516 | //@extension("VK_KHR_display") |
| 1517 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1518 | //} |
| 1519 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1520 | @extension("VK_KHR_xlib_surface") |
| 1521 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
| 1522 | //@extension("VK_KHR_xlib_surface") |
| 1523 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1524 | //} |
| 1525 | |
| 1526 | @extension("VK_KHR_xcb_surface") |
| 1527 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
| 1528 | //@extension("VK_KHR_xcb_surface") |
| 1529 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1530 | //} |
| 1531 | |
| 1532 | @extension("VK_KHR_wayland_surface") |
| 1533 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
| 1534 | //@extension("VK_KHR_wayland_surface") |
| 1535 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1536 | //} |
| 1537 | |
| 1538 | @extension("VK_KHR_mir_surface") |
| 1539 | type VkFlags VkMirSurfaceCreateFlagsKHR |
| 1540 | //@extension("VK_KHR_mir_surface") |
| 1541 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1542 | //} |
| 1543 | |
| 1544 | @extension("VK_KHR_android_surface") |
| 1545 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
| 1546 | //@extension("VK_KHR_android_surface") |
| 1547 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1548 | //} |
| 1549 | |
| 1550 | @extension("VK_KHR_win32_surface") |
| 1551 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
| 1552 | //@extension("VK_KHR_win32_surface") |
| 1553 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1554 | //} |
| 1555 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 1556 | @extension("VK_ANDROID_native_buffer") |
| 1557 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
| 1558 | @extension("VK_ANDROID_native_buffer") |
| 1559 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1560 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_SHARED_BIT_ANDROID = 0x00000001, |
| 1561 | } |
| 1562 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1563 | @extension("VK_EXT_debug_report") |
| 1564 | type VkFlags VkDebugReportFlagsEXT |
| 1565 | @extension("VK_EXT_debug_report") |
| 1566 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1567 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1568 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1569 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1570 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1571 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1572 | } |
| 1573 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1574 | @extension("VK_NV_external_memory_capabilities") |
| 1575 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
| 1576 | @extension("VK_NV_external_memory_capabilities") |
| 1577 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1578 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1579 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1580 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1581 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1582 | } |
| 1583 | |
| 1584 | @extension("VK_NV_external_memory_capabilities") |
| 1585 | type VkFlags VkExternalMemoryFeatureFlagsNV |
| 1586 | @extension("VK_NV_external_memory_capabilities") |
| 1587 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1588 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1589 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1590 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1591 | } |
| 1592 | |
| 1593 | @extension("VK_NVX_device_generated_commands") |
| 1594 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
| 1595 | @extension("VK_NVX_device_generated_commands") |
| 1596 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1597 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 1598 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 1599 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 1600 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1601 | } |
| 1602 | |
| 1603 | @extension("VK_NVX_device_generated_commands") |
| 1604 | type VkFlags VkObjectEntryUsageFlagsNVX |
| 1605 | @extension("VK_NVX_device_generated_commands") |
| 1606 | bitfield VkObjectEntryUsageFlagBitsNVX { |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1607 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 1608 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1609 | } |
| 1610 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1611 | ////////////////// |
| 1612 | // Structures // |
| 1613 | ////////////////// |
| 1614 | |
| 1615 | class VkOffset2D { |
| 1616 | s32 x |
| 1617 | s32 y |
| 1618 | } |
| 1619 | |
| 1620 | class VkOffset3D { |
| 1621 | s32 x |
| 1622 | s32 y |
| 1623 | s32 z |
| 1624 | } |
| 1625 | |
| 1626 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1627 | u32 width |
| 1628 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1629 | } |
| 1630 | |
| 1631 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1632 | u32 width |
| 1633 | u32 height |
| 1634 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1635 | } |
| 1636 | |
| 1637 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1638 | f32 x |
| 1639 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1640 | f32 width |
| 1641 | f32 height |
| 1642 | f32 minDepth |
| 1643 | f32 maxDepth |
| 1644 | } |
| 1645 | |
| 1646 | class VkRect2D { |
| 1647 | VkOffset2D offset |
| 1648 | VkExtent2D extent |
| 1649 | } |
| 1650 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1651 | class VkClearRect { |
| 1652 | VkRect2D rect |
| 1653 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1654 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1655 | } |
| 1656 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1657 | class VkComponentMapping { |
| 1658 | VkComponentSwizzle r |
| 1659 | VkComponentSwizzle g |
| 1660 | VkComponentSwizzle b |
| 1661 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1662 | } |
| 1663 | |
| 1664 | class VkPhysicalDeviceProperties { |
| 1665 | u32 apiVersion |
| 1666 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1667 | u32 vendorID |
| 1668 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1669 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1670 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 1671 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1672 | VkPhysicalDeviceLimits limits |
| 1673 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1674 | } |
| 1675 | |
| 1676 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1677 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1678 | u32 specVersion /// version of the extension specification implemented |
| 1679 | } |
| 1680 | |
| 1681 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1682 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1683 | u32 specVersion /// version of the layer specification implemented |
| 1684 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1685 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1686 | } |
| 1687 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1688 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1689 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 1690 | const void* pNext /// Next structure in chain |
| 1691 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1692 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1693 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1694 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1695 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1696 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1697 | const VkSemaphore* pSignalSemaphores |
| 1698 | } |
| 1699 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1700 | class VkApplicationInfo { |
| 1701 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 1702 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1703 | const char* pApplicationName |
| 1704 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1705 | const char* pEngineName |
| 1706 | u32 engineVersion |
| 1707 | u32 apiVersion |
| 1708 | } |
| 1709 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1710 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1711 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1712 | PFN_vkAllocationFunction pfnAllocation |
| 1713 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1714 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1715 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1716 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1717 | } |
| 1718 | |
| 1719 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1720 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 1721 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1722 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1723 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1724 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1725 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1726 | } |
| 1727 | |
| 1728 | class VkDeviceCreateInfo { |
| 1729 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 1730 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1731 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1732 | u32 queueCreateInfoCount |
| 1733 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1734 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1735 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1736 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1737 | const char* const* ppEnabledExtensionNames |
| 1738 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1739 | } |
| 1740 | |
| 1741 | class VkInstanceCreateInfo { |
| 1742 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 1743 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1744 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1745 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1746 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1747 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1748 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1749 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 1750 | } |
| 1751 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1752 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1753 | VkQueueFlags queueFlags /// Queue flags |
| 1754 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1755 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1756 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1757 | } |
| 1758 | |
| 1759 | class VkPhysicalDeviceMemoryProperties { |
| 1760 | u32 memoryTypeCount |
| 1761 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 1762 | u32 memoryHeapCount |
| 1763 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 1764 | } |
| 1765 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1766 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1767 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1768 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1769 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1770 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 1771 | } |
| 1772 | |
| 1773 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1774 | VkDeviceSize size /// Specified in bytes |
| 1775 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1776 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 1777 | } |
| 1778 | |
| 1779 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1780 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1781 | VkExtent3D imageGranularity |
| 1782 | VkSparseImageFormatFlags flags |
| 1783 | } |
| 1784 | |
| 1785 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1786 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1787 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1788 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 1789 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 1790 | 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] | 1791 | } |
| 1792 | |
| 1793 | class VkMemoryType { |
| 1794 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 1795 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 1796 | } |
| 1797 | |
| 1798 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1799 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1800 | VkMemoryHeapFlags flags /// Flags for the heap |
| 1801 | } |
| 1802 | |
| 1803 | class VkMappedMemoryRange { |
| 1804 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 1805 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1806 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1807 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 1808 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1809 | } |
| 1810 | |
| 1811 | class VkFormatProperties { |
| 1812 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 1813 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1814 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1815 | } |
| 1816 | |
| 1817 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1818 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 1819 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1820 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1821 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 1822 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 1823 | } |
| 1824 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1825 | class VkDescriptorImageInfo { |
| 1826 | VkSampler sampler |
| 1827 | VkImageView imageView |
| 1828 | VkImageLayout imageLayout |
| 1829 | } |
| 1830 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1831 | class VkDescriptorBufferInfo { |
| 1832 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 1833 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 1834 | 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] | 1835 | } |
| 1836 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1837 | class VkWriteDescriptorSet { |
| 1838 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 1839 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1840 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1841 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 1842 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1843 | 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] | 1844 | 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] | 1845 | const VkDescriptorImageInfo* pImageInfo |
| 1846 | const VkDescriptorBufferInfo* pBufferInfo |
| 1847 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1848 | } |
| 1849 | |
| 1850 | class VkCopyDescriptorSet { |
| 1851 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 1852 | const void* pNext /// Pointer to next structure |
| 1853 | VkDescriptorSet srcSet /// Source descriptor set |
| 1854 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 1855 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1856 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1857 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 1858 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1859 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1860 | } |
| 1861 | |
| 1862 | class VkBufferCreateInfo { |
| 1863 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 1864 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1865 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1866 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1867 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1868 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1869 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1870 | const u32* pQueueFamilyIndices |
| 1871 | } |
| 1872 | |
| 1873 | class VkBufferViewCreateInfo { |
| 1874 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 1875 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1876 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1877 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1878 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1879 | VkDeviceSize offset /// Specified in bytes |
| 1880 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1881 | } |
| 1882 | |
| 1883 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1884 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1885 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1886 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1887 | } |
| 1888 | |
| 1889 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1890 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1891 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1892 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1893 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1894 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1895 | } |
| 1896 | |
| 1897 | class VkMemoryBarrier { |
| 1898 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 1899 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1900 | VkAccessFlags srcAccessMask |
| 1901 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1902 | } |
| 1903 | |
| 1904 | class VkBufferMemoryBarrier { |
| 1905 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 1906 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1907 | VkAccessFlags srcAccessMask |
| 1908 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1909 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1910 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1911 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1912 | VkDeviceSize offset /// Offset within the buffer to sync |
| 1913 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1914 | } |
| 1915 | |
| 1916 | class VkImageMemoryBarrier { |
| 1917 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 1918 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1919 | VkAccessFlags srcAccessMask |
| 1920 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1921 | VkImageLayout oldLayout /// Current layout of the image |
| 1922 | VkImageLayout newLayout /// New layout to transition the image to |
| 1923 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1924 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1925 | VkImage image /// Image to sync |
| 1926 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 1927 | } |
| 1928 | |
| 1929 | class VkImageCreateInfo { |
| 1930 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 1931 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1932 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1933 | VkImageType imageType |
| 1934 | VkFormat format |
| 1935 | VkExtent3D extent |
| 1936 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1937 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1938 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1939 | VkImageTiling tiling |
| 1940 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1941 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1942 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1943 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1944 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1945 | } |
| 1946 | |
| 1947 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1948 | VkDeviceSize offset /// Specified in bytes |
| 1949 | VkDeviceSize size /// Specified in bytes |
| 1950 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1951 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1952 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1953 | } |
| 1954 | |
| 1955 | class VkImageViewCreateInfo { |
| 1956 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 1957 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1958 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1959 | VkImage image |
| 1960 | VkImageViewType viewType |
| 1961 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1962 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1963 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1964 | } |
| 1965 | |
| 1966 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1967 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1968 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1969 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1970 | } |
| 1971 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1972 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1973 | VkDeviceSize resourceOffset /// Specified in bytes |
| 1974 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1975 | VkDeviceMemory memory |
| 1976 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1977 | VkSparseMemoryBindFlags flags |
| 1978 | } |
| 1979 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1980 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1981 | VkImageSubresource subresource |
| 1982 | VkOffset3D offset |
| 1983 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1984 | VkDeviceMemory memory |
| 1985 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1986 | VkSparseMemoryBindFlags flags |
| 1987 | } |
| 1988 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1989 | class VkSparseBufferMemoryBindInfo { |
| 1990 | VkBuffer buffer |
| 1991 | u32 bindCount |
| 1992 | const VkSparseMemoryBind* pBinds |
| 1993 | } |
| 1994 | |
| 1995 | class VkSparseImageOpaqueMemoryBindInfo { |
| 1996 | VkImage image |
| 1997 | u32 bindCount |
| 1998 | const VkSparseMemoryBind* pBinds |
| 1999 | } |
| 2000 | |
| 2001 | class VkSparseImageMemoryBindInfo { |
| 2002 | VkImage image |
| 2003 | u32 bindCount |
| 2004 | const VkSparseMemoryBind* pBinds |
| 2005 | } |
| 2006 | |
| 2007 | class VkBindSparseInfo { |
| 2008 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 2009 | const void* pNext |
| 2010 | u32 waitSemaphoreCount |
| 2011 | const VkSemaphore* pWaitSemaphores |
| 2012 | u32 numBufferBinds |
| 2013 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2014 | u32 numImageOpaqueBinds |
| 2015 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2016 | u32 numImageBinds |
| 2017 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2018 | u32 signalSemaphoreCount |
| 2019 | const VkSemaphore* pSignalSemaphores |
| 2020 | } |
| 2021 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2022 | class VkImageSubresourceLayers { |
| 2023 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2024 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2025 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2026 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2027 | } |
| 2028 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2029 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2030 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2031 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2032 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2033 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2034 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2035 | } |
| 2036 | |
| 2037 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2038 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2039 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2040 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2041 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2042 | } |
| 2043 | |
| 2044 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2045 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2046 | u32 bufferRowLength /// Specified in texels |
| 2047 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2048 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2049 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2050 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2051 | } |
| 2052 | |
| 2053 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2054 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2055 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2056 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2057 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2058 | VkExtent3D extent |
| 2059 | } |
| 2060 | |
| 2061 | class VkShaderModuleCreateInfo { |
| 2062 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2063 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2064 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2065 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2066 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2067 | } |
| 2068 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2069 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2070 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2071 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2072 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2073 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2074 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2075 | } |
| 2076 | |
| 2077 | class VkDescriptorSetLayoutCreateInfo { |
| 2078 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2079 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2080 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2081 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2082 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2083 | } |
| 2084 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2085 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2086 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2087 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2088 | } |
| 2089 | |
| 2090 | class VkDescriptorPoolCreateInfo { |
| 2091 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2092 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2093 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2094 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2095 | u32 poolSizeCount |
| 2096 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2097 | } |
| 2098 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2099 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2100 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2101 | const void* pNext /// Pointer to next structure |
| 2102 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2103 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2104 | const VkDescriptorSetLayout* pSetLayouts |
| 2105 | } |
| 2106 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2107 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2108 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2109 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2110 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2111 | } |
| 2112 | |
| 2113 | class VkSpecializationInfo { |
| 2114 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2115 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2116 | platform.size_t dataSize /// Size in bytes of pData |
| 2117 | const void* pData /// Pointer to SpecConstant data |
| 2118 | } |
| 2119 | |
| 2120 | class VkPipelineShaderStageCreateInfo { |
| 2121 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2122 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2123 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2124 | VkShaderStageFlagBits stage |
| 2125 | VkShaderModule module |
| 2126 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2127 | const VkSpecializationInfo* pSpecializationInfo |
| 2128 | } |
| 2129 | |
| 2130 | class VkComputePipelineCreateInfo { |
| 2131 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2132 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2133 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2134 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2135 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2136 | 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 |
| 2137 | 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 |
| 2138 | } |
| 2139 | |
| 2140 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2141 | u32 binding /// Vertex buffer binding id |
| 2142 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2143 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2144 | } |
| 2145 | |
| 2146 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2147 | u32 location /// location of the shader vertex attrib |
| 2148 | u32 binding /// Vertex buffer binding id |
| 2149 | VkFormat format /// format of source data |
| 2150 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2151 | } |
| 2152 | |
| 2153 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2154 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2155 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2156 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2157 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2158 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2159 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2160 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2161 | } |
| 2162 | |
| 2163 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2164 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2165 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2166 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2167 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2168 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2169 | } |
| 2170 | |
| 2171 | class VkPipelineTessellationStateCreateInfo { |
| 2172 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2173 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2174 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2175 | u32 patchControlPoints |
| 2176 | } |
| 2177 | |
| 2178 | class VkPipelineViewportStateCreateInfo { |
| 2179 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2180 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2181 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2182 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2183 | const VkViewport* pViewports |
| 2184 | u32 scissorCount |
| 2185 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2186 | } |
| 2187 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2188 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2189 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2190 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2191 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2192 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2193 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2194 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2195 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2196 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2197 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2198 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2199 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2200 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2201 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2202 | } |
| 2203 | |
| 2204 | class VkPipelineMultisampleStateCreateInfo { |
| 2205 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2206 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2207 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2208 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2209 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2210 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2211 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2212 | VkBool32 alphaToCoverageEnable |
| 2213 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2214 | } |
| 2215 | |
| 2216 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2217 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2218 | VkBlendFactor srcColorBlendFactor |
| 2219 | VkBlendFactor dstColorBlendFactor |
| 2220 | VkBlendOp colorBlendOp |
| 2221 | VkBlendFactor srcAlphaBlendFactor |
| 2222 | VkBlendFactor dstAlphaBlendFactor |
| 2223 | VkBlendOp alphaBlendOp |
| 2224 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2225 | } |
| 2226 | |
| 2227 | class VkPipelineColorBlendStateCreateInfo { |
| 2228 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2229 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2230 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2231 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2232 | VkLogicOp logicOp |
| 2233 | u32 attachmentCount /// # of pAttachments |
| 2234 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2235 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2236 | } |
| 2237 | |
| 2238 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2239 | VkStencilOp failOp |
| 2240 | VkStencilOp passOp |
| 2241 | VkStencilOp depthFailOp |
| 2242 | VkCompareOp compareOp |
| 2243 | u32 compareMask |
| 2244 | u32 writeMask |
| 2245 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2246 | } |
| 2247 | |
| 2248 | class VkPipelineDepthStencilStateCreateInfo { |
| 2249 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2250 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2251 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2252 | VkBool32 depthTestEnable |
| 2253 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2254 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2255 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2256 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2257 | VkStencilOpState front |
| 2258 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2259 | f32 minDepthBounds |
| 2260 | f32 maxDepthBounds |
| 2261 | } |
| 2262 | |
| 2263 | class VkPipelineDynamicStateCreateInfo { |
| 2264 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2265 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2266 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2267 | u32 dynamicStateCount |
| 2268 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2269 | } |
| 2270 | |
| 2271 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2272 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2273 | const void* pNext /// Pointer to next structure |
| 2274 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2275 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2276 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2277 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2278 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2279 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2280 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2281 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2282 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2283 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2284 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2285 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2286 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2287 | VkRenderPass renderPass |
| 2288 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2289 | 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 |
| 2290 | 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] | 2291 | } |
| 2292 | |
| 2293 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2294 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2295 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2296 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2297 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2298 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2299 | } |
| 2300 | |
| 2301 | class VkPushConstantRange { |
| 2302 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2303 | u32 offset /// Start of the range, in bytes |
| 2304 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2305 | } |
| 2306 | |
| 2307 | class VkPipelineLayoutCreateInfo { |
| 2308 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2309 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2310 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2311 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2312 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2313 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2314 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2315 | } |
| 2316 | |
| 2317 | class VkSamplerCreateInfo { |
| 2318 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2319 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2320 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2321 | VkFilter magFilter /// Filter mode for magnification |
| 2322 | VkFilter minFilter /// Filter mode for minifiation |
| 2323 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2324 | VkSamplerAddressMode addressModeU |
| 2325 | VkSamplerAddressMode addressModeV |
| 2326 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2327 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2328 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2329 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2330 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2331 | VkCompareOp compareOp |
| 2332 | f32 minLod |
| 2333 | f32 maxLod |
| 2334 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2335 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2336 | } |
| 2337 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2338 | class VkCommandPoolCreateInfo { |
| 2339 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2340 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2341 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2342 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2343 | } |
| 2344 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2345 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2346 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2347 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2348 | VkCommandPool commandPool |
| 2349 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2350 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2351 | } |
| 2352 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2353 | class VkCommandBufferInheritanceInfo { |
| 2354 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2355 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2356 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2357 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2358 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2359 | VkBool32 occlusionQueryEnable |
| 2360 | VkQueryControlFlags queryFlags |
| 2361 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2362 | } |
| 2363 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2364 | class VkCommandBufferBeginInfo { |
| 2365 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2366 | const void* pNext /// Pointer to next structure |
| 2367 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2368 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2369 | } |
| 2370 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2371 | class VkRenderPassBeginInfo { |
| 2372 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2373 | const void* pNext /// Pointer to next structure |
| 2374 | VkRenderPass renderPass |
| 2375 | VkFramebuffer framebuffer |
| 2376 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2377 | u32 clearValueCount |
| 2378 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2379 | } |
| 2380 | |
| 2381 | @union |
| 2382 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2383 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2384 | f32[4] float32 |
| 2385 | s32[4] int32 |
| 2386 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2387 | } |
| 2388 | |
| 2389 | class VkClearDepthStencilValue { |
| 2390 | f32 depth |
| 2391 | u32 stencil |
| 2392 | } |
| 2393 | |
| 2394 | @union |
| 2395 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2396 | class VkClearValue { |
| 2397 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2398 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2399 | } |
| 2400 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2401 | class VkClearAttachment { |
| 2402 | VkImageAspectFlags aspectMask |
| 2403 | u32 colorAttachment |
| 2404 | VkClearValue clearValue |
| 2405 | } |
| 2406 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2407 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2408 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2409 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2410 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2411 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2412 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2413 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2414 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2415 | VkImageLayout initialLayout |
| 2416 | VkImageLayout finalLayout |
| 2417 | } |
| 2418 | |
| 2419 | class VkAttachmentReference { |
| 2420 | u32 attachment |
| 2421 | VkImageLayout layout |
| 2422 | } |
| 2423 | |
| 2424 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2425 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2426 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2427 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2428 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2429 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2430 | const VkAttachmentReference* pColorAttachments |
| 2431 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2432 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2433 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2434 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2435 | } |
| 2436 | |
| 2437 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2438 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2439 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2440 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2441 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2442 | VkAccessFlags srcAccessMask |
| 2443 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2444 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2445 | } |
| 2446 | |
| 2447 | class VkRenderPassCreateInfo { |
| 2448 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2449 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2450 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2451 | u32 attachmentCount |
| 2452 | const VkAttachmentDescription* pAttachments |
| 2453 | u32 subpassCount |
| 2454 | const VkSubpassDescription* pSubpasses |
| 2455 | u32 dependencyCount |
| 2456 | const VkSubpassDependency* pDependencies |
| 2457 | } |
| 2458 | |
| 2459 | class VkEventCreateInfo { |
| 2460 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2461 | const void* pNext /// Pointer to next structure |
| 2462 | VkEventCreateFlags flags /// Event creation flags |
| 2463 | } |
| 2464 | |
| 2465 | class VkFenceCreateInfo { |
| 2466 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2467 | const void* pNext /// Pointer to next structure |
| 2468 | VkFenceCreateFlags flags /// Fence creation flags |
| 2469 | } |
| 2470 | |
| 2471 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2472 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2473 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2474 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2475 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2476 | VkBool32 geometryShader /// geometry stage |
| 2477 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2478 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2479 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2480 | VkBool32 logicOp /// logic operations |
| 2481 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2482 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2483 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2484 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2485 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2486 | VkBool32 depthBounds /// depth bounds test |
| 2487 | VkBool32 wideLines /// lines with width greater than 1 |
| 2488 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2489 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2490 | VkBool32 multiViewport |
| 2491 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2492 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2493 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2494 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2495 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2496 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2497 | VkBool32 vertexPipelineStoresAndAtomics |
| 2498 | VkBool32 fragmentStoresAndAtomics |
| 2499 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2500 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2501 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2502 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2503 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2504 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2505 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2506 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2507 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2508 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2509 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2510 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2511 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2512 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2513 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2514 | 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] | 2515 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2516 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2517 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2518 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2519 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2520 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2521 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2522 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2523 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2524 | 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] | 2525 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2526 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2527 | } |
| 2528 | |
| 2529 | class VkPhysicalDeviceLimits { |
| 2530 | /// resource maximum sizes |
| 2531 | u32 maxImageDimension1D /// max 1D image dimension |
| 2532 | u32 maxImageDimension2D /// max 2D image dimension |
| 2533 | u32 maxImageDimension3D /// max 3D image dimension |
| 2534 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2535 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2536 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2537 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 2538 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2539 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 2540 | /// memory limits |
| 2541 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2542 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2543 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 2544 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2545 | /// descriptor set limits |
| 2546 | 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] | 2547 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 2548 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 2549 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 2550 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 2551 | 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] | 2552 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2553 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2554 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 2555 | 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] | 2556 | 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] | 2557 | 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] | 2558 | 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] | 2559 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 2560 | 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] | 2561 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2562 | /// vertex stage limits |
| 2563 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2564 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2565 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 2566 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 2567 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 2568 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2569 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2570 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 2571 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 2572 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 2573 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 2574 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 2575 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 2576 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2577 | /// geometry stage limits |
| 2578 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 2579 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 2580 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 2581 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 2582 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 2583 | /// fragment stage limits |
| 2584 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2585 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2586 | 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] | 2587 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 2588 | /// compute stage limits |
| 2589 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 2590 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 2591 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 2592 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 2593 | |
| 2594 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 2595 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 2596 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 2597 | |
| 2598 | 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] | 2599 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2600 | |
| 2601 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 2602 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 2603 | |
| 2604 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2605 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 2606 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 2607 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 2608 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2609 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 2610 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 2611 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 2612 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2613 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2614 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2615 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2616 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2617 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 2618 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 2619 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 2620 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 2621 | |
| 2622 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 2623 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 2624 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2625 | VkSampleCountFlags framebufferColorSampleCounts |
| 2626 | VkSampleCountFlags framebufferDepthSampleCounts |
| 2627 | VkSampleCountFlags framebufferStencilSampleCounts |
| 2628 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2629 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 2630 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2631 | VkSampleCountFlags sampledImageColorSampleCounts |
| 2632 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 2633 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 2634 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 2635 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2636 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2637 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2638 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2639 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2640 | |
| 2641 | u32 maxClipDistances /// max number of clip distances |
| 2642 | u32 maxCullDistances /// max number of cull distances |
| 2643 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 2644 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2645 | u32 discreteQueuePriorities |
| 2646 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2647 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 2648 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2649 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 2650 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2651 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2652 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2653 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2654 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 2655 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2656 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2657 | } |
| 2658 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2659 | class VkPhysicalDeviceSparseProperties { |
| 2660 | 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] | 2661 | 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] | 2662 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 2663 | 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] | 2664 | 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 |
| 2665 | } |
| 2666 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2667 | class VkSemaphoreCreateInfo { |
| 2668 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 2669 | const void* pNext /// Pointer to next structure |
| 2670 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 2671 | } |
| 2672 | |
| 2673 | class VkQueryPoolCreateInfo { |
| 2674 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 2675 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2676 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2677 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2678 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2679 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 2680 | } |
| 2681 | |
| 2682 | class VkFramebufferCreateInfo { |
| 2683 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 2684 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2685 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2686 | VkRenderPass renderPass |
| 2687 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2688 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2689 | u32 width |
| 2690 | u32 height |
| 2691 | u32 layers |
| 2692 | } |
| 2693 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2694 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2695 | u32 vertexCount |
| 2696 | u32 instanceCount |
| 2697 | u32 firstVertex |
| 2698 | u32 firstInstance |
| 2699 | } |
| 2700 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2701 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2702 | u32 indexCount |
| 2703 | u32 instanceCount |
| 2704 | u32 firstIndex |
| 2705 | s32 vertexOffset |
| 2706 | u32 firstInstance |
| 2707 | } |
| 2708 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2709 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2710 | u32 x |
| 2711 | u32 y |
| 2712 | u32 z |
| 2713 | } |
| 2714 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2715 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2716 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2717 | u32 minImageCount |
| 2718 | u32 maxImageCount |
| 2719 | VkExtent2D currentExtent |
| 2720 | VkExtent2D minImageExtent |
| 2721 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2722 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2723 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2724 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2725 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2726 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2727 | } |
| 2728 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2729 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2730 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2731 | VkFormat format |
| 2732 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2733 | } |
| 2734 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2735 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2736 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2737 | VkStructureType sType |
| 2738 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2739 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2740 | VkSurfaceKHR surface |
| 2741 | u32 minImageCount |
| 2742 | VkFormat imageFormat |
| 2743 | VkColorSpaceKHR imageColorSpace |
| 2744 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2745 | u32 imageArrayLayers |
| 2746 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2747 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2748 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2749 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2750 | VkSurfaceTransformFlagBitsKHR preTransform |
| 2751 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2752 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2753 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2754 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2755 | } |
| 2756 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2757 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2758 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2759 | VkStructureType sType |
| 2760 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2761 | u32 waitSemaphoreCount |
| 2762 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2763 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2764 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2765 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2766 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2767 | } |
| 2768 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2769 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2770 | class VkDisplayPropertiesKHR { |
| 2771 | VkDisplayKHR display |
| 2772 | const char* displayName |
| 2773 | VkExtent2D physicalDimensions |
| 2774 | VkExtent2D physicalResolution |
| 2775 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2776 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2777 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2778 | } |
| 2779 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2780 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2781 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2782 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2783 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2784 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2785 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2786 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2787 | class VkDisplayModePropertiesKHR { |
| 2788 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2789 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2790 | } |
| 2791 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2792 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2793 | class VkDisplayModeCreateInfoKHR { |
| 2794 | VkStructureType sType |
| 2795 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2796 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2797 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2798 | } |
| 2799 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2800 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2801 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2802 | VkDisplayKHR currentDisplay |
| 2803 | u32 currentStackIndex |
| 2804 | } |
| 2805 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2806 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2807 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2808 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 2809 | VkOffset2D minSrcPosition |
| 2810 | VkOffset2D maxSrcPosition |
| 2811 | VkExtent2D minSrcExtent |
| 2812 | VkExtent2D maxSrcExtent |
| 2813 | VkOffset2D minDstPosition |
| 2814 | VkOffset2D maxDstPosition |
| 2815 | VkExtent2D minDstExtent |
| 2816 | VkExtent2D maxDstExtent |
| 2817 | } |
| 2818 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2819 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2820 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2821 | VkStructureType sType |
| 2822 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2823 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2824 | VkDisplayModeKHR displayMode |
| 2825 | u32 planeIndex |
| 2826 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2827 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2828 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2829 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 2830 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2831 | } |
| 2832 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2833 | @extension("VK_KHR_display_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2834 | class VkDisplayPresentInfoKHR { |
| 2835 | VkStructureType sType |
| 2836 | const void* pNext |
| 2837 | VkRect2D srcRect |
| 2838 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2839 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2840 | } |
| 2841 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2842 | @extension("VK_KHR_xlib_surface") |
| 2843 | class VkXlibSurfaceCreateInfoKHR { |
| 2844 | VkStructureType sType |
| 2845 | const void* pNext |
| 2846 | VkXlibSurfaceCreateFlagsKHR flags |
| 2847 | platform.Display* dpy |
| 2848 | platform.Window window |
| 2849 | } |
| 2850 | |
| 2851 | @extension("VK_KHR_xcb_surface") |
| 2852 | class VkXcbSurfaceCreateInfoKHR { |
| 2853 | VkStructureType sType |
| 2854 | const void* pNext |
| 2855 | VkXcbSurfaceCreateFlagsKHR flags |
| 2856 | platform.xcb_connection_t* connection |
| 2857 | platform.xcb_window_t window |
| 2858 | } |
| 2859 | |
| 2860 | @extension("VK_KHR_wayland_surface") |
| 2861 | class VkWaylandSurfaceCreateInfoKHR { |
| 2862 | VkStructureType sType |
| 2863 | const void* pNext |
| 2864 | VkWaylandSurfaceCreateFlagsKHR flags |
| 2865 | platform.wl_display* display |
| 2866 | platform.wl_surface* surface |
| 2867 | } |
| 2868 | |
| 2869 | @extension("VK_KHR_mir_surface") |
| 2870 | class VkMirSurfaceCreateInfoKHR { |
| 2871 | VkStructureType sType |
| 2872 | const void* pNext |
| 2873 | VkMirSurfaceCreateFlagsKHR flags |
| 2874 | platform.MirConnection* connection |
| 2875 | platform.MirSurface* mirSurface |
| 2876 | } |
| 2877 | |
| 2878 | @extension("VK_KHR_android_surface") |
| 2879 | class VkAndroidSurfaceCreateInfoKHR { |
| 2880 | VkStructureType sType |
| 2881 | const void* pNext |
| 2882 | VkAndroidSurfaceCreateFlagsKHR flags |
| 2883 | platform.ANativeWindow* window |
| 2884 | } |
| 2885 | |
| 2886 | @extension("VK_KHR_win32_surface") |
| 2887 | class VkWin32SurfaceCreateInfoKHR { |
| 2888 | VkStructureType sType |
| 2889 | const void* pNext |
| 2890 | VkWin32SurfaceCreateFlagsKHR flags |
| 2891 | platform.HINSTANCE hinstance |
| 2892 | platform.HWND hwnd |
| 2893 | } |
| 2894 | |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 2895 | @internal class Gralloc1Usage { |
| 2896 | u64 consumer |
| 2897 | u64 producer |
| 2898 | } |
| 2899 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2900 | @extension("VK_ANDROID_native_buffer") |
| 2901 | class VkNativeBufferANDROID { |
| 2902 | VkStructureType sType |
| 2903 | const void* pNext |
| 2904 | platform.buffer_handle_t handle |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 2905 | s32 stride |
| 2906 | s32 format |
| 2907 | s32 usage |
| 2908 | Gralloc1Usage usage2 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2909 | } |
| 2910 | |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2911 | @extension("VK_ANDROID_native_buffer") |
| 2912 | class VkSwapchainImageCreateInfoANDROID { |
| 2913 | VkStructureType sType |
| 2914 | const void* pNext |
Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 2915 | VkSwapchainImageUsageFlagsANDROID flags |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2916 | } |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2917 | |
Chris Forbes | 1d4e554 | 2017-02-15 19:38:50 +1300 | [diff] [blame] | 2918 | @extension("VK_ANDROID_native_buffer") |
| 2919 | class VkPhysicalDevicePresentationPropertiesANDROID { |
| 2920 | VkStructureType sType |
| 2921 | void* pNext |
| 2922 | VkBool32 sharedImage |
| 2923 | } |
| 2924 | |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2925 | @extension("VK_GOOGLE_display_timing") |
| 2926 | class VkRefreshCycleDurationGOOGLE { |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2927 | u64 minRefreshDuration |
| 2928 | u64 maxRefreshDuration |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2929 | } |
| 2930 | |
| 2931 | @extension("VK_GOOGLE_display_timing") |
| 2932 | class VkPastPresentationTimingGOOGLE { |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2933 | u32 presentID |
| 2934 | u64 desiredPresentTime |
| 2935 | u64 actualPresentTime |
| 2936 | u64 earliestPresentTime |
| 2937 | u64 presentMargin |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2938 | } |
| 2939 | |
| 2940 | @extension("VK_GOOGLE_display_timing") |
| 2941 | class VkPresentTimeGOOGLE { |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2942 | u32 presentID |
| 2943 | u64 desiredPresentTime |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2944 | } |
| 2945 | |
| 2946 | @extension("VK_GOOGLE_display_timing") |
| 2947 | class VkPresentTimesInfoGOOGLE { |
| 2948 | VkStructureType sType |
| 2949 | const void* pNext |
Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2950 | u32 swapchainCount |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2951 | const VkPresentTimeGOOGLE* pTimes |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2952 | } |
| 2953 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2954 | @extension("VK_EXT_debug_report") |
| 2955 | class VkDebugReportCallbackCreateInfoEXT { |
| 2956 | VkStructureType sType |
| 2957 | const void* pNext |
| 2958 | VkDebugReportFlagsEXT flags |
| 2959 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 2960 | void* pUserData |
| 2961 | } |
| 2962 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2963 | @extension("VK_AMD_rasterization_order") |
| 2964 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 2965 | VkStructureType sType |
| 2966 | const void* pNext |
| 2967 | VkRasterizationOrderAMD rasterizationOrder |
| 2968 | } |
| 2969 | |
| 2970 | @extension("VK_EXT_debug_marker") |
| 2971 | class VkDebugMarkerObjectNameInfoEXT { |
| 2972 | VkStructureType sType |
| 2973 | const void* pNext |
| 2974 | VkDebugReportObjectTypeEXT objectType |
| 2975 | u64 object |
| 2976 | const char* pObjectName |
| 2977 | } |
| 2978 | |
| 2979 | @extension("VK_EXT_debug_marker") |
| 2980 | class VkDebugMarkerObjectTagInfoEXT { |
| 2981 | VkStructureType sType |
| 2982 | const void* pNext |
| 2983 | VkDebugReportObjectTypeEXT objectType |
| 2984 | u64 object |
| 2985 | u64 tagName |
| 2986 | platform.size_t tagSize |
| 2987 | const void* pTag |
| 2988 | } |
| 2989 | |
| 2990 | @extension("VK_EXT_debug_marker") |
| 2991 | class VkDebugMarkerMarkerInfoEXT { |
| 2992 | VkStructureType sType |
| 2993 | const void* pNext |
| 2994 | const char* pMarkerName |
| 2995 | f32[4] color |
| 2996 | } |
| 2997 | |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2998 | @extension("VK_NV_dedicated_allocation") |
| 2999 | class VkDedicatedAllocationImageCreateInfoNV { |
| 3000 | VkStructureType sType |
| 3001 | const void* pNext |
| 3002 | VkBool32 dedicatedAllocation |
| 3003 | } |
| 3004 | |
| 3005 | @extension("VK_NV_dedicated_allocation") |
| 3006 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 3007 | VkStructureType sType |
| 3008 | const void* pNext |
| 3009 | VkBool32 dedicatedAllocation |
| 3010 | } |
| 3011 | |
| 3012 | @extension("VK_NV_dedicated_allocation") |
| 3013 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 3014 | VkStructureType sType |
| 3015 | const void* pNext |
| 3016 | VkImage image |
| 3017 | VkBuffer buffer |
| 3018 | } |
| 3019 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 3020 | @extension("VK_NV_external_memory_capabilities") |
| 3021 | class VkExternalImageFormatPropertiesNV { |
| 3022 | VkImageFormatProperties imageFormatProperties |
| 3023 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3024 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3025 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3026 | } |
| 3027 | |
| 3028 | @extension("VK_NV_external_memory") |
| 3029 | class VkExternalMemoryImageCreateInfoNV { |
| 3030 | VkStructureType sType |
| 3031 | const void* pNext |
| 3032 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3033 | } |
| 3034 | |
| 3035 | @extension("VK_NV_external_memory") |
| 3036 | class VkExportMemoryAllocateInfoNV { |
| 3037 | VkStructureType sType |
| 3038 | const void* pNext |
| 3039 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3040 | } |
| 3041 | |
| 3042 | @extension("VK_NV_external_memory_win32") |
| 3043 | class VkImportMemoryWin32HandleInfoNV { |
| 3044 | VkStructureType sType |
| 3045 | const void* pNext |
| 3046 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3047 | platform.HANDLE handle |
| 3048 | } |
| 3049 | |
| 3050 | @extension("VK_NV_external_memory_win32") |
| 3051 | class VkExportMemoryWin32HandleInfoNV { |
| 3052 | VkStructureType sType |
| 3053 | const void* pNext |
| 3054 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3055 | platform.DWORD dwAccess |
| 3056 | } |
| 3057 | |
| 3058 | @extension("VK_NV_win32_keyed_mutex") |
| 3059 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3060 | VkStructureType sType |
| 3061 | const void* pNext |
| 3062 | u32 acquireCount |
| 3063 | const VkDeviceMemory* pAcquireSyncs |
| 3064 | const u64* pAcquireKeys |
| 3065 | const u32* pAcquireTimeoutMilliseconds |
| 3066 | u32 releaseCount |
| 3067 | const VkDeviceMemory* pReleaseSyncs |
| 3068 | const u64* pReleaseKeys |
| 3069 | } |
| 3070 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3071 | @extension("VK_KHR_get_physical_device_properties2") |
| 3072 | class VkPhysicalDeviceFeatures2KHR { |
| 3073 | VkStructureType sType |
| 3074 | void* pNext |
| 3075 | VkPhysicalDeviceFeatures features |
| 3076 | } |
| 3077 | |
| 3078 | @extension("VK_KHR_get_physical_device_properties2") |
| 3079 | class VkPhysicalDeviceProperties2KHR { |
| 3080 | VkStructureType sType |
| 3081 | void* pNext |
| 3082 | VkPhysicalDeviceProperties properties |
| 3083 | } |
| 3084 | |
| 3085 | @extension("VK_KHR_get_physical_device_properties2") |
| 3086 | class VkFormatProperties2KHR { |
| 3087 | VkStructureType sType |
| 3088 | void* pNext |
| 3089 | VkFormatProperties formatProperties |
| 3090 | } |
| 3091 | |
| 3092 | @extension("VK_KHR_get_physical_device_properties2") |
| 3093 | class VkImageFormatProperties2KHR { |
| 3094 | VkStructureType sType |
| 3095 | void* pNext |
| 3096 | VkImageFormatProperties imageFormatProperties |
| 3097 | } |
| 3098 | |
| 3099 | @extension("VK_KHR_get_physical_device_properties2") |
| 3100 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3101 | VkStructureType sType |
| 3102 | const void* pNext |
| 3103 | VkFormat format |
| 3104 | VkImageType type |
| 3105 | VkImageTiling tiling |
| 3106 | VkImageUsageFlags usage |
| 3107 | VkImageCreateFlags flags |
| 3108 | } |
| 3109 | |
| 3110 | @extension("VK_KHR_get_physical_device_properties2") |
| 3111 | class VkQueueFamilyProperties2KHR { |
| 3112 | VkStructureType sType |
| 3113 | void* pNext |
| 3114 | VkQueueFamilyProperties queueFamilyProperties |
| 3115 | } |
| 3116 | |
| 3117 | @extension("VK_KHR_get_physical_device_properties2") |
| 3118 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3119 | VkStructureType sType |
| 3120 | void* pNext |
| 3121 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3122 | } |
| 3123 | |
| 3124 | @extension("VK_KHR_get_physical_device_properties2") |
| 3125 | class VkSparseImageFormatProperties2KHR { |
| 3126 | VkStructureType sType |
| 3127 | void* pNext |
| 3128 | VkSparseImageFormatProperties properties |
| 3129 | } |
| 3130 | |
| 3131 | @extension("VK_KHR_get_physical_device_properties2") |
| 3132 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3133 | VkStructureType sType |
| 3134 | const void* pNext |
| 3135 | VkFormat format |
| 3136 | VkImageType type |
| 3137 | VkSampleCountFlagBits samples |
| 3138 | VkImageUsageFlags usage |
| 3139 | VkImageTiling tiling |
| 3140 | } |
| 3141 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3142 | @extension("VK_EXT_validation_flags") |
| 3143 | class VkValidationFlagsEXT { |
| 3144 | VkStructureType sType |
| 3145 | const void* pNext |
| 3146 | u32 disabledValidationCheckCount |
| 3147 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3148 | } |
| 3149 | |
| 3150 | @extension("VK_NVX_device_generated_commands") |
| 3151 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3152 | VkStructureType sType |
| 3153 | const void* pNext |
| 3154 | VkBool32 computeBindingPointSupport |
| 3155 | } |
| 3156 | |
| 3157 | @extension("VK_NVX_device_generated_commands") |
| 3158 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 3159 | VkStructureType sType |
| 3160 | const void* pNext |
| 3161 | u32 maxIndirectCommandsLayoutTokenCount |
| 3162 | u32 maxObjectEntryCounts |
| 3163 | u32 minSequenceCountBufferOffsetAlignment |
| 3164 | u32 minSequenceIndexBufferOffsetAlignment |
| 3165 | u32 minCommandsTokenBufferOffsetAlignment |
| 3166 | } |
| 3167 | |
| 3168 | @extension("VK_NVX_device_generated_commands") |
| 3169 | class VkIndirectCommandsTokenNVX { |
| 3170 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3171 | VkBuffer buffer |
| 3172 | VkDeviceSize offset |
| 3173 | } |
| 3174 | |
| 3175 | @extension("VK_NVX_device_generated_commands") |
| 3176 | class VkIndirectCommandsLayoutTokenNVX { |
| 3177 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3178 | u32 bindingUnit |
| 3179 | u32 dynamicCount |
| 3180 | u32 divisor |
| 3181 | } |
| 3182 | |
| 3183 | @extension("VK_NVX_device_generated_commands") |
| 3184 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 3185 | VkStructureType sType |
| 3186 | const void* pNext |
| 3187 | VkPipelineBindPoint pipelineBindPoint |
| 3188 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 3189 | u32 tokenCount |
| 3190 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 3191 | } |
| 3192 | |
| 3193 | @extension("VK_NVX_device_generated_commands") |
| 3194 | class VkCmdProcessCommandsInfoNVX { |
| 3195 | VkStructureType sType |
| 3196 | const void* pNext |
| 3197 | VkObjectTableNVX objectTable |
| 3198 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3199 | u32 indirectCommandsTokenCount |
| 3200 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 3201 | u32 maxSequencesCount |
| 3202 | VkCommandBuffer targetCommandBuffer |
| 3203 | VkBuffer sequencesCountBuffer |
| 3204 | VkDeviceSize sequencesCountOffset |
| 3205 | VkBuffer sequencesIndexBuffer |
| 3206 | VkDeviceSize sequencesIndexOffset |
| 3207 | } |
| 3208 | |
| 3209 | @extension("VK_NVX_device_generated_commands") |
| 3210 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 3211 | VkStructureType sType |
| 3212 | const void* pNext |
| 3213 | VkObjectTableNVX objectTable |
| 3214 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3215 | u32 maxSequencesCount |
| 3216 | } |
| 3217 | |
| 3218 | @extension("VK_NVX_device_generated_commands") |
| 3219 | class VkObjectTableCreateInfoNVX { |
| 3220 | VkStructureType sType |
| 3221 | const void* pNext |
| 3222 | u32 objectCount |
| 3223 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 3224 | const u32* pObjectEntryCounts |
| 3225 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 3226 | u32 maxUniformBuffersPerDescriptor |
| 3227 | u32 maxStorageBuffersPerDescriptor |
| 3228 | u32 maxStorageImagesPerDescriptor |
| 3229 | u32 maxSampledImagesPerDescriptor |
| 3230 | u32 maxPipelineLayouts |
| 3231 | } |
| 3232 | |
| 3233 | @extension("VK_NVX_device_generated_commands") |
| 3234 | class VkObjectTableEntryNVX { |
| 3235 | VkObjectEntryTypeNVX type |
| 3236 | VkObjectEntryUsageFlagsNVX flags |
| 3237 | } |
| 3238 | |
| 3239 | @extension("VK_NVX_device_generated_commands") |
| 3240 | class VkObjectTablePipelineEntryNVX { |
| 3241 | VkObjectEntryTypeNVX type |
| 3242 | VkObjectEntryUsageFlagsNVX flags |
| 3243 | VkPipeline pipeline |
| 3244 | } |
| 3245 | |
| 3246 | @extension("VK_NVX_device_generated_commands") |
| 3247 | class VkObjectTableDescriptorSetEntryNVX { |
| 3248 | VkObjectEntryTypeNVX type |
| 3249 | VkObjectEntryUsageFlagsNVX flags |
| 3250 | VkPipelineLayout pipelineLayout |
| 3251 | VkDescriptorSet descriptorSet |
| 3252 | } |
| 3253 | |
| 3254 | @extension("VK_NVX_device_generated_commands") |
| 3255 | class VkObjectTableVertexBufferEntryNVX { |
| 3256 | VkObjectEntryTypeNVX type |
| 3257 | VkObjectEntryUsageFlagsNVX flags |
| 3258 | VkBuffer buffer |
| 3259 | } |
| 3260 | |
| 3261 | @extension("VK_NVX_device_generated_commands") |
| 3262 | class VkObjectTableIndexBufferEntryNVX { |
| 3263 | VkObjectEntryTypeNVX type |
| 3264 | VkObjectEntryUsageFlagsNVX flags |
| 3265 | VkBuffer buffer |
| 3266 | } |
| 3267 | |
| 3268 | @extension("VK_NVX_device_generated_commands") |
| 3269 | class VkObjectTablePushConstantEntryNVX { |
| 3270 | VkObjectEntryTypeNVX type |
| 3271 | VkObjectEntryUsageFlagsNVX flags |
| 3272 | VkPipelineLayout pipelineLayout |
| 3273 | VkShaderStageFlags stageFlags |
| 3274 | } |
| 3275 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 3276 | @extension("VK_KHR_incremental_present") |
| 3277 | class VkRectLayerKHR { |
| 3278 | VkOffset2D offset |
| 3279 | VkExtent2D extent |
| 3280 | u32 layer |
| 3281 | } |
| 3282 | |
| 3283 | @extension("VK_KHR_incremental_present") |
| 3284 | class VkPresentRegionKHR { |
| 3285 | u32 rectangleCount |
| 3286 | const VkRectLayerKHR* pRectangles |
| 3287 | } |
| 3288 | |
| 3289 | @extension("VK_KHR_incremental_present") |
| 3290 | class VkPresentRegionsKHR { |
| 3291 | VkStructureType sType |
| 3292 | const void* pNext |
| 3293 | u32 swapchainCount |
| 3294 | const VkPresentRegionKHR* pRegions |
| 3295 | } |
| 3296 | |
Courtney Goeltzenleuchter | d634c48 | 2017-01-05 15:55:31 -0700 | [diff] [blame] | 3297 | @extension("VK_EXT_hdr_metadata") |
| 3298 | class VkXYColorEXT { |
| 3299 | f32 x |
| 3300 | f32 y |
| 3301 | } |
| 3302 | |
| 3303 | @extension("VK_EXT_hdr_metadata") |
| 3304 | class VkHdrMetadataEXT { |
| 3305 | VkXYColorEXT displayPrimaryRed |
| 3306 | VkXYColorEXT displayPrimaryGreen |
| 3307 | VkXYColorEXT displayPrimaryBlue |
| 3308 | VkXYColorEXT whitePoint |
| 3309 | f32 maxLuminance |
| 3310 | f32 minLuminance |
| 3311 | f32 maxContentLightLevel |
| 3312 | f32 maxFrameAverageLightLevel |
| 3313 | } |
| 3314 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3315 | //////////////// |
| 3316 | // Commands // |
| 3317 | //////////////// |
| 3318 | |
| 3319 | // Function pointers. TODO: add support for function pointers. |
| 3320 | |
| 3321 | @external type void* PFN_vkVoidFunction |
| 3322 | @pfn cmd void vkVoidFunction() { |
| 3323 | } |
| 3324 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3325 | @external type void* PFN_vkAllocationFunction |
| 3326 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3327 | void* pUserData, |
| 3328 | platform.size_t size, |
| 3329 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3330 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3331 | return ? |
| 3332 | } |
| 3333 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3334 | @external type void* PFN_vkReallocationFunction |
| 3335 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3336 | void* pUserData, |
| 3337 | void* pOriginal, |
| 3338 | platform.size_t size, |
| 3339 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3340 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3341 | return ? |
| 3342 | } |
| 3343 | |
| 3344 | @external type void* PFN_vkFreeFunction |
| 3345 | @pfn cmd void vkFreeFunction( |
| 3346 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3347 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3348 | } |
| 3349 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3350 | @external type void* PFN_vkInternalAllocationNotification |
| 3351 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3352 | void* pUserData, |
| 3353 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3354 | VkInternalAllocationType allocationType, |
| 3355 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3356 | } |
| 3357 | |
| 3358 | @external type void* PFN_vkInternalFreeNotification |
| 3359 | @pfn cmd void vkInternalFreeNotification( |
| 3360 | void* pUserData, |
| 3361 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3362 | VkInternalAllocationType allocationType, |
| 3363 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3364 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3365 | |
| 3366 | // Global functions |
| 3367 | |
| 3368 | @threadSafety("system") |
| 3369 | cmd VkResult vkCreateInstance( |
| 3370 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3371 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3372 | VkInstance* pInstance) { |
| 3373 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 3374 | |
| 3375 | instance := ? |
| 3376 | pInstance[0] = instance |
| 3377 | State.Instances[instance] = new!InstanceObject() |
| 3378 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3379 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 3380 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3381 | |
| 3382 | return ? |
| 3383 | } |
| 3384 | |
| 3385 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3386 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3387 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3388 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3389 | instanceObject := GetInstance(instance) |
| 3390 | |
| 3391 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3392 | } |
| 3393 | |
| 3394 | @threadSafety("system") |
| 3395 | cmd VkResult vkEnumeratePhysicalDevices( |
| 3396 | VkInstance instance, |
| 3397 | u32* pPhysicalDeviceCount, |
| 3398 | VkPhysicalDevice* pPhysicalDevices) { |
| 3399 | instanceObject := GetInstance(instance) |
| 3400 | |
| 3401 | physicalDeviceCount := as!u32(?) |
| 3402 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 3403 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 3404 | |
| 3405 | for i in (0 .. physicalDeviceCount) { |
| 3406 | physicalDevice := ? |
| 3407 | physicalDevices[i] = physicalDevice |
| 3408 | if !(physicalDevice in State.PhysicalDevices) { |
| 3409 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 3410 | } |
| 3411 | } |
| 3412 | |
| 3413 | return ? |
| 3414 | } |
| 3415 | |
| 3416 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 3417 | VkDevice device, |
| 3418 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3419 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3420 | device := GetDevice(device) |
| 3421 | } |
| 3422 | |
| 3423 | return ? |
| 3424 | } |
| 3425 | |
| 3426 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 3427 | VkInstance instance, |
| 3428 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3429 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3430 | instanceObject := GetInstance(instance) |
| 3431 | } |
| 3432 | |
| 3433 | return ? |
| 3434 | } |
| 3435 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3436 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3437 | VkPhysicalDevice physicalDevice, |
| 3438 | VkPhysicalDeviceProperties* pProperties) { |
| 3439 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3440 | |
| 3441 | properties := ? |
| 3442 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3443 | } |
| 3444 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3445 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3446 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3447 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3448 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3449 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3450 | // TODO: Figure out how to express fetch-count-or-properties |
| 3451 | // This version fails 'apic validate' with 'fence not allowed in |
| 3452 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 3453 | // errors. |
| 3454 | // if pQueueFamilyProperties != null { |
| 3455 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 3456 | // for i in (0 .. pCount[0]) { |
| 3457 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 3458 | // queuesProperties[i] = queueProperties |
| 3459 | // } |
| 3460 | // } else { |
| 3461 | // count := ? |
| 3462 | // pCount[0] = count |
| 3463 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3464 | } |
| 3465 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3466 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3467 | VkPhysicalDevice physicalDevice, |
| 3468 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 3469 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3470 | |
| 3471 | memoryProperties := ? |
| 3472 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3473 | } |
| 3474 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3475 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3476 | VkPhysicalDevice physicalDevice, |
| 3477 | VkPhysicalDeviceFeatures* pFeatures) { |
| 3478 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3479 | |
| 3480 | features := ? |
| 3481 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3482 | } |
| 3483 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3484 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3485 | VkPhysicalDevice physicalDevice, |
| 3486 | VkFormat format, |
| 3487 | VkFormatProperties* pFormatProperties) { |
| 3488 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3489 | |
| 3490 | formatProperties := ? |
| 3491 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3492 | } |
| 3493 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3494 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3495 | VkPhysicalDevice physicalDevice, |
| 3496 | VkFormat format, |
| 3497 | VkImageType type, |
| 3498 | VkImageTiling tiling, |
| 3499 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3500 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3501 | VkImageFormatProperties* pImageFormatProperties) { |
| 3502 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3503 | |
| 3504 | imageFormatProperties := ? |
| 3505 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3506 | |
| 3507 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3508 | } |
| 3509 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3510 | |
| 3511 | // Device functions |
| 3512 | |
| 3513 | @threadSafety("system") |
| 3514 | cmd VkResult vkCreateDevice( |
| 3515 | VkPhysicalDevice physicalDevice, |
| 3516 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3517 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3518 | VkDevice* pDevice) { |
| 3519 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 3520 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3521 | |
| 3522 | device := ? |
| 3523 | pDevice[0] = device |
| 3524 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 3525 | |
| 3526 | return ? |
| 3527 | } |
| 3528 | |
| 3529 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3530 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3531 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3532 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3533 | deviceObject := GetDevice(device) |
| 3534 | |
| 3535 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3536 | } |
| 3537 | |
| 3538 | |
| 3539 | // Extension discovery functions |
| 3540 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3541 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3542 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3543 | VkLayerProperties* pProperties) { |
| 3544 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3545 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3546 | |
| 3547 | properties := pProperties[0:count] |
| 3548 | for i in (0 .. count) { |
| 3549 | property := ? |
| 3550 | properties[i] = property |
| 3551 | } |
| 3552 | |
| 3553 | return ? |
| 3554 | } |
| 3555 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3556 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3557 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3558 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3559 | VkExtensionProperties* pProperties) { |
| 3560 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3561 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3562 | |
| 3563 | properties := pProperties[0:count] |
| 3564 | for i in (0 .. count) { |
| 3565 | property := ? |
| 3566 | properties[i] = property |
| 3567 | } |
| 3568 | |
| 3569 | return ? |
| 3570 | } |
| 3571 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3572 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3573 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3574 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3575 | VkLayerProperties* pProperties) { |
| 3576 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3577 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3578 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3579 | |
| 3580 | properties := pProperties[0:count] |
| 3581 | for i in (0 .. count) { |
| 3582 | property := ? |
| 3583 | properties[i] = property |
| 3584 | } |
| 3585 | |
| 3586 | return ? |
| 3587 | } |
| 3588 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3589 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3590 | VkPhysicalDevice physicalDevice, |
| 3591 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3592 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3593 | VkExtensionProperties* pProperties) { |
| 3594 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3595 | |
| 3596 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3597 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3598 | |
| 3599 | properties := pProperties[0:count] |
| 3600 | for i in (0 .. count) { |
| 3601 | property := ? |
| 3602 | properties[i] = property |
| 3603 | } |
| 3604 | |
| 3605 | return ? |
| 3606 | } |
| 3607 | |
| 3608 | |
| 3609 | // Queue functions |
| 3610 | |
| 3611 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3612 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3613 | VkDevice device, |
| 3614 | u32 queueFamilyIndex, |
| 3615 | u32 queueIndex, |
| 3616 | VkQueue* pQueue) { |
| 3617 | deviceObject := GetDevice(device) |
| 3618 | |
| 3619 | queue := ? |
| 3620 | pQueue[0] = queue |
| 3621 | |
| 3622 | if !(queue in State.Queues) { |
| 3623 | State.Queues[queue] = new!QueueObject(device: device) |
| 3624 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3625 | } |
| 3626 | |
| 3627 | @threadSafety("app") |
| 3628 | cmd VkResult vkQueueSubmit( |
| 3629 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3630 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3631 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3632 | VkFence fence) { |
| 3633 | queueObject := GetQueue(queue) |
| 3634 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3635 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3636 | fenceObject := GetFence(fence) |
| 3637 | assert(fenceObject.device == queueObject.device) |
| 3638 | } |
| 3639 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3640 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 3641 | // for i in (0 .. commandBufferCount) { |
| 3642 | // commandBuffer := commandBuffers[i] |
| 3643 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 3644 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3645 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3646 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 3647 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3648 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3649 | |
| 3650 | return ? |
| 3651 | } |
| 3652 | |
| 3653 | @threadSafety("system") |
| 3654 | cmd VkResult vkQueueWaitIdle( |
| 3655 | VkQueue queue) { |
| 3656 | queueObject := GetQueue(queue) |
| 3657 | |
| 3658 | return ? |
| 3659 | } |
| 3660 | |
| 3661 | @threadSafety("system") |
| 3662 | cmd VkResult vkDeviceWaitIdle( |
| 3663 | VkDevice device) { |
| 3664 | deviceObject := GetDevice(device) |
| 3665 | |
| 3666 | return ? |
| 3667 | } |
| 3668 | |
| 3669 | |
| 3670 | // Memory functions |
| 3671 | |
| 3672 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3673 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3674 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3675 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 3676 | const VkAllocationCallbacks* pAllocator, |
| 3677 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3678 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3679 | deviceObject := GetDevice(device) |
| 3680 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3681 | memory := ? |
| 3682 | pMemory[0] = memory |
| 3683 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3684 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3685 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3686 | |
| 3687 | return ? |
| 3688 | } |
| 3689 | |
| 3690 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3691 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3692 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3693 | VkDeviceMemory memory, |
| 3694 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3695 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3696 | memoryObject := GetDeviceMemory(memory) |
| 3697 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3698 | |
| 3699 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3700 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3701 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3702 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 3703 | "vkFreeMemory: commandBuffers still bound") |
| 3704 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3705 | } |
| 3706 | |
| 3707 | @threadSafety("app") |
| 3708 | cmd VkResult vkMapMemory( |
| 3709 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3710 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3711 | VkDeviceSize offset, |
| 3712 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3713 | VkMemoryMapFlags flags, |
| 3714 | void** ppData) { |
| 3715 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3716 | memoryObject := GetDeviceMemory(memory) |
| 3717 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3718 | |
| 3719 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3720 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3721 | |
| 3722 | return ? |
| 3723 | } |
| 3724 | |
| 3725 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3726 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3727 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3728 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3729 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3730 | memoryObject := GetDeviceMemory(memory) |
| 3731 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3732 | } |
| 3733 | |
| 3734 | cmd VkResult vkFlushMappedMemoryRanges( |
| 3735 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3736 | u32 memoryRangeCount |
| 3737 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3738 | deviceObject := GetDevice(device) |
| 3739 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3740 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3741 | for i in (0 .. memoryRangeCount) { |
| 3742 | memoryRange := memoryRanges[i] |
| 3743 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3744 | assert(memoryObject.device == device) |
| 3745 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3746 | } |
| 3747 | |
| 3748 | return ? |
| 3749 | } |
| 3750 | |
| 3751 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 3752 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3753 | u32 memoryRangeCount, |
| 3754 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3755 | deviceObject := GetDevice(device) |
| 3756 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3757 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3758 | for i in (0 .. memoryRangeCount) { |
| 3759 | memoryRange := memoryRanges[i] |
| 3760 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3761 | assert(memoryObject.device == device) |
| 3762 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3763 | } |
| 3764 | |
| 3765 | return ? |
| 3766 | } |
| 3767 | |
| 3768 | |
| 3769 | // Memory management API functions |
| 3770 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3771 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3772 | VkDevice device, |
| 3773 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3774 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3775 | deviceObject := GetDevice(device) |
| 3776 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3777 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3778 | memoryObject := GetDeviceMemory(memory) |
| 3779 | assert(memoryObject.device == device) |
| 3780 | } |
| 3781 | |
| 3782 | committedMemoryInBytes := ? |
| 3783 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3784 | } |
| 3785 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3786 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3787 | VkDevice device, |
| 3788 | VkBuffer buffer, |
| 3789 | VkMemoryRequirements* pMemoryRequirements) { |
| 3790 | deviceObject := GetDevice(device) |
| 3791 | bufferObject := GetBuffer(buffer) |
| 3792 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3793 | } |
| 3794 | |
| 3795 | cmd VkResult vkBindBufferMemory( |
| 3796 | VkDevice device, |
| 3797 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3798 | VkDeviceMemory memory, |
| 3799 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3800 | deviceObject := GetDevice(device) |
| 3801 | bufferObject := GetBuffer(buffer) |
| 3802 | assert(bufferObject.device == device) |
| 3803 | |
| 3804 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3805 | if bufferObject.memory != NULL_HANDLE { |
| 3806 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 3807 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3808 | } |
| 3809 | |
| 3810 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3811 | if memory != NULL_HANDLE { |
| 3812 | memoryObject := GetDeviceMemory(memory) |
| 3813 | assert(memoryObject.device == device) |
| 3814 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3815 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3816 | bufferObject.memory = memory |
| 3817 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3818 | |
| 3819 | return ? |
| 3820 | } |
| 3821 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3822 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3823 | VkDevice device, |
| 3824 | VkImage image, |
| 3825 | VkMemoryRequirements* pMemoryRequirements) { |
| 3826 | deviceObject := GetDevice(device) |
| 3827 | imageObject := GetImage(image) |
| 3828 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3829 | } |
| 3830 | |
| 3831 | cmd VkResult vkBindImageMemory( |
| 3832 | VkDevice device, |
| 3833 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3834 | VkDeviceMemory memory, |
| 3835 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3836 | deviceObject := GetDevice(device) |
| 3837 | imageObject := GetImage(image) |
| 3838 | assert(imageObject.device == device) |
| 3839 | |
| 3840 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3841 | if imageObject.memory != NULL_HANDLE { |
| 3842 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 3843 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3844 | } |
| 3845 | |
| 3846 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3847 | if memory != NULL_HANDLE { |
| 3848 | memoryObject := GetDeviceMemory(memory) |
| 3849 | assert(memoryObject.device == device) |
| 3850 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3851 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3852 | imageObject.memory = memory |
| 3853 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3854 | |
| 3855 | return ? |
| 3856 | } |
| 3857 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3858 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3859 | VkDevice device, |
| 3860 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3861 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3862 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 3863 | deviceObject := GetDevice(device) |
| 3864 | imageObject := GetImage(image) |
| 3865 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3866 | } |
| 3867 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3868 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3869 | VkPhysicalDevice physicalDevice, |
| 3870 | VkFormat format, |
| 3871 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3872 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3873 | VkImageUsageFlags usage, |
| 3874 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3875 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3876 | VkSparseImageFormatProperties* pProperties) { |
| 3877 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3878 | } |
| 3879 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3880 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3881 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3882 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3883 | const VkBindSparseInfo* pBindInfo, |
| 3884 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3885 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3886 | |
| 3887 | return ? |
| 3888 | } |
| 3889 | |
| 3890 | |
| 3891 | // Fence functions |
| 3892 | |
| 3893 | @threadSafety("system") |
| 3894 | cmd VkResult vkCreateFence( |
| 3895 | VkDevice device, |
| 3896 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3897 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3898 | VkFence* pFence) { |
| 3899 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 3900 | deviceObject := GetDevice(device) |
| 3901 | |
| 3902 | fence := ? |
| 3903 | pFence[0] = fence |
| 3904 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3905 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3906 | |
| 3907 | return ? |
| 3908 | } |
| 3909 | |
| 3910 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3911 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3912 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3913 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3914 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3915 | deviceObject := GetDevice(device) |
| 3916 | fenceObject := GetFence(fence) |
| 3917 | assert(fenceObject.device == device) |
| 3918 | |
| 3919 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3920 | } |
| 3921 | |
| 3922 | @threadSafety("system") |
| 3923 | cmd VkResult vkResetFences( |
| 3924 | VkDevice device, |
| 3925 | u32 fenceCount, |
| 3926 | const VkFence* pFences) { |
| 3927 | deviceObject := GetDevice(device) |
| 3928 | |
| 3929 | fences := pFences[0:fenceCount] |
| 3930 | for i in (0 .. fenceCount) { |
| 3931 | fence := fences[i] |
| 3932 | fenceObject := GetFence(fence) |
| 3933 | assert(fenceObject.device == device) |
| 3934 | fenceObject.signaled = false |
| 3935 | } |
| 3936 | |
| 3937 | return ? |
| 3938 | } |
| 3939 | |
| 3940 | @threadSafety("system") |
| 3941 | cmd VkResult vkGetFenceStatus( |
| 3942 | VkDevice device, |
| 3943 | VkFence fence) { |
| 3944 | deviceObject := GetDevice(device) |
| 3945 | fenceObject := GetFence(fence) |
| 3946 | assert(fenceObject.device == device) |
| 3947 | |
| 3948 | return ? |
| 3949 | } |
| 3950 | |
| 3951 | @threadSafety("system") |
| 3952 | cmd VkResult vkWaitForFences( |
| 3953 | VkDevice device, |
| 3954 | u32 fenceCount, |
| 3955 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3956 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3957 | u64 timeout) { /// timeout in nanoseconds |
| 3958 | deviceObject := GetDevice(device) |
| 3959 | |
| 3960 | fences := pFences[0:fenceCount] |
| 3961 | for i in (0 .. fenceCount) { |
| 3962 | fence := fences[i] |
| 3963 | fenceObject := GetFence(fence) |
| 3964 | assert(fenceObject.device == device) |
| 3965 | } |
| 3966 | |
| 3967 | return ? |
| 3968 | } |
| 3969 | |
| 3970 | |
| 3971 | // Queue semaphore functions |
| 3972 | |
| 3973 | @threadSafety("system") |
| 3974 | cmd VkResult vkCreateSemaphore( |
| 3975 | VkDevice device, |
| 3976 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3977 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3978 | VkSemaphore* pSemaphore) { |
| 3979 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 3980 | deviceObject := GetDevice(device) |
| 3981 | |
| 3982 | semaphore := ? |
| 3983 | pSemaphore[0] = semaphore |
| 3984 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 3985 | |
| 3986 | return ? |
| 3987 | } |
| 3988 | |
| 3989 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3990 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3991 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3992 | VkSemaphore semaphore, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3993 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3994 | deviceObject := GetDevice(device) |
| 3995 | semaphoreObject := GetSemaphore(semaphore) |
| 3996 | assert(semaphoreObject.device == device) |
| 3997 | |
| 3998 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3999 | } |
| 4000 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4001 | |
| 4002 | // Event functions |
| 4003 | |
| 4004 | @threadSafety("system") |
| 4005 | cmd VkResult vkCreateEvent( |
| 4006 | VkDevice device, |
| 4007 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4008 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4009 | VkEvent* pEvent) { |
| 4010 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 4011 | deviceObject := GetDevice(device) |
| 4012 | |
| 4013 | event := ? |
| 4014 | pEvent[0] = event |
| 4015 | State.Events[event] = new!EventObject(device: device) |
| 4016 | |
| 4017 | return ? |
| 4018 | } |
| 4019 | |
| 4020 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4021 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4022 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4023 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4024 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4025 | deviceObject := GetDevice(device) |
| 4026 | eventObject := GetEvent(event) |
| 4027 | assert(eventObject.device == device) |
| 4028 | |
| 4029 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4030 | } |
| 4031 | |
| 4032 | @threadSafety("system") |
| 4033 | cmd VkResult vkGetEventStatus( |
| 4034 | VkDevice device, |
| 4035 | VkEvent event) { |
| 4036 | deviceObject := GetDevice(device) |
| 4037 | eventObject := GetEvent(event) |
| 4038 | assert(eventObject.device == device) |
| 4039 | |
| 4040 | return ? |
| 4041 | } |
| 4042 | |
| 4043 | @threadSafety("system") |
| 4044 | cmd VkResult vkSetEvent( |
| 4045 | VkDevice device, |
| 4046 | VkEvent event) { |
| 4047 | deviceObject := GetDevice(device) |
| 4048 | eventObject := GetEvent(event) |
| 4049 | assert(eventObject.device == device) |
| 4050 | |
| 4051 | return ? |
| 4052 | } |
| 4053 | |
| 4054 | @threadSafety("system") |
| 4055 | cmd VkResult vkResetEvent( |
| 4056 | VkDevice device, |
| 4057 | VkEvent event) { |
| 4058 | deviceObject := GetDevice(device) |
| 4059 | eventObject := GetEvent(event) |
| 4060 | assert(eventObject.device == device) |
| 4061 | |
| 4062 | return ? |
| 4063 | } |
| 4064 | |
| 4065 | |
| 4066 | // Query functions |
| 4067 | |
| 4068 | @threadSafety("system") |
| 4069 | cmd VkResult vkCreateQueryPool( |
| 4070 | VkDevice device, |
| 4071 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4072 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4073 | VkQueryPool* pQueryPool) { |
| 4074 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 4075 | deviceObject := GetDevice(device) |
| 4076 | |
| 4077 | queryPool := ? |
| 4078 | pQueryPool[0] = queryPool |
| 4079 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 4080 | |
| 4081 | return ? |
| 4082 | } |
| 4083 | |
| 4084 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4085 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4086 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4087 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4088 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4089 | deviceObject := GetDevice(device) |
| 4090 | queryPoolObject := GetQueryPool(queryPool) |
| 4091 | assert(queryPoolObject.device == device) |
| 4092 | |
| 4093 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4094 | } |
| 4095 | |
| 4096 | @threadSafety("system") |
| 4097 | cmd VkResult vkGetQueryPoolResults( |
| 4098 | VkDevice device, |
| 4099 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4100 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4101 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4102 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4103 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4104 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4105 | VkQueryResultFlags flags) { |
| 4106 | deviceObject := GetDevice(device) |
| 4107 | queryPoolObject := GetQueryPool(queryPool) |
| 4108 | assert(queryPoolObject.device == device) |
| 4109 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4110 | data := pData[0:dataSize] |
| 4111 | |
| 4112 | return ? |
| 4113 | } |
| 4114 | |
| 4115 | // Buffer functions |
| 4116 | |
| 4117 | @threadSafety("system") |
| 4118 | cmd VkResult vkCreateBuffer( |
| 4119 | VkDevice device, |
| 4120 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4121 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4122 | VkBuffer* pBuffer) { |
| 4123 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 4124 | deviceObject := GetDevice(device) |
| 4125 | |
| 4126 | buffer := ? |
| 4127 | pBuffer[0] = buffer |
| 4128 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 4129 | |
| 4130 | return ? |
| 4131 | } |
| 4132 | |
| 4133 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4134 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4135 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4136 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4137 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4138 | deviceObject := GetDevice(device) |
| 4139 | bufferObject := GetBuffer(buffer) |
| 4140 | assert(bufferObject.device == device) |
| 4141 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4142 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4143 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4144 | } |
| 4145 | |
| 4146 | |
| 4147 | // Buffer view functions |
| 4148 | |
| 4149 | @threadSafety("system") |
| 4150 | cmd VkResult vkCreateBufferView( |
| 4151 | VkDevice device, |
| 4152 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4153 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4154 | VkBufferView* pView) { |
| 4155 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 4156 | deviceObject := GetDevice(device) |
| 4157 | |
| 4158 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 4159 | assert(bufferObject.device == device) |
| 4160 | |
| 4161 | view := ? |
| 4162 | pView[0] = view |
| 4163 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 4164 | |
| 4165 | return ? |
| 4166 | } |
| 4167 | |
| 4168 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4169 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4170 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4171 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4172 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4173 | deviceObject := GetDevice(device) |
| 4174 | bufferViewObject := GetBufferView(bufferView) |
| 4175 | assert(bufferViewObject.device == device) |
| 4176 | |
| 4177 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4178 | } |
| 4179 | |
| 4180 | |
| 4181 | // Image functions |
| 4182 | |
| 4183 | @threadSafety("system") |
| 4184 | cmd VkResult vkCreateImage( |
| 4185 | VkDevice device, |
| 4186 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4187 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4188 | VkImage* pImage) { |
| 4189 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 4190 | deviceObject := GetDevice(device) |
| 4191 | |
| 4192 | image := ? |
| 4193 | pImage[0] = image |
| 4194 | State.Images[image] = new!ImageObject(device: device) |
| 4195 | |
| 4196 | return ? |
| 4197 | } |
| 4198 | |
| 4199 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4200 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4201 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4202 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4203 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4204 | deviceObject := GetDevice(device) |
| 4205 | imageObject := GetImage(image) |
| 4206 | assert(imageObject.device == device) |
| 4207 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4208 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4209 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4210 | } |
| 4211 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4212 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4213 | VkDevice device, |
| 4214 | VkImage image, |
| 4215 | const VkImageSubresource* pSubresource, |
| 4216 | VkSubresourceLayout* pLayout) { |
| 4217 | deviceObject := GetDevice(device) |
| 4218 | imageObject := GetImage(image) |
| 4219 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4220 | } |
| 4221 | |
| 4222 | |
| 4223 | // Image view functions |
| 4224 | |
| 4225 | @threadSafety("system") |
| 4226 | cmd VkResult vkCreateImageView( |
| 4227 | VkDevice device, |
| 4228 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4229 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4230 | VkImageView* pView) { |
| 4231 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 4232 | deviceObject := GetDevice(device) |
| 4233 | |
| 4234 | imageObject := GetImage(pCreateInfo.image) |
| 4235 | assert(imageObject.device == device) |
| 4236 | |
| 4237 | view := ? |
| 4238 | pView[0] = view |
| 4239 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 4240 | |
| 4241 | return ? |
| 4242 | } |
| 4243 | |
| 4244 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4245 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4246 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4247 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4248 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4249 | deviceObject := GetDevice(device) |
| 4250 | imageViewObject := GetImageView(imageView) |
| 4251 | assert(imageViewObject.device == device) |
| 4252 | |
| 4253 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4254 | } |
| 4255 | |
| 4256 | |
| 4257 | // Shader functions |
| 4258 | |
| 4259 | cmd VkResult vkCreateShaderModule( |
| 4260 | VkDevice device, |
| 4261 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4262 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4263 | VkShaderModule* pShaderModule) { |
| 4264 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 4265 | deviceObject := GetDevice(device) |
| 4266 | |
| 4267 | shaderModule := ? |
| 4268 | pShaderModule[0] = shaderModule |
| 4269 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 4270 | |
| 4271 | return ? |
| 4272 | } |
| 4273 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4274 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4275 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4276 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4277 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4278 | deviceObject := GetDevice(device) |
| 4279 | shaderModuleObject := GetShaderModule(shaderModule) |
| 4280 | assert(shaderModuleObject.device == device) |
| 4281 | |
| 4282 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4283 | } |
| 4284 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4285 | |
| 4286 | // Pipeline functions |
| 4287 | |
| 4288 | cmd VkResult vkCreatePipelineCache( |
| 4289 | VkDevice device, |
| 4290 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4291 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4292 | VkPipelineCache* pPipelineCache) { |
| 4293 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 4294 | deviceObject := GetDevice(device) |
| 4295 | |
| 4296 | pipelineCache := ? |
| 4297 | pPipelineCache[0] = pipelineCache |
| 4298 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 4299 | |
| 4300 | return ? |
| 4301 | } |
| 4302 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4303 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4304 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4305 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4306 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4307 | deviceObject := GetDevice(device) |
| 4308 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4309 | assert(pipelineCacheObject.device == device) |
| 4310 | |
| 4311 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4312 | } |
| 4313 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4314 | cmd VkResult vkGetPipelineCacheData( |
| 4315 | VkDevice device, |
| 4316 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4317 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4318 | void* pData) { |
| 4319 | deviceObject := GetDevice(device) |
| 4320 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4321 | assert(pipelineCacheObject.device == device) |
| 4322 | |
| 4323 | return ? |
| 4324 | } |
| 4325 | |
| 4326 | cmd VkResult vkMergePipelineCaches( |
| 4327 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4328 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4329 | u32 srcCacheCount, |
| 4330 | const VkPipelineCache* pSrcCaches) { |
| 4331 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4332 | dstCacheObject := GetPipelineCache(dstCache) |
| 4333 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4334 | |
| 4335 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 4336 | for i in (0 .. srcCacheCount) { |
| 4337 | srcCache := srcCaches[i] |
| 4338 | srcCacheObject := GetPipelineCache(srcCache) |
| 4339 | assert(srcCacheObject.device == device) |
| 4340 | } |
| 4341 | |
| 4342 | return ? |
| 4343 | } |
| 4344 | |
| 4345 | cmd VkResult vkCreateGraphicsPipelines( |
| 4346 | VkDevice device, |
| 4347 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4348 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4349 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4350 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4351 | VkPipeline* pPipelines) { |
| 4352 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4353 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4354 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4355 | assert(pipelineCacheObject.device == device) |
| 4356 | } |
| 4357 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4358 | createInfos := pCreateInfos[0:createInfoCount] |
| 4359 | pipelines := pPipelines[0:createInfoCount] |
| 4360 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4361 | pipeline := ? |
| 4362 | pipelines[i] = pipeline |
| 4363 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4364 | } |
| 4365 | |
| 4366 | return ? |
| 4367 | } |
| 4368 | |
| 4369 | cmd VkResult vkCreateComputePipelines( |
| 4370 | VkDevice device, |
| 4371 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4372 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4373 | const VkComputePipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4374 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4375 | VkPipeline* pPipelines) { |
| 4376 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4377 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4378 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4379 | assert(pipelineCacheObject.device == device) |
| 4380 | } |
| 4381 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4382 | createInfos := pCreateInfos[0:createInfoCount] |
| 4383 | pipelines := pPipelines[0:createInfoCount] |
| 4384 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4385 | pipeline := ? |
| 4386 | pipelines[i] = pipeline |
| 4387 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4388 | } |
| 4389 | |
| 4390 | return ? |
| 4391 | } |
| 4392 | |
| 4393 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4394 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4395 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4396 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4397 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4398 | deviceObject := GetDevice(device) |
| 4399 | pipelineObjects := GetPipeline(pipeline) |
| 4400 | assert(pipelineObjects.device == device) |
| 4401 | |
| 4402 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4403 | } |
| 4404 | |
| 4405 | |
| 4406 | // Pipeline layout functions |
| 4407 | |
| 4408 | @threadSafety("system") |
| 4409 | cmd VkResult vkCreatePipelineLayout( |
| 4410 | VkDevice device, |
| 4411 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4412 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4413 | VkPipelineLayout* pPipelineLayout) { |
| 4414 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 4415 | deviceObject := GetDevice(device) |
| 4416 | |
| 4417 | pipelineLayout := ? |
| 4418 | pPipelineLayout[0] = pipelineLayout |
| 4419 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 4420 | |
| 4421 | return ? |
| 4422 | } |
| 4423 | |
| 4424 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4425 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4426 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4427 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4428 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4429 | deviceObject := GetDevice(device) |
| 4430 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 4431 | assert(pipelineLayoutObjects.device == device) |
| 4432 | |
| 4433 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4434 | } |
| 4435 | |
| 4436 | |
| 4437 | // Sampler functions |
| 4438 | |
| 4439 | @threadSafety("system") |
| 4440 | cmd VkResult vkCreateSampler( |
| 4441 | VkDevice device, |
| 4442 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4443 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4444 | VkSampler* pSampler) { |
| 4445 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 4446 | deviceObject := GetDevice(device) |
| 4447 | |
| 4448 | sampler := ? |
| 4449 | pSampler[0] = sampler |
| 4450 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 4451 | |
| 4452 | return ? |
| 4453 | } |
| 4454 | |
| 4455 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4456 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4457 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4458 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4459 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4460 | deviceObject := GetDevice(device) |
| 4461 | samplerObject := GetSampler(sampler) |
| 4462 | assert(samplerObject.device == device) |
| 4463 | |
| 4464 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4465 | } |
| 4466 | |
| 4467 | |
| 4468 | // Descriptor set functions |
| 4469 | |
| 4470 | @threadSafety("system") |
| 4471 | cmd VkResult vkCreateDescriptorSetLayout( |
| 4472 | VkDevice device, |
| 4473 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4474 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4475 | VkDescriptorSetLayout* pSetLayout) { |
| 4476 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 4477 | deviceObject := GetDevice(device) |
| 4478 | |
| 4479 | setLayout := ? |
| 4480 | pSetLayout[0] = setLayout |
| 4481 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 4482 | |
| 4483 | return ? |
| 4484 | } |
| 4485 | |
| 4486 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4487 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4488 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4489 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4490 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4491 | deviceObject := GetDevice(device) |
| 4492 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 4493 | assert(descriptorSetLayoutObject.device == device) |
| 4494 | |
| 4495 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4496 | } |
| 4497 | |
| 4498 | @threadSafety("system") |
| 4499 | cmd VkResult vkCreateDescriptorPool( |
| 4500 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4501 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4502 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4503 | VkDescriptorPool* pDescriptorPool) { |
| 4504 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 4505 | deviceObject := GetDevice(device) |
| 4506 | |
| 4507 | descriptorPool := ? |
| 4508 | pDescriptorPool[0] = descriptorPool |
| 4509 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 4510 | |
| 4511 | return ? |
| 4512 | } |
| 4513 | |
| 4514 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4515 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4516 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4517 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4518 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4519 | deviceObject := GetDevice(device) |
| 4520 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4521 | assert(descriptorPoolObject.device == device) |
| 4522 | |
| 4523 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4524 | } |
| 4525 | |
| 4526 | @threadSafety("app") |
| 4527 | cmd VkResult vkResetDescriptorPool( |
| 4528 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4529 | VkDescriptorPool descriptorPool, |
| 4530 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4531 | deviceObject := GetDevice(device) |
| 4532 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4533 | assert(descriptorPoolObject.device == device) |
| 4534 | |
| 4535 | return ? |
| 4536 | } |
| 4537 | |
| 4538 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4539 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4540 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4541 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4542 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4543 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4544 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4545 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4546 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4547 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 4548 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4549 | setLayout := setLayouts[i] |
| 4550 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 4551 | assert(setLayoutObject.device == device) |
| 4552 | } |
| 4553 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4554 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 4555 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4556 | descriptorSet := ? |
| 4557 | descriptorSets[i] = descriptorSet |
| 4558 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 4559 | } |
| 4560 | |
| 4561 | return ? |
| 4562 | } |
| 4563 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4564 | cmd VkResult vkFreeDescriptorSets( |
| 4565 | VkDevice device, |
| 4566 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4567 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4568 | const VkDescriptorSet* pDescriptorSets) { |
| 4569 | deviceObject := GetDevice(device) |
| 4570 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4571 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4572 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4573 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4574 | descriptorSet := descriptorSets[i] |
| 4575 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 4576 | assert(descriptorSetObject.device == device) |
| 4577 | State.DescriptorSets[descriptorSet] = null |
| 4578 | } |
| 4579 | |
| 4580 | return ? |
| 4581 | } |
| 4582 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4583 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4584 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4585 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4586 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4587 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4588 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 4589 | deviceObject := GetDevice(device) |
| 4590 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4591 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 4592 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4593 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4594 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4595 | assert(descriptorWriteObject.device == device) |
| 4596 | } |
| 4597 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4598 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 4599 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4600 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4601 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4602 | assert(descriptorCopyObject.device == device) |
| 4603 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4604 | } |
| 4605 | |
| 4606 | |
| 4607 | // Framebuffer functions |
| 4608 | |
| 4609 | @threadSafety("system") |
| 4610 | cmd VkResult vkCreateFramebuffer( |
| 4611 | VkDevice device, |
| 4612 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4613 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4614 | VkFramebuffer* pFramebuffer) { |
| 4615 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 4616 | deviceObject := GetDevice(device) |
| 4617 | |
| 4618 | framebuffer := ? |
| 4619 | pFramebuffer[0] = framebuffer |
| 4620 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 4621 | |
| 4622 | return ? |
| 4623 | } |
| 4624 | |
| 4625 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4626 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4627 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4628 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4629 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4630 | deviceObject := GetDevice(device) |
| 4631 | framebufferObject := GetFramebuffer(framebuffer) |
| 4632 | assert(framebufferObject.device == device) |
| 4633 | |
| 4634 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4635 | } |
| 4636 | |
| 4637 | |
| 4638 | // Renderpass functions |
| 4639 | |
| 4640 | @threadSafety("system") |
| 4641 | cmd VkResult vkCreateRenderPass( |
| 4642 | VkDevice device, |
| 4643 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4644 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4645 | VkRenderPass* pRenderPass) { |
| 4646 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 4647 | deviceObject := GetDevice(device) |
| 4648 | |
| 4649 | renderpass := ? |
| 4650 | pRenderPass[0] = renderpass |
| 4651 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 4652 | |
| 4653 | return ? |
| 4654 | } |
| 4655 | |
| 4656 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4657 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4658 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4659 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4660 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4661 | deviceObject := GetDevice(device) |
| 4662 | renderPassObject := GetRenderPass(renderPass) |
| 4663 | assert(renderPassObject.device == device) |
| 4664 | |
| 4665 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4666 | } |
| 4667 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4668 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4669 | VkDevice device, |
| 4670 | VkRenderPass renderPass, |
| 4671 | VkExtent2D* pGranularity) { |
| 4672 | deviceObject := GetDevice(device) |
| 4673 | renderPassObject := GetRenderPass(renderPass) |
| 4674 | |
| 4675 | granularity := ? |
| 4676 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4677 | } |
| 4678 | |
| 4679 | // Command pool functions |
| 4680 | |
| 4681 | cmd VkResult vkCreateCommandPool( |
| 4682 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4683 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 4684 | const VkAllocationCallbacks* pAllocator, |
| 4685 | VkCommandPool* pCommandPool) { |
| 4686 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4687 | deviceObject := GetDevice(device) |
| 4688 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4689 | commandPool := ? |
| 4690 | pCommandPool[0] = commandPool |
| 4691 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4692 | |
| 4693 | return ? |
| 4694 | } |
| 4695 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4696 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4697 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4698 | VkCommandPool commandPool, |
| 4699 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4700 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4701 | commandPoolObject := GetCommandPool(commandPool) |
| 4702 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4703 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4704 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4705 | } |
| 4706 | |
| 4707 | cmd VkResult vkResetCommandPool( |
| 4708 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4709 | VkCommandPool commandPool, |
| 4710 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4712 | commandPoolObject := GetCommandPool(commandPool) |
| 4713 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4714 | |
| 4715 | return ? |
| 4716 | } |
| 4717 | |
| 4718 | // Command buffer functions |
| 4719 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4720 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4721 | memoryObject := GetDeviceMemory(memory) |
| 4722 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4723 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4724 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4725 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4726 | } |
| 4727 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4728 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4729 | memoryObject := GetDeviceMemory(memory) |
| 4730 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4731 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4732 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4733 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4734 | } |
| 4735 | |
| 4736 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4737 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4738 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4739 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 4740 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4741 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4742 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4743 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4744 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4745 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4746 | commandBuffer := ? |
| 4747 | commandBuffers[i] = commandBuffer |
| 4748 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4749 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4750 | |
| 4751 | return ? |
| 4752 | } |
| 4753 | |
| 4754 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4755 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4756 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4757 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4758 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4759 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4760 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4761 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4762 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4763 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4764 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 4765 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4766 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4767 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4768 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4769 | } |
| 4770 | |
| 4771 | @threadSafety("app") |
| 4772 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4773 | VkCommandBuffer commandBuffer, |
| 4774 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 4775 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 4776 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4777 | |
| 4778 | // TODO: iterate over boundObjects and clear memory bindings |
| 4779 | |
| 4780 | return ? |
| 4781 | } |
| 4782 | |
| 4783 | @threadSafety("app") |
| 4784 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4785 | VkCommandBuffer commandBuffer) { |
| 4786 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4787 | |
| 4788 | return ? |
| 4789 | } |
| 4790 | |
| 4791 | @threadSafety("app") |
| 4792 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4793 | VkCommandBuffer commandBuffer, |
| 4794 | VkCommandBufferResetFlags flags) { |
| 4795 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4796 | |
| 4797 | // TODO: iterate over boundObjects and clear memory bindings |
| 4798 | |
| 4799 | return ? |
| 4800 | } |
| 4801 | |
| 4802 | |
| 4803 | // Command buffer building functions |
| 4804 | |
| 4805 | @threadSafety("app") |
| 4806 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4807 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4808 | VkPipelineBindPoint pipelineBindPoint, |
| 4809 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4810 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4811 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4812 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4813 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4814 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4815 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4816 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4817 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4818 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4819 | } |
| 4820 | |
| 4821 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4822 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4823 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4824 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4825 | u32 viewportCount, |
| 4826 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4827 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4828 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4829 | } |
| 4830 | |
| 4831 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4832 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4833 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4834 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4835 | u32 scissorCount, |
| 4836 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4837 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4838 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4839 | } |
| 4840 | |
| 4841 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4842 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4843 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4844 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4845 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4846 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4847 | } |
| 4848 | |
| 4849 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4850 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4851 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4852 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4853 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4854 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4855 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4856 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4857 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4858 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4859 | @threadSafety("app") |
| 4860 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4861 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4862 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 4863 | // an annotation as a quick hack to pass this to the template without |
| 4864 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4865 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4866 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4867 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4868 | } |
| 4869 | |
| 4870 | @threadSafety("app") |
| 4871 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4872 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4873 | f32 minDepthBounds, |
| 4874 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4875 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4876 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4877 | } |
| 4878 | |
| 4879 | @threadSafety("app") |
| 4880 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4881 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4882 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4883 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4884 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4885 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4886 | } |
| 4887 | |
| 4888 | @threadSafety("app") |
| 4889 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4890 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4891 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4892 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4893 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4894 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4895 | } |
| 4896 | |
| 4897 | @threadSafety("app") |
| 4898 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4899 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4900 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4901 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4902 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4903 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4904 | } |
| 4905 | |
| 4906 | @threadSafety("app") |
| 4907 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4908 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4909 | VkPipelineBindPoint pipelineBindPoint, |
| 4910 | VkPipelineLayout layout, |
| 4911 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4912 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4913 | const VkDescriptorSet* pDescriptorSets, |
| 4914 | u32 dynamicOffsetCount, |
| 4915 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4916 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4917 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4918 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4919 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 | descriptorSet := descriptorSets[i] |
| 4921 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4922 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4923 | } |
| 4924 | |
| 4925 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 4926 | for i in (0 .. dynamicOffsetCount) { |
| 4927 | dynamicOffset := dynamicOffsets[i] |
| 4928 | } |
| 4929 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4930 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4931 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4932 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4933 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4934 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4935 | } |
| 4936 | |
| 4937 | @threadSafety("app") |
| 4938 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4939 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4940 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4941 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4942 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4943 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4944 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4945 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4946 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4947 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4948 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4949 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4950 | } |
| 4951 | |
| 4952 | @threadSafety("app") |
| 4953 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4954 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4955 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4956 | u32 bindingCount, |
| 4957 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4958 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4959 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4960 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4961 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4962 | buffers := pBuffers[0:bindingCount] |
| 4963 | offsets := pOffsets[0:bindingCount] |
| 4964 | for i in (0 .. bindingCount) { |
| 4965 | buffer := buffers[i] |
| 4966 | offset := offsets[i] |
| 4967 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4968 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4969 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | } |
| 4972 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4973 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4974 | } |
| 4975 | |
| 4976 | @threadSafety("app") |
| 4977 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4978 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4979 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4980 | u32 instanceCount, |
| 4981 | u32 firstVertex, |
| 4982 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4983 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4984 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4985 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4986 | } |
| 4987 | |
| 4988 | @threadSafety("app") |
| 4989 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4990 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4991 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4992 | u32 instanceCount, |
| 4993 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4994 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4995 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4996 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 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 vkCmdDrawIndirect( |
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 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5005 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5006 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5007 | u32 stride) { |
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 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5010 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5011 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5012 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5013 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5014 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5015 | } |
| 5016 | |
| 5017 | @threadSafety("app") |
| 5018 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5019 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5020 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5021 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5022 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5023 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5024 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5025 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5026 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5027 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5028 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5029 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5030 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5031 | } |
| 5032 | |
| 5033 | @threadSafety("app") |
| 5034 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5035 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5036 | u32 x, |
| 5037 | u32 y, |
| 5038 | u32 z) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5039 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5040 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5041 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5042 | } |
| 5043 | |
| 5044 | @threadSafety("app") |
| 5045 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5046 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5047 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5048 | VkDeviceSize offset) { |
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_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5056 | } |
| 5057 | |
| 5058 | @threadSafety("app") |
| 5059 | cmd void vkCmdCopyBuffer( |
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 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5062 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5063 | u32 regionCount, |
| 5064 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5065 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5066 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5067 | dstBufferObject := GetBuffer(dstBuffer) |
| 5068 | assert(commandBufferObject.device == srcBufferObject.device) |
| 5069 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5070 | |
| 5071 | regions := pRegions[0:regionCount] |
| 5072 | for i in (0 .. regionCount) { |
| 5073 | region := regions[i] |
| 5074 | } |
| 5075 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5076 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 5077 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5078 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5079 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5080 | } |
| 5081 | |
| 5082 | @threadSafety("app") |
| 5083 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5084 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5085 | VkImage srcImage, |
| 5086 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5087 | VkImage dstImage, |
| 5088 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5089 | u32 regionCount, |
| 5090 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5091 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5092 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5093 | dstImageObject := GetImage(dstImage) |
| 5094 | assert(commandBufferObject.device == srcImageObject.device) |
| 5095 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5096 | |
| 5097 | regions := pRegions[0:regionCount] |
| 5098 | for i in (0 .. regionCount) { |
| 5099 | region := regions[i] |
| 5100 | } |
| 5101 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5102 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5103 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5104 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5105 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5106 | } |
| 5107 | |
| 5108 | @threadSafety("app") |
| 5109 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5110 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5111 | VkImage srcImage, |
| 5112 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5113 | VkImage dstImage, |
| 5114 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5115 | u32 regionCount, |
| 5116 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 5117 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5118 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5119 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5120 | dstImageObject := GetImage(dstImage) |
| 5121 | assert(commandBufferObject.device == srcImageObject.device) |
| 5122 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5123 | |
| 5124 | regions := pRegions[0:regionCount] |
| 5125 | for i in (0 .. regionCount) { |
| 5126 | region := regions[i] |
| 5127 | } |
| 5128 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5129 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5130 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5131 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5132 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5133 | } |
| 5134 | |
| 5135 | @threadSafety("app") |
| 5136 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5137 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5138 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5139 | VkImage dstImage, |
| 5140 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5141 | u32 regionCount, |
| 5142 | const VkBufferImageCopy* pRegions) { |
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 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5145 | dstImageObject := GetImage(dstImage) |
| 5146 | assert(commandBufferObject.device == srcBufferObject.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, srcBuffer, srcBufferObject.memory) |
| 5155 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5156 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5157 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5158 | } |
| 5159 | |
| 5160 | @threadSafety("app") |
| 5161 | cmd void vkCmdCopyImageToBuffer( |
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 | VkImage srcImage, |
| 5164 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5165 | VkBuffer dstBuffer, |
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 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5170 | dstBufferObject := GetBuffer(dstBuffer) |
| 5171 | assert(commandBufferObject.device == srcImageObject.device) |
| 5172 | assert(commandBufferObject.device == dstBufferObject.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, srcImage, srcImageObject.memory) |
| 5180 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.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 vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5187 | VkCommandBuffer commandBuffer, |
| 5188 | VkBuffer dstBuffer, |
| 5189 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5190 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 5191 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5192 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5193 | dstBufferObject := GetBuffer(dstBuffer) |
| 5194 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5195 | |
| 5196 | data := pData[0:dataSize] |
| 5197 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5198 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5199 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5200 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5201 | } |
| 5202 | |
| 5203 | @threadSafety("app") |
| 5204 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5205 | VkCommandBuffer commandBuffer, |
| 5206 | VkBuffer dstBuffer, |
| 5207 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5208 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5209 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5210 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5211 | dstBufferObject := GetBuffer(dstBuffer) |
| 5212 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5213 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5214 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5215 | } |
| 5216 | |
| 5217 | @threadSafety("app") |
| 5218 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5219 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5220 | VkImage image, |
| 5221 | VkImageLayout imageLayout, |
| 5222 | const VkClearColorValue* pColor, |
| 5223 | u32 rangeCount, |
| 5224 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5225 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5226 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5227 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5228 | |
| 5229 | ranges := pRanges[0:rangeCount] |
| 5230 | for i in (0 .. rangeCount) { |
| 5231 | range := ranges[i] |
| 5232 | } |
| 5233 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5234 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5235 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5236 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5237 | } |
| 5238 | |
| 5239 | @threadSafety("app") |
| 5240 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5241 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5242 | VkImage image, |
| 5243 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5244 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5245 | u32 rangeCount, |
| 5246 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5247 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5248 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5249 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5250 | |
| 5251 | ranges := pRanges[0:rangeCount] |
| 5252 | for i in (0 .. rangeCount) { |
| 5253 | range := ranges[i] |
| 5254 | } |
| 5255 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5256 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5257 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5258 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5259 | } |
| 5260 | |
| 5261 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5262 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5263 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5264 | u32 attachmentCount, |
| 5265 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5266 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5267 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5268 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5269 | |
| 5270 | rects := pRects[0:rectCount] |
| 5271 | for i in (0 .. rectCount) { |
| 5272 | rect := rects[i] |
| 5273 | } |
| 5274 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5275 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5276 | } |
| 5277 | |
| 5278 | @threadSafety("app") |
| 5279 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5280 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5281 | VkImage srcImage, |
| 5282 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5283 | VkImage dstImage, |
| 5284 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5285 | u32 regionCount, |
| 5286 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5287 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5288 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5289 | dstImageObject := GetImage(dstImage) |
| 5290 | assert(commandBufferObject.device == srcImageObject.device) |
| 5291 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5292 | |
| 5293 | regions := pRegions[0:regionCount] |
| 5294 | for i in (0 .. regionCount) { |
| 5295 | region := regions[i] |
| 5296 | } |
| 5297 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5298 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5299 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5300 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5301 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5302 | } |
| 5303 | |
| 5304 | @threadSafety("app") |
| 5305 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5306 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5307 | VkEvent event, |
| 5308 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5309 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5310 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5311 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5312 | } |
| 5313 | |
| 5314 | @threadSafety("app") |
| 5315 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5316 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5317 | VkEvent event, |
| 5318 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5319 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5320 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5321 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5322 | } |
| 5323 | |
| 5324 | @threadSafety("app") |
| 5325 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5326 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5327 | u32 eventCount, |
| 5328 | const VkEvent* pEvents, |
| 5329 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5330 | VkPipelineStageFlags dstStageMask, |
| 5331 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5332 | const VkMemoryBarrier* pMemoryBarriers, |
| 5333 | u32 bufferMemoryBarrierCount, |
| 5334 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5335 | u32 imageMemoryBarrierCount, |
| 5336 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5337 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5338 | |
| 5339 | events := pEvents[0:eventCount] |
| 5340 | for i in (0 .. eventCount) { |
| 5341 | event := events[i] |
| 5342 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5343 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5344 | } |
| 5345 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5346 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5347 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5348 | memoryBarrier := memoryBarriers[i] |
| 5349 | } |
| 5350 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5351 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5352 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5353 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5354 | assert(bufferObject.device == commandBufferObject.device) |
| 5355 | } |
| 5356 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5357 | for i in (0 .. imageMemoryBarrierCount) { |
| 5358 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5359 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5360 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5361 | } |
| 5362 | } |
| 5363 | |
| 5364 | @threadSafety("app") |
| 5365 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5366 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5367 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5368 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5369 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5370 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5371 | const VkMemoryBarrier* pMemoryBarriers, |
| 5372 | u32 bufferMemoryBarrierCount, |
| 5373 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5374 | u32 imageMemoryBarrierCount, |
| 5375 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5376 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5377 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5378 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5379 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5380 | memoryBarrier := memoryBarriers[i] |
| 5381 | } |
| 5382 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5383 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5384 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5385 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5386 | assert(bufferObject.device == commandBufferObject.device) |
| 5387 | } |
| 5388 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5389 | for i in (0 .. imageMemoryBarrierCount) { |
| 5390 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5391 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5392 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5393 | } |
| 5394 | } |
| 5395 | |
| 5396 | @threadSafety("app") |
| 5397 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5398 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5399 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5400 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5401 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5402 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5403 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5404 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5405 | } |
| 5406 | |
| 5407 | @threadSafety("app") |
| 5408 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5409 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5410 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5411 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5412 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5413 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5414 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5415 | } |
| 5416 | |
| 5417 | @threadSafety("app") |
| 5418 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5419 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5420 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5421 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5422 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5423 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5424 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5425 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5426 | } |
| 5427 | |
| 5428 | @threadSafety("app") |
| 5429 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5430 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5431 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5432 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5433 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5434 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5435 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5436 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5437 | } |
| 5438 | |
| 5439 | @threadSafety("app") |
| 5440 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5441 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5442 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5443 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5444 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5445 | VkBuffer dstBuffer, |
| 5446 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5447 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5448 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5449 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5450 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5451 | dstBufferObject := GetBuffer(dstBuffer) |
| 5452 | assert(commandBufferObject.device == queryPoolObject.device) |
| 5453 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5454 | } |
| 5455 | |
| 5456 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5457 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5458 | VkPipelineLayout layout, |
| 5459 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5460 | u32 offset, |
| 5461 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5462 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5463 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5464 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5465 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5466 | } |
| 5467 | |
| 5468 | @threadSafety("app") |
| 5469 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5470 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5471 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5472 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5473 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5474 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 5475 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5476 | assert(commandBufferObject.device == renderPassObject.device) |
| 5477 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5478 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5479 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5480 | } |
| 5481 | |
| 5482 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5483 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5484 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5485 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5486 | } |
| 5487 | |
| 5488 | @threadSafety("app") |
| 5489 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5490 | VkCommandBuffer commandBuffer) { |
| 5491 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5492 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5493 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5494 | } |
| 5495 | |
| 5496 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5497 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5498 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5499 | const VkCommandBuffer* pCommandBuffers) { |
| 5500 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5501 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5502 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 5503 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5504 | secondaryCommandBuffer := commandBuffers[i] |
| 5505 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 5506 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5507 | } |
| 5508 | } |
| 5509 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5510 | @extension("VK_KHR_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5511 | cmd void vkDestroySurfaceKHR( |
| 5512 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5513 | VkSurfaceKHR surface, |
| 5514 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5515 | instanceObject := GetInstance(instance) |
| 5516 | surfaceObject := GetSurface(surface) |
| 5517 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5518 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5519 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5520 | } |
| 5521 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5522 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5523 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5524 | VkPhysicalDevice physicalDevice, |
| 5525 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5526 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5527 | VkBool32* pSupported) { |
| 5528 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5529 | |
| 5530 | return ? |
| 5531 | } |
| 5532 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5533 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5534 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5535 | VkPhysicalDevice physicalDevice, |
| 5536 | VkSurfaceKHR surface, |
| 5537 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 5538 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5539 | |
| 5540 | surfaceCapabilities := ? |
| 5541 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 5542 | |
| 5543 | return ? |
| 5544 | } |
| 5545 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5546 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5547 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5548 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5549 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5550 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5551 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5552 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5553 | |
| 5554 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5555 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5556 | surfaceFormats := pSurfaceFormats[0:count] |
| 5557 | |
| 5558 | for i in (0 .. count) { |
| 5559 | surfaceFormat := ? |
| 5560 | surfaceFormats[i] = surfaceFormat |
| 5561 | } |
| 5562 | |
| 5563 | return ? |
| 5564 | } |
| 5565 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5566 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5567 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5568 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5569 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5570 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5571 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5572 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5573 | |
| 5574 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5575 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5576 | presentModes := pPresentModes[0:count] |
| 5577 | |
| 5578 | for i in (0 .. count) { |
| 5579 | presentMode := ? |
| 5580 | presentModes[i] = presentMode |
| 5581 | } |
| 5582 | |
| 5583 | return ? |
| 5584 | } |
| 5585 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5586 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5587 | cmd VkResult vkCreateSwapchainKHR( |
| 5588 | VkDevice device, |
| 5589 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5590 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5591 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5592 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5593 | deviceObject := GetDevice(device) |
| 5594 | |
| 5595 | swapchain := ? |
| 5596 | pSwapchain[0] = swapchain |
| 5597 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 5598 | |
| 5599 | return ? |
| 5600 | } |
| 5601 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5602 | @extension("VK_KHR_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5603 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5604 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5605 | VkSwapchainKHR swapchain, |
| 5606 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5607 | deviceObject := GetDevice(device) |
| 5608 | swapchainObject := GetSwapchain(swapchain) |
| 5609 | assert(swapchainObject.device == device) |
| 5610 | |
| 5611 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5612 | } |
| 5613 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5614 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5615 | cmd VkResult vkGetSwapchainImagesKHR( |
| 5616 | VkDevice device, |
| 5617 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5618 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5619 | VkImage* pSwapchainImages) { |
| 5620 | deviceObject := GetDevice(device) |
| 5621 | |
| 5622 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5623 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5624 | swapchainImages := pSwapchainImages[0:count] |
| 5625 | |
| 5626 | for i in (0 .. count) { |
| 5627 | swapchainImage := ? |
| 5628 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5629 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5630 | } |
| 5631 | |
| 5632 | return ? |
| 5633 | } |
| 5634 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5635 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5636 | cmd VkResult vkAcquireNextImageKHR( |
| 5637 | VkDevice device, |
| 5638 | VkSwapchainKHR swapchain, |
| 5639 | u64 timeout, |
| 5640 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5641 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5642 | u32* pImageIndex) { |
| 5643 | deviceObject := GetDevice(device) |
| 5644 | swapchainObject := GetSwapchain(swapchain) |
| 5645 | |
| 5646 | imageIndex := ? |
| 5647 | pImageIndex[0] = imageIndex |
| 5648 | |
| 5649 | return ? |
| 5650 | } |
| 5651 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5652 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5653 | cmd VkResult vkQueuePresentKHR( |
| 5654 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5655 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5656 | queueObject := GetQueue(queue) |
| 5657 | |
| 5658 | presentInfo := ? |
| 5659 | pPresentInfo[0] = presentInfo |
| 5660 | |
| 5661 | return ? |
| 5662 | } |
| 5663 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5664 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5665 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 5666 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5667 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5668 | VkDisplayPropertiesKHR* pProperties) { |
| 5669 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5670 | return ? |
| 5671 | } |
| 5672 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5673 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5674 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 5675 | VkPhysicalDevice physicalDevice, |
| 5676 | u32* pPropertyCount, |
| 5677 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 5678 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5679 | return ? |
| 5680 | } |
| 5681 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5682 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5683 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 5684 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5685 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5686 | u32* pDisplayCount, |
| 5687 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5688 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5689 | return ? |
| 5690 | } |
| 5691 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5692 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5693 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 5694 | VkPhysicalDevice physicalDevice, |
| 5695 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5696 | u32* pPropertyCount, |
| 5697 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5698 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5699 | return ? |
| 5700 | } |
| 5701 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5702 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5703 | cmd VkResult vkCreateDisplayModeKHR( |
| 5704 | VkPhysicalDevice physicalDevice, |
| 5705 | VkDisplayKHR display, |
| 5706 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5707 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5708 | VkDisplayModeKHR* pMode) { |
| 5709 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5710 | return ? |
| 5711 | } |
| 5712 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5713 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5714 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5715 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5716 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5717 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5718 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5719 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5720 | return ? |
| 5721 | } |
| 5722 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5723 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5724 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 5725 | VkInstance instance, |
| 5726 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5727 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5728 | VkSurfaceKHR* pSurface) { |
| 5729 | return ? |
| 5730 | } |
| 5731 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5732 | @extension("VK_KHR_display_swapchain") |
| 5733 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 5734 | VkDevice device, |
| 5735 | u32 swapchainCount, |
| 5736 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 5737 | const VkAllocationCallbacks* pAllocator, |
| 5738 | VkSwapchainKHR* pSwapchains) { |
| 5739 | return ? |
| 5740 | } |
| 5741 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5742 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5743 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5744 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5745 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5746 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5747 | VkSurfaceKHR* pSurface) { |
| 5748 | instanceObject := GetInstance(instance) |
| 5749 | return ? |
| 5750 | } |
| 5751 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5752 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5753 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 5754 | VkPhysicalDevice physicalDevice, |
| 5755 | u32 queueFamilyIndex, |
| 5756 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5757 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5758 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5759 | return ? |
| 5760 | } |
| 5761 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5762 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5763 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5764 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5765 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5766 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5767 | VkSurfaceKHR* pSurface) { |
| 5768 | instanceObject := GetInstance(instance) |
| 5769 | return ? |
| 5770 | } |
| 5771 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5772 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5773 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 5774 | VkPhysicalDevice physicalDevice, |
| 5775 | u32 queueFamilyIndex, |
| 5776 | platform.xcb_connection_t* connection, |
| 5777 | platform.xcb_visualid_t visual_id) { |
| 5778 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5779 | return ? |
| 5780 | } |
| 5781 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5782 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5783 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 5784 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5785 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5786 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5787 | VkSurfaceKHR* pSurface) { |
| 5788 | instanceObject := GetInstance(instance) |
| 5789 | return ? |
| 5790 | } |
| 5791 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5792 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5793 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 5794 | VkPhysicalDevice physicalDevice, |
| 5795 | u32 queueFamilyIndex, |
| 5796 | platform.wl_display* display) { |
| 5797 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5798 | return ? |
| 5799 | } |
| 5800 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5801 | @extension("VK_KHR_mir_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5802 | cmd VkResult vkCreateMirSurfaceKHR( |
| 5803 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5804 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5805 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5806 | VkSurfaceKHR* pSurface) { |
| 5807 | instanceObject := GetInstance(instance) |
| 5808 | return ? |
| 5809 | } |
| 5810 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5811 | @extension("VK_KHR_mir_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5812 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 5813 | VkPhysicalDevice physicalDevice, |
| 5814 | u32 queueFamilyIndex, |
| 5815 | platform.MirConnection* connection) { |
| 5816 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5817 | return ? |
| 5818 | } |
| 5819 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5820 | @extension("VK_KHR_android_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5821 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 5822 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5823 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5824 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5825 | VkSurfaceKHR* pSurface) { |
| 5826 | instanceObject := GetInstance(instance) |
| 5827 | return ? |
| 5828 | } |
| 5829 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5830 | @extension("VK_KHR_win32_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5831 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 5832 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5833 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5834 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5835 | VkSurfaceKHR* pSurface) { |
| 5836 | instanceObject := GetInstance(instance) |
| 5837 | return ? |
| 5838 | } |
| 5839 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5840 | @extension("VK_KHR_win32_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5841 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 5842 | VkPhysicalDevice physicalDevice, |
| 5843 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5844 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5845 | return ? |
| 5846 | } |
| 5847 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5848 | @extension("VK_ANDROID_native_buffer") |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 5849 | @optional |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5850 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 5851 | VkDevice device, |
| 5852 | VkFormat format, |
| 5853 | VkImageUsageFlags imageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 5854 | s32* grallocUsage) { |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5855 | return ? |
| 5856 | } |
| 5857 | |
| 5858 | @extension("VK_ANDROID_native_buffer") |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 5859 | @optional |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 5860 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 5861 | VkDevice device, |
| 5862 | VkFormat format, |
| 5863 | VkImageUsageFlags imageUsage, |
| 5864 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
Jesse Hall | d1abd74 | 2017-02-09 21:45:51 -0800 | [diff] [blame] | 5865 | u64* grallocConsumerUsage, |
| 5866 | u64* grallocProducerUsage) { |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 5867 | return ? |
| 5868 | } |
| 5869 | |
| 5870 | @extension("VK_ANDROID_native_buffer") |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5871 | cmd VkResult vkAcquireImageANDROID( |
| 5872 | VkDevice device, |
| 5873 | VkImage image, |
| 5874 | int nativeFenceFd, |
| 5875 | VkSemaphore semaphore, |
| 5876 | VkFence fence) { |
| 5877 | return ? |
| 5878 | } |
| 5879 | |
| 5880 | @extension("VK_ANDROID_native_buffer") |
| 5881 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 5882 | VkQueue queue, |
| 5883 | u32 waitSemaphoreCount, |
| 5884 | const VkSemaphore* pWaitSemaphores, |
| 5885 | VkImage image, |
| 5886 | int* pNativeFenceFd) { |
| 5887 | return ? |
| 5888 | } |
| 5889 | |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 5890 | @extension("VK_GOOGLE_display_timing") |
| 5891 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( |
| 5892 | VkDevice device, |
| 5893 | VkSwapchainKHR swapchain, |
| 5894 | VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { |
| 5895 | deviceObject := GetDevice(device) |
| 5896 | swapchainObject := GetSwapchain(swapchain) |
| 5897 | |
| 5898 | displayTimingProperties := ? |
| 5899 | pDisplayTimingProperties[0] = displayTimingProperties |
| 5900 | |
| 5901 | return ? |
| 5902 | } |
| 5903 | |
| 5904 | @extension("VK_GOOGLE_display_timing") |
| 5905 | cmd VkResult vkGetPastPresentationTimingGOOGLE( |
| 5906 | VkDevice device, |
| 5907 | VkSwapchainKHR swapchain, |
| 5908 | u32* pPresentationTimingCount, |
| 5909 | VkPastPresentationTimingGOOGLE* pPresentationTimings) { |
Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 5910 | return ? |
| 5911 | } |
| 5912 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5913 | @extension("VK_EXT_debug_report") |
| 5914 | @external type void* PFN_vkDebugReportCallbackEXT |
| 5915 | @extension("VK_EXT_debug_report") |
| 5916 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 5917 | VkDebugReportFlagsEXT flags, |
| 5918 | VkDebugReportObjectTypeEXT objectType, |
| 5919 | u64 object, |
| 5920 | platform.size_t location, |
| 5921 | s32 messageCode, |
| 5922 | const char* pLayerPrefix, |
| 5923 | const char* pMessage, |
| 5924 | void* pUserData) { |
| 5925 | return ? |
| 5926 | } |
| 5927 | |
| 5928 | @extension("VK_EXT_debug_report") |
| 5929 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 5930 | VkInstance instance, |
| 5931 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 5932 | const VkAllocationCallbacks* pAllocator, |
| 5933 | VkDebugReportCallbackEXT* pCallback) { |
| 5934 | return ? |
| 5935 | } |
| 5936 | |
| 5937 | @extension("VK_EXT_debug_report") |
| 5938 | cmd void vkDestroyDebugReportCallbackEXT( |
| 5939 | VkInstance instance, |
| 5940 | VkDebugReportCallbackEXT callback, |
| 5941 | const VkAllocationCallbacks* pAllocator) { |
| 5942 | } |
| 5943 | |
| 5944 | @extension("VK_EXT_debug_report") |
| 5945 | cmd void vkDebugReportMessageEXT( |
| 5946 | VkInstance instance, |
| 5947 | VkDebugReportFlagsEXT flags, |
| 5948 | VkDebugReportObjectTypeEXT objectType, |
| 5949 | u64 object, |
| 5950 | platform.size_t location, |
| 5951 | s32 messageCode, |
| 5952 | const char* pLayerPrefix, |
| 5953 | const char* pMessage) { |
| 5954 | } |
| 5955 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5956 | @extension("VK_EXT_debug_marker") |
| 5957 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 5958 | VkDevice device, |
| 5959 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 5960 | return ? |
| 5961 | } |
| 5962 | |
| 5963 | @extension("VK_EXT_debug_marker") |
| 5964 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 5965 | VkDevice device, |
| 5966 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 5967 | return ? |
| 5968 | } |
| 5969 | |
| 5970 | @extension("VK_EXT_debug_marker") |
| 5971 | cmd void vkCmdDebugMarkerBeginEXT( |
| 5972 | VkCommandBuffer commandBuffer, |
| 5973 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5974 | } |
| 5975 | |
| 5976 | @extension("VK_EXT_debug_marker") |
| 5977 | cmd void vkCmdDebugMarkerEndEXT( |
| 5978 | VkCommandBuffer commandBuffer) { |
| 5979 | } |
| 5980 | |
| 5981 | @extension("VK_EXT_debug_marker") |
| 5982 | cmd void vkCmdDebugMarkerInsertEXT( |
| 5983 | VkCommandBuffer commandBuffer, |
| 5984 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5985 | } |
| 5986 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 5987 | @extension("VK_AMD_draw_indirect_count") |
| 5988 | cmd void vkCmdDrawIndirectCountAMD( |
| 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_AMD_draw_indirect_count") |
| 5999 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 6000 | VkCommandBuffer commandBuffer, |
| 6001 | VkBuffer buffer, |
| 6002 | VkDeviceSize offset, |
| 6003 | VkBuffer countBuffer, |
| 6004 | VkDeviceSize countBufferOffset, |
| 6005 | u32 maxDrawCount, |
| 6006 | u32 stride) { |
| 6007 | } |
| 6008 | |
| 6009 | @extension("VK_NV_external_memory_capabilities") |
| 6010 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 6011 | VkPhysicalDevice physicalDevice, |
| 6012 | VkFormat format, |
| 6013 | VkImageType type, |
| 6014 | VkImageTiling tiling, |
| 6015 | VkImageUsageFlags usage, |
| 6016 | VkImageCreateFlags flags, |
| 6017 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 6018 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 6019 | return ? |
| 6020 | } |
| 6021 | |
| 6022 | @extension("VK_NV_external_memory_win32") |
| 6023 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 6024 | VkDevice device, |
| 6025 | VkDeviceMemory memory, |
| 6026 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6027 | platform.HANDLE* pHandle) { |
| 6028 | return ? |
| 6029 | } |
| 6030 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 6031 | @extension("VK_KHR_get_physical_device_properties2") |
| 6032 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 6033 | VkPhysicalDevice physicalDevice, |
| 6034 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 6035 | } |
| 6036 | |
| 6037 | @extension("VK_KHR_get_physical_device_properties2") |
| 6038 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 6039 | VkPhysicalDevice physicalDevice, |
| 6040 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 6041 | } |
| 6042 | |
| 6043 | @extension("VK_KHR_get_physical_device_properties2") |
| 6044 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 6045 | VkPhysicalDevice physicalDevice, |
| 6046 | VkFormat format, |
| 6047 | VkFormatProperties2KHR* pFormatProperties) { |
| 6048 | } |
| 6049 | |
| 6050 | @extension("VK_KHR_get_physical_device_properties2") |
| 6051 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 6052 | VkPhysicalDevice physicalDevice, |
| 6053 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 6054 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 6055 | return ? |
| 6056 | } |
| 6057 | |
| 6058 | @extension("VK_KHR_get_physical_device_properties2") |
| 6059 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 6060 | VkPhysicalDevice physicalDevice, |
| 6061 | u32* pQueueFamilyPropertyCount, |
| 6062 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 6063 | } |
| 6064 | |
| 6065 | @extension("VK_KHR_get_physical_device_properties2") |
| 6066 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 6067 | VkPhysicalDevice physicalDevice, |
| 6068 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 6069 | } |
| 6070 | |
| 6071 | @extension("VK_KHR_get_physical_device_properties2") |
| 6072 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 6073 | VkPhysicalDevice physicalDevice, |
| 6074 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 6075 | u32* pPropertyCount, |
| 6076 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 6077 | } |
| 6078 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6079 | @extension("VK_NVX_device_generated_commands") |
| 6080 | cmd void vkCmdProcessCommandsNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6081 | VkCommandBuffer commandBuffer, |
| 6082 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 6083 | } |
| 6084 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6085 | @extension("VK_NVX_device_generated_commands") |
| 6086 | cmd void vkCmdReserveSpaceForCommandsNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6087 | VkCommandBuffer commandBuffer, |
| 6088 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 6089 | } |
| 6090 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6091 | @extension("VK_NVX_device_generated_commands") |
| 6092 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6093 | VkDevice device, |
| 6094 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 6095 | const VkAllocationCallbacks* pAllocator, |
| 6096 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 6097 | return ? |
| 6098 | } |
| 6099 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6100 | @extension("VK_NVX_device_generated_commands") |
| 6101 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6102 | VkDevice device, |
| 6103 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 6104 | const VkAllocationCallbacks* pAllocator) { |
| 6105 | } |
| 6106 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6107 | @extension("VK_NVX_device_generated_commands") |
| 6108 | cmd VkResult vkCreateObjectTableNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6109 | VkDevice device, |
| 6110 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 6111 | const VkAllocationCallbacks* pAllocator, |
| 6112 | VkObjectTableNVX* pObjectTable) { |
| 6113 | return ? |
| 6114 | } |
| 6115 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6116 | @extension("VK_NVX_device_generated_commands") |
| 6117 | cmd void vkDestroyObjectTableNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6118 | VkDevice device, |
| 6119 | VkObjectTableNVX objectTable, |
| 6120 | const VkAllocationCallbacks* pAllocator) { |
| 6121 | } |
| 6122 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6123 | @extension("VK_NVX_device_generated_commands") |
| 6124 | cmd VkResult vkRegisterObjectsNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6125 | VkDevice device, |
| 6126 | VkObjectTableNVX objectTable, |
| 6127 | u32 objectCount, |
| 6128 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 6129 | const u32* pObjectIndices) { |
| 6130 | return ? |
| 6131 | } |
| 6132 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6133 | @extension("VK_NVX_device_generated_commands") |
| 6134 | cmd VkResult vkUnregisterObjectsNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6135 | VkDevice device, |
| 6136 | VkObjectTableNVX objectTable, |
| 6137 | u32 objectCount, |
| 6138 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 6139 | const u32* pObjectIndices) { |
| 6140 | return ? |
| 6141 | } |
| 6142 | |
Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 6143 | @extension("VK_NVX_device_generated_commands") |
| 6144 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6145 | VkPhysicalDevice physicalDevice, |
| 6146 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 6147 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 6148 | } |
| 6149 | |
Jesse Hall | 889cd9a | 2017-02-25 22:12:23 -0800 | [diff] [blame] | 6150 | @extension("VK_EXT_hdr_metadata") |
| 6151 | cmd void vkSetHdrMetadataEXT( |
| 6152 | VkDevice device, |
| 6153 | u32 swapchainCount, |
| 6154 | const VkSwapchainKHR* pSwapchains, |
| 6155 | const VkHdrMetadataEXT* pMetadata) { |
| 6156 | } |
| 6157 | |
Chris Forbes | 1d5f68c | 2017-01-31 10:17:01 +1300 | [diff] [blame] | 6158 | @extension("VK_KHR_shared_presentable_image") |
Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 6159 | cmd VkResult vkGetSwapchainStatusKHR( |
| 6160 | VkDevice device, |
| 6161 | VkSwapchainKHR swapchain) { |
| 6162 | return ? |
| 6163 | } |
| 6164 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6165 | //////////////// |
| 6166 | // Validation // |
| 6167 | //////////////// |
| 6168 | |
| 6169 | extern void validate(string layerName, bool condition, string message) |
| 6170 | |
| 6171 | |
| 6172 | ///////////////////////////// |
| 6173 | // Internal State Tracking // |
| 6174 | ///////////////////////////// |
| 6175 | |
| 6176 | StateObject State |
| 6177 | |
| 6178 | @internal class StateObject { |
| 6179 | // Dispatchable objects. |
| 6180 | map!(VkInstance, ref!InstanceObject) Instances |
| 6181 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 6182 | map!(VkDevice, ref!DeviceObject) Devices |
| 6183 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6184 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6185 | |
| 6186 | // Non-dispatchable objects. |
| 6187 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 6188 | map!(VkBuffer, ref!BufferObject) Buffers |
| 6189 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 6190 | map!(VkImage, ref!ImageObject) Images |
| 6191 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6192 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6193 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 6194 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 6195 | map!(VkSampler, ref!SamplerObject) Samplers |
| 6196 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 6197 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 6198 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6199 | map!(VkFence, ref!FenceObject) Fences |
| 6200 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 6201 | map!(VkEvent, ref!EventObject) Events |
| 6202 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 6203 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 6204 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 6205 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6206 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6207 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6208 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6209 | } |
| 6210 | |
| 6211 | @internal class InstanceObject { |
| 6212 | } |
| 6213 | |
| 6214 | @internal class PhysicalDeviceObject { |
| 6215 | VkInstance instance |
| 6216 | } |
| 6217 | |
| 6218 | @internal class DeviceObject { |
| 6219 | VkPhysicalDevice physicalDevice |
| 6220 | } |
| 6221 | |
| 6222 | @internal class QueueObject { |
| 6223 | VkDevice device |
| 6224 | VkQueueFlags flags |
| 6225 | } |
| 6226 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6227 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6228 | VkDevice device |
| 6229 | map!(u64, VkDeviceMemory) boundObjects |
| 6230 | VkQueueFlags queueFlags |
| 6231 | } |
| 6232 | |
| 6233 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6234 | VkDevice device |
| 6235 | VkDeviceSize allocationSize |
| 6236 | map!(u64, VkDeviceSize) boundObjects |
| 6237 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6238 | } |
| 6239 | |
| 6240 | @internal class BufferObject { |
| 6241 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6242 | VkDeviceMemory memory |
| 6243 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6244 | } |
| 6245 | |
| 6246 | @internal class BufferViewObject { |
| 6247 | VkDevice device |
| 6248 | VkBuffer buffer |
| 6249 | } |
| 6250 | |
| 6251 | @internal class ImageObject { |
| 6252 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6253 | VkDeviceMemory memory |
| 6254 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6255 | } |
| 6256 | |
| 6257 | @internal class ImageViewObject { |
| 6258 | VkDevice device |
| 6259 | VkImage image |
| 6260 | } |
| 6261 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6262 | @internal class ShaderObject { |
| 6263 | VkDevice device |
| 6264 | } |
| 6265 | |
| 6266 | @internal class ShaderModuleObject { |
| 6267 | VkDevice device |
| 6268 | } |
| 6269 | |
| 6270 | @internal class PipelineObject { |
| 6271 | VkDevice device |
| 6272 | } |
| 6273 | |
| 6274 | @internal class PipelineLayoutObject { |
| 6275 | VkDevice device |
| 6276 | } |
| 6277 | |
| 6278 | @internal class SamplerObject { |
| 6279 | VkDevice device |
| 6280 | } |
| 6281 | |
| 6282 | @internal class DescriptorSetObject { |
| 6283 | VkDevice device |
| 6284 | } |
| 6285 | |
| 6286 | @internal class DescriptorSetLayoutObject { |
| 6287 | VkDevice device |
| 6288 | } |
| 6289 | |
| 6290 | @internal class DescriptorPoolObject { |
| 6291 | VkDevice device |
| 6292 | } |
| 6293 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6294 | @internal class FenceObject { |
| 6295 | VkDevice device |
| 6296 | bool signaled |
| 6297 | } |
| 6298 | |
| 6299 | @internal class SemaphoreObject { |
| 6300 | VkDevice device |
| 6301 | } |
| 6302 | |
| 6303 | @internal class EventObject { |
| 6304 | VkDevice device |
| 6305 | } |
| 6306 | |
| 6307 | @internal class QueryPoolObject { |
| 6308 | VkDevice device |
| 6309 | } |
| 6310 | |
| 6311 | @internal class FramebufferObject { |
| 6312 | VkDevice device |
| 6313 | } |
| 6314 | |
| 6315 | @internal class RenderPassObject { |
| 6316 | VkDevice device |
| 6317 | } |
| 6318 | |
| 6319 | @internal class PipelineCacheObject { |
| 6320 | VkDevice device |
| 6321 | } |
| 6322 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6323 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6324 | VkDevice device |
| 6325 | } |
| 6326 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6327 | @internal class SurfaceObject { |
| 6328 | VkInstance instance |
| 6329 | } |
| 6330 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6331 | @internal class SwapchainObject { |
| 6332 | VkDevice device |
| 6333 | } |
| 6334 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6335 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 6336 | assert(instance in State.Instances) |
| 6337 | return State.Instances[instance] |
| 6338 | } |
| 6339 | |
| 6340 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 6341 | assert(physicalDevice in State.PhysicalDevices) |
| 6342 | return State.PhysicalDevices[physicalDevice] |
| 6343 | } |
| 6344 | |
| 6345 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 6346 | assert(device in State.Devices) |
| 6347 | return State.Devices[device] |
| 6348 | } |
| 6349 | |
| 6350 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 6351 | assert(queue in State.Queues) |
| 6352 | return State.Queues[queue] |
| 6353 | } |
| 6354 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6355 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 6356 | assert(commandBuffer in State.CommandBuffers) |
| 6357 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6358 | } |
| 6359 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6360 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 6361 | assert(memory in State.DeviceMemories) |
| 6362 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6363 | } |
| 6364 | |
| 6365 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 6366 | assert(buffer in State.Buffers) |
| 6367 | return State.Buffers[buffer] |
| 6368 | } |
| 6369 | |
| 6370 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 6371 | assert(bufferView in State.BufferViews) |
| 6372 | return State.BufferViews[bufferView] |
| 6373 | } |
| 6374 | |
| 6375 | macro ref!ImageObject GetImage(VkImage image) { |
| 6376 | assert(image in State.Images) |
| 6377 | return State.Images[image] |
| 6378 | } |
| 6379 | |
| 6380 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 6381 | assert(imageView in State.ImageViews) |
| 6382 | return State.ImageViews[imageView] |
| 6383 | } |
| 6384 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6385 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 6386 | assert(shaderModule in State.ShaderModules) |
| 6387 | return State.ShaderModules[shaderModule] |
| 6388 | } |
| 6389 | |
| 6390 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 6391 | assert(pipeline in State.Pipelines) |
| 6392 | return State.Pipelines[pipeline] |
| 6393 | } |
| 6394 | |
| 6395 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 6396 | assert(pipelineLayout in State.PipelineLayouts) |
| 6397 | return State.PipelineLayouts[pipelineLayout] |
| 6398 | } |
| 6399 | |
| 6400 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 6401 | assert(sampler in State.Samplers) |
| 6402 | return State.Samplers[sampler] |
| 6403 | } |
| 6404 | |
| 6405 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 6406 | assert(descriptorSet in State.DescriptorSets) |
| 6407 | return State.DescriptorSets[descriptorSet] |
| 6408 | } |
| 6409 | |
| 6410 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 6411 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 6412 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 6413 | } |
| 6414 | |
| 6415 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 6416 | assert(descriptorPool in State.DescriptorPools) |
| 6417 | return State.DescriptorPools[descriptorPool] |
| 6418 | } |
| 6419 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6420 | macro ref!FenceObject GetFence(VkFence fence) { |
| 6421 | assert(fence in State.Fences) |
| 6422 | return State.Fences[fence] |
| 6423 | } |
| 6424 | |
| 6425 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 6426 | assert(semaphore in State.Semaphores) |
| 6427 | return State.Semaphores[semaphore] |
| 6428 | } |
| 6429 | |
| 6430 | macro ref!EventObject GetEvent(VkEvent event) { |
| 6431 | assert(event in State.Events) |
| 6432 | return State.Events[event] |
| 6433 | } |
| 6434 | |
| 6435 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 6436 | assert(queryPool in State.QueryPools) |
| 6437 | return State.QueryPools[queryPool] |
| 6438 | } |
| 6439 | |
| 6440 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 6441 | assert(framebuffer in State.Framebuffers) |
| 6442 | return State.Framebuffers[framebuffer] |
| 6443 | } |
| 6444 | |
| 6445 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 6446 | assert(renderPass in State.RenderPasses) |
| 6447 | return State.RenderPasses[renderPass] |
| 6448 | } |
| 6449 | |
| 6450 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 6451 | assert(pipelineCache in State.PipelineCaches) |
| 6452 | return State.PipelineCaches[pipelineCache] |
| 6453 | } |
| 6454 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6455 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 6456 | assert(commandPool in State.CommandPools) |
| 6457 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6458 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6459 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6460 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 6461 | assert(surface in State.Surfaces) |
| 6462 | return State.Surfaces[surface] |
| 6463 | } |
| 6464 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6465 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 6466 | assert(swapchain in State.Swapchains) |
| 6467 | return State.Swapchains[swapchain] |
| 6468 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6469 | |
| 6470 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 6471 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 6472 | } |