| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1 | // Copyright (c) 2015 The Khronos Group Inc. | 
|  | 2 | // | 
|  | 3 | // Permission is hereby granted, free of charge, to any person obtaining a | 
|  | 4 | // copy of this software and/or associated documentation files (the | 
|  | 5 | // "Materials"), to deal in the Materials without restriction, including | 
|  | 6 | // without limitation the rights to use, copy, modify, merge, publish, | 
|  | 7 | // distribute, sublicense, and/or sell copies of the Materials, and to | 
|  | 8 | // permit persons to whom the Materials are furnished to do so, subject to | 
|  | 9 | // the following conditions: | 
|  | 10 | // | 
|  | 11 | // The above copyright notice and this permission notice shall be included | 
|  | 12 | // in all copies or substantial portions of the Materials. | 
|  | 13 | // | 
|  | 14 | // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | 
|  | 15 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | 
|  | 16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 
|  | 17 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | 
|  | 18 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | 
|  | 19 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 
|  | 20 | // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | 
|  | 21 |  | 
|  | 22 | import platform "platform.api" | 
|  | 23 |  | 
|  | 24 | /////////////// | 
|  | 25 | // Constants // | 
|  | 26 | /////////////// | 
|  | 27 |  | 
|  | 28 | // API version (major.minor.patch) | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 29 | define VERSION_MAJOR 1 | 
|  | 30 | define VERSION_MINOR 0 | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [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 | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 89 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION     5 | 
|  | 90 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME             "VK_ANDROID_native_buffer" | 
|  | 91 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 92 | // 12 | 
|  | 93 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION       4 | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 94 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME               "VK_EXT_debug_report" | 
|  | 95 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 96 | // 13 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 97 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION           1 | 
|  | 98 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME                   "VK_NV_glsl_shader" | 
|  | 99 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 100 | // 15 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 101 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION   1 | 
|  | 102 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME           "VK_KHR_sampler_mirror_clamp_to_edge" | 
|  | 103 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 104 | // 16 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 105 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION       1 | 
|  | 106 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME               "VK_IMG_filter_cubic" | 
|  | 107 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 108 | // 19 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 109 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION   1 | 
|  | 110 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME           "VK_AMD_rasterization_order" | 
|  | 111 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 112 | // 21 | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 113 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 | 
|  | 114 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" | 
|  | 115 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 116 | // 22 | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 117 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 | 
|  | 118 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" | 
|  | 119 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 120 | // 23 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 121 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION       3 | 
|  | 122 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME               "VK_EXT_debug_marker" | 
|  | 123 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 124 | // 26 | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 125 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 | 
|  | 126 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" | 
|  | 127 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 128 | // 27 | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 129 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 | 
|  | 130 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" | 
|  | 131 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 132 | // 28 | 
|  | 133 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 | 
|  | 134 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" | 
|  | 135 |  | 
|  | 136 | // 34 | 
|  | 137 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 | 
|  | 138 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" | 
|  | 139 |  | 
|  | 140 | // 36 | 
|  | 141 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 | 
|  | 142 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" | 
|  | 143 |  | 
|  | 144 | // 37 | 
|  | 145 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 | 
|  | 146 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" | 
|  | 147 |  | 
|  | 148 | // 38 | 
|  | 149 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 | 
|  | 150 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" | 
|  | 151 |  | 
|  | 152 | // 56 | 
|  | 153 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 | 
|  | 154 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" | 
|  | 155 |  | 
|  | 156 | // 57 | 
|  | 157 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 | 
|  | 158 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" | 
|  | 159 |  | 
|  | 160 | // 58 | 
|  | 161 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 | 
|  | 162 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" | 
|  | 163 |  | 
|  | 164 | // 59 | 
|  | 165 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 | 
|  | 166 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" | 
|  | 167 |  | 
|  | 168 | // 62 | 
|  | 169 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 | 
|  | 170 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" | 
|  | 171 |  | 
|  | 172 | // 87 | 
|  | 173 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 | 
|  | 174 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" | 
|  | 175 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 176 |  | 
|  | 177 | ///////////// | 
|  | 178 | //  Types  // | 
|  | 179 | ///////////// | 
|  | 180 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 181 | type u32 VkBool32 | 
|  | 182 | type u32 VkFlags | 
|  | 183 | type u64 VkDeviceSize | 
|  | 184 | type u32 VkSampleMask | 
|  | 185 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 186 | /// Dispatchable handle types. | 
|  | 187 | @dispatchHandle type u64 VkInstance | 
|  | 188 | @dispatchHandle type u64 VkPhysicalDevice | 
|  | 189 | @dispatchHandle type u64 VkDevice | 
|  | 190 | @dispatchHandle type u64 VkQueue | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 191 | @dispatchHandle type u64 VkCommandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 192 |  | 
|  | 193 | /// Non dispatchable handle types. | 
|  | 194 | @nonDispatchHandle type u64 VkDeviceMemory | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 195 | @nonDispatchHandle type u64 VkCommandPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 196 | @nonDispatchHandle type u64 VkBuffer | 
|  | 197 | @nonDispatchHandle type u64 VkBufferView | 
|  | 198 | @nonDispatchHandle type u64 VkImage | 
|  | 199 | @nonDispatchHandle type u64 VkImageView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 200 | @nonDispatchHandle type u64 VkShaderModule | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 201 | @nonDispatchHandle type u64 VkPipeline | 
|  | 202 | @nonDispatchHandle type u64 VkPipelineLayout | 
|  | 203 | @nonDispatchHandle type u64 VkSampler | 
|  | 204 | @nonDispatchHandle type u64 VkDescriptorSet | 
|  | 205 | @nonDispatchHandle type u64 VkDescriptorSetLayout | 
|  | 206 | @nonDispatchHandle type u64 VkDescriptorPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 207 | @nonDispatchHandle type u64 VkFence | 
|  | 208 | @nonDispatchHandle type u64 VkSemaphore | 
|  | 209 | @nonDispatchHandle type u64 VkEvent | 
|  | 210 | @nonDispatchHandle type u64 VkQueryPool | 
|  | 211 | @nonDispatchHandle type u64 VkFramebuffer | 
|  | 212 | @nonDispatchHandle type u64 VkRenderPass | 
|  | 213 | @nonDispatchHandle type u64 VkPipelineCache | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 214 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 215 | @extension("VK_KHR_surface")    @nonDispatchHandle type u64 VkSurfaceKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 216 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 217 | @extension("VK_KHR_swapchain")  @nonDispatchHandle type u64 VkSwapchainKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 218 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 219 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayKHR | 
|  | 220 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayModeKHR | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 221 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 222 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT | 
|  | 223 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 224 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX | 
|  | 225 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX | 
|  | 226 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 227 |  | 
|  | 228 | ///////////// | 
|  | 229 | //  Enums  // | 
|  | 230 | ///////////// | 
|  | 231 |  | 
|  | 232 | enum VkImageLayout { | 
|  | 233 | VK_IMAGE_LAYOUT_UNDEFINED                               = 0x00000000,   /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) | 
|  | 234 | VK_IMAGE_LAYOUT_GENERAL                                 = 0x00000001,   /// General layout when image can be used for any kind of access | 
|  | 235 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL                = 0x00000002,   /// Optimal layout when image is only used for color attachment read/write | 
|  | 236 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL        = 0x00000003,   /// Optimal layout when image is only used for depth/stencil attachment read/write | 
|  | 237 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL         = 0x00000004,   /// Optimal layout when image is used for read only depth/stencil attachment and shader access | 
|  | 238 | 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] | 239 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL                    = 0x00000006,   /// Optimal layout when image is used only as source of transfer operations | 
|  | 240 | 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] | 241 | 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] | 242 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 243 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 244 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR                         = 1000001002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 245 | } | 
|  | 246 |  | 
|  | 247 | enum VkAttachmentLoadOp { | 
|  | 248 | VK_ATTACHMENT_LOAD_OP_LOAD                              = 0x00000000, | 
|  | 249 | VK_ATTACHMENT_LOAD_OP_CLEAR                             = 0x00000001, | 
|  | 250 | VK_ATTACHMENT_LOAD_OP_DONT_CARE                         = 0x00000002, | 
|  | 251 | } | 
|  | 252 |  | 
|  | 253 | enum VkAttachmentStoreOp { | 
|  | 254 | VK_ATTACHMENT_STORE_OP_STORE                            = 0x00000000, | 
|  | 255 | VK_ATTACHMENT_STORE_OP_DONT_CARE                        = 0x00000001, | 
|  | 256 | } | 
|  | 257 |  | 
|  | 258 | enum VkImageType { | 
|  | 259 | VK_IMAGE_TYPE_1D                                        = 0x00000000, | 
|  | 260 | VK_IMAGE_TYPE_2D                                        = 0x00000001, | 
|  | 261 | VK_IMAGE_TYPE_3D                                        = 0x00000002, | 
|  | 262 | } | 
|  | 263 |  | 
|  | 264 | enum VkImageTiling { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 265 | VK_IMAGE_TILING_OPTIMAL                                 = 0x00000000, | 
|  | 266 | VK_IMAGE_TILING_LINEAR                                  = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 267 | } | 
|  | 268 |  | 
|  | 269 | enum VkImageViewType { | 
|  | 270 | VK_IMAGE_VIEW_TYPE_1D                                   = 0x00000000, | 
|  | 271 | VK_IMAGE_VIEW_TYPE_2D                                   = 0x00000001, | 
|  | 272 | VK_IMAGE_VIEW_TYPE_3D                                   = 0x00000002, | 
|  | 273 | VK_IMAGE_VIEW_TYPE_CUBE                                 = 0x00000003, | 
|  | 274 | VK_IMAGE_VIEW_TYPE_1D_ARRAY                             = 0x00000004, | 
|  | 275 | VK_IMAGE_VIEW_TYPE_2D_ARRAY                             = 0x00000005, | 
|  | 276 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY                           = 0x00000006, | 
|  | 277 | } | 
|  | 278 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 279 | enum VkCommandBufferLevel { | 
|  | 280 | VK_COMMAND_BUFFER_LEVEL_PRIMARY                         = 0x00000000, | 
|  | 281 | VK_COMMAND_BUFFER_LEVEL_SECONDARY                       = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 282 | } | 
|  | 283 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 284 | enum VkComponentSwizzle { | 
|  | 285 | VK_COMPONENT_SWIZZLE_IDENTITY                           = 0x00000000, | 
|  | 286 | VK_COMPONENT_SWIZZLE_ZERO                               = 0x00000001, | 
|  | 287 | VK_COMPONENT_SWIZZLE_ONE                                = 0x00000002, | 
|  | 288 | VK_COMPONENT_SWIZZLE_R                                  = 0x00000003, | 
|  | 289 | VK_COMPONENT_SWIZZLE_G                                  = 0x00000004, | 
|  | 290 | VK_COMPONENT_SWIZZLE_B                                  = 0x00000005, | 
|  | 291 | VK_COMPONENT_SWIZZLE_A                                  = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 292 | } | 
|  | 293 |  | 
|  | 294 | enum VkDescriptorType { | 
|  | 295 | VK_DESCRIPTOR_TYPE_SAMPLER                              = 0x00000000, | 
|  | 296 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER               = 0x00000001, | 
|  | 297 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE                        = 0x00000002, | 
|  | 298 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE                        = 0x00000003, | 
|  | 299 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER                 = 0x00000004, | 
|  | 300 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER                 = 0x00000005, | 
|  | 301 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER                       = 0x00000006, | 
|  | 302 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER                       = 0x00000007, | 
|  | 303 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC               = 0x00000008, | 
|  | 304 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC               = 0x00000009, | 
|  | 305 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT                     = 0x0000000a, | 
|  | 306 | } | 
|  | 307 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 308 | enum VkQueryType { | 
|  | 309 | VK_QUERY_TYPE_OCCLUSION                                 = 0x00000000, | 
|  | 310 | VK_QUERY_TYPE_PIPELINE_STATISTICS                       = 0x00000001, /// Optional | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 311 | VK_QUERY_TYPE_TIMESTAMP                                 = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 312 | } | 
|  | 313 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 314 | enum VkBorderColor { | 
|  | 315 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK                 = 0x00000000, | 
|  | 316 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK                   = 0x00000001, | 
|  | 317 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK                      = 0x00000002, | 
|  | 318 | VK_BORDER_COLOR_INT_OPAQUE_BLACK                        = 0x00000003, | 
|  | 319 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE                      = 0x00000004, | 
|  | 320 | VK_BORDER_COLOR_INT_OPAQUE_WHITE                        = 0x00000005, | 
|  | 321 | } | 
|  | 322 |  | 
|  | 323 | enum VkPipelineBindPoint { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 324 | VK_PIPELINE_BIND_POINT_GRAPHICS                         = 0x00000000, | 
|  | 325 | VK_PIPELINE_BIND_POINT_COMPUTE                          = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 326 | } | 
|  | 327 |  | 
|  | 328 | enum VkPrimitiveTopology { | 
|  | 329 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST                        = 0x00000000, | 
|  | 330 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST                         = 0x00000001, | 
|  | 331 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP                        = 0x00000002, | 
|  | 332 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST                     = 0x00000003, | 
|  | 333 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP                    = 0x00000004, | 
|  | 334 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN                      = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 335 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY          = 0x00000006, | 
|  | 336 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY         = 0x00000007, | 
|  | 337 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY      = 0x00000008, | 
|  | 338 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY     = 0x00000009, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 339 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST                        = 0x0000000a, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 340 | } | 
|  | 341 |  | 
|  | 342 | enum VkSharingMode { | 
|  | 343 | VK_SHARING_MODE_EXCLUSIVE                               = 0x00000000, | 
|  | 344 | VK_SHARING_MODE_CONCURRENT                              = 0x00000001, | 
|  | 345 | } | 
|  | 346 |  | 
|  | 347 | enum VkIndexType { | 
|  | 348 | VK_INDEX_TYPE_UINT16                                    = 0x00000000, | 
|  | 349 | VK_INDEX_TYPE_UINT32                                    = 0x00000001, | 
|  | 350 | } | 
|  | 351 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 352 | enum VkFilter { | 
|  | 353 | VK_FILTER_NEAREST                                       = 0x00000000, | 
|  | 354 | VK_FILTER_LINEAR                                        = 0x00000001, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 355 |  | 
|  | 356 | //@extension("VK_IMG_filter_cubic") | 
|  | 357 | VK_FILTER_CUBIC_IMG                                     = 1000015000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 358 | } | 
|  | 359 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 360 | enum VkSamplerMipmapMode { | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 361 | VK_SAMPLER_MIPMAP_MODE_NEAREST                          = 0x00000001,   /// Choose nearest mip level | 
|  | 362 | VK_SAMPLER_MIPMAP_MODE_LINEAR                           = 0x00000002,   /// Linear filter between mip levels | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 363 | } | 
|  | 364 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 365 | enum VkSamplerAddressMode { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 366 | VK_SAMPLER_ADDRESS_MODE_REPEAT                          = 0x00000000, | 
|  | 367 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT                 = 0x00000001, | 
|  | 368 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE                   = 0x00000002, | 
|  | 369 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER                 = 0x00000003, | 
|  | 370 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 371 | } | 
|  | 372 |  | 
|  | 373 | enum VkCompareOp { | 
|  | 374 | VK_COMPARE_OP_NEVER                                     = 0x00000000, | 
|  | 375 | VK_COMPARE_OP_LESS                                      = 0x00000001, | 
|  | 376 | VK_COMPARE_OP_EQUAL                                     = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 377 | VK_COMPARE_OP_LESS_OR_EQUAL                             = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 378 | VK_COMPARE_OP_GREATER                                   = 0x00000004, | 
|  | 379 | VK_COMPARE_OP_NOT_EQUAL                                 = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 380 | VK_COMPARE_OP_GREATER_OR_EQUAL                          = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 381 | VK_COMPARE_OP_ALWAYS                                    = 0x00000007, | 
|  | 382 | } | 
|  | 383 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 384 | enum VkPolygonMode { | 
|  | 385 | VK_POLYGON_MODE_FILL                                    = 0x00000000, | 
|  | 386 | VK_POLYGON_MODE_LINE                                    = 0x00000001, | 
|  | 387 | VK_POLYGON_MODE_POINT                                   = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 388 | } | 
|  | 389 |  | 
|  | 390 | enum VkFrontFace { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 391 | VK_FRONT_FACE_COUNTER_CLOCKWISE                         = 0x00000000, | 
|  | 392 | VK_FRONT_FACE_CLOCKWISE                                 = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 393 | } | 
|  | 394 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 395 | enum VkBlendFactor { | 
|  | 396 | VK_BLEND_FACTOR_ZERO                                    = 0x00000000, | 
|  | 397 | VK_BLEND_FACTOR_ONE                                     = 0x00000001, | 
|  | 398 | VK_BLEND_FACTOR_SRC_COLOR                               = 0x00000002, | 
|  | 399 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR                     = 0x00000003, | 
|  | 400 | VK_BLEND_FACTOR_DST_COLOR                               = 0x00000004, | 
|  | 401 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR                     = 0x00000005, | 
|  | 402 | VK_BLEND_FACTOR_SRC_ALPHA                               = 0x00000006, | 
|  | 403 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA                     = 0x00000007, | 
|  | 404 | VK_BLEND_FACTOR_DST_ALPHA                               = 0x00000008, | 
|  | 405 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA                     = 0x00000009, | 
|  | 406 | VK_BLEND_FACTOR_CONSTANT_COLOR                          = 0x0000000a, | 
|  | 407 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR                = 0x0000000b, | 
|  | 408 | VK_BLEND_FACTOR_CONSTANT_ALPHA                          = 0x0000000c, | 
|  | 409 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA                = 0x0000000d, | 
|  | 410 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE                      = 0x0000000e, | 
|  | 411 | VK_BLEND_FACTOR_SRC1_COLOR                              = 0x0000000f, | 
|  | 412 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR                    = 0x00000010, | 
|  | 413 | VK_BLEND_FACTOR_SRC1_ALPHA                              = 0x00000011, | 
|  | 414 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA                    = 0x00000012, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 415 | } | 
|  | 416 |  | 
|  | 417 | enum VkBlendOp { | 
|  | 418 | VK_BLEND_OP_ADD                                         = 0x00000000, | 
|  | 419 | VK_BLEND_OP_SUBTRACT                                    = 0x00000001, | 
|  | 420 | VK_BLEND_OP_REVERSE_SUBTRACT                            = 0x00000002, | 
|  | 421 | VK_BLEND_OP_MIN                                         = 0x00000003, | 
|  | 422 | VK_BLEND_OP_MAX                                         = 0x00000004, | 
|  | 423 | } | 
|  | 424 |  | 
|  | 425 | enum VkStencilOp { | 
|  | 426 | VK_STENCIL_OP_KEEP                                      = 0x00000000, | 
|  | 427 | VK_STENCIL_OP_ZERO                                      = 0x00000001, | 
|  | 428 | VK_STENCIL_OP_REPLACE                                   = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 429 | VK_STENCIL_OP_INCREMENT_AND_CLAMP                       = 0x00000003, | 
|  | 430 | VK_STENCIL_OP_DECREMENT_AND_CLAMP                       = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 431 | VK_STENCIL_OP_INVERT                                    = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 432 | VK_STENCIL_OP_INCREMENT_AND_WRAP                        = 0x00000006, | 
|  | 433 | VK_STENCIL_OP_DECREMENT_AND_WRAP                        = 0x00000007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 434 | } | 
|  | 435 |  | 
|  | 436 | enum VkLogicOp { | 
|  | 437 | VK_LOGIC_OP_CLEAR                                       = 0x00000000, | 
|  | 438 | VK_LOGIC_OP_AND                                         = 0x00000001, | 
|  | 439 | VK_LOGIC_OP_AND_REVERSE                                 = 0x00000002, | 
|  | 440 | VK_LOGIC_OP_COPY                                        = 0x00000003, | 
|  | 441 | VK_LOGIC_OP_AND_INVERTED                                = 0x00000004, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 442 | VK_LOGIC_OP_NO_OP                                       = 0x00000005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 443 | VK_LOGIC_OP_XOR                                         = 0x00000006, | 
|  | 444 | VK_LOGIC_OP_OR                                          = 0x00000007, | 
|  | 445 | VK_LOGIC_OP_NOR                                         = 0x00000008, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 446 | VK_LOGIC_OP_EQUIVALENT                                  = 0x00000009, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 447 | VK_LOGIC_OP_INVERT                                      = 0x0000000a, | 
|  | 448 | VK_LOGIC_OP_OR_REVERSE                                  = 0x0000000b, | 
|  | 449 | VK_LOGIC_OP_COPY_INVERTED                               = 0x0000000c, | 
|  | 450 | VK_LOGIC_OP_OR_INVERTED                                 = 0x0000000d, | 
|  | 451 | VK_LOGIC_OP_NAND                                        = 0x0000000e, | 
|  | 452 | VK_LOGIC_OP_SET                                         = 0x0000000f, | 
|  | 453 | } | 
|  | 454 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 455 | enum VkSystemAllocationScope { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 456 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND                      = 0x00000000, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 457 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT                       = 0x00000001, | 
|  | 458 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE                        = 0x00000002, | 
|  | 459 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE                       = 0x00000003, | 
|  | 460 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE                     = 0x00000004, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 461 | } | 
|  | 462 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 463 | enum VkInternalAllocationType { | 
|  | 464 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE                  = 0x00000000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 465 | } | 
|  | 466 |  | 
|  | 467 | enum VkPhysicalDeviceType { | 
|  | 468 | VK_PHYSICAL_DEVICE_TYPE_OTHER                           = 0x00000000, | 
|  | 469 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU                  = 0x00000001, | 
|  | 470 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU                    = 0x00000002, | 
|  | 471 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU                     = 0x00000003, | 
|  | 472 | VK_PHYSICAL_DEVICE_TYPE_CPU                             = 0x00000004, | 
|  | 473 | } | 
|  | 474 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 475 | enum VkVertexInputRate { | 
|  | 476 | VK_VERTEX_INPUT_RATE_VERTEX                             = 0x00000000, | 
|  | 477 | VK_VERTEX_INPUT_RATE_INSTANCE                           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 478 | } | 
|  | 479 |  | 
|  | 480 | /// Vulkan format definitions | 
|  | 481 | enum VkFormat { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 482 | VK_FORMAT_UNDEFINED                                     = 0, | 
|  | 483 | VK_FORMAT_R4G4_UNORM_PACK8                              = 1, | 
|  | 484 | VK_FORMAT_R4G4B4A4_UNORM_PACK16                         = 2, | 
|  | 485 | VK_FORMAT_B4G4R4A4_UNORM_PACK16                         = 3, | 
|  | 486 | VK_FORMAT_R5G6B5_UNORM_PACK16                           = 4, | 
|  | 487 | VK_FORMAT_B5G6R5_UNORM_PACK16                           = 5, | 
|  | 488 | VK_FORMAT_R5G5B5A1_UNORM_PACK16                         = 6, | 
|  | 489 | VK_FORMAT_B5G5R5A1_UNORM_PACK16                         = 7, | 
|  | 490 | VK_FORMAT_A1R5G5B5_UNORM_PACK16                         = 8, | 
|  | 491 | VK_FORMAT_R8_UNORM                                      = 9, | 
|  | 492 | VK_FORMAT_R8_SNORM                                      = 10, | 
|  | 493 | VK_FORMAT_R8_USCALED                                    = 11, | 
|  | 494 | VK_FORMAT_R8_SSCALED                                    = 12, | 
|  | 495 | VK_FORMAT_R8_UINT                                       = 13, | 
|  | 496 | VK_FORMAT_R8_SINT                                       = 14, | 
|  | 497 | VK_FORMAT_R8_SRGB                                       = 15, | 
|  | 498 | VK_FORMAT_R8G8_UNORM                                    = 16, | 
|  | 499 | VK_FORMAT_R8G8_SNORM                                    = 17, | 
|  | 500 | VK_FORMAT_R8G8_USCALED                                  = 18, | 
|  | 501 | VK_FORMAT_R8G8_SSCALED                                  = 19, | 
|  | 502 | VK_FORMAT_R8G8_UINT                                     = 20, | 
|  | 503 | VK_FORMAT_R8G8_SINT                                     = 21, | 
|  | 504 | VK_FORMAT_R8G8_SRGB                                     = 22, | 
|  | 505 | VK_FORMAT_R8G8B8_UNORM                                  = 23, | 
|  | 506 | VK_FORMAT_R8G8B8_SNORM                                  = 24, | 
|  | 507 | VK_FORMAT_R8G8B8_USCALED                                = 25, | 
|  | 508 | VK_FORMAT_R8G8B8_SSCALED                                = 26, | 
|  | 509 | VK_FORMAT_R8G8B8_UINT                                   = 27, | 
|  | 510 | VK_FORMAT_R8G8B8_SINT                                   = 28, | 
|  | 511 | VK_FORMAT_R8G8B8_SRGB                                   = 29, | 
|  | 512 | VK_FORMAT_B8G8R8_UNORM                                  = 30, | 
|  | 513 | VK_FORMAT_B8G8R8_SNORM                                  = 31, | 
|  | 514 | VK_FORMAT_B8G8R8_USCALED                                = 32, | 
|  | 515 | VK_FORMAT_B8G8R8_SSCALED                                = 33, | 
|  | 516 | VK_FORMAT_B8G8R8_UINT                                   = 34, | 
|  | 517 | VK_FORMAT_B8G8R8_SINT                                   = 35, | 
|  | 518 | VK_FORMAT_B8G8R8_SRGB                                   = 36, | 
|  | 519 | VK_FORMAT_R8G8B8A8_UNORM                                = 37, | 
|  | 520 | VK_FORMAT_R8G8B8A8_SNORM                                = 38, | 
|  | 521 | VK_FORMAT_R8G8B8A8_USCALED                              = 39, | 
|  | 522 | VK_FORMAT_R8G8B8A8_SSCALED                              = 40, | 
|  | 523 | VK_FORMAT_R8G8B8A8_UINT                                 = 41, | 
|  | 524 | VK_FORMAT_R8G8B8A8_SINT                                 = 42, | 
|  | 525 | VK_FORMAT_R8G8B8A8_SRGB                                 = 43, | 
|  | 526 | VK_FORMAT_B8G8R8A8_UNORM                                = 44, | 
|  | 527 | VK_FORMAT_B8G8R8A8_SNORM                                = 45, | 
|  | 528 | VK_FORMAT_B8G8R8A8_USCALED                              = 46, | 
|  | 529 | VK_FORMAT_B8G8R8A8_SSCALED                              = 47, | 
|  | 530 | VK_FORMAT_B8G8R8A8_UINT                                 = 48, | 
|  | 531 | VK_FORMAT_B8G8R8A8_SINT                                 = 49, | 
|  | 532 | VK_FORMAT_B8G8R8A8_SRGB                                 = 50, | 
|  | 533 | VK_FORMAT_A8B8G8R8_UNORM_PACK32                         = 51, | 
|  | 534 | VK_FORMAT_A8B8G8R8_SNORM_PACK32                         = 52, | 
|  | 535 | VK_FORMAT_A8B8G8R8_USCALED_PACK32                       = 53, | 
|  | 536 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32                       = 54, | 
|  | 537 | VK_FORMAT_A8B8G8R8_UINT_PACK32                          = 55, | 
|  | 538 | VK_FORMAT_A8B8G8R8_SINT_PACK32                          = 56, | 
|  | 539 | VK_FORMAT_A8B8G8R8_SRGB_PACK32                          = 57, | 
|  | 540 | VK_FORMAT_A2R10G10B10_UNORM_PACK32                      = 58, | 
|  | 541 | VK_FORMAT_A2R10G10B10_SNORM_PACK32                      = 59, | 
|  | 542 | VK_FORMAT_A2R10G10B10_USCALED_PACK32                    = 60, | 
|  | 543 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32                    = 61, | 
|  | 544 | VK_FORMAT_A2R10G10B10_UINT_PACK32                       = 62, | 
|  | 545 | VK_FORMAT_A2R10G10B10_SINT_PACK32                       = 63, | 
|  | 546 | VK_FORMAT_A2B10G10R10_UNORM_PACK32                      = 64, | 
|  | 547 | VK_FORMAT_A2B10G10R10_SNORM_PACK32                      = 65, | 
|  | 548 | VK_FORMAT_A2B10G10R10_USCALED_PACK32                    = 66, | 
|  | 549 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32                    = 67, | 
|  | 550 | VK_FORMAT_A2B10G10R10_UINT_PACK32                       = 68, | 
|  | 551 | VK_FORMAT_A2B10G10R10_SINT_PACK32                       = 69, | 
|  | 552 | VK_FORMAT_R16_UNORM                                     = 70, | 
|  | 553 | VK_FORMAT_R16_SNORM                                     = 71, | 
|  | 554 | VK_FORMAT_R16_USCALED                                   = 72, | 
|  | 555 | VK_FORMAT_R16_SSCALED                                   = 73, | 
|  | 556 | VK_FORMAT_R16_UINT                                      = 74, | 
|  | 557 | VK_FORMAT_R16_SINT                                      = 75, | 
|  | 558 | VK_FORMAT_R16_SFLOAT                                    = 76, | 
|  | 559 | VK_FORMAT_R16G16_UNORM                                  = 77, | 
|  | 560 | VK_FORMAT_R16G16_SNORM                                  = 78, | 
|  | 561 | VK_FORMAT_R16G16_USCALED                                = 79, | 
|  | 562 | VK_FORMAT_R16G16_SSCALED                                = 80, | 
|  | 563 | VK_FORMAT_R16G16_UINT                                   = 81, | 
|  | 564 | VK_FORMAT_R16G16_SINT                                   = 82, | 
|  | 565 | VK_FORMAT_R16G16_SFLOAT                                 = 83, | 
|  | 566 | VK_FORMAT_R16G16B16_UNORM                               = 84, | 
|  | 567 | VK_FORMAT_R16G16B16_SNORM                               = 85, | 
|  | 568 | VK_FORMAT_R16G16B16_USCALED                             = 86, | 
|  | 569 | VK_FORMAT_R16G16B16_SSCALED                             = 87, | 
|  | 570 | VK_FORMAT_R16G16B16_UINT                                = 88, | 
|  | 571 | VK_FORMAT_R16G16B16_SINT                                = 89, | 
|  | 572 | VK_FORMAT_R16G16B16_SFLOAT                              = 90, | 
|  | 573 | VK_FORMAT_R16G16B16A16_UNORM                            = 91, | 
|  | 574 | VK_FORMAT_R16G16B16A16_SNORM                            = 92, | 
|  | 575 | VK_FORMAT_R16G16B16A16_USCALED                          = 93, | 
|  | 576 | VK_FORMAT_R16G16B16A16_SSCALED                          = 94, | 
|  | 577 | VK_FORMAT_R16G16B16A16_UINT                             = 95, | 
|  | 578 | VK_FORMAT_R16G16B16A16_SINT                             = 96, | 
|  | 579 | VK_FORMAT_R16G16B16A16_SFLOAT                           = 97, | 
|  | 580 | VK_FORMAT_R32_UINT                                      = 98, | 
|  | 581 | VK_FORMAT_R32_SINT                                      = 99, | 
|  | 582 | VK_FORMAT_R32_SFLOAT                                    = 100, | 
|  | 583 | VK_FORMAT_R32G32_UINT                                   = 101, | 
|  | 584 | VK_FORMAT_R32G32_SINT                                   = 102, | 
|  | 585 | VK_FORMAT_R32G32_SFLOAT                                 = 103, | 
|  | 586 | VK_FORMAT_R32G32B32_UINT                                = 104, | 
|  | 587 | VK_FORMAT_R32G32B32_SINT                                = 105, | 
|  | 588 | VK_FORMAT_R32G32B32_SFLOAT                              = 106, | 
|  | 589 | VK_FORMAT_R32G32B32A32_UINT                             = 107, | 
|  | 590 | VK_FORMAT_R32G32B32A32_SINT                             = 108, | 
|  | 591 | VK_FORMAT_R32G32B32A32_SFLOAT                           = 109, | 
|  | 592 | VK_FORMAT_R64_UINT                                      = 110, | 
|  | 593 | VK_FORMAT_R64_SINT                                      = 111, | 
|  | 594 | VK_FORMAT_R64_SFLOAT                                    = 112, | 
|  | 595 | VK_FORMAT_R64G64_UINT                                   = 113, | 
|  | 596 | VK_FORMAT_R64G64_SINT                                   = 114, | 
|  | 597 | VK_FORMAT_R64G64_SFLOAT                                 = 115, | 
|  | 598 | VK_FORMAT_R64G64B64_UINT                                = 116, | 
|  | 599 | VK_FORMAT_R64G64B64_SINT                                = 117, | 
|  | 600 | VK_FORMAT_R64G64B64_SFLOAT                              = 118, | 
|  | 601 | VK_FORMAT_R64G64B64A64_UINT                             = 119, | 
|  | 602 | VK_FORMAT_R64G64B64A64_SINT                             = 120, | 
|  | 603 | VK_FORMAT_R64G64B64A64_SFLOAT                           = 121, | 
|  | 604 | VK_FORMAT_B10G11R11_UFLOAT_PACK32                       = 122, | 
|  | 605 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32                        = 123, | 
|  | 606 | VK_FORMAT_D16_UNORM                                     = 124, | 
|  | 607 | VK_FORMAT_X8_D24_UNORM_PACK32                           = 125, | 
|  | 608 | VK_FORMAT_D32_SFLOAT                                    = 126, | 
|  | 609 | VK_FORMAT_S8_UINT                                       = 127, | 
|  | 610 | VK_FORMAT_D16_UNORM_S8_UINT                             = 128, | 
|  | 611 | VK_FORMAT_D24_UNORM_S8_UINT                             = 129, | 
|  | 612 | VK_FORMAT_D32_SFLOAT_S8_UINT                            = 130, | 
|  | 613 | VK_FORMAT_BC1_RGB_UNORM_BLOCK                           = 131, | 
|  | 614 | VK_FORMAT_BC1_RGB_SRGB_BLOCK                            = 132, | 
|  | 615 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK                          = 133, | 
|  | 616 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK                           = 134, | 
|  | 617 | VK_FORMAT_BC2_UNORM_BLOCK                               = 135, | 
|  | 618 | VK_FORMAT_BC2_SRGB_BLOCK                                = 136, | 
|  | 619 | VK_FORMAT_BC3_UNORM_BLOCK                               = 137, | 
|  | 620 | VK_FORMAT_BC3_SRGB_BLOCK                                = 138, | 
|  | 621 | VK_FORMAT_BC4_UNORM_BLOCK                               = 139, | 
|  | 622 | VK_FORMAT_BC4_SNORM_BLOCK                               = 140, | 
|  | 623 | VK_FORMAT_BC5_UNORM_BLOCK                               = 141, | 
|  | 624 | VK_FORMAT_BC5_SNORM_BLOCK                               = 142, | 
|  | 625 | VK_FORMAT_BC6H_UFLOAT_BLOCK                             = 143, | 
|  | 626 | VK_FORMAT_BC6H_SFLOAT_BLOCK                             = 144, | 
|  | 627 | VK_FORMAT_BC7_UNORM_BLOCK                               = 145, | 
|  | 628 | VK_FORMAT_BC7_SRGB_BLOCK                                = 146, | 
|  | 629 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK                       = 147, | 
|  | 630 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK                        = 148, | 
|  | 631 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK                     = 149, | 
|  | 632 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK                      = 150, | 
|  | 633 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK                     = 151, | 
|  | 634 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK                      = 152, | 
|  | 635 | VK_FORMAT_EAC_R11_UNORM_BLOCK                           = 153, | 
|  | 636 | VK_FORMAT_EAC_R11_SNORM_BLOCK                           = 154, | 
|  | 637 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK                        = 155, | 
|  | 638 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK                        = 156, | 
|  | 639 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK                          = 157, | 
|  | 640 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK                           = 158, | 
|  | 641 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK                          = 159, | 
|  | 642 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK                           = 160, | 
|  | 643 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK                          = 161, | 
|  | 644 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK                           = 162, | 
|  | 645 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK                          = 163, | 
|  | 646 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK                           = 164, | 
|  | 647 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK                          = 165, | 
|  | 648 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK                           = 166, | 
|  | 649 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK                          = 167, | 
|  | 650 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK                           = 168, | 
|  | 651 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK                          = 169, | 
|  | 652 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK                           = 170, | 
|  | 653 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK                          = 171, | 
|  | 654 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK                           = 172, | 
|  | 655 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK                         = 173, | 
|  | 656 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK                          = 174, | 
|  | 657 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK                         = 175, | 
|  | 658 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK                          = 176, | 
|  | 659 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK                         = 177, | 
|  | 660 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK                          = 178, | 
|  | 661 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK                        = 179, | 
|  | 662 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK                         = 180, | 
|  | 663 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK                        = 181, | 
|  | 664 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK                         = 182, | 
|  | 665 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK                        = 183, | 
|  | 666 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK                         = 184, | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 667 |  | 
|  | 668 | //@extension("VK_IMG_format_pvrtc") | 
|  | 669 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG                   = 1000054000, | 
|  | 670 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG                   = 1000054001, | 
|  | 671 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG                   = 1000054002, | 
|  | 672 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG                   = 1000054003, | 
|  | 673 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG                    = 1000054004, | 
|  | 674 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG                    = 1000054005, | 
|  | 675 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG                    = 1000054006, | 
|  | 676 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG                    = 1000054007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 677 | } | 
|  | 678 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 679 | /// Structure type enumerant | 
|  | 680 | enum VkStructureType { | 
|  | 681 | VK_STRUCTURE_TYPE_APPLICATION_INFO                          = 0, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 682 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO                      = 1, | 
|  | 683 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO                  = 2, | 
|  | 684 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO                        = 3, | 
|  | 685 | VK_STRUCTURE_TYPE_SUBMIT_INFO                               = 4, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 686 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO                      = 5, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 687 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE                       = 6, | 
|  | 688 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO                          = 7, | 
|  | 689 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO                         = 8, | 
|  | 690 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO                     = 9, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 691 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO                         = 10, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 692 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO                    = 11, | 
|  | 693 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO                        = 12, | 
|  | 694 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO                   = 13, | 
|  | 695 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO                         = 14, | 
|  | 696 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO                    = 15, | 
|  | 697 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO                 = 16, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 698 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO                = 17, | 
|  | 699 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO         = 18, | 
|  | 700 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO   = 19, | 
|  | 701 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, | 
|  | 702 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO   = 21, | 
|  | 703 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO       = 22, | 
|  | 704 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO  = 23, | 
|  | 705 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO    = 24, | 
|  | 706 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO  = 25, | 
|  | 707 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO    = 26, | 
|  | 708 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO        = 27, | 
|  | 709 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO             = 28, | 
|  | 710 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO              = 29, | 
|  | 711 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO               = 30, | 
|  | 712 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO                       = 31, | 
|  | 713 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO         = 32, | 
|  | 714 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO               = 33, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 715 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO              = 34, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 716 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET                      = 35, | 
|  | 717 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET                       = 36, | 
|  | 718 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO                   = 37, | 
|  | 719 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO                   = 38, | 
|  | 720 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO                  = 39, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 721 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO              = 40, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 722 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO           = 41, | 
|  | 723 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO                 = 42, | 
|  | 724 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO                    = 43, | 
|  | 725 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER                     = 44, | 
|  | 726 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER                      = 45, | 
|  | 727 | VK_STRUCTURE_TYPE_MEMORY_BARRIER                            = 46, | 
|  | 728 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO               = 47, | 
|  | 729 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO                 = 48, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 730 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 731 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 732 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR                 = 1000001000, | 
|  | 733 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR                          = 1000001001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 734 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 735 | //@extension("VK_KHR_display") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 736 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR              = 1000002000, | 
|  | 737 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR           = 1000002001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 738 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 739 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 740 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR          = 1000003000, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 741 |  | 
|  | 742 | //@extension("VK_KHR_xlib_surface") | 
|  | 743 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR              = 1000004000, | 
|  | 744 |  | 
|  | 745 | //@extension("VK_KHR_xcb_surface") | 
|  | 746 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR               = 1000005000, | 
|  | 747 |  | 
|  | 748 | //@extension("VK_KHR_wayland_surface") | 
|  | 749 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR           = 1000006000, | 
|  | 750 |  | 
|  | 751 | //@extension("VK_KHR_mir_surface") | 
|  | 752 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR               = 1000007000, | 
|  | 753 |  | 
|  | 754 | //@extension("VK_KHR_android_surface") | 
|  | 755 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR           = 1000008000, | 
|  | 756 |  | 
|  | 757 | //@extension("VK_KHR_win32_surface") | 
|  | 758 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR             = 1000009000, | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 759 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 760 | //@extension("VK_ANDROID_native_buffer") | 
|  | 761 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID                     = 1000010000, | 
|  | 762 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 763 | //@extension("VK_EXT_debug_report") | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 764 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT     = 1000011000, | 
|  | 765 |  | 
|  | 766 | //@extension("VK_AMD_rasterization_order") | 
|  | 767 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, | 
|  | 768 |  | 
|  | 769 | //@extension("VK_EXT_debug_marker") | 
|  | 770 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT         = 1000022000, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 771 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT          = 1000022001, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 772 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT              = 1000022002, | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 773 |  | 
|  | 774 | //@extension("VK_NV_dedicated_allocation") | 
|  | 775 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 776 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 777 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 778 |  | 
|  | 779 | //@extension("VK_NV_external_memory") | 
|  | 780 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV      = 1000056000, | 
|  | 781 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV            = 1000056001, | 
|  | 782 |  | 
|  | 783 | //@extension("VK_NV_external_memory_win32") | 
|  | 784 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV        = 1000057000, | 
|  | 785 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV        = 1000057001, | 
|  | 786 |  | 
|  | 787 | //@extension("VK_NV_win32_keyed_mutex") | 
|  | 788 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, | 
|  | 789 |  | 
|  | 790 | //@extension("VK_EXT_validation_flags") | 
|  | 791 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT                      = 1000061000, | 
|  | 792 |  | 
|  | 793 | //@extension("VK_NVX_device_generated_commands") | 
|  | 794 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX              = 1000086000, | 
|  | 795 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX  = 1000086001, | 
|  | 796 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX             = 1000086002, | 
|  | 797 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX   = 1000086003, | 
|  | 798 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX      = 1000086004, | 
|  | 799 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX    = 1000086005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 800 | } | 
|  | 801 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 802 | enum VkSubpassContents { | 
|  | 803 | VK_SUBPASS_CONTENTS_INLINE                              = 0x00000000, | 
|  | 804 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 805 | } | 
|  | 806 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 807 | enum VkPipelineCacheHeaderVersion { | 
|  | 808 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE                    = 1, | 
|  | 809 | } | 
|  | 810 |  | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 811 | @lastUnused(-11) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 812 | /// Error and return codes | 
|  | 813 | enum VkResult { | 
|  | 814 | // Return codes for successful operation execution (positive values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 815 | VK_SUCCESS                                              = 0, | 
|  | 816 | VK_NOT_READY                                            = 1, | 
|  | 817 | VK_TIMEOUT                                              = 2, | 
|  | 818 | VK_EVENT_SET                                            = 3, | 
|  | 819 | VK_EVENT_RESET                                          = 4, | 
|  | 820 | VK_INCOMPLETE                                           = 5, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 821 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 822 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 823 | VK_SUBOPTIMAL_KHR                                       = 1000001003, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 824 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 825 | // Error codes (negative values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 826 | VK_ERROR_OUT_OF_HOST_MEMORY                             = 0xFFFFFFFF, // -1 | 
|  | 827 | VK_ERROR_OUT_OF_DEVICE_MEMORY                           = 0xFFFFFFFE, // -2 | 
|  | 828 | VK_ERROR_INITIALIZATION_FAILED                          = 0xFFFFFFFD, // -3 | 
|  | 829 | VK_ERROR_DEVICE_LOST                                    = 0xFFFFFFFC, // -4 | 
|  | 830 | VK_ERROR_MEMORY_MAP_FAILED                              = 0xFFFFFFFB, // -5 | 
|  | 831 | VK_ERROR_LAYER_NOT_PRESENT                              = 0xFFFFFFFA, // -6 | 
|  | 832 | VK_ERROR_EXTENSION_NOT_PRESENT                          = 0xFFFFFFF9, // -7 | 
|  | 833 | VK_ERROR_FEATURE_NOT_PRESENT                            = 0xFFFFFFF8, // -8 | 
|  | 834 | VK_ERROR_INCOMPATIBLE_DRIVER                            = 0xFFFFFFF7, // -9 | 
|  | 835 | VK_ERROR_TOO_MANY_OBJECTS                               = 0xFFFFFFF6, // -10 | 
|  | 836 | VK_ERROR_FORMAT_NOT_SUPPORTED                           = 0xFFFFFFF5, // -11 | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 837 | VK_ERROR_FRAGMENTED_POOL                                = 0xFFFFFFF4, // -12 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 838 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 839 | //@extension("VK_KHR_surface") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 840 | VK_ERROR_SURFACE_LOST_KHR                               = 0xC4653600, // -1000000000 | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 841 |  | 
| Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 842 | //@extension("VK_KHR_surface") | 
|  | 843 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46535FF, // -1000008001 | 
|  | 844 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 845 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 846 | VK_ERROR_OUT_OF_DATE_KHR                                = 0xC4653214, // -1000001004 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 847 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 848 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 849 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                       = 0xC4652A47, // -1000003001 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 850 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 851 | //@extension("VK_EXT_debug_report") | 
|  | 852 | VK_ERROR_VALIDATION_FAILED_EXT                          = 0xC4650B07, // -1000011001 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 853 |  | 
|  | 854 | //@extension("VK_NV_glsl_shader") | 
|  | 855 | VK_ERROR_INVALID_SHADER_NV                              = 0xC4650720, // -1000012000 | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 856 | } | 
|  | 857 |  | 
|  | 858 | enum VkDynamicState { | 
|  | 859 | VK_DYNAMIC_STATE_VIEWPORT                               = 0x00000000, | 
|  | 860 | VK_DYNAMIC_STATE_SCISSOR                                = 0x00000001, | 
|  | 861 | VK_DYNAMIC_STATE_LINE_WIDTH                             = 0x00000002, | 
|  | 862 | VK_DYNAMIC_STATE_DEPTH_BIAS                             = 0x00000003, | 
|  | 863 | VK_DYNAMIC_STATE_BLEND_CONSTANTS                        = 0x00000004, | 
|  | 864 | VK_DYNAMIC_STATE_DEPTH_BOUNDS                           = 0x00000005, | 
|  | 865 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK                   = 0x00000006, | 
|  | 866 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK                     = 0x00000007, | 
|  | 867 | VK_DYNAMIC_STATE_STENCIL_REFERENCE                      = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 868 | } | 
|  | 869 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 870 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 871 | enum VkPresentModeKHR { | 
|  | 872 | VK_PRESENT_MODE_IMMEDIATE_KHR                           = 0x00000000, | 
|  | 873 | VK_PRESENT_MODE_MAILBOX_KHR                             = 0x00000001, | 
|  | 874 | VK_PRESENT_MODE_FIFO_KHR                                = 0x00000002, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 875 | VK_PRESENT_MODE_FIFO_RELAXED_KHR                        = 0x00000003, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 876 | } | 
|  | 877 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 878 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 879 | enum VkColorSpaceKHR { | 
|  | 880 | VK_COLORSPACE_SRGB_NONLINEAR_KHR                        = 0x00000000, | 
|  | 881 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 882 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 883 | @extension("VK_EXT_debug_report") | 
|  | 884 | enum VkDebugReportObjectTypeEXT { | 
|  | 885 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT                 = 0, | 
|  | 886 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT                = 1, | 
|  | 887 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT         = 2, | 
|  | 888 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT                  = 3, | 
|  | 889 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT                   = 4, | 
|  | 890 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT               = 5, | 
|  | 891 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT          = 6, | 
|  | 892 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT                   = 7, | 
|  | 893 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT           = 8, | 
|  | 894 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT                  = 9, | 
|  | 895 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT                   = 10, | 
|  | 896 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT                   = 11, | 
|  | 897 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT              = 12, | 
|  | 898 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT             = 13, | 
|  | 899 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT              = 14, | 
|  | 900 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT           = 15, | 
|  | 901 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT          = 16, | 
|  | 902 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT         = 17, | 
|  | 903 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT             = 18, | 
|  | 904 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT                = 19, | 
|  | 905 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT   = 20, | 
|  | 906 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT                 = 21, | 
|  | 907 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT         = 22, | 
|  | 908 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT          = 23, | 
|  | 909 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT             = 24, | 
|  | 910 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT            = 25, | 
|  | 911 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT             = 26, | 
|  | 912 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT           = 27, | 
|  | 913 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT            = 28, | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 914 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT             = 29, | 
|  | 915 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT        = 30, | 
|  | 916 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT        = 31, | 
|  | 917 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 918 | } | 
|  | 919 |  | 
|  | 920 | @extension("VK_EXT_debug_report") | 
|  | 921 | enum VkDebugReportErrorEXT { | 
|  | 922 | VK_DEBUG_REPORT_ERROR_NONE_EXT                          = 0, | 
|  | 923 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT                  = 1, | 
|  | 924 | } | 
|  | 925 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 926 | @extension("VK_AMD_rasterization_order") | 
|  | 927 | enum VkRasterizationOrderAMD { | 
|  | 928 | VK_RASTERIZATION_ORDER_STRICT_AMD                       = 0, | 
|  | 929 | VK_RASTERIZATION_ORDER_RELAXED_AMD                      = 1, | 
|  | 930 | } | 
|  | 931 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 932 | @extension("VK_EXT_validation_flags") | 
|  | 933 | enum VkValidationCheckEXT { | 
|  | 934 | VK_VALIDATION_CHECK_ALL_EXT                             = 0, | 
|  | 935 | } | 
|  | 936 |  | 
|  | 937 | @extension("VK_NVX_device_generated_commands") | 
|  | 938 | enum VkIndirectCommandsTokenTypeNVX { | 
|  | 939 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX                 = 0, | 
|  | 940 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX           = 1, | 
|  | 941 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX             = 2, | 
|  | 942 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX            = 3, | 
|  | 943 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX            = 4, | 
|  | 944 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX             = 5, | 
|  | 945 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX                     = 6, | 
|  | 946 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX                 = 7, | 
|  | 947 | } | 
|  | 948 |  | 
|  | 949 | @extension("VK_NVX_device_generated_commands") | 
|  | 950 | enum VkObjectEntryTypeNVX { | 
|  | 951 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX                      = 0, | 
|  | 952 | VK_OBJECT_ENTRY_PIPELINE_NVX                            = 1, | 
|  | 953 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX                        = 2, | 
|  | 954 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX                       = 3, | 
|  | 955 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX                       = 4, | 
|  | 956 | } | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 957 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 958 | ///////////////// | 
|  | 959 | //  Bitfields  // | 
|  | 960 | ///////////////// | 
|  | 961 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 962 | /// Queue capabilities | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 963 | type VkFlags VkQueueFlags | 
|  | 964 | bitfield VkQueueFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 965 | VK_QUEUE_GRAPHICS_BIT                                   = 0x00000001,    /// Queue supports graphics operations | 
|  | 966 | VK_QUEUE_COMPUTE_BIT                                    = 0x00000002,    /// Queue supports compute operations | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 967 | VK_QUEUE_TRANSFER_BIT                                   = 0x00000004,    /// Queue supports transfer operations | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 968 | 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] | 969 | } | 
|  | 970 |  | 
|  | 971 | /// Memory properties passed into vkAllocMemory(). | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 972 | type VkFlags VkMemoryPropertyFlags | 
|  | 973 | bitfield VkMemoryPropertyFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 974 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT                     = 0x00000001, | 
|  | 975 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT                     = 0x00000002, | 
|  | 976 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT                    = 0x00000004, | 
|  | 977 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT                      = 0x00000008, | 
|  | 978 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT                 = 0x00000010, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 979 | } | 
|  | 980 |  | 
|  | 981 | /// Memory heap flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 982 | type VkFlags VkMemoryHeapFlags | 
|  | 983 | bitfield VkMemoryHeapFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 984 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT                         = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 985 | } | 
|  | 986 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 987 | /// Access flags | 
|  | 988 | type VkFlags VkAccessFlags | 
|  | 989 | bitfield VkAccessFlagBits { | 
|  | 990 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT                     = 0x00000001, | 
|  | 991 | VK_ACCESS_INDEX_READ_BIT                                = 0x00000002, | 
|  | 992 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT                     = 0x00000004, | 
|  | 993 | VK_ACCESS_UNIFORM_READ_BIT                              = 0x00000008, | 
|  | 994 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT                     = 0x00000010, | 
|  | 995 | VK_ACCESS_SHADER_READ_BIT                               = 0x00000020, | 
|  | 996 | VK_ACCESS_SHADER_WRITE_BIT                              = 0x00000040, | 
|  | 997 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT                     = 0x00000080, | 
|  | 998 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT                    = 0x00000100, | 
|  | 999 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT             = 0x00000200, | 
|  | 1000 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT            = 0x00000400, | 
|  | 1001 | VK_ACCESS_TRANSFER_READ_BIT                             = 0x00000800, | 
|  | 1002 | VK_ACCESS_TRANSFER_WRITE_BIT                            = 0x00001000, | 
|  | 1003 | VK_ACCESS_HOST_READ_BIT                                 = 0x00002000, | 
|  | 1004 | VK_ACCESS_HOST_WRITE_BIT                                = 0x00004000, | 
|  | 1005 | VK_ACCESS_MEMORY_READ_BIT                               = 0x00008000, | 
|  | 1006 | VK_ACCESS_MEMORY_WRITE_BIT                              = 0x00010000, | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1007 |  | 
|  | 1008 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1009 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX                  = 0x00020000, | 
|  | 1010 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX                 = 0x00040000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1011 | } | 
|  | 1012 |  | 
|  | 1013 | /// Buffer usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1014 | type VkFlags VkBufferUsageFlags | 
|  | 1015 | bitfield VkBufferUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1016 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT                        = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1017 | 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] | 1018 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT                = 0x00000004,    /// Can be used as TBO | 
|  | 1019 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT                = 0x00000008,    /// Can be used as IBO | 
|  | 1020 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT                      = 0x00000010,    /// Can be used as UBO | 
|  | 1021 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT                      = 0x00000020,    /// Can be used as SSBO | 
|  | 1022 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT                        = 0x00000040,    /// Can be used as source of fixed function index fetch (index buffer) | 
|  | 1023 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT                       = 0x00000080,    /// Can be used as source of fixed function vertex fetch (VBO) | 
|  | 1024 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT                     = 0x00000100,    /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) | 
|  | 1025 | } | 
|  | 1026 |  | 
|  | 1027 | /// Buffer creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1028 | type VkFlags VkBufferCreateFlags | 
|  | 1029 | bitfield VkBufferCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1030 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT                     = 0x00000001,    /// Buffer should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1031 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT                   = 0x00000002,    /// Buffer should support sparse backing with partial residency | 
|  | 1032 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT                     = 0x00000004,    /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers | 
|  | 1033 | } | 
|  | 1034 |  | 
|  | 1035 | /// Shader stage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1036 | type VkFlags VkShaderStageFlags | 
|  | 1037 | bitfield VkShaderStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1038 | VK_SHADER_STAGE_VERTEX_BIT                              = 0x00000001, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1039 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT                = 0x00000002, | 
|  | 1040 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT             = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1041 | VK_SHADER_STAGE_GEOMETRY_BIT                            = 0x00000008, | 
|  | 1042 | VK_SHADER_STAGE_FRAGMENT_BIT                            = 0x00000010, | 
|  | 1043 | VK_SHADER_STAGE_COMPUTE_BIT                             = 0x00000020, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1044 | VK_SHADER_STAGE_ALL_GRAPHICS                            = 0x0000001F, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1045 |  | 
|  | 1046 | VK_SHADER_STAGE_ALL                                     = 0x7FFFFFFF, | 
|  | 1047 | } | 
|  | 1048 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1049 | /// Descriptor pool create flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1050 | type VkFlags VkDescriptorPoolCreateFlags | 
|  | 1051 | bitfield VkDescriptorPoolCreateFlagBits { | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1052 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT       = 0x00000001, | 
|  | 1053 | } | 
|  | 1054 |  | 
|  | 1055 | /// Descriptor pool reset flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1056 | type VkFlags VkDescriptorPoolResetFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1057 | //bitfield VkDescriptorPoolResetFlagBits { | 
|  | 1058 | //} | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1059 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1060 | /// Image usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1061 | type VkFlags VkImageUsageFlags | 
|  | 1062 | bitfield VkImageUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1063 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT                         = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1064 | 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] | 1065 | VK_IMAGE_USAGE_SAMPLED_BIT                              = 0x00000004,    /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1066 | VK_IMAGE_USAGE_STORAGE_BIT                              = 0x00000008,    /// Can be used as storage image (STORAGE_IMAGE descriptor type) | 
|  | 1067 | 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] | 1068 | 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] | 1069 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT                 = 0x00000040,    /// Image data not needed outside of rendering | 
|  | 1070 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT                     = 0x00000080,    /// Can be used as framebuffer input attachment | 
|  | 1071 | } | 
|  | 1072 |  | 
|  | 1073 | /// Image creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1074 | type VkFlags VkImageCreateFlags | 
|  | 1075 | bitfield VkImageCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1076 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT                      = 0x00000001,    /// Image should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1077 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT                    = 0x00000002,    /// Image should support sparse backing with partial residency | 
|  | 1078 | 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] | 1079 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT                      = 0x00000008,    /// Allows image views to have different format than the base image | 
|  | 1080 | 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] | 1081 | } | 
|  | 1082 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1083 | /// Image view creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1084 | type VkFlags VkImageViewCreateFlags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1085 | //bitfield VkImageViewCreateFlagBits { | 
|  | 1086 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1087 |  | 
|  | 1088 | /// Pipeline creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1089 | type VkFlags VkPipelineCreateFlags | 
|  | 1090 | bitfield VkPipelineCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1091 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT             = 0x00000001, | 
|  | 1092 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT                = 0x00000002, | 
|  | 1093 | VK_PIPELINE_CREATE_DERIVATIVE_BIT                       = 0x00000004, | 
|  | 1094 | } | 
|  | 1095 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1096 | /// Color component flags | 
|  | 1097 | type VkFlags VkColorComponentFlags | 
|  | 1098 | bitfield VkColorComponentFlagBits { | 
|  | 1099 | VK_COLOR_COMPONENT_R_BIT                                = 0x00000001, | 
|  | 1100 | VK_COLOR_COMPONENT_G_BIT                                = 0x00000002, | 
|  | 1101 | VK_COLOR_COMPONENT_B_BIT                                = 0x00000004, | 
|  | 1102 | VK_COLOR_COMPONENT_A_BIT                                = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1103 | } | 
|  | 1104 |  | 
|  | 1105 | /// Fence creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1106 | type VkFlags VkFenceCreateFlags | 
|  | 1107 | bitfield VkFenceCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1108 | VK_FENCE_CREATE_SIGNALED_BIT                            = 0x00000001, | 
|  | 1109 | } | 
|  | 1110 |  | 
|  | 1111 | /// Semaphore creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1112 | type VkFlags VkSemaphoreCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1113 | //bitfield VkSemaphoreCreateFlagBits { | 
|  | 1114 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1115 |  | 
|  | 1116 | /// Format capability flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1117 | type VkFlags VkFormatFeatureFlags | 
|  | 1118 | bitfield VkFormatFeatureFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1119 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT                     = 0x00000001,    /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1120 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT                     = 0x00000002,    /// Format can be used for storage images (STORAGE_IMAGE descriptor type) | 
|  | 1121 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT              = 0x00000004,    /// Format supports atomic operations in case it's used for storage images | 
|  | 1122 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT              = 0x00000008,    /// Format can be used for uniform texel buffers (TBOs) | 
|  | 1123 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT              = 0x00000010,    /// Format can be used for storage texel buffers (IBOs) | 
|  | 1124 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT       = 0x00000020,    /// Format supports atomic operations in case it's used for storage texel buffers | 
|  | 1125 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT                     = 0x00000040,    /// Format can be used for vertex buffers (VBOs) | 
|  | 1126 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT                  = 0x00000080,    /// Format can be used for color attachment images | 
|  | 1127 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT            = 0x00000100,    /// Format supports blending in case it's used for color attachment images | 
|  | 1128 | 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] | 1129 | VK_FORMAT_FEATURE_BLIT_SRC_BIT                          = 0x00000400,    /// Format can be used as the source image of blits with vkCommandBlitImage | 
|  | 1130 | 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] | 1131 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT       = 0x00001000, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1132 |  | 
|  | 1133 | //@extension("VK_IMG_filter_cubic") | 
|  | 1134 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG    = 0x00002000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1135 | } | 
|  | 1136 |  | 
|  | 1137 | /// Query control flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1138 | type VkFlags VkQueryControlFlags | 
|  | 1139 | bitfield VkQueryControlFlagBits { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1140 | VK_QUERY_CONTROL_PRECISE_BIT                            = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1141 | } | 
|  | 1142 |  | 
|  | 1143 | /// Query result flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1144 | type VkFlags VkQueryResultFlags | 
|  | 1145 | bitfield VkQueryResultFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1146 | VK_QUERY_RESULT_64_BIT                                  = 0x00000001,   /// Results of the queries are written to the destination buffer as 64-bit values | 
|  | 1147 | VK_QUERY_RESULT_WAIT_BIT                                = 0x00000002,   /// Results of the queries are waited on before proceeding with the result copy | 
|  | 1148 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT                   = 0x00000004,   /// Besides the results of the query, the availability of the results is also written | 
|  | 1149 | VK_QUERY_RESULT_PARTIAL_BIT                             = 0x00000008,   /// Copy the partial results of the query even if the final results aren't available | 
|  | 1150 | } | 
|  | 1151 |  | 
|  | 1152 | /// Shader module creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1153 | type VkFlags VkShaderModuleCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1154 | //bitfield VkShaderModuleCreateFlagBits { | 
|  | 1155 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1156 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1157 | /// Event creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1158 | type VkFlags VkEventCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1159 | //bitfield VkEventCreateFlagBits { | 
|  | 1160 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1161 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1162 | /// Command buffer usage flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1163 | type VkFlags VkCommandBufferUsageFlags | 
|  | 1164 | bitfield VkCommandBufferUsageFlagBits { | 
|  | 1165 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT             = 0x00000001, | 
|  | 1166 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT        = 0x00000002, | 
|  | 1167 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1168 | } | 
|  | 1169 |  | 
|  | 1170 | /// Pipeline statistics flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1171 | type VkFlags VkQueryPipelineStatisticFlags | 
|  | 1172 | bitfield VkQueryPipelineStatisticFlagBits { | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1173 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT                     = 0x00000001,  /// Optional | 
|  | 1174 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT                   = 0x00000002,  /// Optional | 
|  | 1175 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT                   = 0x00000004,  /// Optional | 
|  | 1176 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT                 = 0x00000008,  /// Optional | 
|  | 1177 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT                  = 0x00000010,  /// Optional | 
|  | 1178 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT                        = 0x00000020,  /// Optional | 
|  | 1179 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT                         = 0x00000040,  /// Optional | 
|  | 1180 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT                 = 0x00000080,  /// Optional | 
|  | 1181 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT         = 0x00000100,  /// Optional | 
|  | 1182 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT  = 0x00000200,  /// Optional | 
|  | 1183 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT                  = 0x00000400,  /// Optional | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1184 | } | 
|  | 1185 |  | 
|  | 1186 | /// Memory mapping flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1187 | type VkFlags VkMemoryMapFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1188 | //bitfield VkMemoryMapFlagBits { | 
|  | 1189 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1190 |  | 
|  | 1191 | /// Bitfield of image aspects | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1192 | type VkFlags VkImageAspectFlags | 
|  | 1193 | bitfield VkImageAspectFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1194 | VK_IMAGE_ASPECT_COLOR_BIT                               = 0x00000001, | 
|  | 1195 | VK_IMAGE_ASPECT_DEPTH_BIT                               = 0x00000002, | 
|  | 1196 | VK_IMAGE_ASPECT_STENCIL_BIT                             = 0x00000004, | 
|  | 1197 | VK_IMAGE_ASPECT_METADATA_BIT                            = 0x00000008, | 
|  | 1198 | } | 
|  | 1199 |  | 
|  | 1200 | /// Sparse memory bind flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1201 | type VkFlags VkSparseMemoryBindFlags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1202 | bitfield VkSparseMemoryBindFlagBits { | 
|  | 1203 | VK_SPARSE_MEMORY_BIND_METADATA_BIT                      = 0x00000001, | 
|  | 1204 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1205 |  | 
|  | 1206 | /// Sparse image memory requirements flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1207 | type VkFlags VkSparseImageFormatFlags | 
|  | 1208 | bitfield VkSparseImageFormatFlagBits { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1209 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT                  = 0x00000001,  /// Image uses a single miptail region for all array slices | 
|  | 1210 | 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. | 
|  | 1211 | 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] | 1212 | } | 
|  | 1213 |  | 
|  | 1214 | /// Pipeline stages | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1215 | type VkFlags VkPipelineStageFlags | 
|  | 1216 | bitfield VkPipelineStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1217 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT                       = 0x00000001,  /// Before subsequent commands are processed | 
|  | 1218 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT                     = 0x00000002,  /// Draw/DispatchIndirect command fetch | 
|  | 1219 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT                      = 0x00000004,  /// Vertex/index fetch | 
|  | 1220 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT                     = 0x00000008,  /// Vertex shading | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1221 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT       = 0x00000010,  /// Tessellation control shading | 
|  | 1222 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT    = 0x00000020,  /// Tessellation evaluation shading | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1223 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT                   = 0x00000040,  /// Geometry shading | 
|  | 1224 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT                   = 0x00000080,  /// Fragment shading | 
|  | 1225 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT              = 0x00000100,  /// Early fragment (depth/stencil) tests | 
|  | 1226 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT               = 0x00000200,  /// Late fragment (depth/stencil) tests | 
|  | 1227 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT           = 0x00000400,  /// Color attachment writes | 
|  | 1228 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT                    = 0x00000800,  /// Compute shading | 
|  | 1229 | VK_PIPELINE_STAGE_TRANSFER_BIT                          = 0x00001000,  /// Transfer/copy operations | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1230 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT                    = 0x00002000, | 
|  | 1231 | 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] | 1232 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1233 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT                      = 0x00008000,  /// All stages of the graphics pipeline | 
|  | 1234 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT                      = 0x00010000,  /// All graphics, compute, copy, and transition commands | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1235 |  | 
|  | 1236 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1237 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX               = 0x00020000, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1238 | } | 
|  | 1239 |  | 
|  | 1240 | /// Render pass attachment description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1241 | type VkFlags VkAttachmentDescriptionFlags | 
|  | 1242 | bitfield VkAttachmentDescriptionFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1243 | 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] | 1244 | } | 
|  | 1245 |  | 
|  | 1246 | /// Subpass description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1247 | type VkFlags VkSubpassDescriptionFlags | 
|  | 1248 | bitfield VkSubpassDescriptionFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1249 | } | 
|  | 1250 |  | 
|  | 1251 | /// Command pool creation flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1252 | type VkFlags VkCommandPoolCreateFlags | 
|  | 1253 | bitfield VkCommandPoolCreateFlagBits { | 
|  | 1254 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT                    = 0x00000001,  /// Command buffers have a short lifetime | 
|  | 1255 | 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] | 1256 | } | 
|  | 1257 |  | 
|  | 1258 | /// Command pool reset flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1259 | type VkFlags VkCommandPoolResetFlags | 
|  | 1260 | bitfield VkCommandPoolResetFlagBits { | 
|  | 1261 | 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] | 1262 | } | 
|  | 1263 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1264 | type VkFlags VkCommandBufferResetFlags | 
|  | 1265 | bitfield VkCommandBufferResetFlagBits { | 
|  | 1266 | 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] | 1267 | } | 
|  | 1268 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1269 | type VkFlags VkSampleCountFlags | 
|  | 1270 | bitfield VkSampleCountFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1271 | VK_SAMPLE_COUNT_1_BIT                                   = 0x00000001, | 
|  | 1272 | VK_SAMPLE_COUNT_2_BIT                                   = 0x00000002, | 
|  | 1273 | VK_SAMPLE_COUNT_4_BIT                                   = 0x00000004, | 
|  | 1274 | VK_SAMPLE_COUNT_8_BIT                                   = 0x00000008, | 
|  | 1275 | VK_SAMPLE_COUNT_16_BIT                                  = 0x00000010, | 
|  | 1276 | VK_SAMPLE_COUNT_32_BIT                                  = 0x00000020, | 
|  | 1277 | VK_SAMPLE_COUNT_64_BIT                                  = 0x00000040, | 
|  | 1278 | } | 
|  | 1279 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1280 | type VkFlags VkStencilFaceFlags | 
|  | 1281 | bitfield VkStencilFaceFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1282 | VK_STENCIL_FACE_FRONT_BIT                               = 0x00000001,   /// Front face | 
|  | 1283 | VK_STENCIL_FACE_BACK_BIT                                = 0x00000002,   /// Back face | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1284 | VK_STENCIL_FRONT_AND_BACK                               = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1285 | } | 
|  | 1286 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1287 | /// Instance creation flags | 
|  | 1288 | type VkFlags VkInstanceCreateFlags | 
|  | 1289 | //bitfield VkInstanceCreateFlagBits { | 
|  | 1290 | //} | 
|  | 1291 |  | 
|  | 1292 | /// Device creation flags | 
|  | 1293 | type VkFlags VkDeviceCreateFlags | 
|  | 1294 | //bitfield VkDeviceCreateFlagBits { | 
|  | 1295 | //} | 
|  | 1296 |  | 
|  | 1297 | /// Device queue creation flags | 
|  | 1298 | type VkFlags VkDeviceQueueCreateFlags | 
|  | 1299 | //bitfield VkDeviceQueueCreateFlagBits { | 
|  | 1300 | //} | 
|  | 1301 |  | 
|  | 1302 | /// Query pool creation flags | 
|  | 1303 | type VkFlags VkQueryPoolCreateFlags | 
|  | 1304 | //bitfield VkQueryPoolCreateFlagBits { | 
|  | 1305 | //} | 
|  | 1306 |  | 
|  | 1307 | /// Buffer view creation flags | 
|  | 1308 | type VkFlags VkBufferViewCreateFlags | 
|  | 1309 | //bitfield VkBufferViewCreateFlagBits { | 
|  | 1310 | //} | 
|  | 1311 |  | 
|  | 1312 | /// Pipeline cache creation flags | 
|  | 1313 | type VkFlags VkPipelineCacheCreateFlags | 
|  | 1314 | //bitfield VkPipelineCacheCreateFlagBits { | 
|  | 1315 | //} | 
|  | 1316 |  | 
|  | 1317 | /// Pipeline shader stage creation flags | 
|  | 1318 | type VkFlags VkPipelineShaderStageCreateFlags | 
|  | 1319 | //bitfield VkPipelineShaderStageCreateFlagBits { | 
|  | 1320 | //} | 
|  | 1321 |  | 
|  | 1322 | /// Descriptor set layout creation flags | 
|  | 1323 | type VkFlags VkDescriptorSetLayoutCreateFlags | 
|  | 1324 | //bitfield VkDescriptorSetLayoutCreateFlagBits { | 
|  | 1325 | //} | 
|  | 1326 |  | 
|  | 1327 | /// Pipeline vertex input state creation flags | 
|  | 1328 | type VkFlags VkPipelineVertexInputStateCreateFlags | 
|  | 1329 | //bitfield VkPipelineVertexInputStateCreateFlagBits { | 
|  | 1330 | //} | 
|  | 1331 |  | 
|  | 1332 | /// Pipeline input assembly state creation flags | 
|  | 1333 | type VkFlags VkPipelineInputAssemblyStateCreateFlags | 
|  | 1334 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { | 
|  | 1335 | //} | 
|  | 1336 |  | 
|  | 1337 | /// Tessellation state creation flags | 
|  | 1338 | type VkFlags VkPipelineTessellationStateCreateFlags | 
|  | 1339 | //bitfield VkPipelineTessellationStateCreateFlagBits { | 
|  | 1340 | //} | 
|  | 1341 |  | 
|  | 1342 | /// Viewport state creation flags | 
|  | 1343 | type VkFlags VkPipelineViewportStateCreateFlags | 
|  | 1344 | //bitfield VkPipelineViewportStateCreateFlagBits { | 
|  | 1345 | //} | 
|  | 1346 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1347 | /// Rasterization state creation flags | 
|  | 1348 | type VkFlags VkPipelineRasterizationStateCreateFlags | 
|  | 1349 | //bitfield VkPipelineRasterizationStateCreateFlagBits { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1350 | //} | 
|  | 1351 |  | 
|  | 1352 | /// Multisample state creation flags | 
|  | 1353 | type VkFlags VkPipelineMultisampleStateCreateFlags | 
|  | 1354 | //bitfield VkPipelineMultisampleStateCreateFlagBits { | 
|  | 1355 | //} | 
|  | 1356 |  | 
|  | 1357 | /// Color blend state creation flags | 
|  | 1358 | type VkFlags VkPipelineColorBlendStateCreateFlags | 
|  | 1359 | //bitfield VkPipelineColorBlendStateCreateFlagBits { | 
|  | 1360 | //} | 
|  | 1361 |  | 
|  | 1362 | /// Depth/stencil state creation flags | 
|  | 1363 | type VkFlags VkPipelineDepthStencilStateCreateFlags | 
|  | 1364 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { | 
|  | 1365 | //} | 
|  | 1366 |  | 
|  | 1367 | /// Dynamic state creation flags | 
|  | 1368 | type VkFlags VkPipelineDynamicStateCreateFlags | 
|  | 1369 | //bitfield VkPipelineDynamicStateCreateFlagBits { | 
|  | 1370 | //} | 
|  | 1371 |  | 
|  | 1372 | /// Pipeline layout creation flags | 
|  | 1373 | type VkFlags VkPipelineLayoutCreateFlags | 
|  | 1374 | //bitfield VkPipelineLayoutCreateFlagBits { | 
|  | 1375 | //} | 
|  | 1376 |  | 
|  | 1377 | /// Sampler creation flags | 
|  | 1378 | type VkFlags VkSamplerCreateFlags | 
|  | 1379 | //bitfield VkSamplerCreateFlagBits { | 
|  | 1380 | //} | 
|  | 1381 |  | 
|  | 1382 | /// Render pass creation flags | 
|  | 1383 | type VkFlags VkRenderPassCreateFlags | 
|  | 1384 | //bitfield VkRenderPassCreateFlagBits { | 
|  | 1385 | //} | 
|  | 1386 |  | 
|  | 1387 | /// Framebuffer creation flags | 
|  | 1388 | type VkFlags VkFramebufferCreateFlags | 
|  | 1389 | //bitfield VkFramebufferCreateFlagBits { | 
|  | 1390 | //} | 
|  | 1391 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1392 | /// Dependency flags | 
|  | 1393 | type VkFlags VkDependencyFlags | 
|  | 1394 | bitfield VkDependencyFlagBits { | 
|  | 1395 | VK_DEPENDENCY_BY_REGION_BIT                             = 0x00000001, | 
|  | 1396 | } | 
|  | 1397 |  | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1398 | /// Cull mode flags | 
|  | 1399 | type VkFlags VkCullModeFlags | 
|  | 1400 | bitfield VkCullModeFlagBits { | 
|  | 1401 | VK_CULL_MODE_NONE                                       = 0x00000000, | 
|  | 1402 | VK_CULL_MODE_FRONT_BIT                                  = 0x00000001, | 
|  | 1403 | VK_CULL_MODE_BACK_BIT                                   = 0x00000002, | 
|  | 1404 | VK_CULL_MODE_FRONT_AND_BACK                             = 0x00000003, | 
|  | 1405 | } | 
|  | 1406 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1407 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1408 | type VkFlags VkSurfaceTransformFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1409 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1410 | bitfield VkSurfaceTransformFlagBitsKHR { | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1411 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR                       = 0x00000001, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1412 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR                      = 0x00000002, | 
|  | 1413 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR                     = 0x00000004, | 
|  | 1414 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR                     = 0x00000008, | 
|  | 1415 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR              = 0x00000010, | 
|  | 1416 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR    = 0x00000020, | 
|  | 1417 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR   = 0x00000040, | 
|  | 1418 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR   = 0x00000080, | 
|  | 1419 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR                        = 0x00000100, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1420 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1421 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1422 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1423 | type VkFlags VkCompositeAlphaFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1424 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1425 | bitfield VkCompositeAlphaFlagBitsKHR { | 
|  | 1426 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR                       = 0x00000001, | 
|  | 1427 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR               = 0x00000002, | 
|  | 1428 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR              = 0x00000004, | 
|  | 1429 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR                      = 0x00000008, | 
|  | 1430 | } | 
|  | 1431 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1432 | @extension("VK_KHR_swapchain") | 
|  | 1433 | type VkFlags VkSwapchainCreateFlagsKHR | 
|  | 1434 | //@extension("VK_KHR_swapchain") | 
|  | 1435 | //bitfield VkSwapchainCreateFlagBitsKHR { | 
|  | 1436 | //} | 
|  | 1437 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1438 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1439 | type VkFlags VkDisplayPlaneAlphaFlagsKHR | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1440 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1441 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1442 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR                   = 0x00000001, | 
|  | 1443 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR                   = 0x00000002, | 
|  | 1444 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR                = 0x00000004, | 
|  | 1445 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR  = 0x00000008, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1446 | } | 
|  | 1447 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1448 | @extension("VK_KHR_display") | 
|  | 1449 | type VkFlags VkDisplaySurfaceCreateFlagsKHR | 
|  | 1450 | //@extension("VK_KHR_display") | 
|  | 1451 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { | 
|  | 1452 | //} | 
|  | 1453 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1454 | @extension("VK_KHR_display") | 
|  | 1455 | type VkFlags VkDisplayModeCreateFlagsKHR | 
|  | 1456 | //@extension("VK_KHR_display") | 
|  | 1457 | //bitfield VkDisplayModeCreateFlagBitsKHR { | 
|  | 1458 | //} | 
|  | 1459 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1460 | @extension("VK_KHR_xlib_surface") | 
|  | 1461 | type VkFlags VkXlibSurfaceCreateFlagsKHR | 
|  | 1462 | //@extension("VK_KHR_xlib_surface") | 
|  | 1463 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { | 
|  | 1464 | //} | 
|  | 1465 |  | 
|  | 1466 | @extension("VK_KHR_xcb_surface") | 
|  | 1467 | type VkFlags VkXcbSurfaceCreateFlagsKHR | 
|  | 1468 | //@extension("VK_KHR_xcb_surface") | 
|  | 1469 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { | 
|  | 1470 | //} | 
|  | 1471 |  | 
|  | 1472 | @extension("VK_KHR_wayland_surface") | 
|  | 1473 | type VkFlags VkWaylandSurfaceCreateFlagsKHR | 
|  | 1474 | //@extension("VK_KHR_wayland_surface") | 
|  | 1475 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { | 
|  | 1476 | //} | 
|  | 1477 |  | 
|  | 1478 | @extension("VK_KHR_mir_surface") | 
|  | 1479 | type VkFlags VkMirSurfaceCreateFlagsKHR | 
|  | 1480 | //@extension("VK_KHR_mir_surface") | 
|  | 1481 | //bitfield VkMirSurfaceCreateFlagBitsKHR { | 
|  | 1482 | //} | 
|  | 1483 |  | 
|  | 1484 | @extension("VK_KHR_android_surface") | 
|  | 1485 | type VkFlags VkAndroidSurfaceCreateFlagsKHR | 
|  | 1486 | //@extension("VK_KHR_android_surface") | 
|  | 1487 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { | 
|  | 1488 | //} | 
|  | 1489 |  | 
|  | 1490 | @extension("VK_KHR_win32_surface") | 
|  | 1491 | type VkFlags VkWin32SurfaceCreateFlagsKHR | 
|  | 1492 | //@extension("VK_KHR_win32_surface") | 
|  | 1493 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { | 
|  | 1494 | //} | 
|  | 1495 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1496 | @extension("VK_EXT_debug_report") | 
|  | 1497 | type VkFlags VkDebugReportFlagsEXT | 
|  | 1498 | @extension("VK_EXT_debug_report") | 
|  | 1499 | bitfield VkDebugReportFlagBitsEXT { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1500 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT                     = 0x00000001, | 
|  | 1501 | VK_DEBUG_REPORT_WARNING_BIT_EXT                         = 0x00000002, | 
|  | 1502 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT             = 0x00000004, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1503 | VK_DEBUG_REPORT_ERROR_BIT_EXT                           = 0x00000008, | 
|  | 1504 | VK_DEBUG_REPORT_DEBUG_BIT_EXT                           = 0x00000010, | 
|  | 1505 | } | 
|  | 1506 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 1507 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1508 | type VkFlags VkExternalMemoryHandleTypeFlagsNV | 
|  | 1509 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1510 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { | 
|  | 1511 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV      = 0x00000001, | 
|  | 1512 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV  = 0x00000002, | 
|  | 1513 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV       = 0x00000004, | 
|  | 1514 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV   = 0x00000008, | 
|  | 1515 | } | 
|  | 1516 |  | 
|  | 1517 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1518 | type VkFlags VkExternalMemoryFeatureFlagsNV | 
|  | 1519 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1520 | bitfield VkExternalMemoryFeatureFlagBitsNV { | 
|  | 1521 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV        = 0x00000001, | 
|  | 1522 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV            = 0x00000002, | 
|  | 1523 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV            = 0x00000004, | 
|  | 1524 | } | 
|  | 1525 |  | 
|  | 1526 | @extension("VK_NVX_device_generated_commands") | 
|  | 1527 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX | 
|  | 1528 | @extension("VK_NVX_device_generated_commands") | 
|  | 1529 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { | 
|  | 1530 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX   = 0x00000001, | 
|  | 1531 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX      = 0x00000002, | 
|  | 1532 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX      = 0x00000004, | 
|  | 1533 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX     = 0x00000008, | 
|  | 1534 | } | 
|  | 1535 |  | 
|  | 1536 | @extension("VK_NVX_device_generated_commands") | 
|  | 1537 | type VkFlags VkObjectEntryUsageFlagsNVX | 
|  | 1538 | @extension("VK_NVX_device_generated_commands") | 
|  | 1539 | bitfield VkObjectEntryUsageFlagBitsNVX { | 
|  | 1540 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX                  = 0x00000001, | 
|  | 1541 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX                   = 0x00000002, | 
|  | 1542 | } | 
|  | 1543 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1544 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1545 | ////////////////// | 
|  | 1546 | //  Structures  // | 
|  | 1547 | ////////////////// | 
|  | 1548 |  | 
|  | 1549 | class VkOffset2D { | 
|  | 1550 | s32                                         x | 
|  | 1551 | s32                                         y | 
|  | 1552 | } | 
|  | 1553 |  | 
|  | 1554 | class VkOffset3D { | 
|  | 1555 | s32                                         x | 
|  | 1556 | s32                                         y | 
|  | 1557 | s32                                         z | 
|  | 1558 | } | 
|  | 1559 |  | 
|  | 1560 | class VkExtent2D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1561 | u32                                         width | 
|  | 1562 | u32                                         height | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1563 | } | 
|  | 1564 |  | 
|  | 1565 | class VkExtent3D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1566 | u32                                         width | 
|  | 1567 | u32                                         height | 
|  | 1568 | u32                                         depth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1569 | } | 
|  | 1570 |  | 
|  | 1571 | class VkViewport { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1572 | f32                                         x | 
|  | 1573 | f32                                         y | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1574 | f32                                         width | 
|  | 1575 | f32                                         height | 
|  | 1576 | f32                                         minDepth | 
|  | 1577 | f32                                         maxDepth | 
|  | 1578 | } | 
|  | 1579 |  | 
|  | 1580 | class VkRect2D { | 
|  | 1581 | VkOffset2D                                  offset | 
|  | 1582 | VkExtent2D                                  extent | 
|  | 1583 | } | 
|  | 1584 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1585 | class VkClearRect { | 
|  | 1586 | VkRect2D                                    rect | 
|  | 1587 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1588 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1589 | } | 
|  | 1590 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1591 | class VkComponentMapping { | 
|  | 1592 | VkComponentSwizzle                          r | 
|  | 1593 | VkComponentSwizzle                          g | 
|  | 1594 | VkComponentSwizzle                          b | 
|  | 1595 | VkComponentSwizzle                          a | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1596 | } | 
|  | 1597 |  | 
|  | 1598 | class VkPhysicalDeviceProperties { | 
|  | 1599 | u32                                         apiVersion | 
|  | 1600 | u32                                         driverVersion | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1601 | u32                                         vendorID | 
|  | 1602 | u32                                         deviceID | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1603 | VkPhysicalDeviceType                        deviceType | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1604 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]      deviceName | 
|  | 1605 | u8[VK_UUID_SIZE]                            pipelineCacheUUID | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1606 | VkPhysicalDeviceLimits                      limits | 
|  | 1607 | VkPhysicalDeviceSparseProperties            sparseProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1608 | } | 
|  | 1609 |  | 
|  | 1610 | class VkExtensionProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1611 | char[VK_MAX_EXTENSION_NAME_SIZE]            extensionName      /// extension name | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1612 | u32                                         specVersion        /// version of the extension specification implemented | 
|  | 1613 | } | 
|  | 1614 |  | 
|  | 1615 | class VkLayerProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1616 | char[VK_MAX_EXTENSION_NAME_SIZE]            layerName               /// layer name | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1617 | u32                                         specVersion             /// version of the layer specification implemented | 
|  | 1618 | u32                                         implementationVersion   /// build or release version of the layer's library | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1619 | char[VK_MAX_DESCRIPTION_SIZE]               description             /// Free-form description of the layer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1620 | } | 
|  | 1621 |  | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1622 | class VkSubmitInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1623 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO | 
|  | 1624 | const void*                                 pNext              /// Next structure in chain | 
|  | 1625 | u32                                         waitSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1626 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1627 | const VkPipelineStageFlags*                 pWaitDstStageMask | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1628 | u32                                         commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1629 | const VkCommandBuffer*                      pCommandBuffers | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1630 | u32                                         signalSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1631 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1632 | } | 
|  | 1633 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1634 | class VkApplicationInfo { | 
|  | 1635 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO | 
|  | 1636 | const void*                                 pNext              /// Next structure in chain | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1637 | const char*                                 pApplicationName | 
|  | 1638 | u32                                         applicationVersion | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1639 | const char*                                 pEngineName | 
|  | 1640 | u32                                         engineVersion | 
|  | 1641 | u32                                         apiVersion | 
|  | 1642 | } | 
|  | 1643 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1644 | class VkAllocationCallbacks { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1645 | void*                                       pUserData | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1646 | PFN_vkAllocationFunction                    pfnAllocation | 
|  | 1647 | PFN_vkReallocationFunction                  pfnReallocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1648 | PFN_vkFreeFunction                          pfnFree | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1649 | PFN_vkInternalAllocationNotification        pfnInternalAllocation | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1650 | PFN_vkInternalFreeNotification              pfnInternalFree | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1651 | } | 
|  | 1652 |  | 
|  | 1653 | class VkDeviceQueueCreateInfo { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1654 | VkStructureType                             sStype                    /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO | 
|  | 1655 | const void*                                 pNext                     /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1656 | VkDeviceQueueCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1657 | u32                                         queueFamilyIndex | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1658 | u32                                         queueCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1659 | const f32*                                  pQueuePriorities | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1660 | } | 
|  | 1661 |  | 
|  | 1662 | class VkDeviceCreateInfo { | 
|  | 1663 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO | 
|  | 1664 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1665 | VkDeviceCreateFlags                         flags | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1666 | u32                                         queueCreateInfoCount | 
|  | 1667 | const VkDeviceQueueCreateInfo*              pQueueCreateInfos | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1668 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1669 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1670 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1671 | const char* const*                          ppEnabledExtensionNames | 
|  | 1672 | const VkPhysicalDeviceFeatures*             pEnabledFeatures | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1673 | } | 
|  | 1674 |  | 
|  | 1675 | class VkInstanceCreateInfo { | 
|  | 1676 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO | 
|  | 1677 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1678 | VkInstanceCreateFlags                       flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1679 | const VkApplicationInfo*                    pApplicationInfo | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1680 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1681 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1682 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1683 | const char* const*                          ppEnabledExtensionNames    /// Extension names to be enabled | 
|  | 1684 | } | 
|  | 1685 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1686 | class VkQueueFamilyProperties { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1687 | VkQueueFlags                                queueFlags                 /// Queue flags | 
|  | 1688 | u32                                         queueCount | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1689 | u32                                         timestampValidBits | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1690 | VkExtent3D                                  minImageTransferGranularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1691 | } | 
|  | 1692 |  | 
|  | 1693 | class VkPhysicalDeviceMemoryProperties { | 
|  | 1694 | u32                                         memoryTypeCount | 
|  | 1695 | VkMemoryType[VK_MAX_MEMORY_TYPES]           memoryTypes | 
|  | 1696 | u32                                         memoryHeapCount | 
|  | 1697 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS]           memoryHeaps | 
|  | 1698 | } | 
|  | 1699 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1700 | class VkMemoryAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1701 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1702 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1703 | VkDeviceSize                                allocationSize             /// Size of memory allocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1704 | u32                                         memoryTypeIndex            /// Index of the of the memory type to allocate from | 
|  | 1705 | } | 
|  | 1706 |  | 
|  | 1707 | class VkMemoryRequirements { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1708 | VkDeviceSize                                size                       /// Specified in bytes | 
|  | 1709 | VkDeviceSize                                alignment                  /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1710 | u32                                         memoryTypeBits             /// Bitfield of the allowed memory type indices into memoryTypes[] for this object | 
|  | 1711 | } | 
|  | 1712 |  | 
|  | 1713 | class VkSparseImageFormatProperties { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1714 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1715 | VkExtent3D                                  imageGranularity | 
|  | 1716 | VkSparseImageFormatFlags                    flags | 
|  | 1717 | } | 
|  | 1718 |  | 
|  | 1719 | class VkSparseImageMemoryRequirements { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1720 | VkSparseImageFormatProperties               formatProperties | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1721 | u32                                         imageMipTailFirstLod | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1722 | VkDeviceSize                                imageMipTailSize           /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1723 | VkDeviceSize                                imageMipTailOffset         /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1724 | 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] | 1725 | } | 
|  | 1726 |  | 
|  | 1727 | class VkMemoryType { | 
|  | 1728 | VkMemoryPropertyFlags                       propertyFlags              /// Memory properties of this memory type | 
|  | 1729 | u32                                         heapIndex                  /// Index of the memory heap allocations of this memory type are taken from | 
|  | 1730 | } | 
|  | 1731 |  | 
|  | 1732 | class VkMemoryHeap { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1733 | VkDeviceSize                                size                       /// Available memory in the heap | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1734 | VkMemoryHeapFlags                           flags                      /// Flags for the heap | 
|  | 1735 | } | 
|  | 1736 |  | 
|  | 1737 | class VkMappedMemoryRange { | 
|  | 1738 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE | 
|  | 1739 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1740 | VkDeviceMemory                              memory                     /// Mapped memory object | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1741 | VkDeviceSize                                offset                     /// Offset within the mapped memory the range starts from | 
|  | 1742 | VkDeviceSize                                size                       /// Size of the range within the mapped memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1743 | } | 
|  | 1744 |  | 
|  | 1745 | class VkFormatProperties { | 
|  | 1746 | VkFormatFeatureFlags                        linearTilingFeatures       /// Format features in case of linear tiling | 
|  | 1747 | VkFormatFeatureFlags                        optimalTilingFeatures      /// Format features in case of optimal tiling | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1748 | VkFormatFeatureFlags                        bufferFeatures             /// Format features supported by buffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1749 | } | 
|  | 1750 |  | 
|  | 1751 | class VkImageFormatProperties { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1752 | VkExtent3D                                  maxExtent                  /// max image dimensions for this resource type | 
|  | 1753 | u32                                         maxMipLevels               /// max number of mipmap levels for this resource type | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1754 | u32                                         maxArrayLayers             /// max array layers for this resource type | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1755 | VkSampleCountFlags                          sampleCounts               /// supported sample counts for this resource type | 
|  | 1756 | VkDeviceSize                                maxResourceSize            /// max size (in bytes) of this resource type | 
|  | 1757 | } | 
|  | 1758 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1759 | class VkDescriptorImageInfo { | 
|  | 1760 | VkSampler                                   sampler | 
|  | 1761 | VkImageView                                 imageView | 
|  | 1762 | VkImageLayout                               imageLayout | 
|  | 1763 | } | 
|  | 1764 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1765 | class VkDescriptorBufferInfo { | 
|  | 1766 | VkBuffer                                    buffer                     /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] | 
|  | 1767 | VkDeviceSize                                offset                     /// Base offset from buffer start in bytes to update in the descriptor set. | 
|  | 1768 | 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] | 1769 | } | 
|  | 1770 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1771 | class VkWriteDescriptorSet { | 
|  | 1772 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET | 
|  | 1773 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1774 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1775 | u32                                         dstBinding                 /// Binding within the destination descriptor set to write | 
|  | 1776 | u32                                         dstArrayElement            /// Array element within the destination binding to write | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1777 | 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] | 1778 | 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] | 1779 | const VkDescriptorImageInfo*                pImageInfo | 
|  | 1780 | const VkDescriptorBufferInfo*               pBufferInfo | 
|  | 1781 | const VkBufferView*                         pTexelBufferView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1782 | } | 
|  | 1783 |  | 
|  | 1784 | class VkCopyDescriptorSet { | 
|  | 1785 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET | 
|  | 1786 | const void*                                 pNext                      /// Pointer to next structure | 
|  | 1787 | VkDescriptorSet                             srcSet                     /// Source descriptor set | 
|  | 1788 | u32                                         srcBinding                 /// Binding within the source descriptor set to copy from | 
|  | 1789 | u32                                         srcArrayElement            /// Array element within the source binding to copy from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1790 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1791 | u32                                         dstBinding                 /// Binding within the destination descriptor set to copy to | 
|  | 1792 | u32                                         dstArrayElement            /// Array element within the destination binding to copy to | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1793 | u32                                         descriptorCount            /// Number of descriptors to copy | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1794 | } | 
|  | 1795 |  | 
|  | 1796 | class VkBufferCreateInfo { | 
|  | 1797 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO | 
|  | 1798 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1799 | VkBufferCreateFlags                         flags                      /// Buffer creation flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1800 | VkDeviceSize                                size                       /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1801 | VkBufferUsageFlags                          usage                      /// Buffer usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1802 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1803 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1804 | const u32*                                  pQueueFamilyIndices | 
|  | 1805 | } | 
|  | 1806 |  | 
|  | 1807 | class VkBufferViewCreateInfo { | 
|  | 1808 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO | 
|  | 1809 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1810 | VkBufferViewCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1811 | VkBuffer                                    buffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1812 | VkFormat                                    format                     /// Optionally specifies format of elements | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1813 | VkDeviceSize                                offset                     /// Specified in bytes | 
|  | 1814 | VkDeviceSize                                range                      /// View size specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1815 | } | 
|  | 1816 |  | 
|  | 1817 | class VkImageSubresource { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1818 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1819 | u32                                         mipLevel | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1820 | u32                                         arrayLayer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1821 | } | 
|  | 1822 |  | 
|  | 1823 | class VkImageSubresourceRange { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1824 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1825 | u32                                         baseMipLevel | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1826 | u32                                         levelCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1827 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1828 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1829 | } | 
|  | 1830 |  | 
|  | 1831 | class VkMemoryBarrier { | 
|  | 1832 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER | 
|  | 1833 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1834 | VkAccessFlags                               srcAccessMask | 
|  | 1835 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1836 | } | 
|  | 1837 |  | 
|  | 1838 | class VkBufferMemoryBarrier { | 
|  | 1839 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER | 
|  | 1840 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1841 | VkAccessFlags                               srcAccessMask | 
|  | 1842 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1843 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1844 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1845 | VkBuffer                                    buffer                     /// Buffer to sync | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1846 | VkDeviceSize                                offset                     /// Offset within the buffer to sync | 
|  | 1847 | VkDeviceSize                                size                       /// Amount of bytes to sync | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1848 | } | 
|  | 1849 |  | 
|  | 1850 | class VkImageMemoryBarrier { | 
|  | 1851 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER | 
|  | 1852 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1853 | VkAccessFlags                               srcAccessMask | 
|  | 1854 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1855 | VkImageLayout                               oldLayout                  /// Current layout of the image | 
|  | 1856 | VkImageLayout                               newLayout                  /// New layout to transition the image to | 
|  | 1857 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1858 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1859 | VkImage                                     image                      /// Image to sync | 
|  | 1860 | VkImageSubresourceRange                     subresourceRange           /// Subresource range to sync | 
|  | 1861 | } | 
|  | 1862 |  | 
|  | 1863 | class VkImageCreateInfo { | 
|  | 1864 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO | 
|  | 1865 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1866 | VkImageCreateFlags                          flags                      /// Image creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1867 | VkImageType                                 imageType | 
|  | 1868 | VkFormat                                    format | 
|  | 1869 | VkExtent3D                                  extent | 
|  | 1870 | u32                                         mipLevels | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1871 | u32                                         arrayLayers | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1872 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1873 | VkImageTiling                               tiling | 
|  | 1874 | VkImageUsageFlags                           usage                      /// Image usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1875 | VkSharingMode                               sharingMode                /// Cross-queue-family sharing mode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1876 | u32                                         queueFamilyIndexCount      /// Number of queue families to share across | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1877 | const u32*                                  pQueueFamilyIndices        /// Array of queue family indices to share across | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1878 | VkImageLayout                               initialLayout              /// Initial image layout for all subresources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1879 | } | 
|  | 1880 |  | 
|  | 1881 | class VkSubresourceLayout { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1882 | VkDeviceSize                                offset                 /// Specified in bytes | 
|  | 1883 | VkDeviceSize                                size                   /// Specified in bytes | 
|  | 1884 | VkDeviceSize                                rowPitch               /// Specified in bytes | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1885 | VkDeviceSize                                arrayPitch             /// Specified in bytes | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1886 | VkDeviceSize                                depthPitch             /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1887 | } | 
|  | 1888 |  | 
|  | 1889 | class VkImageViewCreateInfo { | 
|  | 1890 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO | 
|  | 1891 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1892 | VkImageViewCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1893 | VkImage                                     image | 
|  | 1894 | VkImageViewType                             viewType | 
|  | 1895 | VkFormat                                    format | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1896 | VkComponentMapping                          components | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1897 | VkImageSubresourceRange                     subresourceRange | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1898 | } | 
|  | 1899 |  | 
|  | 1900 | class VkBufferCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1901 | VkDeviceSize                                srcOffset              /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1902 | VkDeviceSize                                dstOffset              /// Specified in bytes | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1903 | VkDeviceSize                                size                   /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1904 | } | 
|  | 1905 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1906 | class VkSparseMemoryBind { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1907 | VkDeviceSize                                resourceOffset        /// Specified in bytes | 
|  | 1908 | VkDeviceSize                                size                  /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1909 | VkDeviceMemory                              memory | 
|  | 1910 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1911 | VkSparseMemoryBindFlags                     flags | 
|  | 1912 | } | 
|  | 1913 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1914 | class VkSparseImageMemoryBind { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1915 | VkImageSubresource                          subresource | 
|  | 1916 | VkOffset3D                                  offset | 
|  | 1917 | VkExtent3D                                  extent | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1918 | VkDeviceMemory                              memory | 
|  | 1919 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1920 | VkSparseMemoryBindFlags                     flags | 
|  | 1921 | } | 
|  | 1922 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1923 | class VkSparseBufferMemoryBindInfo { | 
|  | 1924 | VkBuffer                                    buffer | 
|  | 1925 | u32                                         bindCount | 
|  | 1926 | const VkSparseMemoryBind*                   pBinds | 
|  | 1927 | } | 
|  | 1928 |  | 
|  | 1929 | class VkSparseImageOpaqueMemoryBindInfo { | 
|  | 1930 | VkImage                                     image | 
|  | 1931 | u32                                         bindCount | 
|  | 1932 | const VkSparseMemoryBind*                   pBinds | 
|  | 1933 | } | 
|  | 1934 |  | 
|  | 1935 | class VkSparseImageMemoryBindInfo { | 
|  | 1936 | VkImage                                     image | 
|  | 1937 | u32                                         bindCount | 
|  | 1938 | const VkSparseMemoryBind*                   pBinds | 
|  | 1939 | } | 
|  | 1940 |  | 
|  | 1941 | class VkBindSparseInfo { | 
|  | 1942 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO | 
|  | 1943 | const void*                                 pNext | 
|  | 1944 | u32                                         waitSemaphoreCount | 
|  | 1945 | const VkSemaphore*                          pWaitSemaphores | 
|  | 1946 | u32                                         numBufferBinds | 
|  | 1947 | const VkSparseBufferMemoryBindInfo*         pBufferBinds | 
|  | 1948 | u32                                         numImageOpaqueBinds | 
|  | 1949 | const VkSparseImageOpaqueMemoryBindInfo*    pImageOpaqueBinds | 
|  | 1950 | u32                                         numImageBinds | 
|  | 1951 | const VkSparseImageMemoryBindInfo*          pImageBinds | 
|  | 1952 | u32                                         signalSemaphoreCount | 
|  | 1953 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1954 | } | 
|  | 1955 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1956 | class VkImageSubresourceLayers { | 
|  | 1957 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1958 | u32                                         mipLevel | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1959 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1960 | u32                                         layerCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1961 | } | 
|  | 1962 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1963 | class VkImageCopy { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1964 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1965 | VkOffset3D                                  srcOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1966 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1967 | VkOffset3D                                  dstOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1968 | VkExtent3D                                  extent                /// Specified in pixels for both compressed and uncompressed images | 
|  | 1969 | } | 
|  | 1970 |  | 
|  | 1971 | class VkImageBlit { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1972 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1973 | VkOffset3D[2]                               srcOffsets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1974 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1975 | VkOffset3D[2]                               dstOffsets | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1976 | } | 
|  | 1977 |  | 
|  | 1978 | class VkBufferImageCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1979 | VkDeviceSize                                bufferOffset           /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1980 | u32                                         bufferRowLength        /// Specified in texels | 
|  | 1981 | u32                                         bufferImageHeight | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1982 | VkImageSubresourceLayers                    imageSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1983 | VkOffset3D                                  imageOffset            /// Specified in pixels for both compressed and uncompressed images | 
|  | 1984 | VkExtent3D                                  imageExtent            /// Specified in pixels for both compressed and uncompressed images | 
|  | 1985 | } | 
|  | 1986 |  | 
|  | 1987 | class VkImageResolve { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1988 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1989 | VkOffset3D                                  srcOffset | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1990 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1991 | VkOffset3D                                  dstOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1992 | VkExtent3D                                  extent | 
|  | 1993 | } | 
|  | 1994 |  | 
|  | 1995 | class VkShaderModuleCreateInfo { | 
|  | 1996 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO | 
|  | 1997 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1998 | VkShaderModuleCreateFlags                   flags                  /// Reserved | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1999 | platform.size_t                             codeSize               /// Specified in bytes | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2000 | const u32*                                  pCode                  /// Binary code of size codeSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2001 | } | 
|  | 2002 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2003 | class VkDescriptorSetLayoutBinding { | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2004 | u32                                         binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2005 | VkDescriptorType                            descriptorType     /// Type of the descriptors in this binding | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2006 | u32                                         descriptorCount    /// Number of descriptors in this binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2007 | VkShaderStageFlags                          stageFlags         /// Shader stages this binding is visible to | 
|  | 2008 | const VkSampler*                            pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) | 
|  | 2009 | } | 
|  | 2010 |  | 
|  | 2011 | class VkDescriptorSetLayoutCreateInfo { | 
|  | 2012 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO | 
|  | 2013 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2014 | VkDescriptorSetLayoutCreateFlags            flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2015 | u32                                         bindingCount       /// Number of bindings in the descriptor set layout | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2016 | const VkDescriptorSetLayoutBinding*         pBindings          /// Array of descriptor set layout bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2017 | } | 
|  | 2018 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2019 | class VkDescriptorPoolSize { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2020 | VkDescriptorType                            type | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2021 | u32                                         descriptorCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2022 | } | 
|  | 2023 |  | 
|  | 2024 | class VkDescriptorPoolCreateInfo { | 
|  | 2025 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO | 
|  | 2026 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2027 | VkDescriptorPoolCreateFlags                 flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2028 | u32                                         maxSets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2029 | u32                                         poolSizeCount | 
|  | 2030 | const VkDescriptorPoolSize*                 pPoolSizes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2031 | } | 
|  | 2032 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2033 | class VkDescriptorSetAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2034 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2035 | const void*                                 pNext              /// Pointer to next structure | 
|  | 2036 | VkDescriptorPool                            descriptorPool | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2037 | u32                                         setCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2038 | const VkDescriptorSetLayout*                pSetLayouts | 
|  | 2039 | } | 
|  | 2040 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2041 | class VkSpecializationMapEntry { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2042 | u32                                         constantID         /// The SpecConstant ID specified in the BIL | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2043 | u32                                         offset             /// Offset of the value in the data block | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2044 | platform.size_t                             size               /// Size in bytes of the SpecConstant | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2045 | } | 
|  | 2046 |  | 
|  | 2047 | class VkSpecializationInfo { | 
|  | 2048 | u32                                         mapEntryCount      /// Number of entries in the map | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2049 | const VkSpecializationMapEntry*             pMapEntries        /// Array of map entries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2050 | platform.size_t                             dataSize           /// Size in bytes of pData | 
|  | 2051 | const void*                                 pData              /// Pointer to SpecConstant data | 
|  | 2052 | } | 
|  | 2053 |  | 
|  | 2054 | class VkPipelineShaderStageCreateInfo { | 
|  | 2055 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO | 
|  | 2056 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2057 | VkPipelineShaderStageCreateFlags            flags | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2058 | VkShaderStageFlagBits                       stage | 
|  | 2059 | VkShaderModule                              module | 
|  | 2060 | const char*                                 pName | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2061 | const VkSpecializationInfo*                 pSpecializationInfo | 
|  | 2062 | } | 
|  | 2063 |  | 
|  | 2064 | class VkComputePipelineCreateInfo { | 
|  | 2065 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO | 
|  | 2066 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2067 | VkPipelineCreateFlags                       flags              /// Pipeline creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2068 | VkPipelineShaderStageCreateInfo             stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2069 | VkPipelineLayout                            layout             /// Interface layout of the pipeline | 
|  | 2070 | 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 | 
|  | 2071 | 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 | 
|  | 2072 | } | 
|  | 2073 |  | 
|  | 2074 | class VkVertexInputBindingDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2075 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2076 | u32                                         stride                /// Distance between vertices in bytes (0 = no advancement) | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2077 | VkVertexInputRate                           inputRate             /// Rate at which binding is incremented | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2078 | } | 
|  | 2079 |  | 
|  | 2080 | class VkVertexInputAttributeDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2081 | u32                                         location              /// location of the shader vertex attrib | 
|  | 2082 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2083 | VkFormat                                    format                /// format of source data | 
|  | 2084 | u32                                         offset                /// Offset of first element in bytes from base of vertex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2085 | } | 
|  | 2086 |  | 
|  | 2087 | class VkPipelineVertexInputStateCreateInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2088 | VkStructureType                             sType                           /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO | 
|  | 2089 | const void*                                 pNext                           /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2090 | VkPipelineVertexInputStateCreateFlags       flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2091 | u32                                         vertexBindingDescriptionCount   /// number of bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2092 | const VkVertexInputBindingDescription*      pVertexBindingDescriptions | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2093 | u32                                         vertexAttributeDescriptionCount /// number of attributes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2094 | const VkVertexInputAttributeDescription*    pVertexAttributeDescriptions | 
|  | 2095 | } | 
|  | 2096 |  | 
|  | 2097 | class VkPipelineInputAssemblyStateCreateInfo { | 
|  | 2098 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO | 
|  | 2099 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2100 | VkPipelineInputAssemblyStateCreateFlags     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2101 | VkPrimitiveTopology                         topology | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2102 | VkBool32                                    primitiveRestartEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2103 | } | 
|  | 2104 |  | 
|  | 2105 | class VkPipelineTessellationStateCreateInfo { | 
|  | 2106 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO | 
|  | 2107 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2108 | VkPipelineTessellationStateCreateFlags      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2109 | u32                                         patchControlPoints | 
|  | 2110 | } | 
|  | 2111 |  | 
|  | 2112 | class VkPipelineViewportStateCreateInfo { | 
|  | 2113 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO | 
|  | 2114 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2115 | VkPipelineViewportStateCreateFlags          flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2116 | u32                                         viewportCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2117 | const VkViewport*                           pViewports | 
|  | 2118 | u32                                         scissorCount | 
|  | 2119 | const VkRect2D*                             pScissors | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2120 | } | 
|  | 2121 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2122 | class VkPipelineRasterizationStateCreateInfo { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2123 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2124 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2125 | VkPipelineRasterizationStateCreateFlags     flags | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2126 | VkBool32                                    depthClampEnable | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2127 | VkBool32                                    rasterizerDiscardEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2128 | VkPolygonMode                               polygonMode                   /// optional (GL45) | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2129 | VkCullModeFlags                             cullMode | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2130 | VkFrontFace                                 frontFace | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2131 | VkBool32                                    depthBiasEnable | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2132 | f32                                         depthBiasConstantFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2133 | f32                                         depthBiasClamp | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2134 | f32                                         depthBiasSlopeFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2135 | f32                                         lineWidth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2136 | } | 
|  | 2137 |  | 
|  | 2138 | class VkPipelineMultisampleStateCreateInfo { | 
|  | 2139 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO | 
|  | 2140 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2141 | VkPipelineMultisampleStateCreateFlags       flags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2142 | VkSampleCountFlagBits                       rasterizationSamples       /// Number of samples used for rasterization | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2143 | VkBool32                                    sampleShadingEnable        /// optional (GL45) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2144 | f32                                         minSampleShading           /// optional (GL45) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2145 | const VkSampleMask*                         pSampleMask | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2146 | VkBool32                                    alphaToCoverageEnable | 
|  | 2147 | VkBool32                                    alphaToOneEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | } | 
|  | 2149 |  | 
|  | 2150 | class VkPipelineColorBlendAttachmentState { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2151 | VkBool32                                    blendEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2152 | VkBlendFactor                               srcColorBlendFactor | 
|  | 2153 | VkBlendFactor                               dstColorBlendFactor | 
|  | 2154 | VkBlendOp                                   colorBlendOp | 
|  | 2155 | VkBlendFactor                               srcAlphaBlendFactor | 
|  | 2156 | VkBlendFactor                               dstAlphaBlendFactor | 
|  | 2157 | VkBlendOp                                   alphaBlendOp | 
|  | 2158 | VkColorComponentFlags                       colorWriteMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2159 | } | 
|  | 2160 |  | 
|  | 2161 | class VkPipelineColorBlendStateCreateInfo { | 
|  | 2162 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO | 
|  | 2163 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2164 | VkPipelineColorBlendStateCreateFlags        flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2165 | VkBool32                                    logicOpEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2166 | VkLogicOp                                   logicOp | 
|  | 2167 | u32                                         attachmentCount    /// # of pAttachments | 
|  | 2168 | const VkPipelineColorBlendAttachmentState*  pAttachments | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2169 | f32[4]                                      blendConstants | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2170 | } | 
|  | 2171 |  | 
|  | 2172 | class VkStencilOpState { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2173 | VkStencilOp                                 failOp | 
|  | 2174 | VkStencilOp                                 passOp | 
|  | 2175 | VkStencilOp                                 depthFailOp | 
|  | 2176 | VkCompareOp                                 compareOp | 
|  | 2177 | u32                                         compareMask | 
|  | 2178 | u32                                         writeMask | 
|  | 2179 | u32                                         reference | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2180 | } | 
|  | 2181 |  | 
|  | 2182 | class VkPipelineDepthStencilStateCreateInfo { | 
|  | 2183 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO | 
|  | 2184 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2185 | VkPipelineDepthStencilStateCreateFlags      flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2186 | VkBool32                                    depthTestEnable | 
|  | 2187 | VkBool32                                    depthWriteEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2188 | VkCompareOp                                 depthCompareOp | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2189 | VkBool32                                    depthBoundsTestEnable  /// optional (depth_bounds_test) | 
|  | 2190 | VkBool32                                    stencilTestEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2191 | VkStencilOpState                            front | 
|  | 2192 | VkStencilOpState                            back | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2193 | f32                                         minDepthBounds | 
|  | 2194 | f32                                         maxDepthBounds | 
|  | 2195 | } | 
|  | 2196 |  | 
|  | 2197 | class VkPipelineDynamicStateCreateInfo { | 
|  | 2198 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO | 
|  | 2199 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2200 | VkPipelineDynamicStateCreateFlags           flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2201 | u32                                         dynamicStateCount | 
|  | 2202 | const VkDynamicState*                       pDynamicStates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2203 | } | 
|  | 2204 |  | 
|  | 2205 | class VkGraphicsPipelineCreateInfo { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2206 | VkStructureType                                 sType               /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO | 
|  | 2207 | const void*                                     pNext               /// Pointer to next structure | 
|  | 2208 | VkPipelineCreateFlags                           flags               /// Pipeline creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2209 | u32                                             stageCount | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2210 | const VkPipelineShaderStageCreateInfo*          pStages             /// One entry for each active shader stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2211 | const VkPipelineVertexInputStateCreateInfo*     pVertexInputState | 
|  | 2212 | const VkPipelineInputAssemblyStateCreateInfo*   pInputAssemblyState | 
|  | 2213 | const VkPipelineTessellationStateCreateInfo*    pTessellationState | 
|  | 2214 | const VkPipelineViewportStateCreateInfo*        pViewportState | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2215 | const VkPipelineRasterizationStateCreateInfo*   pRasterizationState | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2216 | const VkPipelineMultisampleStateCreateInfo*     pMultisampleState | 
|  | 2217 | const VkPipelineDepthStencilStateCreateInfo*    pDepthStencilState | 
|  | 2218 | const VkPipelineColorBlendStateCreateInfo*      pColorBlendState | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2219 | const VkPipelineDynamicStateCreateInfo*         pDynamicState | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2220 | VkPipelineLayout                                layout              /// Interface layout of the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2221 | VkRenderPass                                    renderPass | 
|  | 2222 | u32                                             subpass | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2223 | 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 | 
|  | 2224 | 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] | 2225 | } | 
|  | 2226 |  | 
|  | 2227 | class VkPipelineCacheCreateInfo { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2228 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO | 
|  | 2229 | const void*                                 pNext                 /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2230 | VkPipelineCacheCreateFlags                  flags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2231 | platform.size_t                             initialDataSize       /// Size of initial data to populate cache, in bytes | 
|  | 2232 | const void*                                 pInitialData          /// Initial data to populate cache | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2233 | } | 
|  | 2234 |  | 
|  | 2235 | class VkPushConstantRange { | 
|  | 2236 | VkShaderStageFlags                          stageFlags   /// Which stages use the range | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2237 | u32                                         offset       /// Start of the range, in bytes | 
|  | 2238 | u32                                         size        /// Length of the range, in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2239 | } | 
|  | 2240 |  | 
|  | 2241 | class VkPipelineLayoutCreateInfo { | 
|  | 2242 | VkStructureType                             sType                   /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO | 
|  | 2243 | const void*                                 pNext                   /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2244 | VkPipelineLayoutCreateFlags                 flags | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2245 | u32                                         descriptorSetCount      /// Number of descriptor sets interfaced by the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2246 | const VkDescriptorSetLayout*                pSetLayouts             /// Array of <setCount> number of descriptor set layout objects defining the layout of the | 
|  | 2247 | u32                                         pushConstantRangeCount  /// Number of push-constant ranges used by the pipeline | 
|  | 2248 | const VkPushConstantRange*                  pPushConstantRanges     /// Array of pushConstantRangeCount number of ranges used by various shader stages | 
|  | 2249 | } | 
|  | 2250 |  | 
|  | 2251 | class VkSamplerCreateInfo { | 
|  | 2252 | VkStructureType                             sType          /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO | 
|  | 2253 | const void*                                 pNext          /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2254 | VkSamplerCreateFlags                        flags | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2255 | VkFilter                                    magFilter      /// Filter mode for magnification | 
|  | 2256 | VkFilter                                    minFilter      /// Filter mode for minifiation | 
|  | 2257 | VkSamplerMipmapMode                         mipmapMode     /// Mipmap selection mode | 
|  | 2258 | VkSamplerAddressMode                        addressModeU | 
|  | 2259 | VkSamplerAddressMode                        addressModeV | 
|  | 2260 | VkSamplerAddressMode                        addressModeW | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2261 | f32                                         mipLodBias | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2262 | VkBool32                                    anisotropyEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2263 | f32                                         maxAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2264 | VkBool32                                    compareEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2265 | VkCompareOp                                 compareOp | 
|  | 2266 | f32                                         minLod | 
|  | 2267 | f32                                         maxLod | 
|  | 2268 | VkBorderColor                               borderColor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2269 | VkBool32                                    unnormalizedCoordinates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2270 | } | 
|  | 2271 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2272 | class VkCommandPoolCreateInfo { | 
|  | 2273 | VkStructureType                             sType            /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2274 | const void*                                 pNext            /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2275 | VkCommandPoolCreateFlags                    flags            /// Command pool creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2276 | u32                                         queueFamilyIndex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2277 | } | 
|  | 2278 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2279 | class VkCommandBufferAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2280 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2281 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2282 | VkCommandPool                               commandPool | 
|  | 2283 | VkCommandBufferLevel                        level | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2284 | u32                                         commandBufferCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2285 | } | 
|  | 2286 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2287 | class VkCommandBufferInheritanceInfo { | 
|  | 2288 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2289 | const void*                                 pNext       /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2290 | VkRenderPass                                renderPass  /// Render pass for secondary command buffers | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2291 | u32                                         subpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2292 | VkFramebuffer                               framebuffer /// Framebuffer for secondary command buffers | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2293 | VkBool32                                    occlusionQueryEnable | 
|  | 2294 | VkQueryControlFlags                         queryFlags | 
|  | 2295 | VkQueryPipelineStatisticFlags               pipelineStatistics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2296 | } | 
|  | 2297 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2298 | class VkCommandBufferBeginInfo { | 
|  | 2299 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO | 
|  | 2300 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2301 | VkCommandBufferUsageFlags                   flags       /// Command buffer usage flags | 
|  | 2302 | const VkCommandBufferInheritanceInfo*       pInheritanceInfo | 
|  | 2303 | } | 
|  | 2304 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2305 | class VkRenderPassBeginInfo { | 
|  | 2306 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO | 
|  | 2307 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2308 | VkRenderPass                                renderPass | 
|  | 2309 | VkFramebuffer                               framebuffer | 
|  | 2310 | VkRect2D                                    renderArea | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2311 | u32                                         clearValueCount | 
|  | 2312 | const VkClearValue*                         pClearValues | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | } | 
|  | 2314 |  | 
|  | 2315 | @union | 
|  | 2316 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. | 
|  | 2317 | class VkClearColorValue { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2318 | f32[4]                                      float32 | 
|  | 2319 | s32[4]                                      int32 | 
|  | 2320 | u32[4]                                      uint32 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2321 | } | 
|  | 2322 |  | 
|  | 2323 | class VkClearDepthStencilValue { | 
|  | 2324 | f32                                         depth | 
|  | 2325 | u32                                         stencil | 
|  | 2326 | } | 
|  | 2327 |  | 
|  | 2328 | @union | 
|  | 2329 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. | 
|  | 2330 | class VkClearValue { | 
|  | 2331 | VkClearColorValue                           color | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2332 | VkClearDepthStencilValue                    depthStencil | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2333 | } | 
|  | 2334 |  | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2335 | class VkClearAttachment { | 
|  | 2336 | VkImageAspectFlags                          aspectMask | 
|  | 2337 | u32                                         colorAttachment | 
|  | 2338 | VkClearValue                                clearValue | 
|  | 2339 | } | 
|  | 2340 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2341 | class VkAttachmentDescription { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2342 | VkAttachmentDescriptionFlags                flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2343 | VkFormat                                    format | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2344 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2345 | VkAttachmentLoadOp                          loadOp          /// Load op for color or depth data | 
|  | 2346 | VkAttachmentStoreOp                         storeOp         /// Store op for color or depth data | 
|  | 2347 | VkAttachmentLoadOp                          stencilLoadOp   /// Load op for stencil data | 
|  | 2348 | VkAttachmentStoreOp                         stencilStoreOp  /// Store op for stencil data | 
|  | 2349 | VkImageLayout                               initialLayout | 
|  | 2350 | VkImageLayout                               finalLayout | 
|  | 2351 | } | 
|  | 2352 |  | 
|  | 2353 | class VkAttachmentReference { | 
|  | 2354 | u32                                         attachment | 
|  | 2355 | VkImageLayout                               layout | 
|  | 2356 | } | 
|  | 2357 |  | 
|  | 2358 | class VkSubpassDescription { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2359 | VkSubpassDescriptionFlags                   flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2360 | VkPipelineBindPoint                         pipelineBindPoint  /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2361 | u32                                         inputAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2362 | const VkAttachmentReference*                pInputAttachments | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2363 | u32                                         colorAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2364 | const VkAttachmentReference*                pColorAttachments | 
|  | 2365 | const VkAttachmentReference*                pResolveAttachments | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2366 | const VkAttachmentReference*                pDepthStencilAttachment | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2367 | u32                                         preserveAttachmentCount | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2368 | const u32*                                  pPreserveAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2369 | } | 
|  | 2370 |  | 
|  | 2371 | class VkSubpassDependency { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2372 | u32                                         srcSubpass | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2373 | u32                                         dstSubpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2374 | VkPipelineStageFlags                        srcStageMask | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2375 | VkPipelineStageFlags                        dstStageMask | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2376 | VkAccessFlags                               srcAccessMask | 
|  | 2377 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2378 | VkDependencyFlags                           dependencyFlags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2379 | } | 
|  | 2380 |  | 
|  | 2381 | class VkRenderPassCreateInfo { | 
|  | 2382 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO | 
|  | 2383 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2384 | VkRenderPassCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2385 | u32                                         attachmentCount | 
|  | 2386 | const VkAttachmentDescription*              pAttachments | 
|  | 2387 | u32                                         subpassCount | 
|  | 2388 | const VkSubpassDescription*                 pSubpasses | 
|  | 2389 | u32                                         dependencyCount | 
|  | 2390 | const VkSubpassDependency*                  pDependencies | 
|  | 2391 | } | 
|  | 2392 |  | 
|  | 2393 | class VkEventCreateInfo { | 
|  | 2394 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO | 
|  | 2395 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2396 | VkEventCreateFlags                          flags      /// Event creation flags | 
|  | 2397 | } | 
|  | 2398 |  | 
|  | 2399 | class VkFenceCreateInfo { | 
|  | 2400 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO | 
|  | 2401 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2402 | VkFenceCreateFlags                          flags      /// Fence creation flags | 
|  | 2403 | } | 
|  | 2404 |  | 
|  | 2405 | class VkPhysicalDeviceFeatures { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2406 | VkBool32                                    robustBufferAccess                        /// out of bounds buffer accesses are well defined | 
|  | 2407 | VkBool32                                    fullDrawIndexUint32                       /// full 32-bit range of indices for indexed draw calls | 
|  | 2408 | VkBool32                                    imageCubeArray                            /// image views which are arrays of cube maps | 
|  | 2409 | VkBool32                                    independentBlend                          /// blending operations are controlled per-attachment | 
|  | 2410 | VkBool32                                    geometryShader                            /// geometry stage | 
|  | 2411 | VkBool32                                    tessellationShader                        /// tessellation control and evaluation stage | 
|  | 2412 | VkBool32                                    sampleRateShading                         /// per-sample shading and interpolation | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2413 | VkBool32                                    dualSrcBlend                              /// blend operations which take two sources | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2414 | VkBool32                                    logicOp                                   /// logic operations | 
|  | 2415 | VkBool32                                    multiDrawIndirect                         /// multi draw indirect | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2416 | VkBool32                                    drawIndirectFirstInstance | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2417 | VkBool32                                    depthClamp                                /// depth clamping | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2418 | VkBool32                                    depthBiasClamp                            /// depth bias clamping | 
|  | 2419 | VkBool32                                    fillModeNonSolid                          /// point and wireframe fill modes | 
|  | 2420 | VkBool32                                    depthBounds                               /// depth bounds test | 
|  | 2421 | VkBool32                                    wideLines                                 /// lines with width greater than 1 | 
|  | 2422 | VkBool32                                    largePoints                               /// points with size greater than 1 | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2423 | VkBool32                                    alphaToOne                                /// The fragment alpha channel can be forced to maximum representable alpha value | 
|  | 2424 | VkBool32                                    multiViewport | 
|  | 2425 | VkBool32                                    samplerAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2426 | VkBool32                                    textureCompressionETC2                    /// ETC texture compression formats | 
|  | 2427 | VkBool32                                    textureCompressionASTC_LDR                /// ASTC LDR texture compression formats | 
|  | 2428 | VkBool32                                    textureCompressionBC                      /// BC1-7 texture compressed formats | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2429 | VkBool32                                    occlusionQueryPrecise | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2430 | VkBool32                                    pipelineStatisticsQuery                   /// pipeline statistics query | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2431 | VkBool32                                    vertexPipelineStoresAndAtomics | 
|  | 2432 | VkBool32                                    fragmentStoresAndAtomics | 
|  | 2433 | VkBool32                                    shaderTessellationAndGeometryPointSize | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2434 | VkBool32                                    shaderImageGatherExtended                 /// texture gather with run-time values and independent offsets | 
|  | 2435 | VkBool32                                    shaderStorageImageExtendedFormats         /// the extended set of formats can be used for storage images | 
|  | 2436 | VkBool32                                    shaderStorageImageMultisample             /// multisample images can be used for storage images | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2437 | VkBool32                                    shaderStorageImageReadWithoutFormat | 
|  | 2438 | VkBool32                                    shaderStorageImageWriteWithoutFormat | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2439 | VkBool32                                    shaderUniformBufferArrayDynamicIndexing   /// arrays of uniform buffers can be accessed with dynamically uniform indices | 
|  | 2440 | VkBool32                                    shaderSampledImageArrayDynamicIndexing    /// arrays of sampled images can be accessed with dynamically uniform indices | 
|  | 2441 | VkBool32                                    shaderStorageBufferArrayDynamicIndexing   /// arrays of storage buffers can be accessed with dynamically uniform indices | 
|  | 2442 | VkBool32                                    shaderStorageImageArrayDynamicIndexing    /// arrays of storage images can be accessed with dynamically uniform indices | 
|  | 2443 | VkBool32                                    shaderClipDistance                        /// clip distance in shaders | 
|  | 2444 | VkBool32                                    shaderCullDistance                        /// cull distance in shaders | 
|  | 2445 | VkBool32                                    shaderFloat64                             /// 64-bit floats (doubles) in shaders | 
|  | 2446 | VkBool32                                    shaderInt64                               /// 64-bit integers in shaders | 
|  | 2447 | VkBool32                                    shaderInt16                               /// 16-bit integers in shaders | 
|  | 2448 | 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] | 2449 | VkBool32                                    shaderResourceMinLod                      /// shader can use texture operations that specify minimum resource LOD | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2450 | VkBool32                                    sparseBinding                             /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level | 
|  | 2451 | VkBool32                                    sparseResidencyBuffer                     /// Sparse resources support: GPU can access partially resident buffers | 
|  | 2452 | VkBool32                                    sparseResidencyImage2D                    /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images | 
|  | 2453 | VkBool32                                    sparseResidencyImage3D                    /// Sparse resources support: GPU can access partially resident 3D images | 
|  | 2454 | VkBool32                                    sparseResidency2Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples | 
|  | 2455 | VkBool32                                    sparseResidency4Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples | 
|  | 2456 | VkBool32                                    sparseResidency8Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples | 
|  | 2457 | VkBool32                                    sparseResidency16Samples                  /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples | 
|  | 2458 | 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] | 2459 | VkBool32                                    variableMultisampleRate | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2460 | VkBool32                                    inheritedQueries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2461 | } | 
|  | 2462 |  | 
|  | 2463 | class VkPhysicalDeviceLimits { | 
|  | 2464 | /// resource maximum sizes | 
|  | 2465 | u32                                         maxImageDimension1D                       /// max 1D image dimension | 
|  | 2466 | u32                                         maxImageDimension2D                       /// max 2D image dimension | 
|  | 2467 | u32                                         maxImageDimension3D                       /// max 3D image dimension | 
|  | 2468 | u32                                         maxImageDimensionCube                     /// max cubemap image dimension | 
|  | 2469 | u32                                         maxImageArrayLayers                       /// max layers for image arrays | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2470 | u32                                         maxTexelBufferElements | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2471 | u32                                         maxUniformBufferRange                     /// max uniform buffer size (bytes) | 
|  | 2472 | u32                                         maxStorageBufferRange                     /// max storage buffer size (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2473 | u32                                         maxPushConstantsSize                      /// max size of the push constants pool (bytes) | 
|  | 2474 | /// memory limits | 
|  | 2475 | u32                                         maxMemoryAllocationCount                  /// max number of device memory allocations supported | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2476 | u32                                         maxSamplerAllocationCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2477 | VkDeviceSize                                bufferImageGranularity                    /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage | 
|  | 2478 | VkDeviceSize                                sparseAddressSpaceSize                    /// Total address space available for sparse allocations (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2479 | /// descriptor set limits | 
|  | 2480 | 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] | 2481 | u32                                         maxPerStageDescriptorSamplers             /// max num of samplers allowed per-stage in a descriptor set | 
|  | 2482 | u32                                         maxPerStageDescriptorUniformBuffers       /// max num of uniform buffers allowed per-stage in a descriptor set | 
|  | 2483 | u32                                         maxPerStageDescriptorStorageBuffers       /// max num of storage buffers allowed per-stage in a descriptor set | 
|  | 2484 | u32                                         maxPerStageDescriptorSampledImages        /// max num of sampled images allowed per-stage in a descriptor set | 
|  | 2485 | 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] | 2486 | u32                                         maxPerStageDescriptorInputAttachments | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2487 | u32                                         maxPerStageResources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2488 | u32                                         maxDescriptorSetSamplers                  /// max num of samplers allowed in all stages in a descriptor set | 
|  | 2489 | 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] | 2490 | 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] | 2491 | 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] | 2492 | 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] | 2493 | u32                                         maxDescriptorSetSampledImages             /// max num of sampled images allowed in all stages in a descriptor set | 
|  | 2494 | 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] | 2495 | u32                                         maxDescriptorSetInputAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2496 | /// vertex stage limits | 
|  | 2497 | u32                                         maxVertexInputAttributes                  /// max num of vertex input attribute slots | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2498 | u32                                         maxVertexInputBindings                    /// max num of vertex input binding slots | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2499 | u32                                         maxVertexInputAttributeOffset             /// max vertex input attribute offset added to vertex buffer offset | 
|  | 2500 | u32                                         maxVertexInputBindingStride               /// max vertex input binding stride | 
|  | 2501 | u32                                         maxVertexOutputComponents                 /// max num of output components written by vertex shader | 
|  | 2502 | /// tessellation control stage limits | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2503 | u32                                         maxTessellationGenerationLevel                  /// max level supported by tess primitive generator | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2504 | u32                                         maxTessellationPatchSize                        /// max patch size (vertices) | 
|  | 2505 | u32                                         maxTessellationControlPerVertexInputComponents  /// max num of input components per-vertex in TCS | 
|  | 2506 | u32                                         maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS | 
|  | 2507 | u32                                         maxTessellationControlPerPatchOutputComponents  /// max num of output components per-patch in TCS | 
|  | 2508 | u32                                         maxTessellationControlTotalOutputComponents     /// max total num of per-vertex and per-patch output components in TCS | 
|  | 2509 | u32                                         maxTessellationEvaluationInputComponents        /// max num of input components per vertex in TES | 
|  | 2510 | u32                                         maxTessellationEvaluationOutputComponents       /// max num of output components per vertex in TES | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2511 | /// geometry stage limits | 
|  | 2512 | u32                                         maxGeometryShaderInvocations              /// max invocation count supported in geometry shader | 
|  | 2513 | u32                                         maxGeometryInputComponents                /// max num of input components read in geometry stage | 
|  | 2514 | u32                                         maxGeometryOutputComponents               /// max num of output components written in geometry stage | 
|  | 2515 | u32                                         maxGeometryOutputVertices                 /// max num of vertices that can be emitted in geometry stage | 
|  | 2516 | u32                                         maxGeometryTotalOutputComponents          /// max total num of components (all vertices) written in geometry stage | 
|  | 2517 | /// fragment stage limits | 
|  | 2518 | u32                                         maxFragmentInputComponents                /// max num of input compontents read in fragment stage | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2519 | u32                                         maxFragmentOutputAttachments              /// max num of output attachments written in fragment stage | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2520 | 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] | 2521 | u32                                         maxFragmentCombinedOutputResources        /// max total num of storage buffers, storage images and output buffers | 
|  | 2522 | /// compute stage limits | 
|  | 2523 | u32                                         maxComputeSharedMemorySize                /// max total storage size of work group local storage (bytes) | 
|  | 2524 | u32[3]                                      maxComputeWorkGroupCount                  /// max num of compute work groups that may be dispatched by a single command (x,y,z) | 
|  | 2525 | u32                                         maxComputeWorkGroupInvocations            /// max total compute invocations in a single local work group | 
|  | 2526 | u32[3]                                      maxComputeWorkGroupSize                   /// max local size of a compute work group (x,y,z) | 
|  | 2527 |  | 
|  | 2528 | u32                                         subPixelPrecisionBits                     /// num bits of subpixel precision in screen x and y | 
|  | 2529 | u32                                         subTexelPrecisionBits                     /// num bits of subtexel precision | 
|  | 2530 | u32                                         mipmapPrecisionBits                       /// num bits of mipmap precision | 
|  | 2531 |  | 
|  | 2532 | 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] | 2533 | u32                                         maxDrawIndirectCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2534 |  | 
|  | 2535 | f32                                         maxSamplerLodBias                         /// max absolute sampler level of detail bias | 
|  | 2536 | f32                                         maxSamplerAnisotropy                      /// max degree of sampler anisotropy | 
|  | 2537 |  | 
|  | 2538 | u32                                         maxViewports                              /// max number of active viewports | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2539 | u32[2]                                      maxViewportDimensions                     /// max viewport dimensions (x,y) | 
|  | 2540 | f32[2]                                      viewportBoundsRange                       /// viewport bounds range (min,max) | 
|  | 2541 | u32                                         viewportSubPixelBits                      /// num bits of subpixel precision for viewport | 
|  | 2542 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2543 | platform.size_t                             minMemoryMapAlignment                     /// min required alignment of pointers returned by MapMemory (bytes) | 
|  | 2544 | VkDeviceSize                                minTexelBufferOffsetAlignment             /// min required alignment for texel buffer offsets (bytes) | 
|  | 2545 | VkDeviceSize                                minUniformBufferOffsetAlignment           /// min required alignment for uniform buffer sizes and offsets (bytes) | 
|  | 2546 | VkDeviceSize                                minStorageBufferOffsetAlignment           /// min required alignment for storage buffer offsets (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2547 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2548 | s32                                         minTexelOffset                            /// min texel offset for OpTextureSampleOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2549 | u32                                         maxTexelOffset                            /// max texel offset for OpTextureSampleOffset | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2550 | s32                                         minTexelGatherOffset                      /// min texel offset for OpTextureGatherOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2551 | u32                                         maxTexelGatherOffset                      /// max texel offset for OpTextureGatherOffset | 
|  | 2552 | f32                                         minInterpolationOffset                    /// furthest negative offset for interpolateAtOffset | 
|  | 2553 | f32                                         maxInterpolationOffset                    /// furthest positive offset for interpolateAtOffset | 
|  | 2554 | u32                                         subPixelInterpolationOffsetBits           /// num of subpixel bits for interpolateAtOffset | 
|  | 2555 |  | 
|  | 2556 | u32                                         maxFramebufferWidth                       /// max width for a framebuffer | 
|  | 2557 | u32                                         maxFramebufferHeight                      /// max height for a framebuffer | 
|  | 2558 | u32                                         maxFramebufferLayers                      /// max layer count for a layered framebuffer | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2559 | VkSampleCountFlags                          framebufferColorSampleCounts | 
|  | 2560 | VkSampleCountFlags                          framebufferDepthSampleCounts | 
|  | 2561 | VkSampleCountFlags                          framebufferStencilSampleCounts | 
|  | 2562 | VkSampleCountFlags                          framebufferNoAttachmentSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2563 | u32                                         maxColorAttachments                       /// max num of framebuffer color attachments | 
|  | 2564 |  | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2565 | VkSampleCountFlags                          sampledImageColorSampleCounts | 
|  | 2566 | VkSampleCountFlags                          sampledImageIntegerSampleCounts | 
|  | 2567 | VkSampleCountFlags                          sampledImageDepthSampleCounts | 
|  | 2568 | VkSampleCountFlags                          sampledImageStencilSampleCounts | 
|  | 2569 | VkSampleCountFlags                          storageImageSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2570 | u32                                         maxSampleMaskWords                        /// max num of sample mask words | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2571 | VkBool32                                    timestampComputeAndGraphics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2572 |  | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2573 | f32                                         timestampPeriod | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2574 |  | 
|  | 2575 | u32                                         maxClipDistances                          /// max number of clip distances | 
|  | 2576 | u32                                         maxCullDistances                          /// max number of cull distances | 
|  | 2577 | u32                                         maxCombinedClipAndCullDistances           /// max combined number of user clipping | 
|  | 2578 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2579 | u32                                         discreteQueuePriorities | 
|  | 2580 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2581 | f32[2]                                      pointSizeRange                            /// range (min,max) of supported point sizes | 
|  | 2582 | f32[2]                                      lineWidthRange                            /// range (min,max) of supported line widths | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2583 | f32                                         pointSizeGranularity                      /// granularity of supported point sizes | 
|  | 2584 | f32                                         lineWidthGranularity                      /// granularity of supported line widths | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2585 | VkBool32                                    strictLines | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2586 | VkBool32                                    standardSampleLocations | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2587 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2588 | VkDeviceSize                                optimalBufferCopyOffsetAlignment | 
|  | 2589 | VkDeviceSize                                optimalBufferCopyRowPitchAlignment | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2590 | VkDeviceSize                                nonCoherentAtomSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2591 | } | 
|  | 2592 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2593 | class VkPhysicalDeviceSparseProperties { | 
|  | 2594 | 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] | 2595 | 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] | 2596 | VkBool32                                    residencyStandard3DBlockShape             /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) | 
|  | 2597 | 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] | 2598 | 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 | 
|  | 2599 | } | 
|  | 2600 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2601 | class VkSemaphoreCreateInfo { | 
|  | 2602 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO | 
|  | 2603 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2604 | VkSemaphoreCreateFlags                      flags      /// Semaphore creation flags | 
|  | 2605 | } | 
|  | 2606 |  | 
|  | 2607 | class VkQueryPoolCreateInfo { | 
|  | 2608 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO | 
|  | 2609 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2610 | VkQueryPoolCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2611 | VkQueryType                                 queryType | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2612 | u32                                         queryCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2613 | VkQueryPipelineStatisticFlags               pipelineStatistics /// Optional | 
|  | 2614 | } | 
|  | 2615 |  | 
|  | 2616 | class VkFramebufferCreateInfo { | 
|  | 2617 | VkStructureType                             sType  /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO | 
|  | 2618 | const void*                                 pNext  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2619 | VkFramebufferCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2620 | VkRenderPass                                renderPass | 
|  | 2621 | u32                                         attachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2622 | const VkImageView*                          pAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2623 | u32                                         width | 
|  | 2624 | u32                                         height | 
|  | 2625 | u32                                         layers | 
|  | 2626 | } | 
|  | 2627 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2628 | class VkDrawIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2629 | u32                                         vertexCount | 
|  | 2630 | u32                                         instanceCount | 
|  | 2631 | u32                                         firstVertex | 
|  | 2632 | u32                                         firstInstance | 
|  | 2633 | } | 
|  | 2634 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2635 | class VkDrawIndexedIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2636 | u32                                         indexCount | 
|  | 2637 | u32                                         instanceCount | 
|  | 2638 | u32                                         firstIndex | 
|  | 2639 | s32                                         vertexOffset | 
|  | 2640 | u32                                         firstInstance | 
|  | 2641 | } | 
|  | 2642 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2643 | class VkDispatchIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2644 | u32                                         x | 
|  | 2645 | u32                                         y | 
|  | 2646 | u32                                         z | 
|  | 2647 | } | 
|  | 2648 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2649 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2650 | class VkSurfaceCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2651 | u32                                         minImageCount | 
|  | 2652 | u32                                         maxImageCount | 
|  | 2653 | VkExtent2D                                  currentExtent | 
|  | 2654 | VkExtent2D                                  minImageExtent | 
|  | 2655 | VkExtent2D                                  maxImageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2656 | u32                                         maxImageArrayLayers | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2657 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2658 | VkSurfaceTransformFlagBitsKHR               currentTransform | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2659 | VkCompositeAlphaFlagsKHR                    supportedCompositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2660 | VkImageUsageFlags                           supportedUsageFlags | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2661 | } | 
|  | 2662 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2663 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2664 | class VkSurfaceFormatKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2665 | VkFormat                                    format | 
|  | 2666 | VkColorSpaceKHR                             colorSpace | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2667 | } | 
|  | 2668 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2669 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2670 | class VkSwapchainCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2671 | VkStructureType                             sType | 
|  | 2672 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2673 | VkSwapchainCreateFlagsKHR                   flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2674 | VkSurfaceKHR                                surface | 
|  | 2675 | u32                                         minImageCount | 
|  | 2676 | VkFormat                                    imageFormat | 
|  | 2677 | VkColorSpaceKHR                             imageColorSpace | 
|  | 2678 | VkExtent2D                                  imageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2679 | u32                                         imageArrayLayers | 
|  | 2680 | VkImageUsageFlags                           imageUsage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2681 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2682 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2683 | const u32*                                  pQueueFamilyIndices | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2684 | VkSurfaceTransformFlagBitsKHR               preTransform | 
|  | 2685 | VkCompositeAlphaFlagBitsKHR                 compositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2686 | VkPresentModeKHR                            presentMode | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2687 | VkBool32                                    clipped | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2688 | VkSwapchainKHR                              oldSwapchain | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2689 | } | 
|  | 2690 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2691 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2692 | class VkPresentInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2693 | VkStructureType                             sType | 
|  | 2694 | const void*                                 pNext | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2695 | u32                                         waitSemaphoreCount | 
|  | 2696 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2697 | u32                                         swapchainCount | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2698 | const VkSwapchainKHR*                       pSwapchains | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2699 | const u32*                                  pImageIndices | 
| Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2700 | VkResult*                                   pResults | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2701 | } | 
|  | 2702 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2703 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2704 | class VkDisplayPropertiesKHR { | 
|  | 2705 | VkDisplayKHR                                display | 
|  | 2706 | const char*                                 displayName | 
|  | 2707 | VkExtent2D                                  physicalDimensions | 
|  | 2708 | VkExtent2D                                  physicalResolution | 
|  | 2709 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2710 | VkBool32                                    planeReorderPossible | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2711 | VkBool32                                    persistentContent | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2712 | } | 
|  | 2713 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2714 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2715 | class VkDisplayModeParametersKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2716 | VkExtent2D                                  visibleRegion | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2717 | u32                                         refreshRate | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2718 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2719 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2720 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2721 | class VkDisplayModePropertiesKHR { | 
|  | 2722 | VkDisplayModeKHR                            displayMode | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2723 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2724 | } | 
|  | 2725 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2726 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2727 | class VkDisplayModeCreateInfoKHR { | 
|  | 2728 | VkStructureType                             sType | 
|  | 2729 | const void*                                 pNext | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2730 | VkDisplayModeCreateFlagsKHR                 flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2731 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2732 | } | 
|  | 2733 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2734 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2735 | class VkDisplayPlanePropertiesKHR { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2736 | VkDisplayKHR                                currentDisplay | 
|  | 2737 | u32                                         currentStackIndex | 
|  | 2738 | } | 
|  | 2739 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2740 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2741 | class VkDisplayPlaneCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2742 | VkDisplayPlaneAlphaFlagsKHR                 supportedAlpha | 
|  | 2743 | VkOffset2D                                  minSrcPosition | 
|  | 2744 | VkOffset2D                                  maxSrcPosition | 
|  | 2745 | VkExtent2D                                  minSrcExtent | 
|  | 2746 | VkExtent2D                                  maxSrcExtent | 
|  | 2747 | VkOffset2D                                  minDstPosition | 
|  | 2748 | VkOffset2D                                  maxDstPosition | 
|  | 2749 | VkExtent2D                                  minDstExtent | 
|  | 2750 | VkExtent2D                                  maxDstExtent | 
|  | 2751 | } | 
|  | 2752 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2753 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2754 | class VkDisplaySurfaceCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2755 | VkStructureType                             sType | 
|  | 2756 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2757 | VkDisplaySurfaceCreateFlagsKHR              flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2758 | VkDisplayModeKHR                            displayMode | 
|  | 2759 | u32                                         planeIndex | 
|  | 2760 | u32                                         planeStackIndex | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2761 | VkSurfaceTransformFlagBitsKHR               transform | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2762 | f32                                         globalAlpha | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2763 | VkDisplayPlaneAlphaFlagBitsKHR              alphaMode | 
|  | 2764 | VkExtent2D                                  imageExtent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2765 | } | 
|  | 2766 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2767 | @extension("VK_KHR_display_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2768 | class VkDisplayPresentInfoKHR { | 
|  | 2769 | VkStructureType                             sType | 
|  | 2770 | const void*                                 pNext | 
|  | 2771 | VkRect2D                                    srcRect | 
|  | 2772 | VkRect2D                                    dstRect | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2773 | VkBool32                                    persistent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2774 | } | 
|  | 2775 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2776 | @extension("VK_KHR_xlib_surface") | 
|  | 2777 | class VkXlibSurfaceCreateInfoKHR { | 
|  | 2778 | VkStructureType                             sType | 
|  | 2779 | const void*                                 pNext | 
|  | 2780 | VkXlibSurfaceCreateFlagsKHR                 flags | 
|  | 2781 | platform.Display*                           dpy | 
|  | 2782 | platform.Window                             window | 
|  | 2783 | } | 
|  | 2784 |  | 
|  | 2785 | @extension("VK_KHR_xcb_surface") | 
|  | 2786 | class VkXcbSurfaceCreateInfoKHR { | 
|  | 2787 | VkStructureType                             sType | 
|  | 2788 | const void*                                 pNext | 
|  | 2789 | VkXcbSurfaceCreateFlagsKHR                  flags | 
|  | 2790 | platform.xcb_connection_t*                  connection | 
|  | 2791 | platform.xcb_window_t                       window | 
|  | 2792 | } | 
|  | 2793 |  | 
|  | 2794 | @extension("VK_KHR_wayland_surface") | 
|  | 2795 | class VkWaylandSurfaceCreateInfoKHR { | 
|  | 2796 | VkStructureType                             sType | 
|  | 2797 | const void*                                 pNext | 
|  | 2798 | VkWaylandSurfaceCreateFlagsKHR              flags | 
|  | 2799 | platform.wl_display*                        display | 
|  | 2800 | platform.wl_surface*                        surface | 
|  | 2801 | } | 
|  | 2802 |  | 
|  | 2803 | @extension("VK_KHR_mir_surface") | 
|  | 2804 | class VkMirSurfaceCreateInfoKHR { | 
|  | 2805 | VkStructureType                             sType | 
|  | 2806 | const void*                                 pNext | 
|  | 2807 | VkMirSurfaceCreateFlagsKHR                  flags | 
|  | 2808 | platform.MirConnection*                     connection | 
|  | 2809 | platform.MirSurface*                        mirSurface | 
|  | 2810 | } | 
|  | 2811 |  | 
|  | 2812 | @extension("VK_KHR_android_surface") | 
|  | 2813 | class VkAndroidSurfaceCreateInfoKHR { | 
|  | 2814 | VkStructureType                             sType | 
|  | 2815 | const void*                                 pNext | 
|  | 2816 | VkAndroidSurfaceCreateFlagsKHR              flags | 
|  | 2817 | platform.ANativeWindow*                     window | 
|  | 2818 | } | 
|  | 2819 |  | 
|  | 2820 | @extension("VK_KHR_win32_surface") | 
|  | 2821 | class VkWin32SurfaceCreateInfoKHR { | 
|  | 2822 | VkStructureType                             sType | 
|  | 2823 | const void*                                 pNext | 
|  | 2824 | VkWin32SurfaceCreateFlagsKHR                flags | 
|  | 2825 | platform.HINSTANCE                          hinstance | 
|  | 2826 | platform.HWND                               hwnd | 
|  | 2827 | } | 
|  | 2828 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2829 | @extension("VK_ANDROID_native_buffer") | 
|  | 2830 | class VkNativeBufferANDROID { | 
|  | 2831 | VkStructureType                             sType | 
|  | 2832 | const void*                                 pNext | 
|  | 2833 | platform.buffer_handle_t                    handle | 
|  | 2834 | int                                         stride | 
|  | 2835 | int                                         format | 
|  | 2836 | int                                         usage | 
|  | 2837 | } | 
|  | 2838 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2839 | @extension("VK_EXT_debug_report") | 
|  | 2840 | class VkDebugReportCallbackCreateInfoEXT { | 
|  | 2841 | VkStructureType                             sType | 
|  | 2842 | const void*                                 pNext | 
|  | 2843 | VkDebugReportFlagsEXT                       flags | 
|  | 2844 | PFN_vkDebugReportCallbackEXT                pfnCallback | 
|  | 2845 | void*                                       pUserData | 
|  | 2846 | } | 
|  | 2847 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2848 | @extension("VK_AMD_rasterization_order") | 
|  | 2849 | class VkPipelineRasterizationStateRasterizationOrderAMD { | 
|  | 2850 | VkStructureType                             sType | 
|  | 2851 | const void*                                 pNext | 
|  | 2852 | VkRasterizationOrderAMD                     rasterizationOrder | 
|  | 2853 | } | 
|  | 2854 |  | 
|  | 2855 | @extension("VK_EXT_debug_marker") | 
|  | 2856 | class VkDebugMarkerObjectNameInfoEXT { | 
|  | 2857 | VkStructureType                             sType | 
|  | 2858 | const void*                                 pNext | 
|  | 2859 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2860 | u64                                         object | 
|  | 2861 | const char*                                 pObjectName | 
|  | 2862 | } | 
|  | 2863 |  | 
|  | 2864 | @extension("VK_EXT_debug_marker") | 
|  | 2865 | class VkDebugMarkerObjectTagInfoEXT { | 
|  | 2866 | VkStructureType                             sType | 
|  | 2867 | const void*                                 pNext | 
|  | 2868 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2869 | u64                                         object | 
|  | 2870 | u64                                         tagName | 
|  | 2871 | platform.size_t                             tagSize | 
|  | 2872 | const void*                                 pTag | 
|  | 2873 | } | 
|  | 2874 |  | 
|  | 2875 | @extension("VK_EXT_debug_marker") | 
|  | 2876 | class VkDebugMarkerMarkerInfoEXT { | 
|  | 2877 | VkStructureType                             sType | 
|  | 2878 | const void*                                 pNext | 
|  | 2879 | const char*                                 pMarkerName | 
|  | 2880 | f32[4]                                      color | 
|  | 2881 | } | 
|  | 2882 |  | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2883 | @extension("VK_NV_dedicated_allocation") | 
|  | 2884 | class VkDedicatedAllocationImageCreateInfoNV { | 
|  | 2885 | VkStructureType                             sType | 
|  | 2886 | const void*                                 pNext | 
|  | 2887 | VkBool32                                    dedicatedAllocation | 
|  | 2888 | } | 
|  | 2889 |  | 
|  | 2890 | @extension("VK_NV_dedicated_allocation") | 
|  | 2891 | class VkDedicatedAllocationBufferCreateInfoNV { | 
|  | 2892 | VkStructureType                             sType | 
|  | 2893 | const void*                                 pNext | 
|  | 2894 | VkBool32                                    dedicatedAllocation | 
|  | 2895 | } | 
|  | 2896 |  | 
|  | 2897 | @extension("VK_NV_dedicated_allocation") | 
|  | 2898 | class VkDedicatedAllocationMemoryAllocateInfoNV { | 
|  | 2899 | VkStructureType                             sType | 
|  | 2900 | const void*                                 pNext | 
|  | 2901 | VkImage                                     image | 
|  | 2902 | VkBuffer                                    buffer | 
|  | 2903 | } | 
|  | 2904 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 2905 | @extension("VK_NV_external_memory_capabilities") | 
|  | 2906 | class VkExternalImageFormatPropertiesNV { | 
|  | 2907 | VkImageFormatProperties                     imageFormatProperties | 
|  | 2908 | VkExternalMemoryFeatureFlagsNV              externalMemoryFeatures | 
|  | 2909 | VkExternalMemoryHandleTypeFlagsNV           exportFromImportedHandleTypes | 
|  | 2910 | VkExternalMemoryHandleTypeFlagsNV           compatibleHandleTypes | 
|  | 2911 | } | 
|  | 2912 |  | 
|  | 2913 | @extension("VK_NV_external_memory") | 
|  | 2914 | class VkExternalMemoryImageCreateInfoNV { | 
|  | 2915 | VkStructureType                             sType | 
|  | 2916 | const void*                                 pNext | 
|  | 2917 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 2918 | } | 
|  | 2919 |  | 
|  | 2920 | @extension("VK_NV_external_memory") | 
|  | 2921 | class VkExportMemoryAllocateInfoNV { | 
|  | 2922 | VkStructureType                             sType | 
|  | 2923 | const void*                                 pNext | 
|  | 2924 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 2925 | } | 
|  | 2926 |  | 
|  | 2927 | @extension("VK_NV_external_memory_win32") | 
|  | 2928 | class VkImportMemoryWin32HandleInfoNV { | 
|  | 2929 | VkStructureType                             sType | 
|  | 2930 | const void*                                 pNext | 
|  | 2931 | VkExternalMemoryHandleTypeFlagsNV           handleType | 
|  | 2932 | platform.HANDLE                             handle | 
|  | 2933 | } | 
|  | 2934 |  | 
|  | 2935 | @extension("VK_NV_external_memory_win32") | 
|  | 2936 | class VkExportMemoryWin32HandleInfoNV { | 
|  | 2937 | VkStructureType                             sType | 
|  | 2938 | const void*                                 pNext | 
|  | 2939 | const platform.SECURITY_ATTRIBUTES*         pAttributes | 
|  | 2940 | platform.DWORD                              dwAccess | 
|  | 2941 | } | 
|  | 2942 |  | 
|  | 2943 | @extension("VK_NV_win32_keyed_mutex") | 
|  | 2944 | class VkWin32KeyedMutexAcquireReleaseInfoNV { | 
|  | 2945 | VkStructureType                             sType | 
|  | 2946 | const void*                                 pNext | 
|  | 2947 | u32                                         acquireCount | 
|  | 2948 | const VkDeviceMemory*                       pAcquireSyncs | 
|  | 2949 | const u64*                                  pAcquireKeys | 
|  | 2950 | const u32*                                  pAcquireTimeoutMilliseconds | 
|  | 2951 | u32                                         releaseCount | 
|  | 2952 | const VkDeviceMemory*                       pReleaseSyncs | 
|  | 2953 | const u64*                                  pReleaseKeys | 
|  | 2954 | } | 
|  | 2955 |  | 
|  | 2956 | @extension("VK_EXT_validation_flags") | 
|  | 2957 | class VkValidationFlagsEXT { | 
|  | 2958 | VkStructureType                             sType | 
|  | 2959 | const void*                                 pNext | 
|  | 2960 | u32                                         disabledValidationCheckCount | 
|  | 2961 | VkValidationCheckEXT*                       pDisabledValidationChecks | 
|  | 2962 | } | 
|  | 2963 |  | 
|  | 2964 | @extension("VK_NVX_device_generated_commands") | 
|  | 2965 | class VkDeviceGeneratedCommandsFeaturesNVX { | 
|  | 2966 | VkStructureType                             sType | 
|  | 2967 | const void*                                 pNext | 
|  | 2968 | VkBool32                                    computeBindingPointSupport | 
|  | 2969 | } | 
|  | 2970 |  | 
|  | 2971 | @extension("VK_NVX_device_generated_commands") | 
|  | 2972 | class VkDeviceGeneratedCommandsLimitsNVX { | 
|  | 2973 | VkStructureType                             sType | 
|  | 2974 | const void*                                 pNext | 
|  | 2975 | u32                                         maxIndirectCommandsLayoutTokenCount | 
|  | 2976 | u32                                         maxObjectEntryCounts | 
|  | 2977 | u32                                         minSequenceCountBufferOffsetAlignment | 
|  | 2978 | u32                                         minSequenceIndexBufferOffsetAlignment | 
|  | 2979 | u32                                         minCommandsTokenBufferOffsetAlignment | 
|  | 2980 | } | 
|  | 2981 |  | 
|  | 2982 | @extension("VK_NVX_device_generated_commands") | 
|  | 2983 | class VkIndirectCommandsTokenNVX { | 
|  | 2984 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 2985 | VkBuffer                                    buffer | 
|  | 2986 | VkDeviceSize                                offset | 
|  | 2987 | } | 
|  | 2988 |  | 
|  | 2989 | @extension("VK_NVX_device_generated_commands") | 
|  | 2990 | class VkIndirectCommandsLayoutTokenNVX { | 
|  | 2991 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 2992 | u32                                         bindingUnit | 
|  | 2993 | u32                                         dynamicCount | 
|  | 2994 | u32                                         divisor | 
|  | 2995 | } | 
|  | 2996 |  | 
|  | 2997 | @extension("VK_NVX_device_generated_commands") | 
|  | 2998 | class VkIndirectCommandsLayoutCreateInfoNVX { | 
|  | 2999 | VkStructureType                             sType | 
|  | 3000 | const void*                                 pNext | 
|  | 3001 | VkPipelineBindPoint                         pipelineBindPoint | 
|  | 3002 | VkIndirectCommandsLayoutUsageFlagsNVX       flags | 
|  | 3003 | u32                                         tokenCount | 
|  | 3004 | const VkIndirectCommandsLayoutTokenNVX*     pTokens | 
|  | 3005 | } | 
|  | 3006 |  | 
|  | 3007 | @extension("VK_NVX_device_generated_commands") | 
|  | 3008 | class VkCmdProcessCommandsInfoNVX { | 
|  | 3009 | VkStructureType                             sType | 
|  | 3010 | const void*                                 pNext | 
|  | 3011 | VkObjectTableNVX                            objectTable | 
|  | 3012 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3013 | u32                                         indirectCommandsTokenCount | 
|  | 3014 | const VkIndirectCommandsTokenNVX*           pIndirectCommandsTokens | 
|  | 3015 | u32                                         maxSequencesCount | 
|  | 3016 | VkCommandBuffer                             targetCommandBuffer | 
|  | 3017 | VkBuffer                                    sequencesCountBuffer | 
|  | 3018 | VkDeviceSize                                sequencesCountOffset | 
|  | 3019 | VkBuffer                                    sequencesIndexBuffer | 
|  | 3020 | VkDeviceSize                                sequencesIndexOffset | 
|  | 3021 | } | 
|  | 3022 |  | 
|  | 3023 | @extension("VK_NVX_device_generated_commands") | 
|  | 3024 | class VkCmdReserveSpaceForCommandsInfoNVX { | 
|  | 3025 | VkStructureType                             sType | 
|  | 3026 | const void*                                 pNext | 
|  | 3027 | VkObjectTableNVX                            objectTable | 
|  | 3028 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3029 | u32                                         maxSequencesCount | 
|  | 3030 | } | 
|  | 3031 |  | 
|  | 3032 | @extension("VK_NVX_device_generated_commands") | 
|  | 3033 | class VkObjectTableCreateInfoNVX { | 
|  | 3034 | VkStructureType                             sType | 
|  | 3035 | const void*                                 pNext | 
|  | 3036 | u32                                         objectCount | 
|  | 3037 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes | 
|  | 3038 | const u32*                                  pObjectEntryCounts | 
|  | 3039 | const VkObjectEntryUsageFlagsNVX*           pObjectEntryUsageFlags | 
|  | 3040 | u32                                         maxUniformBuffersPerDescriptor | 
|  | 3041 | u32                                         maxStorageBuffersPerDescriptor | 
|  | 3042 | u32                                         maxStorageImagesPerDescriptor | 
|  | 3043 | u32                                         maxSampledImagesPerDescriptor | 
|  | 3044 | u32                                         maxPipelineLayouts | 
|  | 3045 | } | 
|  | 3046 |  | 
|  | 3047 | @extension("VK_NVX_device_generated_commands") | 
|  | 3048 | class VkObjectTableEntryNVX { | 
|  | 3049 | VkObjectEntryTypeNVX                        type | 
|  | 3050 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3051 | } | 
|  | 3052 |  | 
|  | 3053 | @extension("VK_NVX_device_generated_commands") | 
|  | 3054 | class VkObjectTablePipelineEntryNVX { | 
|  | 3055 | VkObjectEntryTypeNVX                        type | 
|  | 3056 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3057 | VkPipeline                                  pipeline | 
|  | 3058 | } | 
|  | 3059 |  | 
|  | 3060 | @extension("VK_NVX_device_generated_commands") | 
|  | 3061 | class VkObjectTableDescriptorSetEntryNVX { | 
|  | 3062 | VkObjectEntryTypeNVX                        type | 
|  | 3063 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3064 | VkPipelineLayout                            pipelineLayout | 
|  | 3065 | VkDescriptorSet                             descriptorSet | 
|  | 3066 | } | 
|  | 3067 |  | 
|  | 3068 | @extension("VK_NVX_device_generated_commands") | 
|  | 3069 | class VkObjectTableVertexBufferEntryNVX { | 
|  | 3070 | VkObjectEntryTypeNVX                        type | 
|  | 3071 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3072 | VkBuffer                                    buffer | 
|  | 3073 | } | 
|  | 3074 |  | 
|  | 3075 | @extension("VK_NVX_device_generated_commands") | 
|  | 3076 | class VkObjectTableIndexBufferEntryNVX { | 
|  | 3077 | VkObjectEntryTypeNVX                        type | 
|  | 3078 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3079 | VkBuffer                                    buffer | 
|  | 3080 | } | 
|  | 3081 |  | 
|  | 3082 | @extension("VK_NVX_device_generated_commands") | 
|  | 3083 | class VkObjectTablePushConstantEntryNVX { | 
|  | 3084 | VkObjectEntryTypeNVX                        type | 
|  | 3085 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3086 | VkPipelineLayout                            pipelineLayout | 
|  | 3087 | VkShaderStageFlags                          stageFlags | 
|  | 3088 | } | 
|  | 3089 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3090 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3091 | //////////////// | 
|  | 3092 | //  Commands  // | 
|  | 3093 | //////////////// | 
|  | 3094 |  | 
|  | 3095 | // Function pointers. TODO: add support for function pointers. | 
|  | 3096 |  | 
|  | 3097 | @external type void* PFN_vkVoidFunction | 
|  | 3098 | @pfn cmd void vkVoidFunction() { | 
|  | 3099 | } | 
|  | 3100 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3101 | @external type void* PFN_vkAllocationFunction | 
|  | 3102 | @pfn cmd void* vkAllocationFunction( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3103 | void*                                       pUserData, | 
|  | 3104 | platform.size_t                             size, | 
|  | 3105 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3106 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3107 | return ? | 
|  | 3108 | } | 
|  | 3109 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3110 | @external type void* PFN_vkReallocationFunction | 
|  | 3111 | @pfn cmd void* vkReallocationFunction( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3112 | void*                                       pUserData, | 
|  | 3113 | void*                                       pOriginal, | 
|  | 3114 | platform.size_t                             size, | 
|  | 3115 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3116 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3117 | return ? | 
|  | 3118 | } | 
|  | 3119 |  | 
|  | 3120 | @external type void* PFN_vkFreeFunction | 
|  | 3121 | @pfn cmd void vkFreeFunction( | 
|  | 3122 | void*                                       pUserData, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3123 | void*                                       pMemory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3124 | } | 
|  | 3125 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3126 | @external type void* PFN_vkInternalAllocationNotification | 
|  | 3127 | @pfn cmd void vkInternalAllocationNotification( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3128 | void*                                       pUserData, | 
|  | 3129 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3130 | VkInternalAllocationType                    allocationType, | 
|  | 3131 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3132 | } | 
|  | 3133 |  | 
|  | 3134 | @external type void* PFN_vkInternalFreeNotification | 
|  | 3135 | @pfn cmd void vkInternalFreeNotification( | 
|  | 3136 | void*                                       pUserData, | 
|  | 3137 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3138 | VkInternalAllocationType                    allocationType, | 
|  | 3139 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3140 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3141 |  | 
|  | 3142 | // Global functions | 
|  | 3143 |  | 
|  | 3144 | @threadSafety("system") | 
|  | 3145 | cmd VkResult vkCreateInstance( | 
|  | 3146 | const VkInstanceCreateInfo*                 pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3147 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3148 | VkInstance*                                 pInstance) { | 
|  | 3149 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) | 
|  | 3150 |  | 
|  | 3151 | instance := ? | 
|  | 3152 | pInstance[0] = instance | 
|  | 3153 | State.Instances[instance] = new!InstanceObject() | 
|  | 3154 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3155 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] | 
|  | 3156 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3157 |  | 
|  | 3158 | return ? | 
|  | 3159 | } | 
|  | 3160 |  | 
|  | 3161 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3162 | cmd void vkDestroyInstance( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3163 | VkInstance                                  instance, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3164 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3165 | instanceObject := GetInstance(instance) | 
|  | 3166 |  | 
|  | 3167 | State.Instances[instance] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3168 | } | 
|  | 3169 |  | 
|  | 3170 | @threadSafety("system") | 
|  | 3171 | cmd VkResult vkEnumeratePhysicalDevices( | 
|  | 3172 | VkInstance                                  instance, | 
|  | 3173 | u32*                                        pPhysicalDeviceCount, | 
|  | 3174 | VkPhysicalDevice*                           pPhysicalDevices) { | 
|  | 3175 | instanceObject := GetInstance(instance) | 
|  | 3176 |  | 
|  | 3177 | physicalDeviceCount := as!u32(?) | 
|  | 3178 | pPhysicalDeviceCount[0] = physicalDeviceCount | 
|  | 3179 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] | 
|  | 3180 |  | 
|  | 3181 | for i in (0 .. physicalDeviceCount) { | 
|  | 3182 | physicalDevice := ? | 
|  | 3183 | physicalDevices[i] = physicalDevice | 
|  | 3184 | if !(physicalDevice in State.PhysicalDevices) { | 
|  | 3185 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) | 
|  | 3186 | } | 
|  | 3187 | } | 
|  | 3188 |  | 
|  | 3189 | return ? | 
|  | 3190 | } | 
|  | 3191 |  | 
|  | 3192 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( | 
|  | 3193 | VkDevice                                    device, | 
|  | 3194 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3195 | if device != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3196 | device := GetDevice(device) | 
|  | 3197 | } | 
|  | 3198 |  | 
|  | 3199 | return ? | 
|  | 3200 | } | 
|  | 3201 |  | 
|  | 3202 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( | 
|  | 3203 | VkInstance                                  instance, | 
|  | 3204 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3205 | if instance != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3206 | instanceObject := GetInstance(instance) | 
|  | 3207 | } | 
|  | 3208 |  | 
|  | 3209 | return ? | 
|  | 3210 | } | 
|  | 3211 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3212 | cmd void vkGetPhysicalDeviceProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3213 | VkPhysicalDevice                            physicalDevice, | 
|  | 3214 | VkPhysicalDeviceProperties*                 pProperties) { | 
|  | 3215 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3216 |  | 
|  | 3217 | properties := ? | 
|  | 3218 | pProperties[0] = properties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3219 | } | 
|  | 3220 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3221 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3222 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3223 | u32*                                        pQueueFamilyPropertyCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3224 | VkQueueFamilyProperties*                    pQueueFamilyProperties) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3225 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3226 | // TODO: Figure out how to express fetch-count-or-properties | 
|  | 3227 | // This version fails 'apic validate' with 'fence not allowed in | 
|  | 3228 | // *semantic.Branch'. Other attempts have failed with the same or other | 
|  | 3229 | // errors. | 
|  | 3230 | // if pQueueFamilyProperties != null { | 
|  | 3231 | //     queuesProperties := pQueueFamilyProperties[0:pCount[0]] | 
|  | 3232 | //     for i in (0 .. pCount[0]) { | 
|  | 3233 | //         queueProperties := as!VkQueueFamilyProperties(?) | 
|  | 3234 | //         queuesProperties[i] = queueProperties | 
|  | 3235 | //    } | 
|  | 3236 | // } else { | 
|  | 3237 | //     count := ? | 
|  | 3238 | //     pCount[0] = count | 
|  | 3239 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3240 | } | 
|  | 3241 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3242 | cmd void vkGetPhysicalDeviceMemoryProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3243 | VkPhysicalDevice                            physicalDevice, | 
|  | 3244 | VkPhysicalDeviceMemoryProperties*           pMemoryProperties) { | 
|  | 3245 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3246 |  | 
|  | 3247 | memoryProperties := ? | 
|  | 3248 | pMemoryProperties[0] = memoryProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3249 | } | 
|  | 3250 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3251 | cmd void vkGetPhysicalDeviceFeatures( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3252 | VkPhysicalDevice                            physicalDevice, | 
|  | 3253 | VkPhysicalDeviceFeatures*                   pFeatures) { | 
|  | 3254 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3255 |  | 
|  | 3256 | features := ? | 
|  | 3257 | pFeatures[0] = features | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3258 | } | 
|  | 3259 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3260 | cmd void vkGetPhysicalDeviceFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3261 | VkPhysicalDevice                            physicalDevice, | 
|  | 3262 | VkFormat                                    format, | 
|  | 3263 | VkFormatProperties*                         pFormatProperties) { | 
|  | 3264 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3265 |  | 
|  | 3266 | formatProperties := ? | 
|  | 3267 | pFormatProperties[0] = formatProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3268 | } | 
|  | 3269 |  | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3270 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3271 | VkPhysicalDevice                            physicalDevice, | 
|  | 3272 | VkFormat                                    format, | 
|  | 3273 | VkImageType                                 type, | 
|  | 3274 | VkImageTiling                               tiling, | 
|  | 3275 | VkImageUsageFlags                           usage, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3276 | VkImageCreateFlags                          flags, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3277 | VkImageFormatProperties*                    pImageFormatProperties) { | 
|  | 3278 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3279 |  | 
|  | 3280 | imageFormatProperties := ? | 
|  | 3281 | pImageFormatProperties[0] = imageFormatProperties | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3282 |  | 
|  | 3283 | return ? | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3284 | } | 
|  | 3285 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3286 |  | 
|  | 3287 | // Device functions | 
|  | 3288 |  | 
|  | 3289 | @threadSafety("system") | 
|  | 3290 | cmd VkResult vkCreateDevice( | 
|  | 3291 | VkPhysicalDevice                            physicalDevice, | 
|  | 3292 | const VkDeviceCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3293 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3294 | VkDevice*                                   pDevice) { | 
|  | 3295 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) | 
|  | 3296 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3297 |  | 
|  | 3298 | device := ? | 
|  | 3299 | pDevice[0] = device | 
|  | 3300 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) | 
|  | 3301 |  | 
|  | 3302 | return ? | 
|  | 3303 | } | 
|  | 3304 |  | 
|  | 3305 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3306 | cmd void vkDestroyDevice( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3307 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3308 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3309 | deviceObject := GetDevice(device) | 
|  | 3310 |  | 
|  | 3311 | State.Devices[device] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3312 | } | 
|  | 3313 |  | 
|  | 3314 |  | 
|  | 3315 | // Extension discovery functions | 
|  | 3316 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3317 | cmd VkResult vkEnumerateInstanceLayerProperties( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3318 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3319 | VkLayerProperties*                          pProperties) { | 
|  | 3320 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3321 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3322 |  | 
|  | 3323 | properties := pProperties[0:count] | 
|  | 3324 | for i in (0 .. count) { | 
|  | 3325 | property := ? | 
|  | 3326 | properties[i] = property | 
|  | 3327 | } | 
|  | 3328 |  | 
|  | 3329 | return ? | 
|  | 3330 | } | 
|  | 3331 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3332 | cmd VkResult vkEnumerateInstanceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3333 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3334 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3335 | VkExtensionProperties*                      pProperties) { | 
|  | 3336 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3337 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3338 |  | 
|  | 3339 | properties := pProperties[0:count] | 
|  | 3340 | for i in (0 .. count) { | 
|  | 3341 | property := ? | 
|  | 3342 | properties[i] = property | 
|  | 3343 | } | 
|  | 3344 |  | 
|  | 3345 | return ? | 
|  | 3346 | } | 
|  | 3347 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3348 | cmd VkResult vkEnumerateDeviceLayerProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3349 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3350 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3351 | VkLayerProperties*                          pProperties) { | 
|  | 3352 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3353 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3354 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3355 |  | 
|  | 3356 | properties := pProperties[0:count] | 
|  | 3357 | for i in (0 .. count) { | 
|  | 3358 | property := ? | 
|  | 3359 | properties[i] = property | 
|  | 3360 | } | 
|  | 3361 |  | 
|  | 3362 | return ? | 
|  | 3363 | } | 
|  | 3364 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3365 | cmd VkResult vkEnumerateDeviceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3366 | VkPhysicalDevice                            physicalDevice, | 
|  | 3367 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3368 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3369 | VkExtensionProperties*                      pProperties) { | 
|  | 3370 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3371 |  | 
|  | 3372 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3373 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3374 |  | 
|  | 3375 | properties := pProperties[0:count] | 
|  | 3376 | for i in (0 .. count) { | 
|  | 3377 | property := ? | 
|  | 3378 | properties[i] = property | 
|  | 3379 | } | 
|  | 3380 |  | 
|  | 3381 | return ? | 
|  | 3382 | } | 
|  | 3383 |  | 
|  | 3384 |  | 
|  | 3385 | // Queue functions | 
|  | 3386 |  | 
|  | 3387 | @threadSafety("system") | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3388 | cmd void vkGetDeviceQueue( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3389 | VkDevice                                    device, | 
|  | 3390 | u32                                         queueFamilyIndex, | 
|  | 3391 | u32                                         queueIndex, | 
|  | 3392 | VkQueue*                                    pQueue) { | 
|  | 3393 | deviceObject := GetDevice(device) | 
|  | 3394 |  | 
|  | 3395 | queue := ? | 
|  | 3396 | pQueue[0] = queue | 
|  | 3397 |  | 
|  | 3398 | if !(queue in State.Queues) { | 
|  | 3399 | State.Queues[queue] = new!QueueObject(device: device) | 
|  | 3400 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3401 | } | 
|  | 3402 |  | 
|  | 3403 | @threadSafety("app") | 
|  | 3404 | cmd VkResult vkQueueSubmit( | 
|  | 3405 | VkQueue                                     queue, | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3406 | u32                                         submitCount, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3407 | const VkSubmitInfo*                         pSubmits, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3408 | VkFence                                     fence) { | 
|  | 3409 | queueObject := GetQueue(queue) | 
|  | 3410 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3411 | if fence != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3412 | fenceObject := GetFence(fence) | 
|  | 3413 | assert(fenceObject.device == queueObject.device) | 
|  | 3414 | } | 
|  | 3415 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3416 | // commandBuffers := pcommandBuffers[0:commandBufferCount] | 
|  | 3417 | // for i in (0 .. commandBufferCount) { | 
|  | 3418 | //    commandBuffer := commandBuffers[i] | 
|  | 3419 | //    commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 3420 | //    assert(commandBufferObject.device == queueObject.device) | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3421 | // | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3422 | //    validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, | 
|  | 3423 | //        "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3424 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3425 |  | 
|  | 3426 | return ? | 
|  | 3427 | } | 
|  | 3428 |  | 
|  | 3429 | @threadSafety("system") | 
|  | 3430 | cmd VkResult vkQueueWaitIdle( | 
|  | 3431 | VkQueue                                     queue) { | 
|  | 3432 | queueObject := GetQueue(queue) | 
|  | 3433 |  | 
|  | 3434 | return ? | 
|  | 3435 | } | 
|  | 3436 |  | 
|  | 3437 | @threadSafety("system") | 
|  | 3438 | cmd VkResult vkDeviceWaitIdle( | 
|  | 3439 | VkDevice                                    device) { | 
|  | 3440 | deviceObject := GetDevice(device) | 
|  | 3441 |  | 
|  | 3442 | return ? | 
|  | 3443 | } | 
|  | 3444 |  | 
|  | 3445 |  | 
|  | 3446 | // Memory functions | 
|  | 3447 |  | 
|  | 3448 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3449 | cmd VkResult vkAllocateMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3450 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3451 | const VkMemoryAllocateInfo*                 pAllocateInfo, | 
|  | 3452 | const VkAllocationCallbacks*                pAllocator, | 
|  | 3453 | VkDeviceMemory*                             pMemory) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3454 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3455 | deviceObject := GetDevice(device) | 
|  | 3456 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3457 | memory := ? | 
|  | 3458 | pMemory[0] = memory | 
|  | 3459 | State.DeviceMemories[memory] = new!DeviceMemoryObject( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3460 | device: device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3461 | allocationSize: pAllocateInfo[0].allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3462 |  | 
|  | 3463 | return ? | 
|  | 3464 | } | 
|  | 3465 |  | 
|  | 3466 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3467 | cmd void vkFreeMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3468 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3469 | VkDeviceMemory                              memory, | 
|  | 3470 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3471 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3472 | memoryObject := GetDeviceMemory(memory) | 
|  | 3473 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3474 |  | 
|  | 3475 | // Check that no objects are still bound before freeing. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3476 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3477 | "vkFreeMemory: objects still bound") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3478 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, | 
|  | 3479 | "vkFreeMemory: commandBuffers still bound") | 
|  | 3480 | State.DeviceMemories[memory] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3481 | } | 
|  | 3482 |  | 
|  | 3483 | @threadSafety("app") | 
|  | 3484 | cmd VkResult vkMapMemory( | 
|  | 3485 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3486 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3487 | VkDeviceSize                                offset, | 
|  | 3488 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3489 | VkMemoryMapFlags                            flags, | 
|  | 3490 | void**                                      ppData) { | 
|  | 3491 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3492 | memoryObject := GetDeviceMemory(memory) | 
|  | 3493 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3494 |  | 
|  | 3495 | assert(flags == as!VkMemoryMapFlags(0)) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3496 | assert((offset + size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3497 |  | 
|  | 3498 | return ? | 
|  | 3499 | } | 
|  | 3500 |  | 
|  | 3501 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3502 | cmd void vkUnmapMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3503 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3504 | VkDeviceMemory                              memory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3505 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3506 | memoryObject := GetDeviceMemory(memory) | 
|  | 3507 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3508 | } | 
|  | 3509 |  | 
|  | 3510 | cmd VkResult vkFlushMappedMemoryRanges( | 
|  | 3511 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3512 | u32                                         memoryRangeCount | 
|  | 3513 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3514 | deviceObject := GetDevice(device) | 
|  | 3515 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3516 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3517 | for i in (0 .. memoryRangeCount) { | 
|  | 3518 | memoryRange := memoryRanges[i] | 
|  | 3519 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3520 | assert(memoryObject.device == device) | 
|  | 3521 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3522 | } | 
|  | 3523 |  | 
|  | 3524 | return ? | 
|  | 3525 | } | 
|  | 3526 |  | 
|  | 3527 | cmd VkResult vkInvalidateMappedMemoryRanges( | 
|  | 3528 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3529 | u32                                         memoryRangeCount, | 
|  | 3530 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3531 | deviceObject := GetDevice(device) | 
|  | 3532 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3533 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3534 | for i in (0 .. memoryRangeCount) { | 
|  | 3535 | memoryRange := memoryRanges[i] | 
|  | 3536 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3537 | assert(memoryObject.device == device) | 
|  | 3538 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3539 | } | 
|  | 3540 |  | 
|  | 3541 | return ? | 
|  | 3542 | } | 
|  | 3543 |  | 
|  | 3544 |  | 
|  | 3545 | // Memory management API functions | 
|  | 3546 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3547 | cmd void vkGetDeviceMemoryCommitment( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3548 | VkDevice                                    device, | 
|  | 3549 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3550 | VkDeviceSize*                               pCommittedMemoryInBytes) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3551 | deviceObject := GetDevice(device) | 
|  | 3552 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3553 | if memory != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3554 | memoryObject := GetDeviceMemory(memory) | 
|  | 3555 | assert(memoryObject.device == device) | 
|  | 3556 | } | 
|  | 3557 |  | 
|  | 3558 | committedMemoryInBytes := ? | 
|  | 3559 | pCommittedMemoryInBytes[0] = committedMemoryInBytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3560 | } | 
|  | 3561 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3562 | cmd void vkGetBufferMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3563 | VkDevice                                    device, | 
|  | 3564 | VkBuffer                                    buffer, | 
|  | 3565 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3566 | deviceObject := GetDevice(device) | 
|  | 3567 | bufferObject := GetBuffer(buffer) | 
|  | 3568 | assert(bufferObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3569 | } | 
|  | 3570 |  | 
|  | 3571 | cmd VkResult vkBindBufferMemory( | 
|  | 3572 | VkDevice                                    device, | 
|  | 3573 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3574 | VkDeviceMemory                              memory, | 
|  | 3575 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3576 | deviceObject := GetDevice(device) | 
|  | 3577 | bufferObject := GetBuffer(buffer) | 
|  | 3578 | assert(bufferObject.device == device) | 
|  | 3579 |  | 
|  | 3580 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3581 | if bufferObject.memory != NULL_HANDLE { | 
|  | 3582 | memoryObject := GetDeviceMemory(bufferObject.memory) | 
|  | 3583 | memoryObject.boundObjects[as!u64(buffer)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3584 | } | 
|  | 3585 |  | 
|  | 3586 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3587 | if memory != NULL_HANDLE { | 
|  | 3588 | memoryObject := GetDeviceMemory(memory) | 
|  | 3589 | assert(memoryObject.device == device) | 
|  | 3590 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3591 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3592 | bufferObject.memory = memory | 
|  | 3593 | bufferObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3594 |  | 
|  | 3595 | return ? | 
|  | 3596 | } | 
|  | 3597 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3598 | cmd void vkGetImageMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3599 | VkDevice                                    device, | 
|  | 3600 | VkImage                                     image, | 
|  | 3601 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3602 | deviceObject := GetDevice(device) | 
|  | 3603 | imageObject := GetImage(image) | 
|  | 3604 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3605 | } | 
|  | 3606 |  | 
|  | 3607 | cmd VkResult vkBindImageMemory( | 
|  | 3608 | VkDevice                                    device, | 
|  | 3609 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3610 | VkDeviceMemory                              memory, | 
|  | 3611 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3612 | deviceObject := GetDevice(device) | 
|  | 3613 | imageObject := GetImage(image) | 
|  | 3614 | assert(imageObject.device == device) | 
|  | 3615 |  | 
|  | 3616 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3617 | if imageObject.memory != NULL_HANDLE { | 
|  | 3618 | memoryObject := GetDeviceMemory(imageObject.memory) | 
|  | 3619 | memoryObject.boundObjects[as!u64(image)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3620 | } | 
|  | 3621 |  | 
|  | 3622 | // Bind image to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3623 | if memory != NULL_HANDLE { | 
|  | 3624 | memoryObject := GetDeviceMemory(memory) | 
|  | 3625 | assert(memoryObject.device == device) | 
|  | 3626 | memoryObject.boundObjects[as!u64(image)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3627 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3628 | imageObject.memory = memory | 
|  | 3629 | imageObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3630 |  | 
|  | 3631 | return ? | 
|  | 3632 | } | 
|  | 3633 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3634 | cmd void vkGetImageSparseMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3635 | VkDevice                                    device, | 
|  | 3636 | VkImage                                     image, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3637 | u32*                                        pSparseMemoryRequirementCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3638 | VkSparseImageMemoryRequirements*            pSparseMemoryRequirements) { | 
|  | 3639 | deviceObject := GetDevice(device) | 
|  | 3640 | imageObject := GetImage(image) | 
|  | 3641 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3642 | } | 
|  | 3643 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3644 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3645 | VkPhysicalDevice                            physicalDevice, | 
|  | 3646 | VkFormat                                    format, | 
|  | 3647 | VkImageType                                 type, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3648 | VkSampleCountFlagBits                       samples, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3649 | VkImageUsageFlags                           usage, | 
|  | 3650 | VkImageTiling                               tiling, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3651 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3652 | VkSparseImageFormatProperties*              pProperties) { | 
|  | 3653 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3654 | } | 
|  | 3655 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3656 | cmd VkResult vkQueueBindSparse( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3657 | VkQueue                                     queue, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3658 | u32                                         bindInfoCount, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3659 | const VkBindSparseInfo*                     pBindInfo, | 
|  | 3660 | VkFence                                     fence) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3661 | queueObject := GetQueue(queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3662 |  | 
|  | 3663 | return ? | 
|  | 3664 | } | 
|  | 3665 |  | 
|  | 3666 |  | 
|  | 3667 | // Fence functions | 
|  | 3668 |  | 
|  | 3669 | @threadSafety("system") | 
|  | 3670 | cmd VkResult vkCreateFence( | 
|  | 3671 | VkDevice                                    device, | 
|  | 3672 | const VkFenceCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3673 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3674 | VkFence*                                    pFence) { | 
|  | 3675 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) | 
|  | 3676 | deviceObject := GetDevice(device) | 
|  | 3677 |  | 
|  | 3678 | fence := ? | 
|  | 3679 | pFence[0] = fence | 
|  | 3680 | State.Fences[fence] = new!FenceObject( | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3681 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3682 |  | 
|  | 3683 | return ? | 
|  | 3684 | } | 
|  | 3685 |  | 
|  | 3686 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3687 | cmd void vkDestroyFence( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3688 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3689 | VkFence                                     fence, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3690 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3691 | deviceObject := GetDevice(device) | 
|  | 3692 | fenceObject := GetFence(fence) | 
|  | 3693 | assert(fenceObject.device == device) | 
|  | 3694 |  | 
|  | 3695 | State.Fences[fence] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3696 | } | 
|  | 3697 |  | 
|  | 3698 | @threadSafety("system") | 
|  | 3699 | cmd VkResult vkResetFences( | 
|  | 3700 | VkDevice                                    device, | 
|  | 3701 | u32                                         fenceCount, | 
|  | 3702 | const VkFence*                              pFences) { | 
|  | 3703 | deviceObject := GetDevice(device) | 
|  | 3704 |  | 
|  | 3705 | fences := pFences[0:fenceCount] | 
|  | 3706 | for i in (0 .. fenceCount) { | 
|  | 3707 | fence := fences[i] | 
|  | 3708 | fenceObject := GetFence(fence) | 
|  | 3709 | assert(fenceObject.device == device) | 
|  | 3710 | fenceObject.signaled = false | 
|  | 3711 | } | 
|  | 3712 |  | 
|  | 3713 | return ? | 
|  | 3714 | } | 
|  | 3715 |  | 
|  | 3716 | @threadSafety("system") | 
|  | 3717 | cmd VkResult vkGetFenceStatus( | 
|  | 3718 | VkDevice                                    device, | 
|  | 3719 | VkFence                                     fence) { | 
|  | 3720 | deviceObject := GetDevice(device) | 
|  | 3721 | fenceObject := GetFence(fence) | 
|  | 3722 | assert(fenceObject.device == device) | 
|  | 3723 |  | 
|  | 3724 | return ? | 
|  | 3725 | } | 
|  | 3726 |  | 
|  | 3727 | @threadSafety("system") | 
|  | 3728 | cmd VkResult vkWaitForFences( | 
|  | 3729 | VkDevice                                    device, | 
|  | 3730 | u32                                         fenceCount, | 
|  | 3731 | const VkFence*                              pFences, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3732 | VkBool32                                    waitAll, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3733 | u64                                         timeout) {  /// timeout in nanoseconds | 
|  | 3734 | deviceObject := GetDevice(device) | 
|  | 3735 |  | 
|  | 3736 | fences := pFences[0:fenceCount] | 
|  | 3737 | for i in (0 .. fenceCount) { | 
|  | 3738 | fence := fences[i] | 
|  | 3739 | fenceObject := GetFence(fence) | 
|  | 3740 | assert(fenceObject.device == device) | 
|  | 3741 | } | 
|  | 3742 |  | 
|  | 3743 | return ? | 
|  | 3744 | } | 
|  | 3745 |  | 
|  | 3746 |  | 
|  | 3747 | // Queue semaphore functions | 
|  | 3748 |  | 
|  | 3749 | @threadSafety("system") | 
|  | 3750 | cmd VkResult vkCreateSemaphore( | 
|  | 3751 | VkDevice                                    device, | 
|  | 3752 | const VkSemaphoreCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3753 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3754 | VkSemaphore*                                pSemaphore) { | 
|  | 3755 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) | 
|  | 3756 | deviceObject := GetDevice(device) | 
|  | 3757 |  | 
|  | 3758 | semaphore := ? | 
|  | 3759 | pSemaphore[0] = semaphore | 
|  | 3760 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) | 
|  | 3761 |  | 
|  | 3762 | return ? | 
|  | 3763 | } | 
|  | 3764 |  | 
|  | 3765 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3766 | cmd void vkDestroySemaphore( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3767 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3768 | VkSemaphore                                 semaphore, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3769 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3770 | deviceObject := GetDevice(device) | 
|  | 3771 | semaphoreObject := GetSemaphore(semaphore) | 
|  | 3772 | assert(semaphoreObject.device == device) | 
|  | 3773 |  | 
|  | 3774 | State.Semaphores[semaphore] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3775 | } | 
|  | 3776 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3777 |  | 
|  | 3778 | // Event functions | 
|  | 3779 |  | 
|  | 3780 | @threadSafety("system") | 
|  | 3781 | cmd VkResult vkCreateEvent( | 
|  | 3782 | VkDevice                                    device, | 
|  | 3783 | const VkEventCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3784 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3785 | VkEvent*                                    pEvent) { | 
|  | 3786 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) | 
|  | 3787 | deviceObject := GetDevice(device) | 
|  | 3788 |  | 
|  | 3789 | event := ? | 
|  | 3790 | pEvent[0] = event | 
|  | 3791 | State.Events[event] = new!EventObject(device: device) | 
|  | 3792 |  | 
|  | 3793 | return ? | 
|  | 3794 | } | 
|  | 3795 |  | 
|  | 3796 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3797 | cmd void vkDestroyEvent( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3798 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3799 | VkEvent                                     event, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3800 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3801 | deviceObject := GetDevice(device) | 
|  | 3802 | eventObject := GetEvent(event) | 
|  | 3803 | assert(eventObject.device == device) | 
|  | 3804 |  | 
|  | 3805 | State.Events[event] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3806 | } | 
|  | 3807 |  | 
|  | 3808 | @threadSafety("system") | 
|  | 3809 | cmd VkResult vkGetEventStatus( | 
|  | 3810 | VkDevice                                    device, | 
|  | 3811 | VkEvent                                     event) { | 
|  | 3812 | deviceObject := GetDevice(device) | 
|  | 3813 | eventObject := GetEvent(event) | 
|  | 3814 | assert(eventObject.device == device) | 
|  | 3815 |  | 
|  | 3816 | return ? | 
|  | 3817 | } | 
|  | 3818 |  | 
|  | 3819 | @threadSafety("system") | 
|  | 3820 | cmd VkResult vkSetEvent( | 
|  | 3821 | VkDevice                                    device, | 
|  | 3822 | VkEvent                                     event) { | 
|  | 3823 | deviceObject := GetDevice(device) | 
|  | 3824 | eventObject := GetEvent(event) | 
|  | 3825 | assert(eventObject.device == device) | 
|  | 3826 |  | 
|  | 3827 | return ? | 
|  | 3828 | } | 
|  | 3829 |  | 
|  | 3830 | @threadSafety("system") | 
|  | 3831 | cmd VkResult vkResetEvent( | 
|  | 3832 | VkDevice                                    device, | 
|  | 3833 | VkEvent                                     event) { | 
|  | 3834 | deviceObject := GetDevice(device) | 
|  | 3835 | eventObject := GetEvent(event) | 
|  | 3836 | assert(eventObject.device == device) | 
|  | 3837 |  | 
|  | 3838 | return ? | 
|  | 3839 | } | 
|  | 3840 |  | 
|  | 3841 |  | 
|  | 3842 | // Query functions | 
|  | 3843 |  | 
|  | 3844 | @threadSafety("system") | 
|  | 3845 | cmd VkResult vkCreateQueryPool( | 
|  | 3846 | VkDevice                                    device, | 
|  | 3847 | const VkQueryPoolCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3848 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3849 | VkQueryPool*                                pQueryPool) { | 
|  | 3850 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) | 
|  | 3851 | deviceObject := GetDevice(device) | 
|  | 3852 |  | 
|  | 3853 | queryPool := ? | 
|  | 3854 | pQueryPool[0] = queryPool | 
|  | 3855 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) | 
|  | 3856 |  | 
|  | 3857 | return ? | 
|  | 3858 | } | 
|  | 3859 |  | 
|  | 3860 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3861 | cmd void vkDestroyQueryPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3862 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3863 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3864 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3865 | deviceObject := GetDevice(device) | 
|  | 3866 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 3867 | assert(queryPoolObject.device == device) | 
|  | 3868 |  | 
|  | 3869 | State.QueryPools[queryPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3870 | } | 
|  | 3871 |  | 
|  | 3872 | @threadSafety("system") | 
|  | 3873 | cmd VkResult vkGetQueryPoolResults( | 
|  | 3874 | VkDevice                                    device, | 
|  | 3875 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3876 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3877 | u32                                         queryCount, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3878 | platform.size_t                             dataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3879 | void*                                       pData, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3880 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3881 | VkQueryResultFlags                          flags) { | 
|  | 3882 | deviceObject := GetDevice(device) | 
|  | 3883 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 3884 | assert(queryPoolObject.device == device) | 
|  | 3885 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3886 | data := pData[0:dataSize] | 
|  | 3887 |  | 
|  | 3888 | return ? | 
|  | 3889 | } | 
|  | 3890 |  | 
|  | 3891 | // Buffer functions | 
|  | 3892 |  | 
|  | 3893 | @threadSafety("system") | 
|  | 3894 | cmd VkResult vkCreateBuffer( | 
|  | 3895 | VkDevice                                    device, | 
|  | 3896 | const VkBufferCreateInfo*                   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 | VkBuffer*                                   pBuffer) { | 
|  | 3899 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) | 
|  | 3900 | deviceObject := GetDevice(device) | 
|  | 3901 |  | 
|  | 3902 | buffer := ? | 
|  | 3903 | pBuffer[0] = buffer | 
|  | 3904 | State.Buffers[buffer] = new!BufferObject(device: device) | 
|  | 3905 |  | 
|  | 3906 | return ? | 
|  | 3907 | } | 
|  | 3908 |  | 
|  | 3909 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3910 | cmd void vkDestroyBuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3911 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3912 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3913 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3914 | deviceObject := GetDevice(device) | 
|  | 3915 | bufferObject := GetBuffer(buffer) | 
|  | 3916 | assert(bufferObject.device == device) | 
|  | 3917 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3918 | assert(bufferObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3919 | State.Buffers[buffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3920 | } | 
|  | 3921 |  | 
|  | 3922 |  | 
|  | 3923 | // Buffer view functions | 
|  | 3924 |  | 
|  | 3925 | @threadSafety("system") | 
|  | 3926 | cmd VkResult vkCreateBufferView( | 
|  | 3927 | VkDevice                                    device, | 
|  | 3928 | const VkBufferViewCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3929 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3930 | VkBufferView*                               pView) { | 
|  | 3931 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) | 
|  | 3932 | deviceObject := GetDevice(device) | 
|  | 3933 |  | 
|  | 3934 | bufferObject := GetBuffer(pCreateInfo.buffer) | 
|  | 3935 | assert(bufferObject.device == device) | 
|  | 3936 |  | 
|  | 3937 | view := ? | 
|  | 3938 | pView[0] = view | 
|  | 3939 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) | 
|  | 3940 |  | 
|  | 3941 | return ? | 
|  | 3942 | } | 
|  | 3943 |  | 
|  | 3944 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3945 | cmd void vkDestroyBufferView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3946 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3947 | VkBufferView                                bufferView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3948 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3949 | deviceObject := GetDevice(device) | 
|  | 3950 | bufferViewObject := GetBufferView(bufferView) | 
|  | 3951 | assert(bufferViewObject.device == device) | 
|  | 3952 |  | 
|  | 3953 | State.BufferViews[bufferView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3954 | } | 
|  | 3955 |  | 
|  | 3956 |  | 
|  | 3957 | // Image functions | 
|  | 3958 |  | 
|  | 3959 | @threadSafety("system") | 
|  | 3960 | cmd VkResult vkCreateImage( | 
|  | 3961 | VkDevice                                    device, | 
|  | 3962 | const VkImageCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3963 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3964 | VkImage*                                    pImage) { | 
|  | 3965 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) | 
|  | 3966 | deviceObject := GetDevice(device) | 
|  | 3967 |  | 
|  | 3968 | image := ? | 
|  | 3969 | pImage[0] = image | 
|  | 3970 | State.Images[image] = new!ImageObject(device: device) | 
|  | 3971 |  | 
|  | 3972 | return ? | 
|  | 3973 | } | 
|  | 3974 |  | 
|  | 3975 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3976 | cmd void vkDestroyImage( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3977 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3978 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3979 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3980 | deviceObject := GetDevice(device) | 
|  | 3981 | imageObject := GetImage(image) | 
|  | 3982 | assert(imageObject.device == device) | 
|  | 3983 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3984 | assert(imageObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3985 | State.Images[image] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3986 | } | 
|  | 3987 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3988 | cmd void vkGetImageSubresourceLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3989 | VkDevice                                    device, | 
|  | 3990 | VkImage                                     image, | 
|  | 3991 | const VkImageSubresource*                   pSubresource, | 
|  | 3992 | VkSubresourceLayout*                        pLayout) { | 
|  | 3993 | deviceObject := GetDevice(device) | 
|  | 3994 | imageObject := GetImage(image) | 
|  | 3995 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3996 | } | 
|  | 3997 |  | 
|  | 3998 |  | 
|  | 3999 | // Image view functions | 
|  | 4000 |  | 
|  | 4001 | @threadSafety("system") | 
|  | 4002 | cmd VkResult vkCreateImageView( | 
|  | 4003 | VkDevice                                    device, | 
|  | 4004 | const VkImageViewCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4005 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4006 | VkImageView*                                pView) { | 
|  | 4007 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) | 
|  | 4008 | deviceObject := GetDevice(device) | 
|  | 4009 |  | 
|  | 4010 | imageObject := GetImage(pCreateInfo.image) | 
|  | 4011 | assert(imageObject.device == device) | 
|  | 4012 |  | 
|  | 4013 | view := ? | 
|  | 4014 | pView[0] = view | 
|  | 4015 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) | 
|  | 4016 |  | 
|  | 4017 | return ? | 
|  | 4018 | } | 
|  | 4019 |  | 
|  | 4020 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4021 | cmd void vkDestroyImageView( | 
| 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 | VkImageView                                 imageView, | 
| 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 | imageViewObject := GetImageView(imageView) | 
|  | 4027 | assert(imageViewObject.device == device) | 
|  | 4028 |  | 
|  | 4029 | State.ImageViews[imageView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4030 | } | 
|  | 4031 |  | 
|  | 4032 |  | 
|  | 4033 | // Shader functions | 
|  | 4034 |  | 
|  | 4035 | cmd VkResult vkCreateShaderModule( | 
|  | 4036 | VkDevice                                    device, | 
|  | 4037 | const VkShaderModuleCreateInfo*             pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4038 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4039 | VkShaderModule*                             pShaderModule) { | 
|  | 4040 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) | 
|  | 4041 | deviceObject := GetDevice(device) | 
|  | 4042 |  | 
|  | 4043 | shaderModule := ? | 
|  | 4044 | pShaderModule[0] = shaderModule | 
|  | 4045 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) | 
|  | 4046 |  | 
|  | 4047 | return ? | 
|  | 4048 | } | 
|  | 4049 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4050 | cmd void vkDestroyShaderModule( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4051 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4052 | VkShaderModule                              shaderModule, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4053 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4054 | deviceObject := GetDevice(device) | 
|  | 4055 | shaderModuleObject := GetShaderModule(shaderModule) | 
|  | 4056 | assert(shaderModuleObject.device == device) | 
|  | 4057 |  | 
|  | 4058 | State.ShaderModules[shaderModule] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4059 | } | 
|  | 4060 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4061 |  | 
|  | 4062 | // Pipeline functions | 
|  | 4063 |  | 
|  | 4064 | cmd VkResult vkCreatePipelineCache( | 
|  | 4065 | VkDevice                                    device, | 
|  | 4066 | const VkPipelineCacheCreateInfo*            pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4067 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4068 | VkPipelineCache*                            pPipelineCache) { | 
|  | 4069 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) | 
|  | 4070 | deviceObject := GetDevice(device) | 
|  | 4071 |  | 
|  | 4072 | pipelineCache := ? | 
|  | 4073 | pPipelineCache[0] = pipelineCache | 
|  | 4074 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) | 
|  | 4075 |  | 
|  | 4076 | return ? | 
|  | 4077 | } | 
|  | 4078 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4079 | cmd void vkDestroyPipelineCache( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4080 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4081 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4082 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4083 | deviceObject := GetDevice(device) | 
|  | 4084 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4085 | assert(pipelineCacheObject.device == device) | 
|  | 4086 |  | 
|  | 4087 | State.PipelineCaches[pipelineCache] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4088 | } | 
|  | 4089 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4090 | cmd VkResult vkGetPipelineCacheData( | 
|  | 4091 | VkDevice                                    device, | 
|  | 4092 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4093 | platform.size_t*                            pDataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4094 | void*                                       pData) { | 
|  | 4095 | deviceObject := GetDevice(device) | 
|  | 4096 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4097 | assert(pipelineCacheObject.device == device) | 
|  | 4098 |  | 
|  | 4099 | return ? | 
|  | 4100 | } | 
|  | 4101 |  | 
|  | 4102 | cmd VkResult vkMergePipelineCaches( | 
|  | 4103 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4104 | VkPipelineCache                             dstCache, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4105 | u32                                         srcCacheCount, | 
|  | 4106 | const VkPipelineCache*                      pSrcCaches) { | 
|  | 4107 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4108 | dstCacheObject := GetPipelineCache(dstCache) | 
|  | 4109 | assert(dstCacheObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4110 |  | 
|  | 4111 | srcCaches := pSrcCaches[0:srcCacheCount] | 
|  | 4112 | for i in (0 .. srcCacheCount) { | 
|  | 4113 | srcCache := srcCaches[i] | 
|  | 4114 | srcCacheObject := GetPipelineCache(srcCache) | 
|  | 4115 | assert(srcCacheObject.device == device) | 
|  | 4116 | } | 
|  | 4117 |  | 
|  | 4118 | return ? | 
|  | 4119 | } | 
|  | 4120 |  | 
|  | 4121 | cmd VkResult vkCreateGraphicsPipelines( | 
|  | 4122 | VkDevice                                    device, | 
|  | 4123 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4124 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4125 | const VkGraphicsPipelineCreateInfo*         pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4126 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4127 | VkPipeline*                                 pPipelines) { | 
|  | 4128 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4129 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4130 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4131 | assert(pipelineCacheObject.device == device) | 
|  | 4132 | } | 
|  | 4133 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4134 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4135 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4136 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4137 | pipeline := ? | 
|  | 4138 | pipelines[i] = pipeline | 
|  | 4139 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4140 | } | 
|  | 4141 |  | 
|  | 4142 | return ? | 
|  | 4143 | } | 
|  | 4144 |  | 
|  | 4145 | cmd VkResult vkCreateComputePipelines( | 
|  | 4146 | VkDevice                                    device, | 
|  | 4147 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4148 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4149 | const VkComputePipelineCreateInfo*          pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4150 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4151 | VkPipeline*                                 pPipelines) { | 
|  | 4152 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4153 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4154 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4155 | assert(pipelineCacheObject.device == device) | 
|  | 4156 | } | 
|  | 4157 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4158 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4159 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4160 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4161 | pipeline := ? | 
|  | 4162 | pipelines[i] = pipeline | 
|  | 4163 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4164 | } | 
|  | 4165 |  | 
|  | 4166 | return ? | 
|  | 4167 | } | 
|  | 4168 |  | 
|  | 4169 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4170 | cmd void vkDestroyPipeline( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4171 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4172 | VkPipeline                                  pipeline, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4173 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4174 | deviceObject := GetDevice(device) | 
|  | 4175 | pipelineObjects := GetPipeline(pipeline) | 
|  | 4176 | assert(pipelineObjects.device == device) | 
|  | 4177 |  | 
|  | 4178 | State.Pipelines[pipeline] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4179 | } | 
|  | 4180 |  | 
|  | 4181 |  | 
|  | 4182 | // Pipeline layout functions | 
|  | 4183 |  | 
|  | 4184 | @threadSafety("system") | 
|  | 4185 | cmd VkResult vkCreatePipelineLayout( | 
|  | 4186 | VkDevice                                    device, | 
|  | 4187 | const VkPipelineLayoutCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4188 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4189 | VkPipelineLayout*                           pPipelineLayout) { | 
|  | 4190 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) | 
|  | 4191 | deviceObject := GetDevice(device) | 
|  | 4192 |  | 
|  | 4193 | pipelineLayout := ? | 
|  | 4194 | pPipelineLayout[0] = pipelineLayout | 
|  | 4195 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) | 
|  | 4196 |  | 
|  | 4197 | return ? | 
|  | 4198 | } | 
|  | 4199 |  | 
|  | 4200 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4201 | cmd void vkDestroyPipelineLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4202 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4203 | VkPipelineLayout                            pipelineLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4204 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4205 | deviceObject := GetDevice(device) | 
|  | 4206 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) | 
|  | 4207 | assert(pipelineLayoutObjects.device == device) | 
|  | 4208 |  | 
|  | 4209 | State.PipelineLayouts[pipelineLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4210 | } | 
|  | 4211 |  | 
|  | 4212 |  | 
|  | 4213 | // Sampler functions | 
|  | 4214 |  | 
|  | 4215 | @threadSafety("system") | 
|  | 4216 | cmd VkResult vkCreateSampler( | 
|  | 4217 | VkDevice                                    device, | 
|  | 4218 | const VkSamplerCreateInfo*                  pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4219 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4220 | VkSampler*                                  pSampler) { | 
|  | 4221 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) | 
|  | 4222 | deviceObject := GetDevice(device) | 
|  | 4223 |  | 
|  | 4224 | sampler := ? | 
|  | 4225 | pSampler[0] = sampler | 
|  | 4226 | State.Samplers[sampler] = new!SamplerObject(device: device) | 
|  | 4227 |  | 
|  | 4228 | return ? | 
|  | 4229 | } | 
|  | 4230 |  | 
|  | 4231 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4232 | cmd void vkDestroySampler( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4233 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4234 | VkSampler                                   sampler, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4235 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4236 | deviceObject := GetDevice(device) | 
|  | 4237 | samplerObject := GetSampler(sampler) | 
|  | 4238 | assert(samplerObject.device == device) | 
|  | 4239 |  | 
|  | 4240 | State.Samplers[sampler] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4241 | } | 
|  | 4242 |  | 
|  | 4243 |  | 
|  | 4244 | // Descriptor set functions | 
|  | 4245 |  | 
|  | 4246 | @threadSafety("system") | 
|  | 4247 | cmd VkResult vkCreateDescriptorSetLayout( | 
|  | 4248 | VkDevice                                    device, | 
|  | 4249 | const VkDescriptorSetLayoutCreateInfo*      pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4250 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4251 | VkDescriptorSetLayout*                      pSetLayout) { | 
|  | 4252 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) | 
|  | 4253 | deviceObject := GetDevice(device) | 
|  | 4254 |  | 
|  | 4255 | setLayout := ? | 
|  | 4256 | pSetLayout[0] = setLayout | 
|  | 4257 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) | 
|  | 4258 |  | 
|  | 4259 | return ? | 
|  | 4260 | } | 
|  | 4261 |  | 
|  | 4262 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4263 | cmd void vkDestroyDescriptorSetLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4264 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4265 | VkDescriptorSetLayout                       descriptorSetLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4266 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4267 | deviceObject := GetDevice(device) | 
|  | 4268 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) | 
|  | 4269 | assert(descriptorSetLayoutObject.device == device) | 
|  | 4270 |  | 
|  | 4271 | State.DescriptorSetLayouts[descriptorSetLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4272 | } | 
|  | 4273 |  | 
|  | 4274 | @threadSafety("system") | 
|  | 4275 | cmd VkResult vkCreateDescriptorPool( | 
|  | 4276 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4277 | const VkDescriptorPoolCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4278 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4279 | VkDescriptorPool*                           pDescriptorPool) { | 
|  | 4280 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) | 
|  | 4281 | deviceObject := GetDevice(device) | 
|  | 4282 |  | 
|  | 4283 | descriptorPool := ? | 
|  | 4284 | pDescriptorPool[0] = descriptorPool | 
|  | 4285 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) | 
|  | 4286 |  | 
|  | 4287 | return ? | 
|  | 4288 | } | 
|  | 4289 |  | 
|  | 4290 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4291 | cmd void vkDestroyDescriptorPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4292 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4293 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4294 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4295 | deviceObject := GetDevice(device) | 
|  | 4296 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4297 | assert(descriptorPoolObject.device == device) | 
|  | 4298 |  | 
|  | 4299 | State.DescriptorPools[descriptorPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4300 | } | 
|  | 4301 |  | 
|  | 4302 | @threadSafety("app") | 
|  | 4303 | cmd VkResult vkResetDescriptorPool( | 
|  | 4304 | VkDevice                                    device, | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4305 | VkDescriptorPool                            descriptorPool, | 
|  | 4306 | VkDescriptorPoolResetFlags                  flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4307 | deviceObject := GetDevice(device) | 
|  | 4308 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4309 | assert(descriptorPoolObject.device == device) | 
|  | 4310 |  | 
|  | 4311 | return ? | 
|  | 4312 | } | 
|  | 4313 |  | 
|  | 4314 | @threadSafety("app") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4315 | cmd VkResult vkAllocateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4316 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4317 | const VkDescriptorSetAllocateInfo*          pAllocateInfo, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4318 | VkDescriptorSet*                            pDescriptorSets) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4319 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4320 | allocInfo := pAllocateInfo[0] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4321 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4322 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4323 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] | 
|  | 4324 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4325 | setLayout := setLayouts[i] | 
|  | 4326 | setLayoutObject := GetDescriptorSetLayout(setLayout) | 
|  | 4327 | assert(setLayoutObject.device == device) | 
|  | 4328 | } | 
|  | 4329 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4330 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] | 
|  | 4331 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4332 | descriptorSet := ? | 
|  | 4333 | descriptorSets[i] = descriptorSet | 
|  | 4334 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) | 
|  | 4335 | } | 
|  | 4336 |  | 
|  | 4337 | return ? | 
|  | 4338 | } | 
|  | 4339 |  | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4340 | cmd VkResult vkFreeDescriptorSets( | 
|  | 4341 | VkDevice                                    device, | 
|  | 4342 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4343 | u32                                         descriptorSetCount, | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4344 | const VkDescriptorSet*                      pDescriptorSets) { | 
|  | 4345 | deviceObject := GetDevice(device) | 
|  | 4346 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4347 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4348 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4349 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4350 | descriptorSet := descriptorSets[i] | 
|  | 4351 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
|  | 4352 | assert(descriptorSetObject.device == device) | 
|  | 4353 | State.DescriptorSets[descriptorSet] = null | 
|  | 4354 | } | 
|  | 4355 |  | 
|  | 4356 | return ? | 
|  | 4357 | } | 
|  | 4358 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4359 | cmd void vkUpdateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4360 | VkDevice                                    device, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4361 | u32                                         descriptorWriteCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4362 | const VkWriteDescriptorSet*                 pDescriptorWrites, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4363 | u32                                         descriptorCopyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4364 | const VkCopyDescriptorSet*                  pDescriptorCopies) { | 
|  | 4365 | deviceObject := GetDevice(device) | 
|  | 4366 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4367 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] | 
|  | 4368 | for i in (0 .. descriptorWriteCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4369 | descriptorWrite := descriptorWrites[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4370 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4371 | assert(descriptorWriteObject.device == device) | 
|  | 4372 | } | 
|  | 4373 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4374 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] | 
|  | 4375 | for i in (0 .. descriptorCopyCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4376 | descriptorCopy := descriptorCopies[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4377 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4378 | assert(descriptorCopyObject.device == device) | 
|  | 4379 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4380 | } | 
|  | 4381 |  | 
|  | 4382 |  | 
|  | 4383 | // Framebuffer functions | 
|  | 4384 |  | 
|  | 4385 | @threadSafety("system") | 
|  | 4386 | cmd VkResult vkCreateFramebuffer( | 
|  | 4387 | VkDevice                                    device, | 
|  | 4388 | const VkFramebufferCreateInfo*              pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4389 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4390 | VkFramebuffer*                              pFramebuffer) { | 
|  | 4391 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) | 
|  | 4392 | deviceObject := GetDevice(device) | 
|  | 4393 |  | 
|  | 4394 | framebuffer := ? | 
|  | 4395 | pFramebuffer[0] = framebuffer | 
|  | 4396 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) | 
|  | 4397 |  | 
|  | 4398 | return ? | 
|  | 4399 | } | 
|  | 4400 |  | 
|  | 4401 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4402 | cmd void vkDestroyFramebuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4403 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4404 | VkFramebuffer                               framebuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4405 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4406 | deviceObject := GetDevice(device) | 
|  | 4407 | framebufferObject := GetFramebuffer(framebuffer) | 
|  | 4408 | assert(framebufferObject.device == device) | 
|  | 4409 |  | 
|  | 4410 | State.Framebuffers[framebuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4411 | } | 
|  | 4412 |  | 
|  | 4413 |  | 
|  | 4414 | // Renderpass functions | 
|  | 4415 |  | 
|  | 4416 | @threadSafety("system") | 
|  | 4417 | cmd VkResult vkCreateRenderPass( | 
|  | 4418 | VkDevice                                    device, | 
|  | 4419 | const VkRenderPassCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4420 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4421 | VkRenderPass*                               pRenderPass) { | 
|  | 4422 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) | 
|  | 4423 | deviceObject := GetDevice(device) | 
|  | 4424 |  | 
|  | 4425 | renderpass := ? | 
|  | 4426 | pRenderPass[0] = renderpass | 
|  | 4427 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) | 
|  | 4428 |  | 
|  | 4429 | return ? | 
|  | 4430 | } | 
|  | 4431 |  | 
|  | 4432 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4433 | cmd void vkDestroyRenderPass( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4434 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4435 | VkRenderPass                                renderPass, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4436 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4437 | deviceObject := GetDevice(device) | 
|  | 4438 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4439 | assert(renderPassObject.device == device) | 
|  | 4440 |  | 
|  | 4441 | State.RenderPasses[renderPass] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4442 | } | 
|  | 4443 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4444 | cmd void vkGetRenderAreaGranularity( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4445 | VkDevice                                    device, | 
|  | 4446 | VkRenderPass                                renderPass, | 
|  | 4447 | VkExtent2D*                                 pGranularity) { | 
|  | 4448 | deviceObject := GetDevice(device) | 
|  | 4449 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4450 |  | 
|  | 4451 | granularity := ? | 
|  | 4452 | pGranularity[0] = granularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4453 | } | 
|  | 4454 |  | 
|  | 4455 | // Command pool functions | 
|  | 4456 |  | 
|  | 4457 | cmd VkResult vkCreateCommandPool( | 
|  | 4458 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4459 | const VkCommandPoolCreateInfo*              pCreateInfo, | 
|  | 4460 | const VkAllocationCallbacks*                pAllocator, | 
|  | 4461 | VkCommandPool*                              pCommandPool) { | 
|  | 4462 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4463 | deviceObject := GetDevice(device) | 
|  | 4464 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4465 | commandPool := ? | 
|  | 4466 | pCommandPool[0] = commandPool | 
|  | 4467 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4468 |  | 
|  | 4469 | return ? | 
|  | 4470 | } | 
|  | 4471 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4472 | cmd void vkDestroyCommandPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4473 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4474 | VkCommandPool                               commandPool, | 
|  | 4475 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4476 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4477 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4478 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4479 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4480 | State.CommandPools[commandPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4481 | } | 
|  | 4482 |  | 
|  | 4483 | cmd VkResult vkResetCommandPool( | 
|  | 4484 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4485 | VkCommandPool                               commandPool, | 
|  | 4486 | VkCommandPoolResetFlags                     flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4487 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4488 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4489 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4490 |  | 
|  | 4491 | return ? | 
|  | 4492 | } | 
|  | 4493 |  | 
|  | 4494 | // Command buffer functions | 
|  | 4495 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4496 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4497 | memoryObject := GetDeviceMemory(memory) | 
|  | 4498 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4499 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4500 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4501 | commandBufferObject.boundObjects[as!u64(obj)] = memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4502 | } | 
|  | 4503 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4504 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4505 | memoryObject := GetDeviceMemory(memory) | 
|  | 4506 | memoryObject.boundCommandBuffers[commandBuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4507 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4508 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4509 | commandBufferObject.boundObjects[as!u64(obj)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4510 | } | 
|  | 4511 |  | 
|  | 4512 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4513 | cmd VkResult vkAllocateCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4514 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4515 | const VkCommandBufferAllocateInfo*          pAllocateInfo, | 
|  | 4516 | VkCommandBuffer*                            pCommandBuffers) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4517 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4518 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4519 | count := pAllocateInfo[0].commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4520 | commandBuffers := pCommandBuffers[0:count] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4521 | for i in (0 .. count) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4522 | commandBuffer := ? | 
|  | 4523 | commandBuffers[i] = commandBuffer | 
|  | 4524 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4525 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4526 |  | 
|  | 4527 | return ? | 
|  | 4528 | } | 
|  | 4529 |  | 
|  | 4530 | @threadSafety("system") | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4531 | cmd void vkFreeCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4532 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4533 | VkCommandPool                               commandPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4534 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4535 | const VkCommandBuffer*                      pCommandBuffers) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4536 | deviceObject := GetDevice(device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4537 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4538 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4539 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4540 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) | 
|  | 4541 | assert(commandBufferObject.device == device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4542 | // TODO: iterate over boundObjects and clear memory bindings | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4543 | State.CommandBuffers[commandBuffers[i]] = null | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4544 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4545 | } | 
|  | 4546 |  | 
|  | 4547 | @threadSafety("app") | 
|  | 4548 | cmd VkResult vkBeginCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4549 | VkCommandBuffer                             commandBuffer, | 
|  | 4550 | const VkCommandBufferBeginInfo*             pBeginInfo) { | 
|  | 4551 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) | 
|  | 4552 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4553 |  | 
|  | 4554 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4555 |  | 
|  | 4556 | return ? | 
|  | 4557 | } | 
|  | 4558 |  | 
|  | 4559 | @threadSafety("app") | 
|  | 4560 | cmd VkResult vkEndCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4561 | VkCommandBuffer                             commandBuffer) { | 
|  | 4562 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4563 |  | 
|  | 4564 | return ? | 
|  | 4565 | } | 
|  | 4566 |  | 
|  | 4567 | @threadSafety("app") | 
|  | 4568 | cmd VkResult vkResetCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4569 | VkCommandBuffer                             commandBuffer, | 
|  | 4570 | VkCommandBufferResetFlags                   flags) { | 
|  | 4571 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4572 |  | 
|  | 4573 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4574 |  | 
|  | 4575 | return ? | 
|  | 4576 | } | 
|  | 4577 |  | 
|  | 4578 |  | 
|  | 4579 | // Command buffer building functions | 
|  | 4580 |  | 
|  | 4581 | @threadSafety("app") | 
|  | 4582 | cmd void vkCmdBindPipeline( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4583 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4584 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4585 | VkPipeline                                  pipeline) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4586 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4587 | pipelineObject := GetPipeline(pipeline) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4588 | assert(commandBufferObject.device == pipelineObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4589 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4590 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4591 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4592 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4593 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4594 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4595 | } | 
|  | 4596 |  | 
|  | 4597 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4598 | cmd void vkCmdSetViewport( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4599 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4600 | u32                                         firstViewport, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4601 | u32                                         viewportCount, | 
|  | 4602 | const VkViewport*                           pViewports) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4603 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4604 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4605 | } | 
|  | 4606 |  | 
|  | 4607 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4608 | cmd void vkCmdSetScissor( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4609 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4610 | u32                                         firstScissor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4611 | u32                                         scissorCount, | 
|  | 4612 | const VkRect2D*                             pScissors) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4613 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4614 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4615 | } | 
|  | 4616 |  | 
|  | 4617 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4618 | cmd void vkCmdSetLineWidth( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4619 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4620 | f32                                         lineWidth) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4621 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4622 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4623 | } | 
|  | 4624 |  | 
|  | 4625 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4626 | cmd void vkCmdSetDepthBias( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4627 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4628 | f32                                         depthBiasConstantFactor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4629 | f32                                         depthBiasClamp, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4630 | f32                                         depthBiasSlopeFactor) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4631 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4632 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4633 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4634 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4635 | @threadSafety("app") | 
|  | 4636 | cmd void vkCmdSetBlendConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4637 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4638 | // TODO(jessehall): apic only supports 'const' on pointer types. Using | 
|  | 4639 | // an annotation as a quick hack to pass this to the template without | 
|  | 4640 | // having to modify the AST and semantic model. | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4641 | @readonly f32[4]                            blendConstants) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4642 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4643 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4644 | } | 
|  | 4645 |  | 
|  | 4646 | @threadSafety("app") | 
|  | 4647 | cmd void vkCmdSetDepthBounds( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4648 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4649 | f32                                         minDepthBounds, | 
|  | 4650 | f32                                         maxDepthBounds) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4651 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4652 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4653 | } | 
|  | 4654 |  | 
|  | 4655 | @threadSafety("app") | 
|  | 4656 | cmd void vkCmdSetStencilCompareMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4657 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4658 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4659 | u32                                         compareMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4660 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4661 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4662 | } | 
|  | 4663 |  | 
|  | 4664 | @threadSafety("app") | 
|  | 4665 | cmd void vkCmdSetStencilWriteMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4666 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4667 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4668 | u32                                         writeMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4669 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4670 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4671 | } | 
|  | 4672 |  | 
|  | 4673 | @threadSafety("app") | 
|  | 4674 | cmd void vkCmdSetStencilReference( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4675 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4676 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4677 | u32                                         reference) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4678 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4679 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4680 | } | 
|  | 4681 |  | 
|  | 4682 | @threadSafety("app") | 
|  | 4683 | cmd void vkCmdBindDescriptorSets( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4684 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4685 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4686 | VkPipelineLayout                            layout, | 
|  | 4687 | u32                                         firstSet, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4688 | u32                                         descriptorSetCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4689 | const VkDescriptorSet*                      pDescriptorSets, | 
|  | 4690 | u32                                         dynamicOffsetCount, | 
|  | 4691 | const u32*                                  pDynamicOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4692 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4693 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4694 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4695 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4696 | descriptorSet := descriptorSets[i] | 
|  | 4697 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4698 | assert(commandBufferObject.device == descriptorSetObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4699 | } | 
|  | 4700 |  | 
|  | 4701 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] | 
|  | 4702 | for i in (0 .. dynamicOffsetCount) { | 
|  | 4703 | dynamicOffset := dynamicOffsets[i] | 
|  | 4704 | } | 
|  | 4705 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4706 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4707 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4708 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4709 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4710 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 | } | 
|  | 4712 |  | 
|  | 4713 | @threadSafety("app") | 
|  | 4714 | cmd void vkCmdBindIndexBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4715 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4716 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4717 | VkDeviceSize                                offset, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4718 | VkIndexType                                 indexType) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4719 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4720 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4721 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4722 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4723 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4724 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4725 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4726 | } | 
|  | 4727 |  | 
|  | 4728 | @threadSafety("app") | 
|  | 4729 | cmd void vkCmdBindVertexBuffers( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4730 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4731 | u32                                         firstBinding, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4732 | u32                                         bindingCount, | 
|  | 4733 | const VkBuffer*                             pBuffers, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4734 | const VkDeviceSize*                         pOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4735 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4736 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4737 | // TODO: check if not [firstBinding:firstBinding+bindingCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4738 | buffers := pBuffers[0:bindingCount] | 
|  | 4739 | offsets := pOffsets[0:bindingCount] | 
|  | 4740 | for i in (0 .. bindingCount) { | 
|  | 4741 | buffer := buffers[i] | 
|  | 4742 | offset := offsets[i] | 
|  | 4743 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4744 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4745 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4746 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4747 | } | 
|  | 4748 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4749 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4750 | } | 
|  | 4751 |  | 
|  | 4752 | @threadSafety("app") | 
|  | 4753 | cmd void vkCmdDraw( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4754 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4755 | u32                                         vertexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4756 | u32                                         instanceCount, | 
|  | 4757 | u32                                         firstVertex, | 
|  | 4758 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4759 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4760 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4761 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4762 | } | 
|  | 4763 |  | 
|  | 4764 | @threadSafety("app") | 
|  | 4765 | cmd void vkCmdDrawIndexed( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4766 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4767 | u32                                         indexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4768 | u32                                         instanceCount, | 
|  | 4769 | u32                                         firstIndex, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4770 | s32                                         vertexOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4771 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4772 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4773 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4774 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4775 | } | 
|  | 4776 |  | 
|  | 4777 | @threadSafety("app") | 
|  | 4778 | cmd void vkCmdDrawIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4779 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4780 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4781 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4782 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4783 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4784 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4786 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4787 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4788 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4789 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4790 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4791 | } | 
|  | 4792 |  | 
|  | 4793 | @threadSafety("app") | 
|  | 4794 | cmd void vkCmdDrawIndexedIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4795 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4796 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4797 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4798 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4799 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4800 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4801 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4802 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4803 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4804 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4805 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4806 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4807 | } | 
|  | 4808 |  | 
|  | 4809 | @threadSafety("app") | 
|  | 4810 | cmd void vkCmdDispatch( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4811 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4812 | u32                                         x, | 
|  | 4813 | u32                                         y, | 
|  | 4814 | u32                                         z) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4815 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4816 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4817 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4818 | } | 
|  | 4819 |  | 
|  | 4820 | @threadSafety("app") | 
|  | 4821 | cmd void vkCmdDispatchIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4822 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4823 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4824 | VkDeviceSize                                offset) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4825 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4826 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4827 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4828 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4829 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4830 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4831 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4832 | } | 
|  | 4833 |  | 
|  | 4834 | @threadSafety("app") | 
|  | 4835 | cmd void vkCmdCopyBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4836 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4837 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4838 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4839 | u32                                         regionCount, | 
|  | 4840 | const VkBufferCopy*                         pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4841 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4842 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4843 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4844 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 4845 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4846 |  | 
|  | 4847 | regions := pRegions[0:regionCount] | 
|  | 4848 | for i in (0 .. regionCount) { | 
|  | 4849 | region := regions[i] | 
|  | 4850 | } | 
|  | 4851 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4852 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 4853 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4854 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4855 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4856 | } | 
|  | 4857 |  | 
|  | 4858 | @threadSafety("app") | 
|  | 4859 | cmd void vkCmdCopyImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4860 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4861 | VkImage                                     srcImage, | 
|  | 4862 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4863 | VkImage                                     dstImage, | 
|  | 4864 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4865 | u32                                         regionCount, | 
|  | 4866 | const VkImageCopy*                          pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4867 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4869 | dstImageObject := GetImage(dstImage) | 
|  | 4870 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4871 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4872 |  | 
|  | 4873 | regions := pRegions[0:regionCount] | 
|  | 4874 | for i in (0 .. regionCount) { | 
|  | 4875 | region := regions[i] | 
|  | 4876 | } | 
|  | 4877 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4878 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4879 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4880 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4881 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4882 | } | 
|  | 4883 |  | 
|  | 4884 | @threadSafety("app") | 
|  | 4885 | cmd void vkCmdBlitImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4886 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4887 | VkImage                                     srcImage, | 
|  | 4888 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4889 | VkImage                                     dstImage, | 
|  | 4890 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4891 | u32                                         regionCount, | 
|  | 4892 | const VkImageBlit*                          pRegions, | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 4893 | VkFilter                                    filter) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4894 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4895 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4896 | dstImageObject := GetImage(dstImage) | 
|  | 4897 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4898 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4899 |  | 
|  | 4900 | regions := pRegions[0:regionCount] | 
|  | 4901 | for i in (0 .. regionCount) { | 
|  | 4902 | region := regions[i] | 
|  | 4903 | } | 
|  | 4904 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4905 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4906 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4907 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4908 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4909 | } | 
|  | 4910 |  | 
|  | 4911 | @threadSafety("app") | 
|  | 4912 | cmd void vkCmdCopyBufferToImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4913 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4914 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4915 | VkImage                                     dstImage, | 
|  | 4916 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4917 | u32                                         regionCount, | 
|  | 4918 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4919 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4921 | dstImageObject := GetImage(dstImage) | 
|  | 4922 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 4923 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4924 |  | 
|  | 4925 | regions := pRegions[0:regionCount] | 
|  | 4926 | for i in (0 .. regionCount) { | 
|  | 4927 | region := regions[i] | 
|  | 4928 | } | 
|  | 4929 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4930 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 4931 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4932 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4933 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4934 | } | 
|  | 4935 |  | 
|  | 4936 | @threadSafety("app") | 
|  | 4937 | cmd void vkCmdCopyImageToBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4938 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4939 | VkImage                                     srcImage, | 
|  | 4940 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4941 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4942 | u32                                         regionCount, | 
|  | 4943 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4944 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4945 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4946 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4947 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4948 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4949 |  | 
|  | 4950 | regions := pRegions[0:regionCount] | 
|  | 4951 | for i in (0 .. regionCount) { | 
|  | 4952 | region := regions[i] | 
|  | 4953 | } | 
|  | 4954 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4955 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4956 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4957 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4958 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4959 | } | 
|  | 4960 |  | 
|  | 4961 | @threadSafety("app") | 
|  | 4962 | cmd void vkCmdUpdateBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4963 | VkCommandBuffer                             commandBuffer, | 
|  | 4964 | VkBuffer                                    dstBuffer, | 
|  | 4965 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4966 | VkDeviceSize                                dataSize, | 
| Jesse Hall | 3f5499b | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 4967 | const void*                                 pData) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4968 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4969 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4970 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 |  | 
|  | 4972 | data := pData[0:dataSize] | 
|  | 4973 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4974 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4975 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4976 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4977 | } | 
|  | 4978 |  | 
|  | 4979 | @threadSafety("app") | 
|  | 4980 | cmd void vkCmdFillBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4981 | VkCommandBuffer                             commandBuffer, | 
|  | 4982 | VkBuffer                                    dstBuffer, | 
|  | 4983 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4984 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4985 | u32                                         data) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4986 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4987 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4988 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4989 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4990 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4991 | } | 
|  | 4992 |  | 
|  | 4993 | @threadSafety("app") | 
|  | 4994 | cmd void vkCmdClearColorImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4995 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4996 | VkImage                                     image, | 
|  | 4997 | VkImageLayout                               imageLayout, | 
|  | 4998 | const VkClearColorValue*                    pColor, | 
|  | 4999 | u32                                         rangeCount, | 
|  | 5000 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5001 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5002 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5003 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5004 |  | 
|  | 5005 | ranges := pRanges[0:rangeCount] | 
|  | 5006 | for i in (0 .. rangeCount) { | 
|  | 5007 | range := ranges[i] | 
|  | 5008 | } | 
|  | 5009 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5010 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| 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 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5013 | } | 
|  | 5014 |  | 
|  | 5015 | @threadSafety("app") | 
|  | 5016 | cmd void vkCmdClearDepthStencilImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5017 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5018 | VkImage                                     image, | 
|  | 5019 | VkImageLayout                               imageLayout, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5020 | const VkClearDepthStencilValue*             pDepthStencil, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5021 | u32                                         rangeCount, | 
|  | 5022 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5023 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5024 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5025 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5026 |  | 
|  | 5027 | ranges := pRanges[0:rangeCount] | 
|  | 5028 | for i in (0 .. rangeCount) { | 
|  | 5029 | range := ranges[i] | 
|  | 5030 | } | 
|  | 5031 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5032 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5033 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5034 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5035 | } | 
|  | 5036 |  | 
|  | 5037 | @threadSafety("app") | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5038 | cmd void vkCmdClearAttachments( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5039 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5040 | u32                                         attachmentCount, | 
|  | 5041 | const VkClearAttachment*                    pAttachments, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5042 | u32                                         rectCount, | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5043 | const VkClearRect*                          pRects) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5044 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5045 |  | 
|  | 5046 | rects := pRects[0:rectCount] | 
|  | 5047 | for i in (0 .. rectCount) { | 
|  | 5048 | rect := rects[i] | 
|  | 5049 | } | 
|  | 5050 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5051 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5052 | } | 
|  | 5053 |  | 
|  | 5054 | @threadSafety("app") | 
|  | 5055 | cmd void vkCmdResolveImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5056 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5057 | VkImage                                     srcImage, | 
|  | 5058 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5059 | VkImage                                     dstImage, | 
|  | 5060 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5061 | u32                                         regionCount, | 
|  | 5062 | const VkImageResolve*                       pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5063 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5064 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5065 | dstImageObject := GetImage(dstImage) | 
|  | 5066 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5067 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5068 |  | 
|  | 5069 | regions := pRegions[0:regionCount] | 
|  | 5070 | for i in (0 .. regionCount) { | 
|  | 5071 | region := regions[i] | 
|  | 5072 | } | 
|  | 5073 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5074 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5075 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5076 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5077 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5078 | } | 
|  | 5079 |  | 
|  | 5080 | @threadSafety("app") | 
|  | 5081 | cmd void vkCmdSetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5082 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5083 | VkEvent                                     event, | 
|  | 5084 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5085 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5086 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5087 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5088 | } | 
|  | 5089 |  | 
|  | 5090 | @threadSafety("app") | 
|  | 5091 | cmd void vkCmdResetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5092 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5093 | VkEvent                                     event, | 
|  | 5094 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5095 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5096 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5097 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5098 | } | 
|  | 5099 |  | 
|  | 5100 | @threadSafety("app") | 
|  | 5101 | cmd void vkCmdWaitEvents( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5102 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5103 | u32                                         eventCount, | 
|  | 5104 | const VkEvent*                              pEvents, | 
|  | 5105 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5106 | VkPipelineStageFlags                        dstStageMask, | 
|  | 5107 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5108 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5109 | u32                                         bufferMemoryBarrierCount, | 
|  | 5110 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5111 | u32                                         imageMemoryBarrierCount, | 
|  | 5112 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5113 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5114 |  | 
|  | 5115 | events := pEvents[0:eventCount] | 
|  | 5116 | for i in (0 .. eventCount) { | 
|  | 5117 | event := events[i] | 
|  | 5118 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5119 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5120 | } | 
|  | 5121 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5122 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5123 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5124 | memoryBarrier := memoryBarriers[i] | 
|  | 5125 | } | 
|  | 5126 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5127 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5128 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5129 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5130 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5131 | } | 
|  | 5132 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5133 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5134 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5135 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5136 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5137 | } | 
|  | 5138 | } | 
|  | 5139 |  | 
|  | 5140 | @threadSafety("app") | 
|  | 5141 | cmd void vkCmdPipelineBarrier( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5142 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5143 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5144 | VkPipelineStageFlags                        dstStageMask, | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5145 | VkDependencyFlags                           dependencyFlags, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5146 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5147 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5148 | u32                                         bufferMemoryBarrierCount, | 
|  | 5149 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5150 | u32                                         imageMemoryBarrierCount, | 
|  | 5151 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5152 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5153 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5154 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5155 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5156 | memoryBarrier := memoryBarriers[i] | 
|  | 5157 | } | 
|  | 5158 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5159 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5160 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5161 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5162 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5163 | } | 
|  | 5164 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5165 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5166 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5167 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5168 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5169 | } | 
|  | 5170 | } | 
|  | 5171 |  | 
|  | 5172 | @threadSafety("app") | 
|  | 5173 | cmd void vkCmdBeginQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5174 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5175 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5176 | u32                                         query, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5177 | VkQueryControlFlags                         flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5178 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5179 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5180 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5181 | } | 
|  | 5182 |  | 
|  | 5183 | @threadSafety("app") | 
|  | 5184 | cmd void vkCmdEndQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5185 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5186 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5187 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5188 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5189 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5190 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5191 | } | 
|  | 5192 |  | 
|  | 5193 | @threadSafety("app") | 
|  | 5194 | cmd void vkCmdResetQueryPool( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5195 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5196 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5197 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5198 | u32                                         queryCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5199 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5200 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5201 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5202 | } | 
|  | 5203 |  | 
|  | 5204 | @threadSafety("app") | 
|  | 5205 | cmd void vkCmdWriteTimestamp( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5206 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5207 | VkPipelineStageFlagBits                     pipelineStage, | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5208 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5209 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5210 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5211 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5212 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5213 | } | 
|  | 5214 |  | 
|  | 5215 | @threadSafety("app") | 
|  | 5216 | cmd void vkCmdCopyQueryPoolResults( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5217 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5218 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5219 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5220 | u32                                         queryCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5221 | VkBuffer                                    dstBuffer, | 
|  | 5222 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5223 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5224 | VkQueryResultFlags                          flags) { | 
| 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 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5227 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5228 | assert(commandBufferObject.device == queryPoolObject.device) | 
|  | 5229 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5230 | } | 
|  | 5231 |  | 
|  | 5232 | cmd void vkCmdPushConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5233 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5234 | VkPipelineLayout                            layout, | 
|  | 5235 | VkShaderStageFlags                          stageFlags, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5236 | u32                                         offset, | 
|  | 5237 | u32                                         size, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5238 | const void*                                 pValues) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5239 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5240 | layoutObject := GetPipelineLayout(layout) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5241 | assert(commandBufferObject.device == layoutObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5242 | } | 
|  | 5243 |  | 
|  | 5244 | @threadSafety("app") | 
|  | 5245 | cmd void vkCmdBeginRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5246 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5247 | const VkRenderPassBeginInfo*                pRenderPassBegin, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5248 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5249 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5250 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) | 
|  | 5251 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5252 | assert(commandBufferObject.device == renderPassObject.device) | 
|  | 5253 | assert(commandBufferObject.device == framebufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5254 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5255 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5256 | } | 
|  | 5257 |  | 
|  | 5258 | cmd void vkCmdNextSubpass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5259 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5260 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5261 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5262 | } | 
|  | 5263 |  | 
|  | 5264 | @threadSafety("app") | 
|  | 5265 | cmd void vkCmdEndRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5266 | VkCommandBuffer                             commandBuffer) { | 
|  | 5267 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5268 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5269 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5270 | } | 
|  | 5271 |  | 
|  | 5272 | cmd void vkCmdExecuteCommands( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5273 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5274 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5275 | const VkCommandBuffer*                      pCommandBuffers) { | 
|  | 5276 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5277 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5278 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
|  | 5279 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5280 | secondaryCommandBuffer := commandBuffers[i] | 
|  | 5281 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) | 
|  | 5282 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5283 | } | 
|  | 5284 | } | 
|  | 5285 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5286 | @extension("VK_KHR_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5287 | cmd void vkDestroySurfaceKHR( | 
|  | 5288 | VkInstance                                  instance, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5289 | VkSurfaceKHR                                surface, | 
|  | 5290 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5291 | instanceObject := GetInstance(instance) | 
|  | 5292 | surfaceObject := GetSurface(surface) | 
|  | 5293 | assert(surfaceObject.instance == instance) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5294 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5295 | State.Surfaces[surface] = null | 
| Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5296 | } | 
|  | 5297 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5298 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5299 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5300 | VkPhysicalDevice                            physicalDevice, | 
|  | 5301 | u32                                         queueFamilyIndex, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5302 | VkSurfaceKHR                                surface, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5303 | VkBool32*                                   pSupported) { | 
|  | 5304 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5305 |  | 
|  | 5306 | return ? | 
|  | 5307 | } | 
|  | 5308 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5309 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5310 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( | 
|  | 5311 | VkPhysicalDevice                            physicalDevice, | 
|  | 5312 | VkSurfaceKHR                                surface, | 
|  | 5313 | VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities) { | 
|  | 5314 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5315 |  | 
|  | 5316 | surfaceCapabilities := ? | 
|  | 5317 | pSurfaceCapabilities[0] = surfaceCapabilities | 
|  | 5318 |  | 
|  | 5319 | return ? | 
|  | 5320 | } | 
|  | 5321 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5322 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5323 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( | 
|  | 5324 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5325 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5326 | u32*                                        pSurfaceFormatCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5327 | VkSurfaceFormatKHR*                         pSurfaceFormats) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5328 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5329 |  | 
|  | 5330 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5331 | pSurfaceFormatCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5332 | surfaceFormats := pSurfaceFormats[0:count] | 
|  | 5333 |  | 
|  | 5334 | for i in (0 .. count) { | 
|  | 5335 | surfaceFormat := ? | 
|  | 5336 | surfaceFormats[i] = surfaceFormat | 
|  | 5337 | } | 
|  | 5338 |  | 
|  | 5339 | return ? | 
|  | 5340 | } | 
|  | 5341 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5342 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5343 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( | 
|  | 5344 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5345 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5346 | u32*                                        pPresentModeCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5347 | VkPresentModeKHR*                           pPresentModes) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5348 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5349 |  | 
|  | 5350 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5351 | pPresentModeCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5352 | presentModes := pPresentModes[0:count] | 
|  | 5353 |  | 
|  | 5354 | for i in (0 .. count) { | 
|  | 5355 | presentMode := ? | 
|  | 5356 | presentModes[i] = presentMode | 
|  | 5357 | } | 
|  | 5358 |  | 
|  | 5359 | return ? | 
|  | 5360 | } | 
|  | 5361 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5362 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5363 | cmd VkResult vkCreateSwapchainKHR( | 
|  | 5364 | VkDevice                                 device, | 
|  | 5365 | const VkSwapchainCreateInfoKHR*          pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5366 | const VkAllocationCallbacks*             pAllocator, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5367 | VkSwapchainKHR*                          pSwapchain) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5368 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5369 | deviceObject := GetDevice(device) | 
|  | 5370 |  | 
|  | 5371 | swapchain := ? | 
|  | 5372 | pSwapchain[0] = swapchain | 
|  | 5373 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) | 
|  | 5374 |  | 
|  | 5375 | return ? | 
|  | 5376 | } | 
|  | 5377 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5378 | @extension("VK_KHR_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5379 | cmd void vkDestroySwapchainKHR( | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5380 | VkDevice                                 device, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5381 | VkSwapchainKHR                           swapchain, | 
|  | 5382 | const VkAllocationCallbacks*             pAllocator) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5383 | deviceObject := GetDevice(device) | 
|  | 5384 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5385 | assert(swapchainObject.device == device) | 
|  | 5386 |  | 
|  | 5387 | State.Swapchains[swapchain] = null | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5388 | } | 
|  | 5389 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5390 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5391 | cmd VkResult vkGetSwapchainImagesKHR( | 
|  | 5392 | VkDevice                                 device, | 
|  | 5393 | VkSwapchainKHR                           swapchain, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5394 | u32*                                     pSwapchainImageCount, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5395 | VkImage*                                 pSwapchainImages) { | 
|  | 5396 | deviceObject := GetDevice(device) | 
|  | 5397 |  | 
|  | 5398 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5399 | pSwapchainImageCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5400 | swapchainImages := pSwapchainImages[0:count] | 
|  | 5401 |  | 
|  | 5402 | for i in (0 .. count) { | 
|  | 5403 | swapchainImage := ? | 
|  | 5404 | swapchainImages[i] = swapchainImage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5405 | State.Images[swapchainImage] = new!ImageObject(device: device) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5406 | } | 
|  | 5407 |  | 
|  | 5408 | return ? | 
|  | 5409 | } | 
|  | 5410 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5411 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5412 | cmd VkResult vkAcquireNextImageKHR( | 
|  | 5413 | VkDevice                                 device, | 
|  | 5414 | VkSwapchainKHR                           swapchain, | 
|  | 5415 | u64                                      timeout, | 
|  | 5416 | VkSemaphore                              semaphore, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5417 | VkFence                                  fence, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5418 | u32*                                     pImageIndex) { | 
|  | 5419 | deviceObject := GetDevice(device) | 
|  | 5420 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5421 |  | 
|  | 5422 | imageIndex := ? | 
|  | 5423 | pImageIndex[0] = imageIndex | 
|  | 5424 |  | 
|  | 5425 | return ? | 
|  | 5426 | } | 
|  | 5427 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5428 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5429 | cmd VkResult vkQueuePresentKHR( | 
|  | 5430 | VkQueue                                  queue, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5431 | const VkPresentInfoKHR*                  pPresentInfo) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5432 | queueObject := GetQueue(queue) | 
|  | 5433 |  | 
|  | 5434 | presentInfo := ? | 
|  | 5435 | pPresentInfo[0] = presentInfo | 
|  | 5436 |  | 
|  | 5437 | return ? | 
|  | 5438 | } | 
|  | 5439 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5440 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5441 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( | 
|  | 5442 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5443 | u32*                                    pPropertyCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5444 | VkDisplayPropertiesKHR*                 pProperties) { | 
|  | 5445 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5446 | return ? | 
|  | 5447 | } | 
|  | 5448 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5449 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5450 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( | 
|  | 5451 | VkPhysicalDevice                        physicalDevice, | 
|  | 5452 | u32*                                    pPropertyCount, | 
|  | 5453 | VkDisplayPlanePropertiesKHR*            pProperties) { | 
|  | 5454 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5455 | return ? | 
|  | 5456 | } | 
|  | 5457 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5458 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5459 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( | 
|  | 5460 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5461 | u32                                     planeIndex, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5462 | u32*                                    pDisplayCount, | 
|  | 5463 | VkDisplayKHR*                           pDisplays) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5464 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5465 | return ? | 
|  | 5466 | } | 
|  | 5467 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5468 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5469 | cmd VkResult vkGetDisplayModePropertiesKHR( | 
|  | 5470 | VkPhysicalDevice                        physicalDevice, | 
|  | 5471 | VkDisplayKHR                            display, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5472 | u32*                                    pPropertyCount, | 
|  | 5473 | VkDisplayModePropertiesKHR*             pProperties) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5474 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5475 | return ? | 
|  | 5476 | } | 
|  | 5477 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5478 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5479 | cmd VkResult vkCreateDisplayModeKHR( | 
|  | 5480 | VkPhysicalDevice                        physicalDevice, | 
|  | 5481 | VkDisplayKHR                            display, | 
|  | 5482 | const VkDisplayModeCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5483 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5484 | VkDisplayModeKHR*                       pMode) { | 
|  | 5485 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5486 | return ? | 
|  | 5487 | } | 
|  | 5488 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5489 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5490 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5491 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5492 | VkDisplayModeKHR                        mode, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5493 | u32                                     planeIndex, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5494 | VkDisplayPlaneCapabilitiesKHR*          pCapabilities) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5495 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5496 | return ? | 
|  | 5497 | } | 
|  | 5498 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5499 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5500 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( | 
|  | 5501 | VkInstance                              instance, | 
|  | 5502 | const VkDisplaySurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5503 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5504 | VkSurfaceKHR*                           pSurface) { | 
|  | 5505 | return ? | 
|  | 5506 | } | 
|  | 5507 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5508 | @extension("VK_KHR_display_swapchain") | 
|  | 5509 | cmd VkResult vkCreateSharedSwapchainsKHR( | 
|  | 5510 | VkDevice                                device, | 
|  | 5511 | u32                                     swapchainCount, | 
|  | 5512 | const VkSwapchainCreateInfoKHR*         pCreateInfos, | 
|  | 5513 | const VkAllocationCallbacks*            pAllocator, | 
|  | 5514 | VkSwapchainKHR*                         pSwapchains) { | 
|  | 5515 | return ? | 
|  | 5516 | } | 
|  | 5517 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5518 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5519 | cmd VkResult vkCreateXlibSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5520 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5521 | const VkXlibSurfaceCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5522 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5523 | VkSurfaceKHR*                           pSurface) { | 
|  | 5524 | instanceObject := GetInstance(instance) | 
|  | 5525 | return ? | 
|  | 5526 | } | 
|  | 5527 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5528 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5529 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( | 
|  | 5530 | VkPhysicalDevice                        physicalDevice, | 
|  | 5531 | u32                                     queueFamilyIndex, | 
|  | 5532 | platform.Display*                       dpy, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5533 | platform.VisualID                       visualID) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5534 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5535 | return ? | 
|  | 5536 | } | 
|  | 5537 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5538 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5539 | cmd VkResult vkCreateXcbSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5540 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5541 | const VkXcbSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5542 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5543 | VkSurfaceKHR*                           pSurface) { | 
|  | 5544 | instanceObject := GetInstance(instance) | 
|  | 5545 | return ? | 
|  | 5546 | } | 
|  | 5547 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5548 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5549 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( | 
|  | 5550 | VkPhysicalDevice                        physicalDevice, | 
|  | 5551 | u32                                     queueFamilyIndex, | 
|  | 5552 | platform.xcb_connection_t*              connection, | 
|  | 5553 | platform.xcb_visualid_t                 visual_id) { | 
|  | 5554 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5555 | return ? | 
|  | 5556 | } | 
|  | 5557 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5558 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5559 | cmd VkResult vkCreateWaylandSurfaceKHR( | 
|  | 5560 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5561 | const VkWaylandSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5562 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5563 | VkSurfaceKHR*                           pSurface) { | 
|  | 5564 | instanceObject := GetInstance(instance) | 
|  | 5565 | return ? | 
|  | 5566 | } | 
|  | 5567 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5568 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5569 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( | 
|  | 5570 | VkPhysicalDevice                        physicalDevice, | 
|  | 5571 | u32                                     queueFamilyIndex, | 
|  | 5572 | platform.wl_display*                    display) { | 
|  | 5573 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5574 | return ? | 
|  | 5575 | } | 
|  | 5576 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5577 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5578 | cmd VkResult vkCreateMirSurfaceKHR( | 
|  | 5579 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5580 | const VkMirSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5581 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5582 | VkSurfaceKHR*                           pSurface) { | 
|  | 5583 | instanceObject := GetInstance(instance) | 
|  | 5584 | return ? | 
|  | 5585 | } | 
|  | 5586 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5587 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5588 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( | 
|  | 5589 | VkPhysicalDevice                        physicalDevice, | 
|  | 5590 | u32                                     queueFamilyIndex, | 
|  | 5591 | platform.MirConnection*                 connection) { | 
|  | 5592 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5593 | return ? | 
|  | 5594 | } | 
|  | 5595 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5596 | @extension("VK_KHR_android_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5597 | cmd VkResult vkCreateAndroidSurfaceKHR( | 
|  | 5598 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5599 | const VkAndroidSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5600 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5601 | VkSurfaceKHR*                           pSurface) { | 
|  | 5602 | instanceObject := GetInstance(instance) | 
|  | 5603 | return ? | 
|  | 5604 | } | 
|  | 5605 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5606 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5607 | cmd VkResult vkCreateWin32SurfaceKHR( | 
|  | 5608 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5609 | const VkWin32SurfaceCreateInfoKHR*      pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5610 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5611 | VkSurfaceKHR*                           pSurface) { | 
|  | 5612 | instanceObject := GetInstance(instance) | 
|  | 5613 | return ? | 
|  | 5614 | } | 
|  | 5615 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5616 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5617 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( | 
|  | 5618 | VkPhysicalDevice                        physicalDevice, | 
|  | 5619 | u32                                     queueFamilyIndex) { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5620 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5621 | return ? | 
|  | 5622 | } | 
|  | 5623 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5624 | @extension("VK_ANDROID_native_buffer") | 
|  | 5625 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( | 
|  | 5626 | VkDevice                                device, | 
|  | 5627 | VkFormat                                format, | 
|  | 5628 | VkImageUsageFlags                       imageUsage, | 
|  | 5629 | int*                                    grallocUsage) { | 
|  | 5630 | return ? | 
|  | 5631 | } | 
|  | 5632 |  | 
|  | 5633 | @extension("VK_ANDROID_native_buffer") | 
|  | 5634 | cmd VkResult vkAcquireImageANDROID( | 
|  | 5635 | VkDevice                                device, | 
|  | 5636 | VkImage                                 image, | 
|  | 5637 | int                                     nativeFenceFd, | 
|  | 5638 | VkSemaphore                             semaphore, | 
|  | 5639 | VkFence                                 fence) { | 
|  | 5640 | return ? | 
|  | 5641 | } | 
|  | 5642 |  | 
|  | 5643 | @extension("VK_ANDROID_native_buffer") | 
|  | 5644 | cmd VkResult vkQueueSignalReleaseImageANDROID( | 
|  | 5645 | VkQueue                                 queue, | 
|  | 5646 | u32                                     waitSemaphoreCount, | 
|  | 5647 | const VkSemaphore*                      pWaitSemaphores, | 
|  | 5648 | VkImage                                 image, | 
|  | 5649 | int*                                    pNativeFenceFd) { | 
|  | 5650 | return ? | 
|  | 5651 | } | 
|  | 5652 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5653 | @extension("VK_EXT_debug_report") | 
|  | 5654 | @external type void* PFN_vkDebugReportCallbackEXT | 
|  | 5655 | @extension("VK_EXT_debug_report") | 
|  | 5656 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( | 
|  | 5657 | VkDebugReportFlagsEXT                   flags, | 
|  | 5658 | VkDebugReportObjectTypeEXT              objectType, | 
|  | 5659 | u64                                     object, | 
|  | 5660 | platform.size_t                         location, | 
|  | 5661 | s32                                     messageCode, | 
|  | 5662 | const char*                             pLayerPrefix, | 
|  | 5663 | const char*                             pMessage, | 
|  | 5664 | void*                                   pUserData) { | 
|  | 5665 | return ? | 
|  | 5666 | } | 
|  | 5667 |  | 
|  | 5668 | @extension("VK_EXT_debug_report") | 
|  | 5669 | cmd VkResult vkCreateDebugReportCallbackEXT( | 
|  | 5670 | VkInstance                                  instance, | 
|  | 5671 | const VkDebugReportCallbackCreateInfoEXT*   pCreateInfo, | 
|  | 5672 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5673 | VkDebugReportCallbackEXT*                   pCallback) { | 
|  | 5674 | return ? | 
|  | 5675 | } | 
|  | 5676 |  | 
|  | 5677 | @extension("VK_EXT_debug_report") | 
|  | 5678 | cmd void vkDestroyDebugReportCallbackEXT( | 
|  | 5679 | VkInstance                                  instance, | 
|  | 5680 | VkDebugReportCallbackEXT                    callback, | 
|  | 5681 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5682 | } | 
|  | 5683 |  | 
|  | 5684 | @extension("VK_EXT_debug_report") | 
|  | 5685 | cmd void vkDebugReportMessageEXT( | 
|  | 5686 | VkInstance                                  instance, | 
|  | 5687 | VkDebugReportFlagsEXT                       flags, | 
|  | 5688 | VkDebugReportObjectTypeEXT                  objectType, | 
|  | 5689 | u64                                         object, | 
|  | 5690 | platform.size_t                             location, | 
|  | 5691 | s32                                         messageCode, | 
|  | 5692 | const char*                                 pLayerPrefix, | 
|  | 5693 | const char*                                 pMessage) { | 
|  | 5694 | } | 
|  | 5695 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5696 | @extension("VK_EXT_debug_marker") | 
|  | 5697 | cmd VkResult vkDebugMarkerSetObjectTagEXT( | 
|  | 5698 | VkDevice                                    device, | 
|  | 5699 | VkDebugMarkerObjectTagInfoEXT*              pTagInfo) { | 
|  | 5700 | return ? | 
|  | 5701 | } | 
|  | 5702 |  | 
|  | 5703 | @extension("VK_EXT_debug_marker") | 
|  | 5704 | cmd VkResult vkDebugMarkerSetObjectNameEXT( | 
|  | 5705 | VkDevice                                    device, | 
|  | 5706 | VkDebugMarkerObjectNameInfoEXT*             pNameInfo) { | 
|  | 5707 | return ? | 
|  | 5708 | } | 
|  | 5709 |  | 
|  | 5710 | @extension("VK_EXT_debug_marker") | 
|  | 5711 | cmd void vkCmdDebugMarkerBeginEXT( | 
|  | 5712 | VkCommandBuffer                             commandBuffer, | 
|  | 5713 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5714 | } | 
|  | 5715 |  | 
|  | 5716 | @extension("VK_EXT_debug_marker") | 
|  | 5717 | cmd void vkCmdDebugMarkerEndEXT( | 
|  | 5718 | VkCommandBuffer                             commandBuffer) { | 
|  | 5719 | } | 
|  | 5720 |  | 
|  | 5721 | @extension("VK_EXT_debug_marker") | 
|  | 5722 | cmd void vkCmdDebugMarkerInsertEXT( | 
|  | 5723 | VkCommandBuffer                             commandBuffer, | 
|  | 5724 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5725 | } | 
|  | 5726 |  | 
| Jesse Hall | eb02c47 | 2017-02-24 15:13:45 -0800 | [diff] [blame] | 5727 | @extension("VK_AMD_draw_indirect_count") | 
|  | 5728 | cmd void vkCmdDrawIndirectCountAMD( | 
|  | 5729 | VkCommandBuffer                             commandBuffer, | 
|  | 5730 | VkBuffer                                    buffer, | 
|  | 5731 | VkDeviceSize                                offset, | 
|  | 5732 | VkBuffer                                    countBuffer, | 
|  | 5733 | VkDeviceSize                                countBufferOffset, | 
|  | 5734 | u32                                         maxDrawCount, | 
|  | 5735 | u32                                         stride) { | 
|  | 5736 | } | 
|  | 5737 |  | 
|  | 5738 | @extension("VK_AMD_draw_indirect_count") | 
|  | 5739 | cmd void vkCmdDrawIndexedIndirectCountAMD( | 
|  | 5740 | VkCommandBuffer                             commandBuffer, | 
|  | 5741 | VkBuffer                                    buffer, | 
|  | 5742 | VkDeviceSize                                offset, | 
|  | 5743 | VkBuffer                                    countBuffer, | 
|  | 5744 | VkDeviceSize                                countBufferOffset, | 
|  | 5745 | u32                                         maxDrawCount, | 
|  | 5746 | u32                                         stride) { | 
|  | 5747 | } | 
|  | 5748 |  | 
|  | 5749 | @extension("VK_NV_external_memory_capabilities") | 
|  | 5750 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( | 
|  | 5751 | VkPhysicalDevice                            physicalDevice, | 
|  | 5752 | VkFormat                                    format, | 
|  | 5753 | VkImageType                                 type, | 
|  | 5754 | VkImageTiling                               tiling, | 
|  | 5755 | VkImageUsageFlags                           usage, | 
|  | 5756 | VkImageCreateFlags                          flags, | 
|  | 5757 | VkExternalMemoryHandleTypeFlagsNV           externalHandleType, | 
|  | 5758 | VkExternalImageFormatPropertiesNV*          pExternalImageFormatProperties) { | 
|  | 5759 | return ? | 
|  | 5760 | } | 
|  | 5761 |  | 
|  | 5762 | @extension("VK_NV_external_memory_win32") | 
|  | 5763 | cmd VkResult vkGetMemoryWin32HandleNV( | 
|  | 5764 | VkDevice                                    device, | 
|  | 5765 | VkDeviceMemory                              memory, | 
|  | 5766 | VkExternalMemoryHandleTypeFlagsNV           handleType, | 
|  | 5767 | platform.HANDLE*                            pHandle) { | 
|  | 5768 | return ? | 
|  | 5769 | } | 
|  | 5770 |  | 
|  | 5771 | @extension("VK_NVX_device_generated_commands") | 
|  | 5772 | cmd void vkCmdProcessCommandsNVX( | 
|  | 5773 | VkCommandBuffer                             commandBuffer, | 
|  | 5774 | const VkCmdProcessCommandsInfoNVX*          pProcessCommandsInfo) { | 
|  | 5775 | } | 
|  | 5776 |  | 
|  | 5777 | @extension("VK_NVX_device_generated_commands") | 
|  | 5778 | cmd void vkCmdReserveSpaceForCommandsNVX( | 
|  | 5779 | VkCommandBuffer                             commandBuffer, | 
|  | 5780 | const VkCmdReserveSpaceForCommandsInfoNVX*  pReserveSpaceInfo) { | 
|  | 5781 | } | 
|  | 5782 |  | 
|  | 5783 | @extension("VK_NVX_device_generated_commands") | 
|  | 5784 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( | 
|  | 5785 | VkDevice                                    device, | 
|  | 5786 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, | 
|  | 5787 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5788 | VkIndirectCommandsLayoutNVX*                pIndirectCommandsLayout) { | 
|  | 5789 | return ? | 
|  | 5790 | } | 
|  | 5791 |  | 
|  | 5792 | @extension("VK_NVX_device_generated_commands") | 
|  | 5793 | cmd void vkDestroyIndirectCommandsLayoutNVX( | 
|  | 5794 | VkDevice                                    device, | 
|  | 5795 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout, | 
|  | 5796 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5797 | } | 
|  | 5798 |  | 
|  | 5799 | @extension("VK_NVX_device_generated_commands") | 
|  | 5800 | cmd VkResult vkCreateObjectTableNVX( | 
|  | 5801 | VkDevice                                    device, | 
|  | 5802 | const VkObjectTableCreateInfoNVX*           pCreateInfo, | 
|  | 5803 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5804 | VkObjectTableNVX*                           pObjectTable) { | 
|  | 5805 | return ? | 
|  | 5806 | } | 
|  | 5807 |  | 
|  | 5808 | @extension("VK_NVX_device_generated_commands") | 
|  | 5809 | cmd void vkDestroyObjectTableNVX( | 
|  | 5810 | VkDevice                                    device, | 
|  | 5811 | VkObjectTableNVX                            objectTable, | 
|  | 5812 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5813 | } | 
|  | 5814 |  | 
|  | 5815 | @extension("VK_NVX_device_generated_commands") | 
|  | 5816 | cmd VkResult vkRegisterObjectsNVX( | 
|  | 5817 | VkDevice                                    device, | 
|  | 5818 | VkObjectTableNVX                            objectTable, | 
|  | 5819 | u32                                         objectCount, | 
|  | 5820 | const VkObjectTableEntryNVX* const*         ppObjectTableEntries, | 
|  | 5821 | const u32*                                  pObjectIndices) { | 
|  | 5822 | return ? | 
|  | 5823 | } | 
|  | 5824 |  | 
|  | 5825 | @extension("VK_NVX_device_generated_commands") | 
|  | 5826 | cmd VkResult vkUnregisterObjectsNVX( | 
|  | 5827 | VkDevice                                    device, | 
|  | 5828 | VkObjectTableNVX                            objectTable, | 
|  | 5829 | u32                                         objectCount, | 
|  | 5830 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes, | 
|  | 5831 | const u32*                                  pObjectIndices) { | 
|  | 5832 | return ? | 
|  | 5833 | } | 
|  | 5834 |  | 
|  | 5835 | @extension("VK_NVX_device_generated_commands") | 
|  | 5836 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( | 
|  | 5837 | VkPhysicalDevice                            physicalDevice, | 
|  | 5838 | VkDeviceGeneratedCommandsFeaturesNVX*       pFeatures, | 
|  | 5839 | VkDeviceGeneratedCommandsLimitsNVX*         pLimits) { | 
|  | 5840 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5841 |  | 
|  | 5842 | //////////////// | 
|  | 5843 | // Validation // | 
|  | 5844 | //////////////// | 
|  | 5845 |  | 
|  | 5846 | extern void validate(string layerName, bool condition, string message) | 
|  | 5847 |  | 
|  | 5848 |  | 
|  | 5849 | ///////////////////////////// | 
|  | 5850 | // Internal State Tracking // | 
|  | 5851 | ///////////////////////////// | 
|  | 5852 |  | 
|  | 5853 | StateObject State | 
|  | 5854 |  | 
|  | 5855 | @internal class StateObject { | 
|  | 5856 | // Dispatchable objects. | 
|  | 5857 | map!(VkInstance,       ref!InstanceObject)       Instances | 
|  | 5858 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices | 
|  | 5859 | map!(VkDevice,         ref!DeviceObject)         Devices | 
|  | 5860 | map!(VkQueue,          ref!QueueObject)          Queues | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5861 | map!(VkCommandBuffer,  ref!CommandBufferObject)  CommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5862 |  | 
|  | 5863 | // Non-dispatchable objects. | 
|  | 5864 | map!(VkDeviceMemory,             ref!DeviceMemoryObject)             DeviceMemories | 
|  | 5865 | map!(VkBuffer,                   ref!BufferObject)                   Buffers | 
|  | 5866 | map!(VkBufferView,               ref!BufferViewObject)               BufferViews | 
|  | 5867 | map!(VkImage,                    ref!ImageObject)                    Images | 
|  | 5868 | map!(VkImageView,                ref!ImageViewObject)                ImageViews | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5869 | map!(VkShaderModule,             ref!ShaderModuleObject)             ShaderModules | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5870 | map!(VkPipeline,                 ref!PipelineObject)                 Pipelines | 
|  | 5871 | map!(VkPipelineLayout,           ref!PipelineLayoutObject)           PipelineLayouts | 
|  | 5872 | map!(VkSampler,                  ref!SamplerObject)                  Samplers | 
|  | 5873 | map!(VkDescriptorSet,            ref!DescriptorSetObject)            DescriptorSets | 
|  | 5874 | map!(VkDescriptorSetLayout,      ref!DescriptorSetLayoutObject)      DescriptorSetLayouts | 
|  | 5875 | map!(VkDescriptorPool,           ref!DescriptorPoolObject)           DescriptorPools | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5876 | map!(VkFence,                    ref!FenceObject)                    Fences | 
|  | 5877 | map!(VkSemaphore,                ref!SemaphoreObject)                Semaphores | 
|  | 5878 | map!(VkEvent,                    ref!EventObject)                    Events | 
|  | 5879 | map!(VkQueryPool,                ref!QueryPoolObject)                QueryPools | 
|  | 5880 | map!(VkFramebuffer,              ref!FramebufferObject)              Framebuffers | 
|  | 5881 | map!(VkRenderPass,               ref!RenderPassObject)               RenderPasses | 
|  | 5882 | map!(VkPipelineCache,            ref!PipelineCacheObject)            PipelineCaches | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5883 | map!(VkCommandPool,              ref!CommandPoolObject)              CommandPools | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5884 | map!(VkSurfaceKHR,               ref!SurfaceObject)                  Surfaces | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5885 | map!(VkSwapchainKHR,             ref!SwapchainObject)                Swapchains | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5886 | } | 
|  | 5887 |  | 
|  | 5888 | @internal class InstanceObject { | 
|  | 5889 | } | 
|  | 5890 |  | 
|  | 5891 | @internal class PhysicalDeviceObject { | 
|  | 5892 | VkInstance instance | 
|  | 5893 | } | 
|  | 5894 |  | 
|  | 5895 | @internal class DeviceObject { | 
|  | 5896 | VkPhysicalDevice physicalDevice | 
|  | 5897 | } | 
|  | 5898 |  | 
|  | 5899 | @internal class QueueObject { | 
|  | 5900 | VkDevice      device | 
|  | 5901 | VkQueueFlags  flags | 
|  | 5902 | } | 
|  | 5903 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5904 | @internal class CommandBufferObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5905 | VkDevice                  device | 
|  | 5906 | map!(u64, VkDeviceMemory) boundObjects | 
|  | 5907 | VkQueueFlags              queueFlags | 
|  | 5908 | } | 
|  | 5909 |  | 
|  | 5910 | @internal class DeviceMemoryObject { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5911 | VkDevice                                device | 
|  | 5912 | VkDeviceSize                            allocationSize | 
|  | 5913 | map!(u64, VkDeviceSize)                 boundObjects | 
|  | 5914 | map!(VkCommandBuffer, VkCommandBuffer)  boundCommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5915 | } | 
|  | 5916 |  | 
|  | 5917 | @internal class BufferObject { | 
|  | 5918 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5919 | VkDeviceMemory        memory | 
|  | 5920 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5921 | } | 
|  | 5922 |  | 
|  | 5923 | @internal class BufferViewObject { | 
|  | 5924 | VkDevice      device | 
|  | 5925 | VkBuffer      buffer | 
|  | 5926 | } | 
|  | 5927 |  | 
|  | 5928 | @internal class ImageObject { | 
|  | 5929 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5930 | VkDeviceMemory        memory | 
|  | 5931 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5932 | } | 
|  | 5933 |  | 
|  | 5934 | @internal class ImageViewObject { | 
|  | 5935 | VkDevice      device | 
|  | 5936 | VkImage       image | 
|  | 5937 | } | 
|  | 5938 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5939 | @internal class ShaderObject { | 
|  | 5940 | VkDevice      device | 
|  | 5941 | } | 
|  | 5942 |  | 
|  | 5943 | @internal class ShaderModuleObject { | 
|  | 5944 | VkDevice      device | 
|  | 5945 | } | 
|  | 5946 |  | 
|  | 5947 | @internal class PipelineObject { | 
|  | 5948 | VkDevice      device | 
|  | 5949 | } | 
|  | 5950 |  | 
|  | 5951 | @internal class PipelineLayoutObject { | 
|  | 5952 | VkDevice      device | 
|  | 5953 | } | 
|  | 5954 |  | 
|  | 5955 | @internal class SamplerObject { | 
|  | 5956 | VkDevice      device | 
|  | 5957 | } | 
|  | 5958 |  | 
|  | 5959 | @internal class DescriptorSetObject { | 
|  | 5960 | VkDevice      device | 
|  | 5961 | } | 
|  | 5962 |  | 
|  | 5963 | @internal class DescriptorSetLayoutObject { | 
|  | 5964 | VkDevice      device | 
|  | 5965 | } | 
|  | 5966 |  | 
|  | 5967 | @internal class DescriptorPoolObject { | 
|  | 5968 | VkDevice      device | 
|  | 5969 | } | 
|  | 5970 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5971 | @internal class FenceObject { | 
|  | 5972 | VkDevice      device | 
|  | 5973 | bool          signaled | 
|  | 5974 | } | 
|  | 5975 |  | 
|  | 5976 | @internal class SemaphoreObject { | 
|  | 5977 | VkDevice      device | 
|  | 5978 | } | 
|  | 5979 |  | 
|  | 5980 | @internal class EventObject { | 
|  | 5981 | VkDevice      device | 
|  | 5982 | } | 
|  | 5983 |  | 
|  | 5984 | @internal class QueryPoolObject { | 
|  | 5985 | VkDevice      device | 
|  | 5986 | } | 
|  | 5987 |  | 
|  | 5988 | @internal class FramebufferObject { | 
|  | 5989 | VkDevice      device | 
|  | 5990 | } | 
|  | 5991 |  | 
|  | 5992 | @internal class RenderPassObject { | 
|  | 5993 | VkDevice      device | 
|  | 5994 | } | 
|  | 5995 |  | 
|  | 5996 | @internal class PipelineCacheObject { | 
|  | 5997 | VkDevice      device | 
|  | 5998 | } | 
|  | 5999 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6000 | @internal class CommandPoolObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6001 | VkDevice      device | 
|  | 6002 | } | 
|  | 6003 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6004 | @internal class SurfaceObject { | 
|  | 6005 | VkInstance    instance | 
|  | 6006 | } | 
|  | 6007 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6008 | @internal class SwapchainObject { | 
|  | 6009 | VkDevice      device | 
|  | 6010 | } | 
|  | 6011 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6012 | macro ref!InstanceObject GetInstance(VkInstance instance) { | 
|  | 6013 | assert(instance in State.Instances) | 
|  | 6014 | return State.Instances[instance] | 
|  | 6015 | } | 
|  | 6016 |  | 
|  | 6017 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { | 
|  | 6018 | assert(physicalDevice in State.PhysicalDevices) | 
|  | 6019 | return State.PhysicalDevices[physicalDevice] | 
|  | 6020 | } | 
|  | 6021 |  | 
|  | 6022 | macro ref!DeviceObject GetDevice(VkDevice device) { | 
|  | 6023 | assert(device in State.Devices) | 
|  | 6024 | return State.Devices[device] | 
|  | 6025 | } | 
|  | 6026 |  | 
|  | 6027 | macro ref!QueueObject GetQueue(VkQueue queue) { | 
|  | 6028 | assert(queue in State.Queues) | 
|  | 6029 | return State.Queues[queue] | 
|  | 6030 | } | 
|  | 6031 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6032 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { | 
|  | 6033 | assert(commandBuffer in State.CommandBuffers) | 
|  | 6034 | return State.CommandBuffers[commandBuffer] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6035 | } | 
|  | 6036 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6037 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { | 
|  | 6038 | assert(memory in State.DeviceMemories) | 
|  | 6039 | return State.DeviceMemories[memory] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6040 | } | 
|  | 6041 |  | 
|  | 6042 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { | 
|  | 6043 | assert(buffer in State.Buffers) | 
|  | 6044 | return State.Buffers[buffer] | 
|  | 6045 | } | 
|  | 6046 |  | 
|  | 6047 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { | 
|  | 6048 | assert(bufferView in State.BufferViews) | 
|  | 6049 | return State.BufferViews[bufferView] | 
|  | 6050 | } | 
|  | 6051 |  | 
|  | 6052 | macro ref!ImageObject GetImage(VkImage image) { | 
|  | 6053 | assert(image in State.Images) | 
|  | 6054 | return State.Images[image] | 
|  | 6055 | } | 
|  | 6056 |  | 
|  | 6057 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { | 
|  | 6058 | assert(imageView in State.ImageViews) | 
|  | 6059 | return State.ImageViews[imageView] | 
|  | 6060 | } | 
|  | 6061 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6062 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { | 
|  | 6063 | assert(shaderModule in State.ShaderModules) | 
|  | 6064 | return State.ShaderModules[shaderModule] | 
|  | 6065 | } | 
|  | 6066 |  | 
|  | 6067 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { | 
|  | 6068 | assert(pipeline in State.Pipelines) | 
|  | 6069 | return State.Pipelines[pipeline] | 
|  | 6070 | } | 
|  | 6071 |  | 
|  | 6072 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { | 
|  | 6073 | assert(pipelineLayout in State.PipelineLayouts) | 
|  | 6074 | return State.PipelineLayouts[pipelineLayout] | 
|  | 6075 | } | 
|  | 6076 |  | 
|  | 6077 | macro ref!SamplerObject GetSampler(VkSampler sampler) { | 
|  | 6078 | assert(sampler in State.Samplers) | 
|  | 6079 | return State.Samplers[sampler] | 
|  | 6080 | } | 
|  | 6081 |  | 
|  | 6082 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { | 
|  | 6083 | assert(descriptorSet in State.DescriptorSets) | 
|  | 6084 | return State.DescriptorSets[descriptorSet] | 
|  | 6085 | } | 
|  | 6086 |  | 
|  | 6087 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { | 
|  | 6088 | assert(descriptorSetLayout in State.DescriptorSetLayouts) | 
|  | 6089 | return State.DescriptorSetLayouts[descriptorSetLayout] | 
|  | 6090 | } | 
|  | 6091 |  | 
|  | 6092 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { | 
|  | 6093 | assert(descriptorPool in State.DescriptorPools) | 
|  | 6094 | return State.DescriptorPools[descriptorPool] | 
|  | 6095 | } | 
|  | 6096 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6097 | macro ref!FenceObject GetFence(VkFence fence) { | 
|  | 6098 | assert(fence in State.Fences) | 
|  | 6099 | return State.Fences[fence] | 
|  | 6100 | } | 
|  | 6101 |  | 
|  | 6102 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { | 
|  | 6103 | assert(semaphore in State.Semaphores) | 
|  | 6104 | return State.Semaphores[semaphore] | 
|  | 6105 | } | 
|  | 6106 |  | 
|  | 6107 | macro ref!EventObject GetEvent(VkEvent event) { | 
|  | 6108 | assert(event in State.Events) | 
|  | 6109 | return State.Events[event] | 
|  | 6110 | } | 
|  | 6111 |  | 
|  | 6112 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { | 
|  | 6113 | assert(queryPool in State.QueryPools) | 
|  | 6114 | return State.QueryPools[queryPool] | 
|  | 6115 | } | 
|  | 6116 |  | 
|  | 6117 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { | 
|  | 6118 | assert(framebuffer in State.Framebuffers) | 
|  | 6119 | return State.Framebuffers[framebuffer] | 
|  | 6120 | } | 
|  | 6121 |  | 
|  | 6122 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { | 
|  | 6123 | assert(renderPass in State.RenderPasses) | 
|  | 6124 | return State.RenderPasses[renderPass] | 
|  | 6125 | } | 
|  | 6126 |  | 
|  | 6127 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { | 
|  | 6128 | assert(pipelineCache in State.PipelineCaches) | 
|  | 6129 | return State.PipelineCaches[pipelineCache] | 
|  | 6130 | } | 
|  | 6131 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6132 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { | 
|  | 6133 | assert(commandPool in State.CommandPools) | 
|  | 6134 | return State.CommandPools[commandPool] | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6135 | } | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6136 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6137 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { | 
|  | 6138 | assert(surface in State.Surfaces) | 
|  | 6139 | return State.Surfaces[surface] | 
|  | 6140 | } | 
|  | 6141 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6142 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { | 
|  | 6143 | assert(swapchain in State.Swapchains) | 
|  | 6144 | return State.Swapchains[swapchain] | 
|  | 6145 | } | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6146 |  | 
|  | 6147 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { | 
|  | 6148 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) | 
|  | 6149 | } |