| 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 | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 31 | define VERSION_PATCH 22 | 
| 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 | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 48 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION                 25 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 49 | @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] | 50 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 51 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION             68 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 52 | @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] | 53 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 54 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION                 21 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 55 | @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] | 56 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 57 | @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] | 58 | @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] | 59 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 60 | @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] | 61 | @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] | 62 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 63 | @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] | 64 | @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] | 65 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 66 | @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] | 67 | @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] | 68 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 69 | @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] | 70 | @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] | 71 |  | 
| Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 72 | @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] | 73 | @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] | 74 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 75 | @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] | 76 | @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] | 77 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 78 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION     5 | 
|  | 79 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME             "VK_ANDROID_native_buffer" | 
|  | 80 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 81 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION       3 | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 82 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME               "VK_EXT_debug_report" | 
|  | 83 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 84 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION           1 | 
|  | 85 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME                   "VK_NV_glsl_shader" | 
|  | 86 |  | 
|  | 87 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION   1 | 
|  | 88 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME           "VK_KHR_sampler_mirror_clamp_to_edge" | 
|  | 89 |  | 
|  | 90 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION       1 | 
|  | 91 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME               "VK_IMG_filter_cubic" | 
|  | 92 |  | 
|  | 93 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION   1 | 
|  | 94 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME           "VK_AMD_rasterization_order" | 
|  | 95 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 96 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 | 
|  | 97 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" | 
|  | 98 |  | 
|  | 99 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 | 
|  | 100 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" | 
|  | 101 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 102 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION       3 | 
|  | 103 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME               "VK_EXT_debug_marker" | 
|  | 104 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 105 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 | 
|  | 106 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" | 
|  | 107 |  | 
|  | 108 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 | 
|  | 109 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" | 
|  | 110 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 111 |  | 
|  | 112 | ///////////// | 
|  | 113 | //  Types  // | 
|  | 114 | ///////////// | 
|  | 115 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 116 | type u32 VkBool32 | 
|  | 117 | type u32 VkFlags | 
|  | 118 | type u64 VkDeviceSize | 
|  | 119 | type u32 VkSampleMask | 
|  | 120 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 121 | /// Dispatchable handle types. | 
|  | 122 | @dispatchHandle type u64 VkInstance | 
|  | 123 | @dispatchHandle type u64 VkPhysicalDevice | 
|  | 124 | @dispatchHandle type u64 VkDevice | 
|  | 125 | @dispatchHandle type u64 VkQueue | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 126 | @dispatchHandle type u64 VkCommandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 127 |  | 
|  | 128 | /// Non dispatchable handle types. | 
|  | 129 | @nonDispatchHandle type u64 VkDeviceMemory | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 130 | @nonDispatchHandle type u64 VkCommandPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 131 | @nonDispatchHandle type u64 VkBuffer | 
|  | 132 | @nonDispatchHandle type u64 VkBufferView | 
|  | 133 | @nonDispatchHandle type u64 VkImage | 
|  | 134 | @nonDispatchHandle type u64 VkImageView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 135 | @nonDispatchHandle type u64 VkShaderModule | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 136 | @nonDispatchHandle type u64 VkPipeline | 
|  | 137 | @nonDispatchHandle type u64 VkPipelineLayout | 
|  | 138 | @nonDispatchHandle type u64 VkSampler | 
|  | 139 | @nonDispatchHandle type u64 VkDescriptorSet | 
|  | 140 | @nonDispatchHandle type u64 VkDescriptorSetLayout | 
|  | 141 | @nonDispatchHandle type u64 VkDescriptorPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 142 | @nonDispatchHandle type u64 VkFence | 
|  | 143 | @nonDispatchHandle type u64 VkSemaphore | 
|  | 144 | @nonDispatchHandle type u64 VkEvent | 
|  | 145 | @nonDispatchHandle type u64 VkQueryPool | 
|  | 146 | @nonDispatchHandle type u64 VkFramebuffer | 
|  | 147 | @nonDispatchHandle type u64 VkRenderPass | 
|  | 148 | @nonDispatchHandle type u64 VkPipelineCache | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 149 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 150 | @extension("VK_KHR_surface")    @nonDispatchHandle type u64 VkSurfaceKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 151 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 152 | @extension("VK_KHR_swapchain")  @nonDispatchHandle type u64 VkSwapchainKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 153 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 154 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayKHR | 
|  | 155 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayModeKHR | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 156 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 157 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT | 
|  | 158 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 159 |  | 
|  | 160 | ///////////// | 
|  | 161 | //  Enums  // | 
|  | 162 | ///////////// | 
|  | 163 |  | 
|  | 164 | enum VkImageLayout { | 
|  | 165 | VK_IMAGE_LAYOUT_UNDEFINED                               = 0x00000000,   /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) | 
|  | 166 | VK_IMAGE_LAYOUT_GENERAL                                 = 0x00000001,   /// General layout when image can be used for any kind of access | 
|  | 167 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL                = 0x00000002,   /// Optimal layout when image is only used for color attachment read/write | 
|  | 168 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL        = 0x00000003,   /// Optimal layout when image is only used for depth/stencil attachment read/write | 
|  | 169 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL         = 0x00000004,   /// Optimal layout when image is used for read only depth/stencil attachment and shader access | 
|  | 170 | 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] | 171 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL                    = 0x00000006,   /// Optimal layout when image is used only as source of transfer operations | 
|  | 172 | 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] | 173 | 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] | 174 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 175 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 176 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR                         = 1000001002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 177 | } | 
|  | 178 |  | 
|  | 179 | enum VkAttachmentLoadOp { | 
|  | 180 | VK_ATTACHMENT_LOAD_OP_LOAD                              = 0x00000000, | 
|  | 181 | VK_ATTACHMENT_LOAD_OP_CLEAR                             = 0x00000001, | 
|  | 182 | VK_ATTACHMENT_LOAD_OP_DONT_CARE                         = 0x00000002, | 
|  | 183 | } | 
|  | 184 |  | 
|  | 185 | enum VkAttachmentStoreOp { | 
|  | 186 | VK_ATTACHMENT_STORE_OP_STORE                            = 0x00000000, | 
|  | 187 | VK_ATTACHMENT_STORE_OP_DONT_CARE                        = 0x00000001, | 
|  | 188 | } | 
|  | 189 |  | 
|  | 190 | enum VkImageType { | 
|  | 191 | VK_IMAGE_TYPE_1D                                        = 0x00000000, | 
|  | 192 | VK_IMAGE_TYPE_2D                                        = 0x00000001, | 
|  | 193 | VK_IMAGE_TYPE_3D                                        = 0x00000002, | 
|  | 194 | } | 
|  | 195 |  | 
|  | 196 | enum VkImageTiling { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 197 | VK_IMAGE_TILING_OPTIMAL                                 = 0x00000000, | 
|  | 198 | VK_IMAGE_TILING_LINEAR                                  = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 199 | } | 
|  | 200 |  | 
|  | 201 | enum VkImageViewType { | 
|  | 202 | VK_IMAGE_VIEW_TYPE_1D                                   = 0x00000000, | 
|  | 203 | VK_IMAGE_VIEW_TYPE_2D                                   = 0x00000001, | 
|  | 204 | VK_IMAGE_VIEW_TYPE_3D                                   = 0x00000002, | 
|  | 205 | VK_IMAGE_VIEW_TYPE_CUBE                                 = 0x00000003, | 
|  | 206 | VK_IMAGE_VIEW_TYPE_1D_ARRAY                             = 0x00000004, | 
|  | 207 | VK_IMAGE_VIEW_TYPE_2D_ARRAY                             = 0x00000005, | 
|  | 208 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY                           = 0x00000006, | 
|  | 209 | } | 
|  | 210 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 211 | enum VkCommandBufferLevel { | 
|  | 212 | VK_COMMAND_BUFFER_LEVEL_PRIMARY                         = 0x00000000, | 
|  | 213 | VK_COMMAND_BUFFER_LEVEL_SECONDARY                       = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 214 | } | 
|  | 215 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 216 | enum VkComponentSwizzle { | 
|  | 217 | VK_COMPONENT_SWIZZLE_IDENTITY                           = 0x00000000, | 
|  | 218 | VK_COMPONENT_SWIZZLE_ZERO                               = 0x00000001, | 
|  | 219 | VK_COMPONENT_SWIZZLE_ONE                                = 0x00000002, | 
|  | 220 | VK_COMPONENT_SWIZZLE_R                                  = 0x00000003, | 
|  | 221 | VK_COMPONENT_SWIZZLE_G                                  = 0x00000004, | 
|  | 222 | VK_COMPONENT_SWIZZLE_B                                  = 0x00000005, | 
|  | 223 | VK_COMPONENT_SWIZZLE_A                                  = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 224 | } | 
|  | 225 |  | 
|  | 226 | enum VkDescriptorType { | 
|  | 227 | VK_DESCRIPTOR_TYPE_SAMPLER                              = 0x00000000, | 
|  | 228 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER               = 0x00000001, | 
|  | 229 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE                        = 0x00000002, | 
|  | 230 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE                        = 0x00000003, | 
|  | 231 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER                 = 0x00000004, | 
|  | 232 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER                 = 0x00000005, | 
|  | 233 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER                       = 0x00000006, | 
|  | 234 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER                       = 0x00000007, | 
|  | 235 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC               = 0x00000008, | 
|  | 236 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC               = 0x00000009, | 
|  | 237 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT                     = 0x0000000a, | 
|  | 238 | } | 
|  | 239 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 240 | enum VkQueryType { | 
|  | 241 | VK_QUERY_TYPE_OCCLUSION                                 = 0x00000000, | 
|  | 242 | VK_QUERY_TYPE_PIPELINE_STATISTICS                       = 0x00000001, /// Optional | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 243 | VK_QUERY_TYPE_TIMESTAMP                                 = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 244 | } | 
|  | 245 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 246 | enum VkBorderColor { | 
|  | 247 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK                 = 0x00000000, | 
|  | 248 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK                   = 0x00000001, | 
|  | 249 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK                      = 0x00000002, | 
|  | 250 | VK_BORDER_COLOR_INT_OPAQUE_BLACK                        = 0x00000003, | 
|  | 251 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE                      = 0x00000004, | 
|  | 252 | VK_BORDER_COLOR_INT_OPAQUE_WHITE                        = 0x00000005, | 
|  | 253 | } | 
|  | 254 |  | 
|  | 255 | enum VkPipelineBindPoint { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 256 | VK_PIPELINE_BIND_POINT_GRAPHICS                         = 0x00000000, | 
|  | 257 | VK_PIPELINE_BIND_POINT_COMPUTE                          = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 258 | } | 
|  | 259 |  | 
|  | 260 | enum VkPrimitiveTopology { | 
|  | 261 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST                        = 0x00000000, | 
|  | 262 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST                         = 0x00000001, | 
|  | 263 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP                        = 0x00000002, | 
|  | 264 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST                     = 0x00000003, | 
|  | 265 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP                    = 0x00000004, | 
|  | 266 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN                      = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 267 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY          = 0x00000006, | 
|  | 268 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY         = 0x00000007, | 
|  | 269 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY      = 0x00000008, | 
|  | 270 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY     = 0x00000009, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 271 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST                        = 0x0000000a, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 272 | } | 
|  | 273 |  | 
|  | 274 | enum VkSharingMode { | 
|  | 275 | VK_SHARING_MODE_EXCLUSIVE                               = 0x00000000, | 
|  | 276 | VK_SHARING_MODE_CONCURRENT                              = 0x00000001, | 
|  | 277 | } | 
|  | 278 |  | 
|  | 279 | enum VkIndexType { | 
|  | 280 | VK_INDEX_TYPE_UINT16                                    = 0x00000000, | 
|  | 281 | VK_INDEX_TYPE_UINT32                                    = 0x00000001, | 
|  | 282 | } | 
|  | 283 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 284 | enum VkFilter { | 
|  | 285 | VK_FILTER_NEAREST                                       = 0x00000000, | 
|  | 286 | VK_FILTER_LINEAR                                        = 0x00000001, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 287 |  | 
|  | 288 | //@extension("VK_IMG_filter_cubic") | 
|  | 289 | VK_FILTER_CUBIC_IMG                                     = 1000015000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 290 | } | 
|  | 291 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 292 | enum VkSamplerMipmapMode { | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 293 | VK_SAMPLER_MIPMAP_MODE_NEAREST                          = 0x00000001,   /// Choose nearest mip level | 
|  | 294 | VK_SAMPLER_MIPMAP_MODE_LINEAR                           = 0x00000002,   /// Linear filter between mip levels | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 295 | } | 
|  | 296 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 297 | enum VkSamplerAddressMode { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 298 | VK_SAMPLER_ADDRESS_MODE_REPEAT                          = 0x00000000, | 
|  | 299 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT                 = 0x00000001, | 
|  | 300 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE                   = 0x00000002, | 
|  | 301 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER                 = 0x00000003, | 
|  | 302 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 303 | } | 
|  | 304 |  | 
|  | 305 | enum VkCompareOp { | 
|  | 306 | VK_COMPARE_OP_NEVER                                     = 0x00000000, | 
|  | 307 | VK_COMPARE_OP_LESS                                      = 0x00000001, | 
|  | 308 | VK_COMPARE_OP_EQUAL                                     = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 309 | VK_COMPARE_OP_LESS_OR_EQUAL                             = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 310 | VK_COMPARE_OP_GREATER                                   = 0x00000004, | 
|  | 311 | VK_COMPARE_OP_NOT_EQUAL                                 = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 312 | VK_COMPARE_OP_GREATER_OR_EQUAL                          = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 313 | VK_COMPARE_OP_ALWAYS                                    = 0x00000007, | 
|  | 314 | } | 
|  | 315 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 316 | enum VkPolygonMode { | 
|  | 317 | VK_POLYGON_MODE_FILL                                    = 0x00000000, | 
|  | 318 | VK_POLYGON_MODE_LINE                                    = 0x00000001, | 
|  | 319 | VK_POLYGON_MODE_POINT                                   = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 320 | } | 
|  | 321 |  | 
|  | 322 | enum VkFrontFace { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 323 | VK_FRONT_FACE_COUNTER_CLOCKWISE                         = 0x00000000, | 
|  | 324 | VK_FRONT_FACE_CLOCKWISE                                 = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 325 | } | 
|  | 326 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 327 | enum VkBlendFactor { | 
|  | 328 | VK_BLEND_FACTOR_ZERO                                    = 0x00000000, | 
|  | 329 | VK_BLEND_FACTOR_ONE                                     = 0x00000001, | 
|  | 330 | VK_BLEND_FACTOR_SRC_COLOR                               = 0x00000002, | 
|  | 331 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR                     = 0x00000003, | 
|  | 332 | VK_BLEND_FACTOR_DST_COLOR                               = 0x00000004, | 
|  | 333 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR                     = 0x00000005, | 
|  | 334 | VK_BLEND_FACTOR_SRC_ALPHA                               = 0x00000006, | 
|  | 335 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA                     = 0x00000007, | 
|  | 336 | VK_BLEND_FACTOR_DST_ALPHA                               = 0x00000008, | 
|  | 337 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA                     = 0x00000009, | 
|  | 338 | VK_BLEND_FACTOR_CONSTANT_COLOR                          = 0x0000000a, | 
|  | 339 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR                = 0x0000000b, | 
|  | 340 | VK_BLEND_FACTOR_CONSTANT_ALPHA                          = 0x0000000c, | 
|  | 341 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA                = 0x0000000d, | 
|  | 342 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE                      = 0x0000000e, | 
|  | 343 | VK_BLEND_FACTOR_SRC1_COLOR                              = 0x0000000f, | 
|  | 344 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR                    = 0x00000010, | 
|  | 345 | VK_BLEND_FACTOR_SRC1_ALPHA                              = 0x00000011, | 
|  | 346 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA                    = 0x00000012, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 347 | } | 
|  | 348 |  | 
|  | 349 | enum VkBlendOp { | 
|  | 350 | VK_BLEND_OP_ADD                                         = 0x00000000, | 
|  | 351 | VK_BLEND_OP_SUBTRACT                                    = 0x00000001, | 
|  | 352 | VK_BLEND_OP_REVERSE_SUBTRACT                            = 0x00000002, | 
|  | 353 | VK_BLEND_OP_MIN                                         = 0x00000003, | 
|  | 354 | VK_BLEND_OP_MAX                                         = 0x00000004, | 
|  | 355 | } | 
|  | 356 |  | 
|  | 357 | enum VkStencilOp { | 
|  | 358 | VK_STENCIL_OP_KEEP                                      = 0x00000000, | 
|  | 359 | VK_STENCIL_OP_ZERO                                      = 0x00000001, | 
|  | 360 | VK_STENCIL_OP_REPLACE                                   = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 361 | VK_STENCIL_OP_INCREMENT_AND_CLAMP                       = 0x00000003, | 
|  | 362 | VK_STENCIL_OP_DECREMENT_AND_CLAMP                       = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 363 | VK_STENCIL_OP_INVERT                                    = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 364 | VK_STENCIL_OP_INCREMENT_AND_WRAP                        = 0x00000006, | 
|  | 365 | VK_STENCIL_OP_DECREMENT_AND_WRAP                        = 0x00000007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 366 | } | 
|  | 367 |  | 
|  | 368 | enum VkLogicOp { | 
|  | 369 | VK_LOGIC_OP_CLEAR                                       = 0x00000000, | 
|  | 370 | VK_LOGIC_OP_AND                                         = 0x00000001, | 
|  | 371 | VK_LOGIC_OP_AND_REVERSE                                 = 0x00000002, | 
|  | 372 | VK_LOGIC_OP_COPY                                        = 0x00000003, | 
|  | 373 | VK_LOGIC_OP_AND_INVERTED                                = 0x00000004, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 374 | VK_LOGIC_OP_NO_OP                                       = 0x00000005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 375 | VK_LOGIC_OP_XOR                                         = 0x00000006, | 
|  | 376 | VK_LOGIC_OP_OR                                          = 0x00000007, | 
|  | 377 | VK_LOGIC_OP_NOR                                         = 0x00000008, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 378 | VK_LOGIC_OP_EQUIVALENT                                  = 0x00000009, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 379 | VK_LOGIC_OP_INVERT                                      = 0x0000000a, | 
|  | 380 | VK_LOGIC_OP_OR_REVERSE                                  = 0x0000000b, | 
|  | 381 | VK_LOGIC_OP_COPY_INVERTED                               = 0x0000000c, | 
|  | 382 | VK_LOGIC_OP_OR_INVERTED                                 = 0x0000000d, | 
|  | 383 | VK_LOGIC_OP_NAND                                        = 0x0000000e, | 
|  | 384 | VK_LOGIC_OP_SET                                         = 0x0000000f, | 
|  | 385 | } | 
|  | 386 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 387 | enum VkSystemAllocationScope { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 388 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND                      = 0x00000000, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 389 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT                       = 0x00000001, | 
|  | 390 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE                        = 0x00000002, | 
|  | 391 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE                       = 0x00000003, | 
|  | 392 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE                     = 0x00000004, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 393 | } | 
|  | 394 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 395 | enum VkInternalAllocationType { | 
|  | 396 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE                  = 0x00000000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 397 | } | 
|  | 398 |  | 
|  | 399 | enum VkPhysicalDeviceType { | 
|  | 400 | VK_PHYSICAL_DEVICE_TYPE_OTHER                           = 0x00000000, | 
|  | 401 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU                  = 0x00000001, | 
|  | 402 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU                    = 0x00000002, | 
|  | 403 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU                     = 0x00000003, | 
|  | 404 | VK_PHYSICAL_DEVICE_TYPE_CPU                             = 0x00000004, | 
|  | 405 | } | 
|  | 406 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 407 | enum VkVertexInputRate { | 
|  | 408 | VK_VERTEX_INPUT_RATE_VERTEX                             = 0x00000000, | 
|  | 409 | VK_VERTEX_INPUT_RATE_INSTANCE                           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 410 | } | 
|  | 411 |  | 
|  | 412 | /// Vulkan format definitions | 
|  | 413 | enum VkFormat { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 414 | VK_FORMAT_UNDEFINED                                     = 0, | 
|  | 415 | VK_FORMAT_R4G4_UNORM_PACK8                              = 1, | 
|  | 416 | VK_FORMAT_R4G4B4A4_UNORM_PACK16                         = 2, | 
|  | 417 | VK_FORMAT_B4G4R4A4_UNORM_PACK16                         = 3, | 
|  | 418 | VK_FORMAT_R5G6B5_UNORM_PACK16                           = 4, | 
|  | 419 | VK_FORMAT_B5G6R5_UNORM_PACK16                           = 5, | 
|  | 420 | VK_FORMAT_R5G5B5A1_UNORM_PACK16                         = 6, | 
|  | 421 | VK_FORMAT_B5G5R5A1_UNORM_PACK16                         = 7, | 
|  | 422 | VK_FORMAT_A1R5G5B5_UNORM_PACK16                         = 8, | 
|  | 423 | VK_FORMAT_R8_UNORM                                      = 9, | 
|  | 424 | VK_FORMAT_R8_SNORM                                      = 10, | 
|  | 425 | VK_FORMAT_R8_USCALED                                    = 11, | 
|  | 426 | VK_FORMAT_R8_SSCALED                                    = 12, | 
|  | 427 | VK_FORMAT_R8_UINT                                       = 13, | 
|  | 428 | VK_FORMAT_R8_SINT                                       = 14, | 
|  | 429 | VK_FORMAT_R8_SRGB                                       = 15, | 
|  | 430 | VK_FORMAT_R8G8_UNORM                                    = 16, | 
|  | 431 | VK_FORMAT_R8G8_SNORM                                    = 17, | 
|  | 432 | VK_FORMAT_R8G8_USCALED                                  = 18, | 
|  | 433 | VK_FORMAT_R8G8_SSCALED                                  = 19, | 
|  | 434 | VK_FORMAT_R8G8_UINT                                     = 20, | 
|  | 435 | VK_FORMAT_R8G8_SINT                                     = 21, | 
|  | 436 | VK_FORMAT_R8G8_SRGB                                     = 22, | 
|  | 437 | VK_FORMAT_R8G8B8_UNORM                                  = 23, | 
|  | 438 | VK_FORMAT_R8G8B8_SNORM                                  = 24, | 
|  | 439 | VK_FORMAT_R8G8B8_USCALED                                = 25, | 
|  | 440 | VK_FORMAT_R8G8B8_SSCALED                                = 26, | 
|  | 441 | VK_FORMAT_R8G8B8_UINT                                   = 27, | 
|  | 442 | VK_FORMAT_R8G8B8_SINT                                   = 28, | 
|  | 443 | VK_FORMAT_R8G8B8_SRGB                                   = 29, | 
|  | 444 | VK_FORMAT_B8G8R8_UNORM                                  = 30, | 
|  | 445 | VK_FORMAT_B8G8R8_SNORM                                  = 31, | 
|  | 446 | VK_FORMAT_B8G8R8_USCALED                                = 32, | 
|  | 447 | VK_FORMAT_B8G8R8_SSCALED                                = 33, | 
|  | 448 | VK_FORMAT_B8G8R8_UINT                                   = 34, | 
|  | 449 | VK_FORMAT_B8G8R8_SINT                                   = 35, | 
|  | 450 | VK_FORMAT_B8G8R8_SRGB                                   = 36, | 
|  | 451 | VK_FORMAT_R8G8B8A8_UNORM                                = 37, | 
|  | 452 | VK_FORMAT_R8G8B8A8_SNORM                                = 38, | 
|  | 453 | VK_FORMAT_R8G8B8A8_USCALED                              = 39, | 
|  | 454 | VK_FORMAT_R8G8B8A8_SSCALED                              = 40, | 
|  | 455 | VK_FORMAT_R8G8B8A8_UINT                                 = 41, | 
|  | 456 | VK_FORMAT_R8G8B8A8_SINT                                 = 42, | 
|  | 457 | VK_FORMAT_R8G8B8A8_SRGB                                 = 43, | 
|  | 458 | VK_FORMAT_B8G8R8A8_UNORM                                = 44, | 
|  | 459 | VK_FORMAT_B8G8R8A8_SNORM                                = 45, | 
|  | 460 | VK_FORMAT_B8G8R8A8_USCALED                              = 46, | 
|  | 461 | VK_FORMAT_B8G8R8A8_SSCALED                              = 47, | 
|  | 462 | VK_FORMAT_B8G8R8A8_UINT                                 = 48, | 
|  | 463 | VK_FORMAT_B8G8R8A8_SINT                                 = 49, | 
|  | 464 | VK_FORMAT_B8G8R8A8_SRGB                                 = 50, | 
|  | 465 | VK_FORMAT_A8B8G8R8_UNORM_PACK32                         = 51, | 
|  | 466 | VK_FORMAT_A8B8G8R8_SNORM_PACK32                         = 52, | 
|  | 467 | VK_FORMAT_A8B8G8R8_USCALED_PACK32                       = 53, | 
|  | 468 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32                       = 54, | 
|  | 469 | VK_FORMAT_A8B8G8R8_UINT_PACK32                          = 55, | 
|  | 470 | VK_FORMAT_A8B8G8R8_SINT_PACK32                          = 56, | 
|  | 471 | VK_FORMAT_A8B8G8R8_SRGB_PACK32                          = 57, | 
|  | 472 | VK_FORMAT_A2R10G10B10_UNORM_PACK32                      = 58, | 
|  | 473 | VK_FORMAT_A2R10G10B10_SNORM_PACK32                      = 59, | 
|  | 474 | VK_FORMAT_A2R10G10B10_USCALED_PACK32                    = 60, | 
|  | 475 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32                    = 61, | 
|  | 476 | VK_FORMAT_A2R10G10B10_UINT_PACK32                       = 62, | 
|  | 477 | VK_FORMAT_A2R10G10B10_SINT_PACK32                       = 63, | 
|  | 478 | VK_FORMAT_A2B10G10R10_UNORM_PACK32                      = 64, | 
|  | 479 | VK_FORMAT_A2B10G10R10_SNORM_PACK32                      = 65, | 
|  | 480 | VK_FORMAT_A2B10G10R10_USCALED_PACK32                    = 66, | 
|  | 481 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32                    = 67, | 
|  | 482 | VK_FORMAT_A2B10G10R10_UINT_PACK32                       = 68, | 
|  | 483 | VK_FORMAT_A2B10G10R10_SINT_PACK32                       = 69, | 
|  | 484 | VK_FORMAT_R16_UNORM                                     = 70, | 
|  | 485 | VK_FORMAT_R16_SNORM                                     = 71, | 
|  | 486 | VK_FORMAT_R16_USCALED                                   = 72, | 
|  | 487 | VK_FORMAT_R16_SSCALED                                   = 73, | 
|  | 488 | VK_FORMAT_R16_UINT                                      = 74, | 
|  | 489 | VK_FORMAT_R16_SINT                                      = 75, | 
|  | 490 | VK_FORMAT_R16_SFLOAT                                    = 76, | 
|  | 491 | VK_FORMAT_R16G16_UNORM                                  = 77, | 
|  | 492 | VK_FORMAT_R16G16_SNORM                                  = 78, | 
|  | 493 | VK_FORMAT_R16G16_USCALED                                = 79, | 
|  | 494 | VK_FORMAT_R16G16_SSCALED                                = 80, | 
|  | 495 | VK_FORMAT_R16G16_UINT                                   = 81, | 
|  | 496 | VK_FORMAT_R16G16_SINT                                   = 82, | 
|  | 497 | VK_FORMAT_R16G16_SFLOAT                                 = 83, | 
|  | 498 | VK_FORMAT_R16G16B16_UNORM                               = 84, | 
|  | 499 | VK_FORMAT_R16G16B16_SNORM                               = 85, | 
|  | 500 | VK_FORMAT_R16G16B16_USCALED                             = 86, | 
|  | 501 | VK_FORMAT_R16G16B16_SSCALED                             = 87, | 
|  | 502 | VK_FORMAT_R16G16B16_UINT                                = 88, | 
|  | 503 | VK_FORMAT_R16G16B16_SINT                                = 89, | 
|  | 504 | VK_FORMAT_R16G16B16_SFLOAT                              = 90, | 
|  | 505 | VK_FORMAT_R16G16B16A16_UNORM                            = 91, | 
|  | 506 | VK_FORMAT_R16G16B16A16_SNORM                            = 92, | 
|  | 507 | VK_FORMAT_R16G16B16A16_USCALED                          = 93, | 
|  | 508 | VK_FORMAT_R16G16B16A16_SSCALED                          = 94, | 
|  | 509 | VK_FORMAT_R16G16B16A16_UINT                             = 95, | 
|  | 510 | VK_FORMAT_R16G16B16A16_SINT                             = 96, | 
|  | 511 | VK_FORMAT_R16G16B16A16_SFLOAT                           = 97, | 
|  | 512 | VK_FORMAT_R32_UINT                                      = 98, | 
|  | 513 | VK_FORMAT_R32_SINT                                      = 99, | 
|  | 514 | VK_FORMAT_R32_SFLOAT                                    = 100, | 
|  | 515 | VK_FORMAT_R32G32_UINT                                   = 101, | 
|  | 516 | VK_FORMAT_R32G32_SINT                                   = 102, | 
|  | 517 | VK_FORMAT_R32G32_SFLOAT                                 = 103, | 
|  | 518 | VK_FORMAT_R32G32B32_UINT                                = 104, | 
|  | 519 | VK_FORMAT_R32G32B32_SINT                                = 105, | 
|  | 520 | VK_FORMAT_R32G32B32_SFLOAT                              = 106, | 
|  | 521 | VK_FORMAT_R32G32B32A32_UINT                             = 107, | 
|  | 522 | VK_FORMAT_R32G32B32A32_SINT                             = 108, | 
|  | 523 | VK_FORMAT_R32G32B32A32_SFLOAT                           = 109, | 
|  | 524 | VK_FORMAT_R64_UINT                                      = 110, | 
|  | 525 | VK_FORMAT_R64_SINT                                      = 111, | 
|  | 526 | VK_FORMAT_R64_SFLOAT                                    = 112, | 
|  | 527 | VK_FORMAT_R64G64_UINT                                   = 113, | 
|  | 528 | VK_FORMAT_R64G64_SINT                                   = 114, | 
|  | 529 | VK_FORMAT_R64G64_SFLOAT                                 = 115, | 
|  | 530 | VK_FORMAT_R64G64B64_UINT                                = 116, | 
|  | 531 | VK_FORMAT_R64G64B64_SINT                                = 117, | 
|  | 532 | VK_FORMAT_R64G64B64_SFLOAT                              = 118, | 
|  | 533 | VK_FORMAT_R64G64B64A64_UINT                             = 119, | 
|  | 534 | VK_FORMAT_R64G64B64A64_SINT                             = 120, | 
|  | 535 | VK_FORMAT_R64G64B64A64_SFLOAT                           = 121, | 
|  | 536 | VK_FORMAT_B10G11R11_UFLOAT_PACK32                       = 122, | 
|  | 537 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32                        = 123, | 
|  | 538 | VK_FORMAT_D16_UNORM                                     = 124, | 
|  | 539 | VK_FORMAT_X8_D24_UNORM_PACK32                           = 125, | 
|  | 540 | VK_FORMAT_D32_SFLOAT                                    = 126, | 
|  | 541 | VK_FORMAT_S8_UINT                                       = 127, | 
|  | 542 | VK_FORMAT_D16_UNORM_S8_UINT                             = 128, | 
|  | 543 | VK_FORMAT_D24_UNORM_S8_UINT                             = 129, | 
|  | 544 | VK_FORMAT_D32_SFLOAT_S8_UINT                            = 130, | 
|  | 545 | VK_FORMAT_BC1_RGB_UNORM_BLOCK                           = 131, | 
|  | 546 | VK_FORMAT_BC1_RGB_SRGB_BLOCK                            = 132, | 
|  | 547 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK                          = 133, | 
|  | 548 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK                           = 134, | 
|  | 549 | VK_FORMAT_BC2_UNORM_BLOCK                               = 135, | 
|  | 550 | VK_FORMAT_BC2_SRGB_BLOCK                                = 136, | 
|  | 551 | VK_FORMAT_BC3_UNORM_BLOCK                               = 137, | 
|  | 552 | VK_FORMAT_BC3_SRGB_BLOCK                                = 138, | 
|  | 553 | VK_FORMAT_BC4_UNORM_BLOCK                               = 139, | 
|  | 554 | VK_FORMAT_BC4_SNORM_BLOCK                               = 140, | 
|  | 555 | VK_FORMAT_BC5_UNORM_BLOCK                               = 141, | 
|  | 556 | VK_FORMAT_BC5_SNORM_BLOCK                               = 142, | 
|  | 557 | VK_FORMAT_BC6H_UFLOAT_BLOCK                             = 143, | 
|  | 558 | VK_FORMAT_BC6H_SFLOAT_BLOCK                             = 144, | 
|  | 559 | VK_FORMAT_BC7_UNORM_BLOCK                               = 145, | 
|  | 560 | VK_FORMAT_BC7_SRGB_BLOCK                                = 146, | 
|  | 561 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK                       = 147, | 
|  | 562 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK                        = 148, | 
|  | 563 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK                     = 149, | 
|  | 564 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK                      = 150, | 
|  | 565 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK                     = 151, | 
|  | 566 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK                      = 152, | 
|  | 567 | VK_FORMAT_EAC_R11_UNORM_BLOCK                           = 153, | 
|  | 568 | VK_FORMAT_EAC_R11_SNORM_BLOCK                           = 154, | 
|  | 569 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK                        = 155, | 
|  | 570 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK                        = 156, | 
|  | 571 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK                          = 157, | 
|  | 572 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK                           = 158, | 
|  | 573 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK                          = 159, | 
|  | 574 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK                           = 160, | 
|  | 575 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK                          = 161, | 
|  | 576 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK                           = 162, | 
|  | 577 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK                          = 163, | 
|  | 578 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK                           = 164, | 
|  | 579 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK                          = 165, | 
|  | 580 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK                           = 166, | 
|  | 581 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK                          = 167, | 
|  | 582 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK                           = 168, | 
|  | 583 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK                          = 169, | 
|  | 584 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK                           = 170, | 
|  | 585 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK                          = 171, | 
|  | 586 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK                           = 172, | 
|  | 587 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK                         = 173, | 
|  | 588 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK                          = 174, | 
|  | 589 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK                         = 175, | 
|  | 590 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK                          = 176, | 
|  | 591 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK                         = 177, | 
|  | 592 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK                          = 178, | 
|  | 593 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK                        = 179, | 
|  | 594 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK                         = 180, | 
|  | 595 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK                        = 181, | 
|  | 596 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK                         = 182, | 
|  | 597 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK                        = 183, | 
|  | 598 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK                         = 184, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 599 | } | 
|  | 600 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 601 | /// Structure type enumerant | 
|  | 602 | enum VkStructureType { | 
|  | 603 | VK_STRUCTURE_TYPE_APPLICATION_INFO                          = 0, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 604 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO                      = 1, | 
|  | 605 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO                  = 2, | 
|  | 606 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO                        = 3, | 
|  | 607 | VK_STRUCTURE_TYPE_SUBMIT_INFO                               = 4, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 608 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO                      = 5, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 609 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE                       = 6, | 
|  | 610 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO                          = 7, | 
|  | 611 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO                         = 8, | 
|  | 612 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO                     = 9, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 613 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO                         = 10, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 614 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO                    = 11, | 
|  | 615 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO                        = 12, | 
|  | 616 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO                   = 13, | 
|  | 617 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO                         = 14, | 
|  | 618 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO                    = 15, | 
|  | 619 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO                 = 16, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 620 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO                = 17, | 
|  | 621 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO         = 18, | 
|  | 622 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO   = 19, | 
|  | 623 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, | 
|  | 624 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO   = 21, | 
|  | 625 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO       = 22, | 
|  | 626 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO  = 23, | 
|  | 627 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO    = 24, | 
|  | 628 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO  = 25, | 
|  | 629 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO    = 26, | 
|  | 630 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO        = 27, | 
|  | 631 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO             = 28, | 
|  | 632 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO              = 29, | 
|  | 633 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO               = 30, | 
|  | 634 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO                       = 31, | 
|  | 635 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO         = 32, | 
|  | 636 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO               = 33, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 637 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO              = 34, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 638 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET                      = 35, | 
|  | 639 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET                       = 36, | 
|  | 640 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO                   = 37, | 
|  | 641 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO                   = 38, | 
|  | 642 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO                  = 39, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 643 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO              = 40, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 644 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO           = 41, | 
|  | 645 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO                 = 42, | 
|  | 646 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO                    = 43, | 
|  | 647 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER                     = 44, | 
|  | 648 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER                      = 45, | 
|  | 649 | VK_STRUCTURE_TYPE_MEMORY_BARRIER                            = 46, | 
|  | 650 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO               = 47, | 
|  | 651 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO                 = 48, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 652 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 653 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 654 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR                 = 1000001000, | 
|  | 655 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR                          = 1000001001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 656 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 657 | //@extension("VK_KHR_display") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 658 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR              = 1000002000, | 
|  | 659 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR           = 1000002001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 660 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 661 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 662 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR          = 1000003000, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 663 |  | 
|  | 664 | //@extension("VK_KHR_xlib_surface") | 
|  | 665 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR              = 1000004000, | 
|  | 666 |  | 
|  | 667 | //@extension("VK_KHR_xcb_surface") | 
|  | 668 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR               = 1000005000, | 
|  | 669 |  | 
|  | 670 | //@extension("VK_KHR_wayland_surface") | 
|  | 671 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR           = 1000006000, | 
|  | 672 |  | 
|  | 673 | //@extension("VK_KHR_mir_surface") | 
|  | 674 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR               = 1000007000, | 
|  | 675 |  | 
|  | 676 | //@extension("VK_KHR_android_surface") | 
|  | 677 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR           = 1000008000, | 
|  | 678 |  | 
|  | 679 | //@extension("VK_KHR_win32_surface") | 
|  | 680 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR             = 1000009000, | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 681 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 682 | //@extension("VK_ANDROID_native_buffer") | 
|  | 683 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID                     = 1000010000, | 
|  | 684 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 685 | //@extension("VK_EXT_debug_report") | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 686 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT     = 1000011000, | 
|  | 687 |  | 
|  | 688 | //@extension("VK_AMD_rasterization_order") | 
|  | 689 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, | 
|  | 690 |  | 
|  | 691 | //@extension("VK_EXT_debug_marker") | 
|  | 692 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT         = 1000022000, | 
|  | 693 |  | 
|  | 694 | //@extension("VK_EXT_debug_marker") | 
|  | 695 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT          = 1000022001, | 
|  | 696 |  | 
|  | 697 | //@extension("VK_EXT_debug_marker") | 
|  | 698 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT              = 1000022002, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 699 |  | 
|  | 700 | //@extension("VK_NV_dedicated_allocation") | 
|  | 701 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, | 
|  | 702 |  | 
|  | 703 | //@extension("VK_NV_dedicated_allocation") | 
|  | 704 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, | 
|  | 705 |  | 
|  | 706 | //@extension("VK_NV_dedicated_allocation") | 
|  | 707 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 708 | } | 
|  | 709 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 710 | enum VkSubpassContents { | 
|  | 711 | VK_SUBPASS_CONTENTS_INLINE                              = 0x00000000, | 
|  | 712 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 713 | } | 
|  | 714 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 715 | enum VkPipelineCacheHeaderVersion { | 
|  | 716 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE                    = 1, | 
|  | 717 | } | 
|  | 718 |  | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 719 | @lastUnused(-11) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 720 | /// Error and return codes | 
|  | 721 | enum VkResult { | 
|  | 722 | // Return codes for successful operation execution (positive values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 723 | VK_SUCCESS                                              = 0, | 
|  | 724 | VK_NOT_READY                                            = 1, | 
|  | 725 | VK_TIMEOUT                                              = 2, | 
|  | 726 | VK_EVENT_SET                                            = 3, | 
|  | 727 | VK_EVENT_RESET                                          = 4, | 
|  | 728 | VK_INCOMPLETE                                           = 5, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 729 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 730 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 731 | VK_SUBOPTIMAL_KHR                                       = 1000001003, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 732 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 733 | // Error codes (negative values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 734 | VK_ERROR_OUT_OF_HOST_MEMORY                             = 0xFFFFFFFF, // -1 | 
|  | 735 | VK_ERROR_OUT_OF_DEVICE_MEMORY                           = 0xFFFFFFFE, // -2 | 
|  | 736 | VK_ERROR_INITIALIZATION_FAILED                          = 0xFFFFFFFD, // -3 | 
|  | 737 | VK_ERROR_DEVICE_LOST                                    = 0xFFFFFFFC, // -4 | 
|  | 738 | VK_ERROR_MEMORY_MAP_FAILED                              = 0xFFFFFFFB, // -5 | 
|  | 739 | VK_ERROR_LAYER_NOT_PRESENT                              = 0xFFFFFFFA, // -6 | 
|  | 740 | VK_ERROR_EXTENSION_NOT_PRESENT                          = 0xFFFFFFF9, // -7 | 
|  | 741 | VK_ERROR_FEATURE_NOT_PRESENT                            = 0xFFFFFFF8, // -8 | 
|  | 742 | VK_ERROR_INCOMPATIBLE_DRIVER                            = 0xFFFFFFF7, // -9 | 
|  | 743 | VK_ERROR_TOO_MANY_OBJECTS                               = 0xFFFFFFF6, // -10 | 
|  | 744 | VK_ERROR_FORMAT_NOT_SUPPORTED                           = 0xFFFFFFF5, // -11 | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 745 | VK_ERROR_FRAGMENTED_POOL                                = 0xFFFFFFF4, // -12 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 746 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 747 | //@extension("VK_KHR_surface") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 748 | VK_ERROR_SURFACE_LOST_KHR                               = 0xC4653600, // -1000000000 | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 749 |  | 
| Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 750 | //@extension("VK_KHR_surface") | 
|  | 751 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46535FF, // -1000008001 | 
|  | 752 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 753 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 754 | VK_ERROR_OUT_OF_DATE_KHR                                = 0xC4653214, // -1000001004 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 755 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 756 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 757 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                       = 0xC4652A47, // -1000003001 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 758 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 759 | //@extension("VK_EXT_debug_report") | 
|  | 760 | VK_ERROR_VALIDATION_FAILED_EXT                          = 0xC4650B07, // -1000011001 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 761 |  | 
|  | 762 | //@extension("VK_NV_glsl_shader") | 
|  | 763 | VK_ERROR_INVALID_SHADER_NV                              = 0xC4650720, // -1000012000 | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 764 | } | 
|  | 765 |  | 
|  | 766 | enum VkDynamicState { | 
|  | 767 | VK_DYNAMIC_STATE_VIEWPORT                               = 0x00000000, | 
|  | 768 | VK_DYNAMIC_STATE_SCISSOR                                = 0x00000001, | 
|  | 769 | VK_DYNAMIC_STATE_LINE_WIDTH                             = 0x00000002, | 
|  | 770 | VK_DYNAMIC_STATE_DEPTH_BIAS                             = 0x00000003, | 
|  | 771 | VK_DYNAMIC_STATE_BLEND_CONSTANTS                        = 0x00000004, | 
|  | 772 | VK_DYNAMIC_STATE_DEPTH_BOUNDS                           = 0x00000005, | 
|  | 773 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK                   = 0x00000006, | 
|  | 774 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK                     = 0x00000007, | 
|  | 775 | VK_DYNAMIC_STATE_STENCIL_REFERENCE                      = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 776 | } | 
|  | 777 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 778 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 779 | enum VkPresentModeKHR { | 
|  | 780 | VK_PRESENT_MODE_IMMEDIATE_KHR                           = 0x00000000, | 
|  | 781 | VK_PRESENT_MODE_MAILBOX_KHR                             = 0x00000001, | 
|  | 782 | VK_PRESENT_MODE_FIFO_KHR                                = 0x00000002, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 783 | VK_PRESENT_MODE_FIFO_RELAXED_KHR                        = 0x00000003, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 784 | } | 
|  | 785 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 786 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 787 | enum VkColorSpaceKHR { | 
|  | 788 | VK_COLORSPACE_SRGB_NONLINEAR_KHR                        = 0x00000000, | 
|  | 789 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 790 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 791 | @extension("VK_EXT_debug_report") | 
|  | 792 | enum VkDebugReportObjectTypeEXT { | 
|  | 793 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT                 = 0, | 
|  | 794 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT                = 1, | 
|  | 795 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT         = 2, | 
|  | 796 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT                  = 3, | 
|  | 797 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT                   = 4, | 
|  | 798 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT               = 5, | 
|  | 799 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT          = 6, | 
|  | 800 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT                   = 7, | 
|  | 801 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT           = 8, | 
|  | 802 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT                  = 9, | 
|  | 803 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT                   = 10, | 
|  | 804 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT                   = 11, | 
|  | 805 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT              = 12, | 
|  | 806 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT             = 13, | 
|  | 807 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT              = 14, | 
|  | 808 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT           = 15, | 
|  | 809 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT          = 16, | 
|  | 810 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT         = 17, | 
|  | 811 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT             = 18, | 
|  | 812 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT                = 19, | 
|  | 813 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT   = 20, | 
|  | 814 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT                 = 21, | 
|  | 815 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT         = 22, | 
|  | 816 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT          = 23, | 
|  | 817 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT             = 24, | 
|  | 818 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT            = 25, | 
|  | 819 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT             = 26, | 
|  | 820 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT           = 27, | 
|  | 821 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT            = 28, | 
|  | 822 | } | 
|  | 823 |  | 
|  | 824 | @extension("VK_EXT_debug_report") | 
|  | 825 | enum VkDebugReportErrorEXT { | 
|  | 826 | VK_DEBUG_REPORT_ERROR_NONE_EXT                          = 0, | 
|  | 827 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT                  = 1, | 
|  | 828 | } | 
|  | 829 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 830 | @extension("VK_AMD_rasterization_order") | 
|  | 831 | enum VkRasterizationOrderAMD { | 
|  | 832 | VK_RASTERIZATION_ORDER_STRICT_AMD                       = 0, | 
|  | 833 | VK_RASTERIZATION_ORDER_RELAXED_AMD                      = 1, | 
|  | 834 | } | 
|  | 835 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 836 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 837 | ///////////////// | 
|  | 838 | //  Bitfields  // | 
|  | 839 | ///////////////// | 
|  | 840 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 841 | /// Queue capabilities | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 842 | type VkFlags VkQueueFlags | 
|  | 843 | bitfield VkQueueFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 844 | VK_QUEUE_GRAPHICS_BIT                                   = 0x00000001,    /// Queue supports graphics operations | 
|  | 845 | VK_QUEUE_COMPUTE_BIT                                    = 0x00000002,    /// Queue supports compute operations | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 846 | VK_QUEUE_TRANSFER_BIT                                   = 0x00000004,    /// Queue supports transfer operations | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 847 | 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] | 848 | } | 
|  | 849 |  | 
|  | 850 | /// Memory properties passed into vkAllocMemory(). | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 851 | type VkFlags VkMemoryPropertyFlags | 
|  | 852 | bitfield VkMemoryPropertyFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 853 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT                     = 0x00000001, | 
|  | 854 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT                     = 0x00000002, | 
|  | 855 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT                    = 0x00000004, | 
|  | 856 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT                      = 0x00000008, | 
|  | 857 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT                 = 0x00000010, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 858 | } | 
|  | 859 |  | 
|  | 860 | /// Memory heap flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 861 | type VkFlags VkMemoryHeapFlags | 
|  | 862 | bitfield VkMemoryHeapFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 863 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT                         = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 864 | } | 
|  | 865 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 866 | /// Access flags | 
|  | 867 | type VkFlags VkAccessFlags | 
|  | 868 | bitfield VkAccessFlagBits { | 
|  | 869 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT                     = 0x00000001, | 
|  | 870 | VK_ACCESS_INDEX_READ_BIT                                = 0x00000002, | 
|  | 871 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT                     = 0x00000004, | 
|  | 872 | VK_ACCESS_UNIFORM_READ_BIT                              = 0x00000008, | 
|  | 873 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT                     = 0x00000010, | 
|  | 874 | VK_ACCESS_SHADER_READ_BIT                               = 0x00000020, | 
|  | 875 | VK_ACCESS_SHADER_WRITE_BIT                              = 0x00000040, | 
|  | 876 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT                     = 0x00000080, | 
|  | 877 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT                    = 0x00000100, | 
|  | 878 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT             = 0x00000200, | 
|  | 879 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT            = 0x00000400, | 
|  | 880 | VK_ACCESS_TRANSFER_READ_BIT                             = 0x00000800, | 
|  | 881 | VK_ACCESS_TRANSFER_WRITE_BIT                            = 0x00001000, | 
|  | 882 | VK_ACCESS_HOST_READ_BIT                                 = 0x00002000, | 
|  | 883 | VK_ACCESS_HOST_WRITE_BIT                                = 0x00004000, | 
|  | 884 | VK_ACCESS_MEMORY_READ_BIT                               = 0x00008000, | 
|  | 885 | VK_ACCESS_MEMORY_WRITE_BIT                              = 0x00010000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 886 | } | 
|  | 887 |  | 
|  | 888 | /// Buffer usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 889 | type VkFlags VkBufferUsageFlags | 
|  | 890 | bitfield VkBufferUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 891 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT                        = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 892 | 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] | 893 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT                = 0x00000004,    /// Can be used as TBO | 
|  | 894 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT                = 0x00000008,    /// Can be used as IBO | 
|  | 895 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT                      = 0x00000010,    /// Can be used as UBO | 
|  | 896 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT                      = 0x00000020,    /// Can be used as SSBO | 
|  | 897 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT                        = 0x00000040,    /// Can be used as source of fixed function index fetch (index buffer) | 
|  | 898 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT                       = 0x00000080,    /// Can be used as source of fixed function vertex fetch (VBO) | 
|  | 899 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT                     = 0x00000100,    /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) | 
|  | 900 | } | 
|  | 901 |  | 
|  | 902 | /// Buffer creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 903 | type VkFlags VkBufferCreateFlags | 
|  | 904 | bitfield VkBufferCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 905 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT                     = 0x00000001,    /// Buffer should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 906 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT                   = 0x00000002,    /// Buffer should support sparse backing with partial residency | 
|  | 907 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT                     = 0x00000004,    /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers | 
|  | 908 | } | 
|  | 909 |  | 
|  | 910 | /// Shader stage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 911 | type VkFlags VkShaderStageFlags | 
|  | 912 | bitfield VkShaderStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 913 | VK_SHADER_STAGE_VERTEX_BIT                              = 0x00000001, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 914 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT                = 0x00000002, | 
|  | 915 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT             = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 916 | VK_SHADER_STAGE_GEOMETRY_BIT                            = 0x00000008, | 
|  | 917 | VK_SHADER_STAGE_FRAGMENT_BIT                            = 0x00000010, | 
|  | 918 | VK_SHADER_STAGE_COMPUTE_BIT                             = 0x00000020, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 919 | VK_SHADER_STAGE_ALL_GRAPHICS                            = 0x0000001F, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 920 |  | 
|  | 921 | VK_SHADER_STAGE_ALL                                     = 0x7FFFFFFF, | 
|  | 922 | } | 
|  | 923 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 924 | /// Descriptor pool create flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 925 | type VkFlags VkDescriptorPoolCreateFlags | 
|  | 926 | bitfield VkDescriptorPoolCreateFlagBits { | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 927 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT       = 0x00000001, | 
|  | 928 | } | 
|  | 929 |  | 
|  | 930 | /// Descriptor pool reset flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 931 | type VkFlags VkDescriptorPoolResetFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 932 | //bitfield VkDescriptorPoolResetFlagBits { | 
|  | 933 | //} | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 934 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 935 | /// Image usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 936 | type VkFlags VkImageUsageFlags | 
|  | 937 | bitfield VkImageUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 938 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT                         = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 939 | 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] | 940 | VK_IMAGE_USAGE_SAMPLED_BIT                              = 0x00000004,    /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 941 | VK_IMAGE_USAGE_STORAGE_BIT                              = 0x00000008,    /// Can be used as storage image (STORAGE_IMAGE descriptor type) | 
|  | 942 | 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] | 943 | 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] | 944 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT                 = 0x00000040,    /// Image data not needed outside of rendering | 
|  | 945 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT                     = 0x00000080,    /// Can be used as framebuffer input attachment | 
|  | 946 | } | 
|  | 947 |  | 
|  | 948 | /// Image creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 949 | type VkFlags VkImageCreateFlags | 
|  | 950 | bitfield VkImageCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 951 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT                      = 0x00000001,    /// Image should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 952 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT                    = 0x00000002,    /// Image should support sparse backing with partial residency | 
|  | 953 | 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] | 954 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT                      = 0x00000008,    /// Allows image views to have different format than the base image | 
|  | 955 | 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] | 956 | } | 
|  | 957 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 958 | /// Image view creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 959 | type VkFlags VkImageViewCreateFlags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 960 | //bitfield VkImageViewCreateFlagBits { | 
|  | 961 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 962 |  | 
|  | 963 | /// Pipeline creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 964 | type VkFlags VkPipelineCreateFlags | 
|  | 965 | bitfield VkPipelineCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 966 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT             = 0x00000001, | 
|  | 967 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT                = 0x00000002, | 
|  | 968 | VK_PIPELINE_CREATE_DERIVATIVE_BIT                       = 0x00000004, | 
|  | 969 | } | 
|  | 970 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 971 | /// Color component flags | 
|  | 972 | type VkFlags VkColorComponentFlags | 
|  | 973 | bitfield VkColorComponentFlagBits { | 
|  | 974 | VK_COLOR_COMPONENT_R_BIT                                = 0x00000001, | 
|  | 975 | VK_COLOR_COMPONENT_G_BIT                                = 0x00000002, | 
|  | 976 | VK_COLOR_COMPONENT_B_BIT                                = 0x00000004, | 
|  | 977 | VK_COLOR_COMPONENT_A_BIT                                = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 978 | } | 
|  | 979 |  | 
|  | 980 | /// Fence creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 981 | type VkFlags VkFenceCreateFlags | 
|  | 982 | bitfield VkFenceCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 983 | VK_FENCE_CREATE_SIGNALED_BIT                            = 0x00000001, | 
|  | 984 | } | 
|  | 985 |  | 
|  | 986 | /// Semaphore creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 987 | type VkFlags VkSemaphoreCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 988 | //bitfield VkSemaphoreCreateFlagBits { | 
|  | 989 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 990 |  | 
|  | 991 | /// Format capability flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 992 | type VkFlags VkFormatFeatureFlags | 
|  | 993 | bitfield VkFormatFeatureFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 994 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT                     = 0x00000001,    /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 995 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT                     = 0x00000002,    /// Format can be used for storage images (STORAGE_IMAGE descriptor type) | 
|  | 996 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT              = 0x00000004,    /// Format supports atomic operations in case it's used for storage images | 
|  | 997 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT              = 0x00000008,    /// Format can be used for uniform texel buffers (TBOs) | 
|  | 998 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT              = 0x00000010,    /// Format can be used for storage texel buffers (IBOs) | 
|  | 999 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT       = 0x00000020,    /// Format supports atomic operations in case it's used for storage texel buffers | 
|  | 1000 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT                     = 0x00000040,    /// Format can be used for vertex buffers (VBOs) | 
|  | 1001 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT                  = 0x00000080,    /// Format can be used for color attachment images | 
|  | 1002 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT            = 0x00000100,    /// Format supports blending in case it's used for color attachment images | 
|  | 1003 | 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] | 1004 | VK_FORMAT_FEATURE_BLIT_SRC_BIT                          = 0x00000400,    /// Format can be used as the source image of blits with vkCommandBlitImage | 
|  | 1005 | 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] | 1006 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT       = 0x00001000, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1007 |  | 
|  | 1008 | //@extension("VK_IMG_filter_cubic") | 
|  | 1009 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG    = 0x00002000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1010 | } | 
|  | 1011 |  | 
|  | 1012 | /// Query control flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1013 | type VkFlags VkQueryControlFlags | 
|  | 1014 | bitfield VkQueryControlFlagBits { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1015 | VK_QUERY_CONTROL_PRECISE_BIT                            = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1016 | } | 
|  | 1017 |  | 
|  | 1018 | /// Query result flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1019 | type VkFlags VkQueryResultFlags | 
|  | 1020 | bitfield VkQueryResultFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1021 | VK_QUERY_RESULT_64_BIT                                  = 0x00000001,   /// Results of the queries are written to the destination buffer as 64-bit values | 
|  | 1022 | VK_QUERY_RESULT_WAIT_BIT                                = 0x00000002,   /// Results of the queries are waited on before proceeding with the result copy | 
|  | 1023 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT                   = 0x00000004,   /// Besides the results of the query, the availability of the results is also written | 
|  | 1024 | VK_QUERY_RESULT_PARTIAL_BIT                             = 0x00000008,   /// Copy the partial results of the query even if the final results aren't available | 
|  | 1025 | } | 
|  | 1026 |  | 
|  | 1027 | /// Shader module creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1028 | type VkFlags VkShaderModuleCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1029 | //bitfield VkShaderModuleCreateFlagBits { | 
|  | 1030 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1031 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1032 | /// Event creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1033 | type VkFlags VkEventCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1034 | //bitfield VkEventCreateFlagBits { | 
|  | 1035 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1036 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1037 | /// Command buffer usage flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1038 | type VkFlags VkCommandBufferUsageFlags | 
|  | 1039 | bitfield VkCommandBufferUsageFlagBits { | 
|  | 1040 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT             = 0x00000001, | 
|  | 1041 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT        = 0x00000002, | 
|  | 1042 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1043 | } | 
|  | 1044 |  | 
|  | 1045 | /// Pipeline statistics flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1046 | type VkFlags VkQueryPipelineStatisticFlags | 
|  | 1047 | bitfield VkQueryPipelineStatisticFlagBits { | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1048 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT                     = 0x00000001,  /// Optional | 
|  | 1049 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT                   = 0x00000002,  /// Optional | 
|  | 1050 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT                   = 0x00000004,  /// Optional | 
|  | 1051 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT                 = 0x00000008,  /// Optional | 
|  | 1052 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT                  = 0x00000010,  /// Optional | 
|  | 1053 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT                        = 0x00000020,  /// Optional | 
|  | 1054 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT                         = 0x00000040,  /// Optional | 
|  | 1055 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT                 = 0x00000080,  /// Optional | 
|  | 1056 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT         = 0x00000100,  /// Optional | 
|  | 1057 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT  = 0x00000200,  /// Optional | 
|  | 1058 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT                  = 0x00000400,  /// Optional | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1059 | } | 
|  | 1060 |  | 
|  | 1061 | /// Memory mapping flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1062 | type VkFlags VkMemoryMapFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1063 | //bitfield VkMemoryMapFlagBits { | 
|  | 1064 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1065 |  | 
|  | 1066 | /// Bitfield of image aspects | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1067 | type VkFlags VkImageAspectFlags | 
|  | 1068 | bitfield VkImageAspectFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1069 | VK_IMAGE_ASPECT_COLOR_BIT                               = 0x00000001, | 
|  | 1070 | VK_IMAGE_ASPECT_DEPTH_BIT                               = 0x00000002, | 
|  | 1071 | VK_IMAGE_ASPECT_STENCIL_BIT                             = 0x00000004, | 
|  | 1072 | VK_IMAGE_ASPECT_METADATA_BIT                            = 0x00000008, | 
|  | 1073 | } | 
|  | 1074 |  | 
|  | 1075 | /// Sparse memory bind flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1076 | type VkFlags VkSparseMemoryBindFlags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1077 | bitfield VkSparseMemoryBindFlagBits { | 
|  | 1078 | VK_SPARSE_MEMORY_BIND_METADATA_BIT                      = 0x00000001, | 
|  | 1079 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1080 |  | 
|  | 1081 | /// Sparse image memory requirements flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1082 | type VkFlags VkSparseImageFormatFlags | 
|  | 1083 | bitfield VkSparseImageFormatFlagBits { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1084 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT                  = 0x00000001,  /// Image uses a single miptail region for all array slices | 
|  | 1085 | 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. | 
|  | 1086 | 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] | 1087 | } | 
|  | 1088 |  | 
|  | 1089 | /// Pipeline stages | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1090 | type VkFlags VkPipelineStageFlags | 
|  | 1091 | bitfield VkPipelineStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1092 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT                       = 0x00000001,  /// Before subsequent commands are processed | 
|  | 1093 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT                     = 0x00000002,  /// Draw/DispatchIndirect command fetch | 
|  | 1094 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT                      = 0x00000004,  /// Vertex/index fetch | 
|  | 1095 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT                     = 0x00000008,  /// Vertex shading | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1096 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT       = 0x00000010,  /// Tessellation control shading | 
|  | 1097 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT    = 0x00000020,  /// Tessellation evaluation shading | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1098 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT                   = 0x00000040,  /// Geometry shading | 
|  | 1099 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT                   = 0x00000080,  /// Fragment shading | 
|  | 1100 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT              = 0x00000100,  /// Early fragment (depth/stencil) tests | 
|  | 1101 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT               = 0x00000200,  /// Late fragment (depth/stencil) tests | 
|  | 1102 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT           = 0x00000400,  /// Color attachment writes | 
|  | 1103 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT                    = 0x00000800,  /// Compute shading | 
|  | 1104 | VK_PIPELINE_STAGE_TRANSFER_BIT                          = 0x00001000,  /// Transfer/copy operations | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1105 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT                    = 0x00002000, | 
|  | 1106 | 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] | 1107 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1108 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT                      = 0x00008000,  /// All stages of the graphics pipeline | 
|  | 1109 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT                      = 0x00010000,  /// All graphics, compute, copy, and transition commands | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1110 | } | 
|  | 1111 |  | 
|  | 1112 | /// Render pass attachment description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1113 | type VkFlags VkAttachmentDescriptionFlags | 
|  | 1114 | bitfield VkAttachmentDescriptionFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1115 | 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] | 1116 | } | 
|  | 1117 |  | 
|  | 1118 | /// Subpass description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1119 | type VkFlags VkSubpassDescriptionFlags | 
|  | 1120 | bitfield VkSubpassDescriptionFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1121 | } | 
|  | 1122 |  | 
|  | 1123 | /// Command pool creation flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1124 | type VkFlags VkCommandPoolCreateFlags | 
|  | 1125 | bitfield VkCommandPoolCreateFlagBits { | 
|  | 1126 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT                    = 0x00000001,  /// Command buffers have a short lifetime | 
|  | 1127 | 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] | 1128 | } | 
|  | 1129 |  | 
|  | 1130 | /// Command pool reset flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1131 | type VkFlags VkCommandPoolResetFlags | 
|  | 1132 | bitfield VkCommandPoolResetFlagBits { | 
|  | 1133 | 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] | 1134 | } | 
|  | 1135 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1136 | type VkFlags VkCommandBufferResetFlags | 
|  | 1137 | bitfield VkCommandBufferResetFlagBits { | 
|  | 1138 | 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] | 1139 | } | 
|  | 1140 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1141 | type VkFlags VkSampleCountFlags | 
|  | 1142 | bitfield VkSampleCountFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1143 | VK_SAMPLE_COUNT_1_BIT                                   = 0x00000001, | 
|  | 1144 | VK_SAMPLE_COUNT_2_BIT                                   = 0x00000002, | 
|  | 1145 | VK_SAMPLE_COUNT_4_BIT                                   = 0x00000004, | 
|  | 1146 | VK_SAMPLE_COUNT_8_BIT                                   = 0x00000008, | 
|  | 1147 | VK_SAMPLE_COUNT_16_BIT                                  = 0x00000010, | 
|  | 1148 | VK_SAMPLE_COUNT_32_BIT                                  = 0x00000020, | 
|  | 1149 | VK_SAMPLE_COUNT_64_BIT                                  = 0x00000040, | 
|  | 1150 | } | 
|  | 1151 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1152 | type VkFlags VkStencilFaceFlags | 
|  | 1153 | bitfield VkStencilFaceFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1154 | VK_STENCIL_FACE_FRONT_BIT                               = 0x00000001,   /// Front face | 
|  | 1155 | VK_STENCIL_FACE_BACK_BIT                                = 0x00000002,   /// Back face | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1156 | VK_STENCIL_FRONT_AND_BACK                               = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1157 | } | 
|  | 1158 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1159 | /// Instance creation flags | 
|  | 1160 | type VkFlags VkInstanceCreateFlags | 
|  | 1161 | //bitfield VkInstanceCreateFlagBits { | 
|  | 1162 | //} | 
|  | 1163 |  | 
|  | 1164 | /// Device creation flags | 
|  | 1165 | type VkFlags VkDeviceCreateFlags | 
|  | 1166 | //bitfield VkDeviceCreateFlagBits { | 
|  | 1167 | //} | 
|  | 1168 |  | 
|  | 1169 | /// Device queue creation flags | 
|  | 1170 | type VkFlags VkDeviceQueueCreateFlags | 
|  | 1171 | //bitfield VkDeviceQueueCreateFlagBits { | 
|  | 1172 | //} | 
|  | 1173 |  | 
|  | 1174 | /// Query pool creation flags | 
|  | 1175 | type VkFlags VkQueryPoolCreateFlags | 
|  | 1176 | //bitfield VkQueryPoolCreateFlagBits { | 
|  | 1177 | //} | 
|  | 1178 |  | 
|  | 1179 | /// Buffer view creation flags | 
|  | 1180 | type VkFlags VkBufferViewCreateFlags | 
|  | 1181 | //bitfield VkBufferViewCreateFlagBits { | 
|  | 1182 | //} | 
|  | 1183 |  | 
|  | 1184 | /// Pipeline cache creation flags | 
|  | 1185 | type VkFlags VkPipelineCacheCreateFlags | 
|  | 1186 | //bitfield VkPipelineCacheCreateFlagBits { | 
|  | 1187 | //} | 
|  | 1188 |  | 
|  | 1189 | /// Pipeline shader stage creation flags | 
|  | 1190 | type VkFlags VkPipelineShaderStageCreateFlags | 
|  | 1191 | //bitfield VkPipelineShaderStageCreateFlagBits { | 
|  | 1192 | //} | 
|  | 1193 |  | 
|  | 1194 | /// Descriptor set layout creation flags | 
|  | 1195 | type VkFlags VkDescriptorSetLayoutCreateFlags | 
|  | 1196 | //bitfield VkDescriptorSetLayoutCreateFlagBits { | 
|  | 1197 | //} | 
|  | 1198 |  | 
|  | 1199 | /// Pipeline vertex input state creation flags | 
|  | 1200 | type VkFlags VkPipelineVertexInputStateCreateFlags | 
|  | 1201 | //bitfield VkPipelineVertexInputStateCreateFlagBits { | 
|  | 1202 | //} | 
|  | 1203 |  | 
|  | 1204 | /// Pipeline input assembly state creation flags | 
|  | 1205 | type VkFlags VkPipelineInputAssemblyStateCreateFlags | 
|  | 1206 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { | 
|  | 1207 | //} | 
|  | 1208 |  | 
|  | 1209 | /// Tessellation state creation flags | 
|  | 1210 | type VkFlags VkPipelineTessellationStateCreateFlags | 
|  | 1211 | //bitfield VkPipelineTessellationStateCreateFlagBits { | 
|  | 1212 | //} | 
|  | 1213 |  | 
|  | 1214 | /// Viewport state creation flags | 
|  | 1215 | type VkFlags VkPipelineViewportStateCreateFlags | 
|  | 1216 | //bitfield VkPipelineViewportStateCreateFlagBits { | 
|  | 1217 | //} | 
|  | 1218 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1219 | /// Rasterization state creation flags | 
|  | 1220 | type VkFlags VkPipelineRasterizationStateCreateFlags | 
|  | 1221 | //bitfield VkPipelineRasterizationStateCreateFlagBits { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1222 | //} | 
|  | 1223 |  | 
|  | 1224 | /// Multisample state creation flags | 
|  | 1225 | type VkFlags VkPipelineMultisampleStateCreateFlags | 
|  | 1226 | //bitfield VkPipelineMultisampleStateCreateFlagBits { | 
|  | 1227 | //} | 
|  | 1228 |  | 
|  | 1229 | /// Color blend state creation flags | 
|  | 1230 | type VkFlags VkPipelineColorBlendStateCreateFlags | 
|  | 1231 | //bitfield VkPipelineColorBlendStateCreateFlagBits { | 
|  | 1232 | //} | 
|  | 1233 |  | 
|  | 1234 | /// Depth/stencil state creation flags | 
|  | 1235 | type VkFlags VkPipelineDepthStencilStateCreateFlags | 
|  | 1236 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { | 
|  | 1237 | //} | 
|  | 1238 |  | 
|  | 1239 | /// Dynamic state creation flags | 
|  | 1240 | type VkFlags VkPipelineDynamicStateCreateFlags | 
|  | 1241 | //bitfield VkPipelineDynamicStateCreateFlagBits { | 
|  | 1242 | //} | 
|  | 1243 |  | 
|  | 1244 | /// Pipeline layout creation flags | 
|  | 1245 | type VkFlags VkPipelineLayoutCreateFlags | 
|  | 1246 | //bitfield VkPipelineLayoutCreateFlagBits { | 
|  | 1247 | //} | 
|  | 1248 |  | 
|  | 1249 | /// Sampler creation flags | 
|  | 1250 | type VkFlags VkSamplerCreateFlags | 
|  | 1251 | //bitfield VkSamplerCreateFlagBits { | 
|  | 1252 | //} | 
|  | 1253 |  | 
|  | 1254 | /// Render pass creation flags | 
|  | 1255 | type VkFlags VkRenderPassCreateFlags | 
|  | 1256 | //bitfield VkRenderPassCreateFlagBits { | 
|  | 1257 | //} | 
|  | 1258 |  | 
|  | 1259 | /// Framebuffer creation flags | 
|  | 1260 | type VkFlags VkFramebufferCreateFlags | 
|  | 1261 | //bitfield VkFramebufferCreateFlagBits { | 
|  | 1262 | //} | 
|  | 1263 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1264 | /// Dependency flags | 
|  | 1265 | type VkFlags VkDependencyFlags | 
|  | 1266 | bitfield VkDependencyFlagBits { | 
|  | 1267 | VK_DEPENDENCY_BY_REGION_BIT                             = 0x00000001, | 
|  | 1268 | } | 
|  | 1269 |  | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1270 | /// Cull mode flags | 
|  | 1271 | type VkFlags VkCullModeFlags | 
|  | 1272 | bitfield VkCullModeFlagBits { | 
|  | 1273 | VK_CULL_MODE_NONE                                       = 0x00000000, | 
|  | 1274 | VK_CULL_MODE_FRONT_BIT                                  = 0x00000001, | 
|  | 1275 | VK_CULL_MODE_BACK_BIT                                   = 0x00000002, | 
|  | 1276 | VK_CULL_MODE_FRONT_AND_BACK                             = 0x00000003, | 
|  | 1277 | } | 
|  | 1278 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1279 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1280 | type VkFlags VkSurfaceTransformFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1281 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1282 | bitfield VkSurfaceTransformFlagBitsKHR { | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1283 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR                       = 0x00000001, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1284 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR                      = 0x00000002, | 
|  | 1285 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR                     = 0x00000004, | 
|  | 1286 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR                     = 0x00000008, | 
|  | 1287 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR              = 0x00000010, | 
|  | 1288 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR    = 0x00000020, | 
|  | 1289 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR   = 0x00000040, | 
|  | 1290 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR   = 0x00000080, | 
|  | 1291 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR                        = 0x00000100, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1292 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1293 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1294 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1295 | type VkFlags VkCompositeAlphaFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1296 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1297 | bitfield VkCompositeAlphaFlagBitsKHR { | 
|  | 1298 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR                       = 0x00000001, | 
|  | 1299 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR               = 0x00000002, | 
|  | 1300 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR              = 0x00000004, | 
|  | 1301 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR                      = 0x00000008, | 
|  | 1302 | } | 
|  | 1303 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1304 | @extension("VK_KHR_swapchain") | 
|  | 1305 | type VkFlags VkSwapchainCreateFlagsKHR | 
|  | 1306 | //@extension("VK_KHR_swapchain") | 
|  | 1307 | //bitfield VkSwapchainCreateFlagBitsKHR { | 
|  | 1308 | //} | 
|  | 1309 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1310 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1311 | type VkFlags VkDisplayPlaneAlphaFlagsKHR | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1312 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1313 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1314 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR                   = 0x00000001, | 
|  | 1315 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR                   = 0x00000002, | 
|  | 1316 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR                = 0x00000004, | 
|  | 1317 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR  = 0x00000008, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1318 | } | 
|  | 1319 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1320 | @extension("VK_KHR_display") | 
|  | 1321 | type VkFlags VkDisplaySurfaceCreateFlagsKHR | 
|  | 1322 | //@extension("VK_KHR_display") | 
|  | 1323 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { | 
|  | 1324 | //} | 
|  | 1325 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1326 | @extension("VK_KHR_display") | 
|  | 1327 | type VkFlags VkDisplayModeCreateFlagsKHR | 
|  | 1328 | //@extension("VK_KHR_display") | 
|  | 1329 | //bitfield VkDisplayModeCreateFlagBitsKHR { | 
|  | 1330 | //} | 
|  | 1331 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1332 | @extension("VK_KHR_xlib_surface") | 
|  | 1333 | type VkFlags VkXlibSurfaceCreateFlagsKHR | 
|  | 1334 | //@extension("VK_KHR_xlib_surface") | 
|  | 1335 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { | 
|  | 1336 | //} | 
|  | 1337 |  | 
|  | 1338 | @extension("VK_KHR_xcb_surface") | 
|  | 1339 | type VkFlags VkXcbSurfaceCreateFlagsKHR | 
|  | 1340 | //@extension("VK_KHR_xcb_surface") | 
|  | 1341 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { | 
|  | 1342 | //} | 
|  | 1343 |  | 
|  | 1344 | @extension("VK_KHR_wayland_surface") | 
|  | 1345 | type VkFlags VkWaylandSurfaceCreateFlagsKHR | 
|  | 1346 | //@extension("VK_KHR_wayland_surface") | 
|  | 1347 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { | 
|  | 1348 | //} | 
|  | 1349 |  | 
|  | 1350 | @extension("VK_KHR_mir_surface") | 
|  | 1351 | type VkFlags VkMirSurfaceCreateFlagsKHR | 
|  | 1352 | //@extension("VK_KHR_mir_surface") | 
|  | 1353 | //bitfield VkMirSurfaceCreateFlagBitsKHR { | 
|  | 1354 | //} | 
|  | 1355 |  | 
|  | 1356 | @extension("VK_KHR_android_surface") | 
|  | 1357 | type VkFlags VkAndroidSurfaceCreateFlagsKHR | 
|  | 1358 | //@extension("VK_KHR_android_surface") | 
|  | 1359 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { | 
|  | 1360 | //} | 
|  | 1361 |  | 
|  | 1362 | @extension("VK_KHR_win32_surface") | 
|  | 1363 | type VkFlags VkWin32SurfaceCreateFlagsKHR | 
|  | 1364 | //@extension("VK_KHR_win32_surface") | 
|  | 1365 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { | 
|  | 1366 | //} | 
|  | 1367 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1368 | @extension("VK_EXT_debug_report") | 
|  | 1369 | type VkFlags VkDebugReportFlagsEXT | 
|  | 1370 | @extension("VK_EXT_debug_report") | 
|  | 1371 | bitfield VkDebugReportFlagBitsEXT { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1372 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT                     = 0x00000001, | 
|  | 1373 | VK_DEBUG_REPORT_WARNING_BIT_EXT                         = 0x00000002, | 
|  | 1374 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT             = 0x00000004, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1375 | VK_DEBUG_REPORT_ERROR_BIT_EXT                           = 0x00000008, | 
|  | 1376 | VK_DEBUG_REPORT_DEBUG_BIT_EXT                           = 0x00000010, | 
|  | 1377 | } | 
|  | 1378 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1379 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1380 | ////////////////// | 
|  | 1381 | //  Structures  // | 
|  | 1382 | ////////////////// | 
|  | 1383 |  | 
|  | 1384 | class VkOffset2D { | 
|  | 1385 | s32                                         x | 
|  | 1386 | s32                                         y | 
|  | 1387 | } | 
|  | 1388 |  | 
|  | 1389 | class VkOffset3D { | 
|  | 1390 | s32                                         x | 
|  | 1391 | s32                                         y | 
|  | 1392 | s32                                         z | 
|  | 1393 | } | 
|  | 1394 |  | 
|  | 1395 | class VkExtent2D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1396 | u32                                         width | 
|  | 1397 | u32                                         height | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1398 | } | 
|  | 1399 |  | 
|  | 1400 | class VkExtent3D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1401 | u32                                         width | 
|  | 1402 | u32                                         height | 
|  | 1403 | u32                                         depth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1404 | } | 
|  | 1405 |  | 
|  | 1406 | class VkViewport { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1407 | f32                                         x | 
|  | 1408 | f32                                         y | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1409 | f32                                         width | 
|  | 1410 | f32                                         height | 
|  | 1411 | f32                                         minDepth | 
|  | 1412 | f32                                         maxDepth | 
|  | 1413 | } | 
|  | 1414 |  | 
|  | 1415 | class VkRect2D { | 
|  | 1416 | VkOffset2D                                  offset | 
|  | 1417 | VkExtent2D                                  extent | 
|  | 1418 | } | 
|  | 1419 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1420 | class VkClearRect { | 
|  | 1421 | VkRect2D                                    rect | 
|  | 1422 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1423 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1424 | } | 
|  | 1425 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1426 | class VkComponentMapping { | 
|  | 1427 | VkComponentSwizzle                          r | 
|  | 1428 | VkComponentSwizzle                          g | 
|  | 1429 | VkComponentSwizzle                          b | 
|  | 1430 | VkComponentSwizzle                          a | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1431 | } | 
|  | 1432 |  | 
|  | 1433 | class VkPhysicalDeviceProperties { | 
|  | 1434 | u32                                         apiVersion | 
|  | 1435 | u32                                         driverVersion | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1436 | u32                                         vendorID | 
|  | 1437 | u32                                         deviceID | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1438 | VkPhysicalDeviceType                        deviceType | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1439 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]      deviceName | 
|  | 1440 | u8[VK_UUID_SIZE]                            pipelineCacheUUID | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1441 | VkPhysicalDeviceLimits                      limits | 
|  | 1442 | VkPhysicalDeviceSparseProperties            sparseProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1443 | } | 
|  | 1444 |  | 
|  | 1445 | class VkExtensionProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1446 | char[VK_MAX_EXTENSION_NAME_SIZE]            extensionName      /// extension name | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1447 | u32                                         specVersion        /// version of the extension specification implemented | 
|  | 1448 | } | 
|  | 1449 |  | 
|  | 1450 | class VkLayerProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1451 | char[VK_MAX_EXTENSION_NAME_SIZE]            layerName               /// layer name | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1452 | u32                                         specVersion             /// version of the layer specification implemented | 
|  | 1453 | u32                                         implementationVersion   /// build or release version of the layer's library | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1454 | char[VK_MAX_DESCRIPTION_SIZE]               description             /// Free-form description of the layer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1455 | } | 
|  | 1456 |  | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1457 | class VkSubmitInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1458 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO | 
|  | 1459 | const void*                                 pNext              /// Next structure in chain | 
|  | 1460 | u32                                         waitSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1461 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1462 | const VkPipelineStageFlags*                 pWaitDstStageMask | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1463 | u32                                         commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1464 | const VkCommandBuffer*                      pCommandBuffers | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1465 | u32                                         signalSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1466 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1467 | } | 
|  | 1468 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1469 | class VkApplicationInfo { | 
|  | 1470 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO | 
|  | 1471 | const void*                                 pNext              /// Next structure in chain | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1472 | const char*                                 pApplicationName | 
|  | 1473 | u32                                         applicationVersion | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1474 | const char*                                 pEngineName | 
|  | 1475 | u32                                         engineVersion | 
|  | 1476 | u32                                         apiVersion | 
|  | 1477 | } | 
|  | 1478 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1479 | class VkAllocationCallbacks { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1480 | void*                                       pUserData | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1481 | PFN_vkAllocationFunction                    pfnAllocation | 
|  | 1482 | PFN_vkReallocationFunction                  pfnReallocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1483 | PFN_vkFreeFunction                          pfnFree | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1484 | PFN_vkInternalAllocationNotification        pfnInternalAllocation | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1485 | PFN_vkInternalFreeNotification              pfnInternalFree | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1486 | } | 
|  | 1487 |  | 
|  | 1488 | class VkDeviceQueueCreateInfo { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1489 | VkStructureType                             sStype                    /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO | 
|  | 1490 | const void*                                 pNext                     /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1491 | VkDeviceQueueCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1492 | u32                                         queueFamilyIndex | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1493 | u32                                         queueCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1494 | const f32*                                  pQueuePriorities | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1495 | } | 
|  | 1496 |  | 
|  | 1497 | class VkDeviceCreateInfo { | 
|  | 1498 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO | 
|  | 1499 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1500 | VkDeviceCreateFlags                         flags | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1501 | u32                                         queueCreateInfoCount | 
|  | 1502 | const VkDeviceQueueCreateInfo*              pQueueCreateInfos | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1503 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1504 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1505 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1506 | const char* const*                          ppEnabledExtensionNames | 
|  | 1507 | const VkPhysicalDeviceFeatures*             pEnabledFeatures | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1508 | } | 
|  | 1509 |  | 
|  | 1510 | class VkInstanceCreateInfo { | 
|  | 1511 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO | 
|  | 1512 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1513 | VkInstanceCreateFlags                       flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1514 | const VkApplicationInfo*                    pApplicationInfo | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1515 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1516 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1517 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1518 | const char* const*                          ppEnabledExtensionNames    /// Extension names to be enabled | 
|  | 1519 | } | 
|  | 1520 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1521 | class VkQueueFamilyProperties { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1522 | VkQueueFlags                                queueFlags                 /// Queue flags | 
|  | 1523 | u32                                         queueCount | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1524 | u32                                         timestampValidBits | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1525 | VkExtent3D                                  minImageTransferGranularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1526 | } | 
|  | 1527 |  | 
|  | 1528 | class VkPhysicalDeviceMemoryProperties { | 
|  | 1529 | u32                                         memoryTypeCount | 
|  | 1530 | VkMemoryType[VK_MAX_MEMORY_TYPES]           memoryTypes | 
|  | 1531 | u32                                         memoryHeapCount | 
|  | 1532 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS]           memoryHeaps | 
|  | 1533 | } | 
|  | 1534 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1535 | class VkMemoryAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1536 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1537 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1538 | VkDeviceSize                                allocationSize             /// Size of memory allocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1539 | u32                                         memoryTypeIndex            /// Index of the of the memory type to allocate from | 
|  | 1540 | } | 
|  | 1541 |  | 
|  | 1542 | class VkMemoryRequirements { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1543 | VkDeviceSize                                size                       /// Specified in bytes | 
|  | 1544 | VkDeviceSize                                alignment                  /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1545 | u32                                         memoryTypeBits             /// Bitfield of the allowed memory type indices into memoryTypes[] for this object | 
|  | 1546 | } | 
|  | 1547 |  | 
|  | 1548 | class VkSparseImageFormatProperties { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1549 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1550 | VkExtent3D                                  imageGranularity | 
|  | 1551 | VkSparseImageFormatFlags                    flags | 
|  | 1552 | } | 
|  | 1553 |  | 
|  | 1554 | class VkSparseImageMemoryRequirements { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1555 | VkSparseImageFormatProperties               formatProperties | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1556 | u32                                         imageMipTailFirstLod | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1557 | VkDeviceSize                                imageMipTailSize           /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1558 | VkDeviceSize                                imageMipTailOffset         /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1559 | 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] | 1560 | } | 
|  | 1561 |  | 
|  | 1562 | class VkMemoryType { | 
|  | 1563 | VkMemoryPropertyFlags                       propertyFlags              /// Memory properties of this memory type | 
|  | 1564 | u32                                         heapIndex                  /// Index of the memory heap allocations of this memory type are taken from | 
|  | 1565 | } | 
|  | 1566 |  | 
|  | 1567 | class VkMemoryHeap { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1568 | VkDeviceSize                                size                       /// Available memory in the heap | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1569 | VkMemoryHeapFlags                           flags                      /// Flags for the heap | 
|  | 1570 | } | 
|  | 1571 |  | 
|  | 1572 | class VkMappedMemoryRange { | 
|  | 1573 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE | 
|  | 1574 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1575 | VkDeviceMemory                              memory                     /// Mapped memory object | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1576 | VkDeviceSize                                offset                     /// Offset within the mapped memory the range starts from | 
|  | 1577 | VkDeviceSize                                size                       /// Size of the range within the mapped memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1578 | } | 
|  | 1579 |  | 
|  | 1580 | class VkFormatProperties { | 
|  | 1581 | VkFormatFeatureFlags                        linearTilingFeatures       /// Format features in case of linear tiling | 
|  | 1582 | VkFormatFeatureFlags                        optimalTilingFeatures      /// Format features in case of optimal tiling | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1583 | VkFormatFeatureFlags                        bufferFeatures             /// Format features supported by buffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1584 | } | 
|  | 1585 |  | 
|  | 1586 | class VkImageFormatProperties { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1587 | VkExtent3D                                  maxExtent                  /// max image dimensions for this resource type | 
|  | 1588 | u32                                         maxMipLevels               /// max number of mipmap levels for this resource type | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1589 | u32                                         maxArrayLayers             /// max array layers for this resource type | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1590 | VkSampleCountFlags                          sampleCounts               /// supported sample counts for this resource type | 
|  | 1591 | VkDeviceSize                                maxResourceSize            /// max size (in bytes) of this resource type | 
|  | 1592 | } | 
|  | 1593 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1594 | class VkDescriptorImageInfo { | 
|  | 1595 | VkSampler                                   sampler | 
|  | 1596 | VkImageView                                 imageView | 
|  | 1597 | VkImageLayout                               imageLayout | 
|  | 1598 | } | 
|  | 1599 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1600 | class VkDescriptorBufferInfo { | 
|  | 1601 | VkBuffer                                    buffer                     /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] | 
|  | 1602 | VkDeviceSize                                offset                     /// Base offset from buffer start in bytes to update in the descriptor set. | 
|  | 1603 | 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] | 1604 | } | 
|  | 1605 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1606 | class VkWriteDescriptorSet { | 
|  | 1607 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET | 
|  | 1608 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1609 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1610 | u32                                         dstBinding                 /// Binding within the destination descriptor set to write | 
|  | 1611 | u32                                         dstArrayElement            /// Array element within the destination binding to write | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1612 | 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] | 1613 | 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] | 1614 | const VkDescriptorImageInfo*                pImageInfo | 
|  | 1615 | const VkDescriptorBufferInfo*               pBufferInfo | 
|  | 1616 | const VkBufferView*                         pTexelBufferView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1617 | } | 
|  | 1618 |  | 
|  | 1619 | class VkCopyDescriptorSet { | 
|  | 1620 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET | 
|  | 1621 | const void*                                 pNext                      /// Pointer to next structure | 
|  | 1622 | VkDescriptorSet                             srcSet                     /// Source descriptor set | 
|  | 1623 | u32                                         srcBinding                 /// Binding within the source descriptor set to copy from | 
|  | 1624 | u32                                         srcArrayElement            /// Array element within the source binding to copy from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1625 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1626 | u32                                         dstBinding                 /// Binding within the destination descriptor set to copy to | 
|  | 1627 | u32                                         dstArrayElement            /// Array element within the destination binding to copy to | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1628 | u32                                         descriptorCount            /// Number of descriptors to copy | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1629 | } | 
|  | 1630 |  | 
|  | 1631 | class VkBufferCreateInfo { | 
|  | 1632 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO | 
|  | 1633 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1634 | VkBufferCreateFlags                         flags                      /// Buffer creation flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1635 | VkDeviceSize                                size                       /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1636 | VkBufferUsageFlags                          usage                      /// Buffer usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1637 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1638 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1639 | const u32*                                  pQueueFamilyIndices | 
|  | 1640 | } | 
|  | 1641 |  | 
|  | 1642 | class VkBufferViewCreateInfo { | 
|  | 1643 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO | 
|  | 1644 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1645 | VkBufferViewCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1646 | VkBuffer                                    buffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1647 | VkFormat                                    format                     /// Optionally specifies format of elements | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1648 | VkDeviceSize                                offset                     /// Specified in bytes | 
|  | 1649 | VkDeviceSize                                range                      /// View size specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1650 | } | 
|  | 1651 |  | 
|  | 1652 | class VkImageSubresource { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1653 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1654 | u32                                         mipLevel | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1655 | u32                                         arrayLayer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1656 | } | 
|  | 1657 |  | 
|  | 1658 | class VkImageSubresourceRange { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1659 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1660 | u32                                         baseMipLevel | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1661 | u32                                         levelCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1662 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1663 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1664 | } | 
|  | 1665 |  | 
|  | 1666 | class VkMemoryBarrier { | 
|  | 1667 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER | 
|  | 1668 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1669 | VkAccessFlags                               srcAccessMask | 
|  | 1670 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1671 | } | 
|  | 1672 |  | 
|  | 1673 | class VkBufferMemoryBarrier { | 
|  | 1674 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER | 
|  | 1675 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1676 | VkAccessFlags                               srcAccessMask | 
|  | 1677 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1678 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1679 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1680 | VkBuffer                                    buffer                     /// Buffer to sync | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1681 | VkDeviceSize                                offset                     /// Offset within the buffer to sync | 
|  | 1682 | VkDeviceSize                                size                       /// Amount of bytes to sync | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1683 | } | 
|  | 1684 |  | 
|  | 1685 | class VkImageMemoryBarrier { | 
|  | 1686 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER | 
|  | 1687 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1688 | VkAccessFlags                               srcAccessMask | 
|  | 1689 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1690 | VkImageLayout                               oldLayout                  /// Current layout of the image | 
|  | 1691 | VkImageLayout                               newLayout                  /// New layout to transition the image to | 
|  | 1692 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1693 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1694 | VkImage                                     image                      /// Image to sync | 
|  | 1695 | VkImageSubresourceRange                     subresourceRange           /// Subresource range to sync | 
|  | 1696 | } | 
|  | 1697 |  | 
|  | 1698 | class VkImageCreateInfo { | 
|  | 1699 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO | 
|  | 1700 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1701 | VkImageCreateFlags                          flags                      /// Image creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1702 | VkImageType                                 imageType | 
|  | 1703 | VkFormat                                    format | 
|  | 1704 | VkExtent3D                                  extent | 
|  | 1705 | u32                                         mipLevels | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1706 | u32                                         arrayLayers | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1707 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1708 | VkImageTiling                               tiling | 
|  | 1709 | VkImageUsageFlags                           usage                      /// Image usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1710 | VkSharingMode                               sharingMode                /// Cross-queue-family sharing mode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1711 | u32                                         queueFamilyIndexCount      /// Number of queue families to share across | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1712 | const u32*                                  pQueueFamilyIndices        /// Array of queue family indices to share across | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1713 | VkImageLayout                               initialLayout              /// Initial image layout for all subresources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1714 | } | 
|  | 1715 |  | 
|  | 1716 | class VkSubresourceLayout { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1717 | VkDeviceSize                                offset                 /// Specified in bytes | 
|  | 1718 | VkDeviceSize                                size                   /// Specified in bytes | 
|  | 1719 | VkDeviceSize                                rowPitch               /// Specified in bytes | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1720 | VkDeviceSize                                arrayPitch             /// Specified in bytes | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1721 | VkDeviceSize                                depthPitch             /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1722 | } | 
|  | 1723 |  | 
|  | 1724 | class VkImageViewCreateInfo { | 
|  | 1725 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO | 
|  | 1726 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1727 | VkImageViewCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1728 | VkImage                                     image | 
|  | 1729 | VkImageViewType                             viewType | 
|  | 1730 | VkFormat                                    format | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1731 | VkComponentMapping                          components | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1732 | VkImageSubresourceRange                     subresourceRange | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1733 | } | 
|  | 1734 |  | 
|  | 1735 | class VkBufferCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1736 | VkDeviceSize                                srcOffset              /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1737 | VkDeviceSize                                dstOffset              /// Specified in bytes | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1738 | VkDeviceSize                                size                   /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1739 | } | 
|  | 1740 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1741 | class VkSparseMemoryBind { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1742 | VkDeviceSize                                resourceOffset        /// Specified in bytes | 
|  | 1743 | VkDeviceSize                                size                  /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1744 | VkDeviceMemory                              memory | 
|  | 1745 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1746 | VkSparseMemoryBindFlags                     flags | 
|  | 1747 | } | 
|  | 1748 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1749 | class VkSparseImageMemoryBind { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1750 | VkImageSubresource                          subresource | 
|  | 1751 | VkOffset3D                                  offset | 
|  | 1752 | VkExtent3D                                  extent | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1753 | VkDeviceMemory                              memory | 
|  | 1754 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1755 | VkSparseMemoryBindFlags                     flags | 
|  | 1756 | } | 
|  | 1757 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1758 | class VkSparseBufferMemoryBindInfo { | 
|  | 1759 | VkBuffer                                    buffer | 
|  | 1760 | u32                                         bindCount | 
|  | 1761 | const VkSparseMemoryBind*                   pBinds | 
|  | 1762 | } | 
|  | 1763 |  | 
|  | 1764 | class VkSparseImageOpaqueMemoryBindInfo { | 
|  | 1765 | VkImage                                     image | 
|  | 1766 | u32                                         bindCount | 
|  | 1767 | const VkSparseMemoryBind*                   pBinds | 
|  | 1768 | } | 
|  | 1769 |  | 
|  | 1770 | class VkSparseImageMemoryBindInfo { | 
|  | 1771 | VkImage                                     image | 
|  | 1772 | u32                                         bindCount | 
|  | 1773 | const VkSparseMemoryBind*                   pBinds | 
|  | 1774 | } | 
|  | 1775 |  | 
|  | 1776 | class VkBindSparseInfo { | 
|  | 1777 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO | 
|  | 1778 | const void*                                 pNext | 
|  | 1779 | u32                                         waitSemaphoreCount | 
|  | 1780 | const VkSemaphore*                          pWaitSemaphores | 
|  | 1781 | u32                                         numBufferBinds | 
|  | 1782 | const VkSparseBufferMemoryBindInfo*         pBufferBinds | 
|  | 1783 | u32                                         numImageOpaqueBinds | 
|  | 1784 | const VkSparseImageOpaqueMemoryBindInfo*    pImageOpaqueBinds | 
|  | 1785 | u32                                         numImageBinds | 
|  | 1786 | const VkSparseImageMemoryBindInfo*          pImageBinds | 
|  | 1787 | u32                                         signalSemaphoreCount | 
|  | 1788 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1789 | } | 
|  | 1790 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1791 | class VkImageSubresourceLayers { | 
|  | 1792 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1793 | u32                                         mipLevel | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1794 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1795 | u32                                         layerCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1796 | } | 
|  | 1797 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1798 | class VkImageCopy { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1799 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1800 | VkOffset3D                                  srcOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1801 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1802 | VkOffset3D                                  dstOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1803 | VkExtent3D                                  extent                /// Specified in pixels for both compressed and uncompressed images | 
|  | 1804 | } | 
|  | 1805 |  | 
|  | 1806 | class VkImageBlit { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1807 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1808 | VkOffset3D[2]                               srcOffsets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1809 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1810 | VkOffset3D[2]                               dstOffsets | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1811 | } | 
|  | 1812 |  | 
|  | 1813 | class VkBufferImageCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1814 | VkDeviceSize                                bufferOffset           /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1815 | u32                                         bufferRowLength        /// Specified in texels | 
|  | 1816 | u32                                         bufferImageHeight | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1817 | VkImageSubresourceLayers                    imageSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1818 | VkOffset3D                                  imageOffset            /// Specified in pixels for both compressed and uncompressed images | 
|  | 1819 | VkExtent3D                                  imageExtent            /// Specified in pixels for both compressed and uncompressed images | 
|  | 1820 | } | 
|  | 1821 |  | 
|  | 1822 | class VkImageResolve { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1823 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1824 | VkOffset3D                                  srcOffset | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1825 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1826 | VkOffset3D                                  dstOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1827 | VkExtent3D                                  extent | 
|  | 1828 | } | 
|  | 1829 |  | 
|  | 1830 | class VkShaderModuleCreateInfo { | 
|  | 1831 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO | 
|  | 1832 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1833 | VkShaderModuleCreateFlags                   flags                  /// Reserved | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1834 | platform.size_t                             codeSize               /// Specified in bytes | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 1835 | const u32*                                  pCode                  /// Binary code of size codeSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1836 | } | 
|  | 1837 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1838 | class VkDescriptorSetLayoutBinding { | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1839 | u32                                         binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1840 | VkDescriptorType                            descriptorType     /// Type of the descriptors in this binding | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1841 | u32                                         descriptorCount    /// Number of descriptors in this binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1842 | VkShaderStageFlags                          stageFlags         /// Shader stages this binding is visible to | 
|  | 1843 | const VkSampler*                            pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) | 
|  | 1844 | } | 
|  | 1845 |  | 
|  | 1846 | class VkDescriptorSetLayoutCreateInfo { | 
|  | 1847 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO | 
|  | 1848 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1849 | VkDescriptorSetLayoutCreateFlags            flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1850 | u32                                         bindingCount       /// Number of bindings in the descriptor set layout | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1851 | const VkDescriptorSetLayoutBinding*         pBindings          /// Array of descriptor set layout bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1852 | } | 
|  | 1853 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1854 | class VkDescriptorPoolSize { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1855 | VkDescriptorType                            type | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1856 | u32                                         descriptorCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1857 | } | 
|  | 1858 |  | 
|  | 1859 | class VkDescriptorPoolCreateInfo { | 
|  | 1860 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO | 
|  | 1861 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1862 | VkDescriptorPoolCreateFlags                 flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1863 | u32                                         maxSets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1864 | u32                                         poolSizeCount | 
|  | 1865 | const VkDescriptorPoolSize*                 pPoolSizes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1866 | } | 
|  | 1867 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1868 | class VkDescriptorSetAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1869 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1870 | const void*                                 pNext              /// Pointer to next structure | 
|  | 1871 | VkDescriptorPool                            descriptorPool | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1872 | u32                                         setCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1873 | const VkDescriptorSetLayout*                pSetLayouts | 
|  | 1874 | } | 
|  | 1875 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1876 | class VkSpecializationMapEntry { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1877 | u32                                         constantID         /// The SpecConstant ID specified in the BIL | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1878 | u32                                         offset             /// Offset of the value in the data block | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1879 | platform.size_t                             size               /// Size in bytes of the SpecConstant | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1880 | } | 
|  | 1881 |  | 
|  | 1882 | class VkSpecializationInfo { | 
|  | 1883 | u32                                         mapEntryCount      /// Number of entries in the map | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1884 | const VkSpecializationMapEntry*             pMapEntries        /// Array of map entries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1885 | platform.size_t                             dataSize           /// Size in bytes of pData | 
|  | 1886 | const void*                                 pData              /// Pointer to SpecConstant data | 
|  | 1887 | } | 
|  | 1888 |  | 
|  | 1889 | class VkPipelineShaderStageCreateInfo { | 
|  | 1890 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO | 
|  | 1891 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1892 | VkPipelineShaderStageCreateFlags            flags | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1893 | VkShaderStageFlagBits                       stage | 
|  | 1894 | VkShaderModule                              module | 
|  | 1895 | const char*                                 pName | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1896 | const VkSpecializationInfo*                 pSpecializationInfo | 
|  | 1897 | } | 
|  | 1898 |  | 
|  | 1899 | class VkComputePipelineCreateInfo { | 
|  | 1900 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO | 
|  | 1901 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1902 | VkPipelineCreateFlags                       flags              /// Pipeline creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1903 | VkPipelineShaderStageCreateInfo             stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1904 | VkPipelineLayout                            layout             /// Interface layout of the pipeline | 
|  | 1905 | 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 | 
|  | 1906 | 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 | 
|  | 1907 | } | 
|  | 1908 |  | 
|  | 1909 | class VkVertexInputBindingDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1910 | u32                                         binding               /// Vertex buffer binding id | 
|  | 1911 | u32                                         stride                /// Distance between vertices in bytes (0 = no advancement) | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1912 | VkVertexInputRate                           inputRate             /// Rate at which binding is incremented | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1913 | } | 
|  | 1914 |  | 
|  | 1915 | class VkVertexInputAttributeDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1916 | u32                                         location              /// location of the shader vertex attrib | 
|  | 1917 | u32                                         binding               /// Vertex buffer binding id | 
|  | 1918 | VkFormat                                    format                /// format of source data | 
|  | 1919 | u32                                         offset                /// Offset of first element in bytes from base of vertex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1920 | } | 
|  | 1921 |  | 
|  | 1922 | class VkPipelineVertexInputStateCreateInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1923 | VkStructureType                             sType                           /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO | 
|  | 1924 | const void*                                 pNext                           /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1925 | VkPipelineVertexInputStateCreateFlags       flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1926 | u32                                         vertexBindingDescriptionCount   /// number of bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1927 | const VkVertexInputBindingDescription*      pVertexBindingDescriptions | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1928 | u32                                         vertexAttributeDescriptionCount /// number of attributes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1929 | const VkVertexInputAttributeDescription*    pVertexAttributeDescriptions | 
|  | 1930 | } | 
|  | 1931 |  | 
|  | 1932 | class VkPipelineInputAssemblyStateCreateInfo { | 
|  | 1933 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO | 
|  | 1934 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1935 | VkPipelineInputAssemblyStateCreateFlags     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1936 | VkPrimitiveTopology                         topology | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1937 | VkBool32                                    primitiveRestartEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1938 | } | 
|  | 1939 |  | 
|  | 1940 | class VkPipelineTessellationStateCreateInfo { | 
|  | 1941 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO | 
|  | 1942 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1943 | VkPipelineTessellationStateCreateFlags      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1944 | u32                                         patchControlPoints | 
|  | 1945 | } | 
|  | 1946 |  | 
|  | 1947 | class VkPipelineViewportStateCreateInfo { | 
|  | 1948 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO | 
|  | 1949 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1950 | VkPipelineViewportStateCreateFlags          flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1951 | u32                                         viewportCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1952 | const VkViewport*                           pViewports | 
|  | 1953 | u32                                         scissorCount | 
|  | 1954 | const VkRect2D*                             pScissors | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1955 | } | 
|  | 1956 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1957 | class VkPipelineRasterizationStateCreateInfo { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1958 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1959 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1960 | VkPipelineRasterizationStateCreateFlags     flags | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1961 | VkBool32                                    depthClampEnable | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1962 | VkBool32                                    rasterizerDiscardEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1963 | VkPolygonMode                               polygonMode                   /// optional (GL45) | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1964 | VkCullModeFlags                             cullMode | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1965 | VkFrontFace                                 frontFace | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1966 | VkBool32                                    depthBiasEnable | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 1967 | f32                                         depthBiasConstantFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1968 | f32                                         depthBiasClamp | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 1969 | f32                                         depthBiasSlopeFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1970 | f32                                         lineWidth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1971 | } | 
|  | 1972 |  | 
|  | 1973 | class VkPipelineMultisampleStateCreateInfo { | 
|  | 1974 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO | 
|  | 1975 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1976 | VkPipelineMultisampleStateCreateFlags       flags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1977 | VkSampleCountFlagBits                       rasterizationSamples       /// Number of samples used for rasterization | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1978 | VkBool32                                    sampleShadingEnable        /// optional (GL45) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1979 | f32                                         minSampleShading           /// optional (GL45) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1980 | const VkSampleMask*                         pSampleMask | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1981 | VkBool32                                    alphaToCoverageEnable | 
|  | 1982 | VkBool32                                    alphaToOneEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1983 | } | 
|  | 1984 |  | 
|  | 1985 | class VkPipelineColorBlendAttachmentState { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1986 | VkBool32                                    blendEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1987 | VkBlendFactor                               srcColorBlendFactor | 
|  | 1988 | VkBlendFactor                               dstColorBlendFactor | 
|  | 1989 | VkBlendOp                                   colorBlendOp | 
|  | 1990 | VkBlendFactor                               srcAlphaBlendFactor | 
|  | 1991 | VkBlendFactor                               dstAlphaBlendFactor | 
|  | 1992 | VkBlendOp                                   alphaBlendOp | 
|  | 1993 | VkColorComponentFlags                       colorWriteMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1994 | } | 
|  | 1995 |  | 
|  | 1996 | class VkPipelineColorBlendStateCreateInfo { | 
|  | 1997 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO | 
|  | 1998 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1999 | VkPipelineColorBlendStateCreateFlags        flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2000 | VkBool32                                    logicOpEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2001 | VkLogicOp                                   logicOp | 
|  | 2002 | u32                                         attachmentCount    /// # of pAttachments | 
|  | 2003 | const VkPipelineColorBlendAttachmentState*  pAttachments | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2004 | f32[4]                                      blendConstants | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2005 | } | 
|  | 2006 |  | 
|  | 2007 | class VkStencilOpState { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2008 | VkStencilOp                                 failOp | 
|  | 2009 | VkStencilOp                                 passOp | 
|  | 2010 | VkStencilOp                                 depthFailOp | 
|  | 2011 | VkCompareOp                                 compareOp | 
|  | 2012 | u32                                         compareMask | 
|  | 2013 | u32                                         writeMask | 
|  | 2014 | u32                                         reference | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2015 | } | 
|  | 2016 |  | 
|  | 2017 | class VkPipelineDepthStencilStateCreateInfo { | 
|  | 2018 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO | 
|  | 2019 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2020 | VkPipelineDepthStencilStateCreateFlags      flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2021 | VkBool32                                    depthTestEnable | 
|  | 2022 | VkBool32                                    depthWriteEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2023 | VkCompareOp                                 depthCompareOp | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2024 | VkBool32                                    depthBoundsTestEnable  /// optional (depth_bounds_test) | 
|  | 2025 | VkBool32                                    stencilTestEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2026 | VkStencilOpState                            front | 
|  | 2027 | VkStencilOpState                            back | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2028 | f32                                         minDepthBounds | 
|  | 2029 | f32                                         maxDepthBounds | 
|  | 2030 | } | 
|  | 2031 |  | 
|  | 2032 | class VkPipelineDynamicStateCreateInfo { | 
|  | 2033 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO | 
|  | 2034 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2035 | VkPipelineDynamicStateCreateFlags           flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2036 | u32                                         dynamicStateCount | 
|  | 2037 | const VkDynamicState*                       pDynamicStates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2038 | } | 
|  | 2039 |  | 
|  | 2040 | class VkGraphicsPipelineCreateInfo { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2041 | VkStructureType                                 sType               /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO | 
|  | 2042 | const void*                                     pNext               /// Pointer to next structure | 
|  | 2043 | VkPipelineCreateFlags                           flags               /// Pipeline creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2044 | u32                                             stageCount | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2045 | const VkPipelineShaderStageCreateInfo*          pStages             /// One entry for each active shader stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2046 | const VkPipelineVertexInputStateCreateInfo*     pVertexInputState | 
|  | 2047 | const VkPipelineInputAssemblyStateCreateInfo*   pInputAssemblyState | 
|  | 2048 | const VkPipelineTessellationStateCreateInfo*    pTessellationState | 
|  | 2049 | const VkPipelineViewportStateCreateInfo*        pViewportState | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2050 | const VkPipelineRasterizationStateCreateInfo*   pRasterizationState | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2051 | const VkPipelineMultisampleStateCreateInfo*     pMultisampleState | 
|  | 2052 | const VkPipelineDepthStencilStateCreateInfo*    pDepthStencilState | 
|  | 2053 | const VkPipelineColorBlendStateCreateInfo*      pColorBlendState | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2054 | const VkPipelineDynamicStateCreateInfo*         pDynamicState | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2055 | VkPipelineLayout                                layout              /// Interface layout of the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2056 | VkRenderPass                                    renderPass | 
|  | 2057 | u32                                             subpass | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2058 | 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 | 
|  | 2059 | 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] | 2060 | } | 
|  | 2061 |  | 
|  | 2062 | class VkPipelineCacheCreateInfo { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2063 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO | 
|  | 2064 | const void*                                 pNext                 /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2065 | VkPipelineCacheCreateFlags                  flags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2066 | platform.size_t                             initialDataSize       /// Size of initial data to populate cache, in bytes | 
|  | 2067 | const void*                                 pInitialData          /// Initial data to populate cache | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2068 | } | 
|  | 2069 |  | 
|  | 2070 | class VkPushConstantRange { | 
|  | 2071 | VkShaderStageFlags                          stageFlags   /// Which stages use the range | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2072 | u32                                         offset       /// Start of the range, in bytes | 
|  | 2073 | u32                                         size        /// Length of the range, in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2074 | } | 
|  | 2075 |  | 
|  | 2076 | class VkPipelineLayoutCreateInfo { | 
|  | 2077 | VkStructureType                             sType                   /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO | 
|  | 2078 | const void*                                 pNext                   /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2079 | VkPipelineLayoutCreateFlags                 flags | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2080 | u32                                         descriptorSetCount      /// Number of descriptor sets interfaced by the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2081 | const VkDescriptorSetLayout*                pSetLayouts             /// Array of <setCount> number of descriptor set layout objects defining the layout of the | 
|  | 2082 | u32                                         pushConstantRangeCount  /// Number of push-constant ranges used by the pipeline | 
|  | 2083 | const VkPushConstantRange*                  pPushConstantRanges     /// Array of pushConstantRangeCount number of ranges used by various shader stages | 
|  | 2084 | } | 
|  | 2085 |  | 
|  | 2086 | class VkSamplerCreateInfo { | 
|  | 2087 | VkStructureType                             sType          /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO | 
|  | 2088 | const void*                                 pNext          /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2089 | VkSamplerCreateFlags                        flags | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2090 | VkFilter                                    magFilter      /// Filter mode for magnification | 
|  | 2091 | VkFilter                                    minFilter      /// Filter mode for minifiation | 
|  | 2092 | VkSamplerMipmapMode                         mipmapMode     /// Mipmap selection mode | 
|  | 2093 | VkSamplerAddressMode                        addressModeU | 
|  | 2094 | VkSamplerAddressMode                        addressModeV | 
|  | 2095 | VkSamplerAddressMode                        addressModeW | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2096 | f32                                         mipLodBias | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2097 | VkBool32                                    anisotropyEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2098 | f32                                         maxAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2099 | VkBool32                                    compareEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2100 | VkCompareOp                                 compareOp | 
|  | 2101 | f32                                         minLod | 
|  | 2102 | f32                                         maxLod | 
|  | 2103 | VkBorderColor                               borderColor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2104 | VkBool32                                    unnormalizedCoordinates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2105 | } | 
|  | 2106 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2107 | class VkCommandPoolCreateInfo { | 
|  | 2108 | VkStructureType                             sType            /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2109 | const void*                                 pNext            /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2110 | VkCommandPoolCreateFlags                    flags            /// Command pool creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2111 | u32                                         queueFamilyIndex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2112 | } | 
|  | 2113 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2114 | class VkCommandBufferAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2115 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2116 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2117 | VkCommandPool                               commandPool | 
|  | 2118 | VkCommandBufferLevel                        level | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2119 | u32                                         commandBufferCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2120 | } | 
|  | 2121 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2122 | class VkCommandBufferInheritanceInfo { | 
|  | 2123 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2124 | const void*                                 pNext       /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2125 | VkRenderPass                                renderPass  /// Render pass for secondary command buffers | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2126 | u32                                         subpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2127 | VkFramebuffer                               framebuffer /// Framebuffer for secondary command buffers | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2128 | VkBool32                                    occlusionQueryEnable | 
|  | 2129 | VkQueryControlFlags                         queryFlags | 
|  | 2130 | VkQueryPipelineStatisticFlags               pipelineStatistics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2131 | } | 
|  | 2132 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2133 | class VkCommandBufferBeginInfo { | 
|  | 2134 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO | 
|  | 2135 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2136 | VkCommandBufferUsageFlags                   flags       /// Command buffer usage flags | 
|  | 2137 | const VkCommandBufferInheritanceInfo*       pInheritanceInfo | 
|  | 2138 | } | 
|  | 2139 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2140 | class VkRenderPassBeginInfo { | 
|  | 2141 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO | 
|  | 2142 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2143 | VkRenderPass                                renderPass | 
|  | 2144 | VkFramebuffer                               framebuffer | 
|  | 2145 | VkRect2D                                    renderArea | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2146 | u32                                         clearValueCount | 
|  | 2147 | const VkClearValue*                         pClearValues | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | } | 
|  | 2149 |  | 
|  | 2150 | @union | 
|  | 2151 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. | 
|  | 2152 | class VkClearColorValue { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2153 | f32[4]                                      float32 | 
|  | 2154 | s32[4]                                      int32 | 
|  | 2155 | u32[4]                                      uint32 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2156 | } | 
|  | 2157 |  | 
|  | 2158 | class VkClearDepthStencilValue { | 
|  | 2159 | f32                                         depth | 
|  | 2160 | u32                                         stencil | 
|  | 2161 | } | 
|  | 2162 |  | 
|  | 2163 | @union | 
|  | 2164 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. | 
|  | 2165 | class VkClearValue { | 
|  | 2166 | VkClearColorValue                           color | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2167 | VkClearDepthStencilValue                    depthStencil | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2168 | } | 
|  | 2169 |  | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2170 | class VkClearAttachment { | 
|  | 2171 | VkImageAspectFlags                          aspectMask | 
|  | 2172 | u32                                         colorAttachment | 
|  | 2173 | VkClearValue                                clearValue | 
|  | 2174 | } | 
|  | 2175 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2176 | class VkAttachmentDescription { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2177 | VkAttachmentDescriptionFlags                flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2178 | VkFormat                                    format | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2179 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2180 | VkAttachmentLoadOp                          loadOp          /// Load op for color or depth data | 
|  | 2181 | VkAttachmentStoreOp                         storeOp         /// Store op for color or depth data | 
|  | 2182 | VkAttachmentLoadOp                          stencilLoadOp   /// Load op for stencil data | 
|  | 2183 | VkAttachmentStoreOp                         stencilStoreOp  /// Store op for stencil data | 
|  | 2184 | VkImageLayout                               initialLayout | 
|  | 2185 | VkImageLayout                               finalLayout | 
|  | 2186 | } | 
|  | 2187 |  | 
|  | 2188 | class VkAttachmentReference { | 
|  | 2189 | u32                                         attachment | 
|  | 2190 | VkImageLayout                               layout | 
|  | 2191 | } | 
|  | 2192 |  | 
|  | 2193 | class VkSubpassDescription { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2194 | VkSubpassDescriptionFlags                   flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2195 | VkPipelineBindPoint                         pipelineBindPoint  /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2196 | u32                                         inputAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2197 | const VkAttachmentReference*                pInputAttachments | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2198 | u32                                         colorAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2199 | const VkAttachmentReference*                pColorAttachments | 
|  | 2200 | const VkAttachmentReference*                pResolveAttachments | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2201 | const VkAttachmentReference*                pDepthStencilAttachment | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2202 | u32                                         preserveAttachmentCount | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2203 | const u32*                                  pPreserveAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2204 | } | 
|  | 2205 |  | 
|  | 2206 | class VkSubpassDependency { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2207 | u32                                         srcSubpass | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2208 | u32                                         dstSubpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2209 | VkPipelineStageFlags                        srcStageMask | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2210 | VkPipelineStageFlags                        dstStageMask | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2211 | VkAccessFlags                               srcAccessMask | 
|  | 2212 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2213 | VkDependencyFlags                           dependencyFlags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2214 | } | 
|  | 2215 |  | 
|  | 2216 | class VkRenderPassCreateInfo { | 
|  | 2217 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO | 
|  | 2218 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2219 | VkRenderPassCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2220 | u32                                         attachmentCount | 
|  | 2221 | const VkAttachmentDescription*              pAttachments | 
|  | 2222 | u32                                         subpassCount | 
|  | 2223 | const VkSubpassDescription*                 pSubpasses | 
|  | 2224 | u32                                         dependencyCount | 
|  | 2225 | const VkSubpassDependency*                  pDependencies | 
|  | 2226 | } | 
|  | 2227 |  | 
|  | 2228 | class VkEventCreateInfo { | 
|  | 2229 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO | 
|  | 2230 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2231 | VkEventCreateFlags                          flags      /// Event creation flags | 
|  | 2232 | } | 
|  | 2233 |  | 
|  | 2234 | class VkFenceCreateInfo { | 
|  | 2235 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO | 
|  | 2236 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2237 | VkFenceCreateFlags                          flags      /// Fence creation flags | 
|  | 2238 | } | 
|  | 2239 |  | 
|  | 2240 | class VkPhysicalDeviceFeatures { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2241 | VkBool32                                    robustBufferAccess                        /// out of bounds buffer accesses are well defined | 
|  | 2242 | VkBool32                                    fullDrawIndexUint32                       /// full 32-bit range of indices for indexed draw calls | 
|  | 2243 | VkBool32                                    imageCubeArray                            /// image views which are arrays of cube maps | 
|  | 2244 | VkBool32                                    independentBlend                          /// blending operations are controlled per-attachment | 
|  | 2245 | VkBool32                                    geometryShader                            /// geometry stage | 
|  | 2246 | VkBool32                                    tessellationShader                        /// tessellation control and evaluation stage | 
|  | 2247 | VkBool32                                    sampleRateShading                         /// per-sample shading and interpolation | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2248 | VkBool32                                    dualSrcBlend                              /// blend operations which take two sources | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2249 | VkBool32                                    logicOp                                   /// logic operations | 
|  | 2250 | VkBool32                                    multiDrawIndirect                         /// multi draw indirect | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2251 | VkBool32                                    drawIndirectFirstInstance | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2252 | VkBool32                                    depthClamp                                /// depth clamping | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2253 | VkBool32                                    depthBiasClamp                            /// depth bias clamping | 
|  | 2254 | VkBool32                                    fillModeNonSolid                          /// point and wireframe fill modes | 
|  | 2255 | VkBool32                                    depthBounds                               /// depth bounds test | 
|  | 2256 | VkBool32                                    wideLines                                 /// lines with width greater than 1 | 
|  | 2257 | VkBool32                                    largePoints                               /// points with size greater than 1 | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2258 | VkBool32                                    alphaToOne                                /// The fragment alpha channel can be forced to maximum representable alpha value | 
|  | 2259 | VkBool32                                    multiViewport | 
|  | 2260 | VkBool32                                    samplerAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2261 | VkBool32                                    textureCompressionETC2                    /// ETC texture compression formats | 
|  | 2262 | VkBool32                                    textureCompressionASTC_LDR                /// ASTC LDR texture compression formats | 
|  | 2263 | VkBool32                                    textureCompressionBC                      /// BC1-7 texture compressed formats | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2264 | VkBool32                                    occlusionQueryPrecise | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2265 | VkBool32                                    pipelineStatisticsQuery                   /// pipeline statistics query | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2266 | VkBool32                                    vertexPipelineStoresAndAtomics | 
|  | 2267 | VkBool32                                    fragmentStoresAndAtomics | 
|  | 2268 | VkBool32                                    shaderTessellationAndGeometryPointSize | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2269 | VkBool32                                    shaderImageGatherExtended                 /// texture gather with run-time values and independent offsets | 
|  | 2270 | VkBool32                                    shaderStorageImageExtendedFormats         /// the extended set of formats can be used for storage images | 
|  | 2271 | VkBool32                                    shaderStorageImageMultisample             /// multisample images can be used for storage images | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2272 | VkBool32                                    shaderStorageImageReadWithoutFormat | 
|  | 2273 | VkBool32                                    shaderStorageImageWriteWithoutFormat | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2274 | VkBool32                                    shaderUniformBufferArrayDynamicIndexing   /// arrays of uniform buffers can be accessed with dynamically uniform indices | 
|  | 2275 | VkBool32                                    shaderSampledImageArrayDynamicIndexing    /// arrays of sampled images can be accessed with dynamically uniform indices | 
|  | 2276 | VkBool32                                    shaderStorageBufferArrayDynamicIndexing   /// arrays of storage buffers can be accessed with dynamically uniform indices | 
|  | 2277 | VkBool32                                    shaderStorageImageArrayDynamicIndexing    /// arrays of storage images can be accessed with dynamically uniform indices | 
|  | 2278 | VkBool32                                    shaderClipDistance                        /// clip distance in shaders | 
|  | 2279 | VkBool32                                    shaderCullDistance                        /// cull distance in shaders | 
|  | 2280 | VkBool32                                    shaderFloat64                             /// 64-bit floats (doubles) in shaders | 
|  | 2281 | VkBool32                                    shaderInt64                               /// 64-bit integers in shaders | 
|  | 2282 | VkBool32                                    shaderInt16                               /// 16-bit integers in shaders | 
|  | 2283 | 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] | 2284 | VkBool32                                    shaderResourceMinLod                      /// shader can use texture operations that specify minimum resource LOD | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2285 | VkBool32                                    sparseBinding                             /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level | 
|  | 2286 | VkBool32                                    sparseResidencyBuffer                     /// Sparse resources support: GPU can access partially resident buffers | 
|  | 2287 | VkBool32                                    sparseResidencyImage2D                    /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images | 
|  | 2288 | VkBool32                                    sparseResidencyImage3D                    /// Sparse resources support: GPU can access partially resident 3D images | 
|  | 2289 | VkBool32                                    sparseResidency2Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples | 
|  | 2290 | VkBool32                                    sparseResidency4Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples | 
|  | 2291 | VkBool32                                    sparseResidency8Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples | 
|  | 2292 | VkBool32                                    sparseResidency16Samples                  /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples | 
|  | 2293 | 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] | 2294 | VkBool32                                    variableMultisampleRate | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2295 | VkBool32                                    inheritedQueries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2296 | } | 
|  | 2297 |  | 
|  | 2298 | class VkPhysicalDeviceLimits { | 
|  | 2299 | /// resource maximum sizes | 
|  | 2300 | u32                                         maxImageDimension1D                       /// max 1D image dimension | 
|  | 2301 | u32                                         maxImageDimension2D                       /// max 2D image dimension | 
|  | 2302 | u32                                         maxImageDimension3D                       /// max 3D image dimension | 
|  | 2303 | u32                                         maxImageDimensionCube                     /// max cubemap image dimension | 
|  | 2304 | u32                                         maxImageArrayLayers                       /// max layers for image arrays | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2305 | u32                                         maxTexelBufferElements | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2306 | u32                                         maxUniformBufferRange                     /// max uniform buffer size (bytes) | 
|  | 2307 | u32                                         maxStorageBufferRange                     /// max storage buffer size (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2308 | u32                                         maxPushConstantsSize                      /// max size of the push constants pool (bytes) | 
|  | 2309 | /// memory limits | 
|  | 2310 | u32                                         maxMemoryAllocationCount                  /// max number of device memory allocations supported | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2311 | u32                                         maxSamplerAllocationCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2312 | VkDeviceSize                                bufferImageGranularity                    /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage | 
|  | 2313 | VkDeviceSize                                sparseAddressSpaceSize                    /// Total address space available for sparse allocations (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2314 | /// descriptor set limits | 
|  | 2315 | 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] | 2316 | u32                                         maxPerStageDescriptorSamplers             /// max num of samplers allowed per-stage in a descriptor set | 
|  | 2317 | u32                                         maxPerStageDescriptorUniformBuffers       /// max num of uniform buffers allowed per-stage in a descriptor set | 
|  | 2318 | u32                                         maxPerStageDescriptorStorageBuffers       /// max num of storage buffers allowed per-stage in a descriptor set | 
|  | 2319 | u32                                         maxPerStageDescriptorSampledImages        /// max num of sampled images allowed per-stage in a descriptor set | 
|  | 2320 | 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] | 2321 | u32                                         maxPerStageDescriptorInputAttachments | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2322 | u32                                         maxPerStageResources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2323 | u32                                         maxDescriptorSetSamplers                  /// max num of samplers allowed in all stages in a descriptor set | 
|  | 2324 | 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] | 2325 | 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] | 2326 | 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] | 2327 | 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] | 2328 | u32                                         maxDescriptorSetSampledImages             /// max num of sampled images allowed in all stages in a descriptor set | 
|  | 2329 | 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] | 2330 | u32                                         maxDescriptorSetInputAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2331 | /// vertex stage limits | 
|  | 2332 | u32                                         maxVertexInputAttributes                  /// max num of vertex input attribute slots | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2333 | u32                                         maxVertexInputBindings                    /// max num of vertex input binding slots | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2334 | u32                                         maxVertexInputAttributeOffset             /// max vertex input attribute offset added to vertex buffer offset | 
|  | 2335 | u32                                         maxVertexInputBindingStride               /// max vertex input binding stride | 
|  | 2336 | u32                                         maxVertexOutputComponents                 /// max num of output components written by vertex shader | 
|  | 2337 | /// tessellation control stage limits | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2338 | u32                                         maxTessellationGenerationLevel                  /// max level supported by tess primitive generator | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2339 | u32                                         maxTessellationPatchSize                        /// max patch size (vertices) | 
|  | 2340 | u32                                         maxTessellationControlPerVertexInputComponents  /// max num of input components per-vertex in TCS | 
|  | 2341 | u32                                         maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS | 
|  | 2342 | u32                                         maxTessellationControlPerPatchOutputComponents  /// max num of output components per-patch in TCS | 
|  | 2343 | u32                                         maxTessellationControlTotalOutputComponents     /// max total num of per-vertex and per-patch output components in TCS | 
|  | 2344 | u32                                         maxTessellationEvaluationInputComponents        /// max num of input components per vertex in TES | 
|  | 2345 | u32                                         maxTessellationEvaluationOutputComponents       /// max num of output components per vertex in TES | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2346 | /// geometry stage limits | 
|  | 2347 | u32                                         maxGeometryShaderInvocations              /// max invocation count supported in geometry shader | 
|  | 2348 | u32                                         maxGeometryInputComponents                /// max num of input components read in geometry stage | 
|  | 2349 | u32                                         maxGeometryOutputComponents               /// max num of output components written in geometry stage | 
|  | 2350 | u32                                         maxGeometryOutputVertices                 /// max num of vertices that can be emitted in geometry stage | 
|  | 2351 | u32                                         maxGeometryTotalOutputComponents          /// max total num of components (all vertices) written in geometry stage | 
|  | 2352 | /// fragment stage limits | 
|  | 2353 | u32                                         maxFragmentInputComponents                /// max num of input compontents read in fragment stage | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2354 | u32                                         maxFragmentOutputAttachments              /// max num of output attachments written in fragment stage | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2355 | 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] | 2356 | u32                                         maxFragmentCombinedOutputResources        /// max total num of storage buffers, storage images and output buffers | 
|  | 2357 | /// compute stage limits | 
|  | 2358 | u32                                         maxComputeSharedMemorySize                /// max total storage size of work group local storage (bytes) | 
|  | 2359 | u32[3]                                      maxComputeWorkGroupCount                  /// max num of compute work groups that may be dispatched by a single command (x,y,z) | 
|  | 2360 | u32                                         maxComputeWorkGroupInvocations            /// max total compute invocations in a single local work group | 
|  | 2361 | u32[3]                                      maxComputeWorkGroupSize                   /// max local size of a compute work group (x,y,z) | 
|  | 2362 |  | 
|  | 2363 | u32                                         subPixelPrecisionBits                     /// num bits of subpixel precision in screen x and y | 
|  | 2364 | u32                                         subTexelPrecisionBits                     /// num bits of subtexel precision | 
|  | 2365 | u32                                         mipmapPrecisionBits                       /// num bits of mipmap precision | 
|  | 2366 |  | 
|  | 2367 | 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] | 2368 | u32                                         maxDrawIndirectCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2369 |  | 
|  | 2370 | f32                                         maxSamplerLodBias                         /// max absolute sampler level of detail bias | 
|  | 2371 | f32                                         maxSamplerAnisotropy                      /// max degree of sampler anisotropy | 
|  | 2372 |  | 
|  | 2373 | u32                                         maxViewports                              /// max number of active viewports | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2374 | u32[2]                                      maxViewportDimensions                     /// max viewport dimensions (x,y) | 
|  | 2375 | f32[2]                                      viewportBoundsRange                       /// viewport bounds range (min,max) | 
|  | 2376 | u32                                         viewportSubPixelBits                      /// num bits of subpixel precision for viewport | 
|  | 2377 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2378 | platform.size_t                             minMemoryMapAlignment                     /// min required alignment of pointers returned by MapMemory (bytes) | 
|  | 2379 | VkDeviceSize                                minTexelBufferOffsetAlignment             /// min required alignment for texel buffer offsets (bytes) | 
|  | 2380 | VkDeviceSize                                minUniformBufferOffsetAlignment           /// min required alignment for uniform buffer sizes and offsets (bytes) | 
|  | 2381 | VkDeviceSize                                minStorageBufferOffsetAlignment           /// min required alignment for storage buffer offsets (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2382 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2383 | s32                                         minTexelOffset                            /// min texel offset for OpTextureSampleOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2384 | u32                                         maxTexelOffset                            /// max texel offset for OpTextureSampleOffset | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2385 | s32                                         minTexelGatherOffset                      /// min texel offset for OpTextureGatherOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2386 | u32                                         maxTexelGatherOffset                      /// max texel offset for OpTextureGatherOffset | 
|  | 2387 | f32                                         minInterpolationOffset                    /// furthest negative offset for interpolateAtOffset | 
|  | 2388 | f32                                         maxInterpolationOffset                    /// furthest positive offset for interpolateAtOffset | 
|  | 2389 | u32                                         subPixelInterpolationOffsetBits           /// num of subpixel bits for interpolateAtOffset | 
|  | 2390 |  | 
|  | 2391 | u32                                         maxFramebufferWidth                       /// max width for a framebuffer | 
|  | 2392 | u32                                         maxFramebufferHeight                      /// max height for a framebuffer | 
|  | 2393 | u32                                         maxFramebufferLayers                      /// max layer count for a layered framebuffer | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2394 | VkSampleCountFlags                          framebufferColorSampleCounts | 
|  | 2395 | VkSampleCountFlags                          framebufferDepthSampleCounts | 
|  | 2396 | VkSampleCountFlags                          framebufferStencilSampleCounts | 
|  | 2397 | VkSampleCountFlags                          framebufferNoAttachmentSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2398 | u32                                         maxColorAttachments                       /// max num of framebuffer color attachments | 
|  | 2399 |  | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2400 | VkSampleCountFlags                          sampledImageColorSampleCounts | 
|  | 2401 | VkSampleCountFlags                          sampledImageIntegerSampleCounts | 
|  | 2402 | VkSampleCountFlags                          sampledImageDepthSampleCounts | 
|  | 2403 | VkSampleCountFlags                          sampledImageStencilSampleCounts | 
|  | 2404 | VkSampleCountFlags                          storageImageSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2405 | u32                                         maxSampleMaskWords                        /// max num of sample mask words | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2406 | VkBool32                                    timestampComputeAndGraphics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2407 |  | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2408 | f32                                         timestampPeriod | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2409 |  | 
|  | 2410 | u32                                         maxClipDistances                          /// max number of clip distances | 
|  | 2411 | u32                                         maxCullDistances                          /// max number of cull distances | 
|  | 2412 | u32                                         maxCombinedClipAndCullDistances           /// max combined number of user clipping | 
|  | 2413 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2414 | u32                                         discreteQueuePriorities | 
|  | 2415 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2416 | f32[2]                                      pointSizeRange                            /// range (min,max) of supported point sizes | 
|  | 2417 | f32[2]                                      lineWidthRange                            /// range (min,max) of supported line widths | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2418 | f32                                         pointSizeGranularity                      /// granularity of supported point sizes | 
|  | 2419 | f32                                         lineWidthGranularity                      /// granularity of supported line widths | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2420 | VkBool32                                    strictLines | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2421 | VkBool32                                    standardSampleLocations | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2422 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2423 | VkDeviceSize                                optimalBufferCopyOffsetAlignment | 
|  | 2424 | VkDeviceSize                                optimalBufferCopyRowPitchAlignment | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2425 | VkDeviceSize                                nonCoherentAtomSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2426 | } | 
|  | 2427 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2428 | class VkPhysicalDeviceSparseProperties { | 
|  | 2429 | 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] | 2430 | 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] | 2431 | VkBool32                                    residencyStandard3DBlockShape             /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) | 
|  | 2432 | 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] | 2433 | 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 | 
|  | 2434 | } | 
|  | 2435 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2436 | class VkSemaphoreCreateInfo { | 
|  | 2437 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO | 
|  | 2438 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2439 | VkSemaphoreCreateFlags                      flags      /// Semaphore creation flags | 
|  | 2440 | } | 
|  | 2441 |  | 
|  | 2442 | class VkQueryPoolCreateInfo { | 
|  | 2443 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO | 
|  | 2444 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2445 | VkQueryPoolCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2446 | VkQueryType                                 queryType | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2447 | u32                                         queryCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2448 | VkQueryPipelineStatisticFlags               pipelineStatistics /// Optional | 
|  | 2449 | } | 
|  | 2450 |  | 
|  | 2451 | class VkFramebufferCreateInfo { | 
|  | 2452 | VkStructureType                             sType  /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO | 
|  | 2453 | const void*                                 pNext  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2454 | VkFramebufferCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2455 | VkRenderPass                                renderPass | 
|  | 2456 | u32                                         attachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2457 | const VkImageView*                          pAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2458 | u32                                         width | 
|  | 2459 | u32                                         height | 
|  | 2460 | u32                                         layers | 
|  | 2461 | } | 
|  | 2462 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2463 | class VkDrawIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2464 | u32                                         vertexCount | 
|  | 2465 | u32                                         instanceCount | 
|  | 2466 | u32                                         firstVertex | 
|  | 2467 | u32                                         firstInstance | 
|  | 2468 | } | 
|  | 2469 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2470 | class VkDrawIndexedIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2471 | u32                                         indexCount | 
|  | 2472 | u32                                         instanceCount | 
|  | 2473 | u32                                         firstIndex | 
|  | 2474 | s32                                         vertexOffset | 
|  | 2475 | u32                                         firstInstance | 
|  | 2476 | } | 
|  | 2477 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2478 | class VkDispatchIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2479 | u32                                         x | 
|  | 2480 | u32                                         y | 
|  | 2481 | u32                                         z | 
|  | 2482 | } | 
|  | 2483 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2484 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2485 | class VkSurfaceCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2486 | u32                                         minImageCount | 
|  | 2487 | u32                                         maxImageCount | 
|  | 2488 | VkExtent2D                                  currentExtent | 
|  | 2489 | VkExtent2D                                  minImageExtent | 
|  | 2490 | VkExtent2D                                  maxImageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2491 | u32                                         maxImageArrayLayers | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2492 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2493 | VkSurfaceTransformFlagBitsKHR               currentTransform | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2494 | VkCompositeAlphaFlagsKHR                    supportedCompositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2495 | VkImageUsageFlags                           supportedUsageFlags | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2496 | } | 
|  | 2497 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2498 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2499 | class VkSurfaceFormatKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2500 | VkFormat                                    format | 
|  | 2501 | VkColorSpaceKHR                             colorSpace | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2502 | } | 
|  | 2503 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2504 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2505 | class VkSwapchainCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2506 | VkStructureType                             sType | 
|  | 2507 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2508 | VkSwapchainCreateFlagsKHR                   flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2509 | VkSurfaceKHR                                surface | 
|  | 2510 | u32                                         minImageCount | 
|  | 2511 | VkFormat                                    imageFormat | 
|  | 2512 | VkColorSpaceKHR                             imageColorSpace | 
|  | 2513 | VkExtent2D                                  imageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2514 | u32                                         imageArrayLayers | 
|  | 2515 | VkImageUsageFlags                           imageUsage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2516 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2517 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2518 | const u32*                                  pQueueFamilyIndices | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2519 | VkSurfaceTransformFlagBitsKHR               preTransform | 
|  | 2520 | VkCompositeAlphaFlagBitsKHR                 compositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2521 | VkPresentModeKHR                            presentMode | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2522 | VkBool32                                    clipped | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2523 | VkSwapchainKHR                              oldSwapchain | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2524 | } | 
|  | 2525 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2526 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2527 | class VkPresentInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2528 | VkStructureType                             sType | 
|  | 2529 | const void*                                 pNext | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2530 | u32                                         waitSemaphoreCount | 
|  | 2531 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2532 | u32                                         swapchainCount | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2533 | const VkSwapchainKHR*                       pSwapchains | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2534 | const u32*                                  pImageIndices | 
| Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2535 | VkResult*                                   pResults | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2536 | } | 
|  | 2537 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2538 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2539 | class VkDisplayPropertiesKHR { | 
|  | 2540 | VkDisplayKHR                                display | 
|  | 2541 | const char*                                 displayName | 
|  | 2542 | VkExtent2D                                  physicalDimensions | 
|  | 2543 | VkExtent2D                                  physicalResolution | 
|  | 2544 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2545 | VkBool32                                    planeReorderPossible | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2546 | VkBool32                                    persistentContent | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2547 | } | 
|  | 2548 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2549 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2550 | class VkDisplayModeParametersKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2551 | VkExtent2D                                  visibleRegion | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2552 | u32                                         refreshRate | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2553 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2554 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2555 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2556 | class VkDisplayModePropertiesKHR { | 
|  | 2557 | VkDisplayModeKHR                            displayMode | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2558 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2559 | } | 
|  | 2560 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2561 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2562 | class VkDisplayModeCreateInfoKHR { | 
|  | 2563 | VkStructureType                             sType | 
|  | 2564 | const void*                                 pNext | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2565 | VkDisplayModeCreateFlagsKHR                 flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2566 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2567 | } | 
|  | 2568 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2569 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2570 | class VkDisplayPlanePropertiesKHR { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2571 | VkDisplayKHR                                currentDisplay | 
|  | 2572 | u32                                         currentStackIndex | 
|  | 2573 | } | 
|  | 2574 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2575 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2576 | class VkDisplayPlaneCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2577 | VkDisplayPlaneAlphaFlagsKHR                 supportedAlpha | 
|  | 2578 | VkOffset2D                                  minSrcPosition | 
|  | 2579 | VkOffset2D                                  maxSrcPosition | 
|  | 2580 | VkExtent2D                                  minSrcExtent | 
|  | 2581 | VkExtent2D                                  maxSrcExtent | 
|  | 2582 | VkOffset2D                                  minDstPosition | 
|  | 2583 | VkOffset2D                                  maxDstPosition | 
|  | 2584 | VkExtent2D                                  minDstExtent | 
|  | 2585 | VkExtent2D                                  maxDstExtent | 
|  | 2586 | } | 
|  | 2587 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2588 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2589 | class VkDisplaySurfaceCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2590 | VkStructureType                             sType | 
|  | 2591 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2592 | VkDisplaySurfaceCreateFlagsKHR              flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2593 | VkDisplayModeKHR                            displayMode | 
|  | 2594 | u32                                         planeIndex | 
|  | 2595 | u32                                         planeStackIndex | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2596 | VkSurfaceTransformFlagBitsKHR               transform | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2597 | f32                                         globalAlpha | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2598 | VkDisplayPlaneAlphaFlagBitsKHR              alphaMode | 
|  | 2599 | VkExtent2D                                  imageExtent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2600 | } | 
|  | 2601 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2602 | @extension("VK_KHR_display_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2603 | class VkDisplayPresentInfoKHR { | 
|  | 2604 | VkStructureType                             sType | 
|  | 2605 | const void*                                 pNext | 
|  | 2606 | VkRect2D                                    srcRect | 
|  | 2607 | VkRect2D                                    dstRect | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2608 | VkBool32                                    persistent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2609 | } | 
|  | 2610 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2611 | @extension("VK_KHR_xlib_surface") | 
|  | 2612 | class VkXlibSurfaceCreateInfoKHR { | 
|  | 2613 | VkStructureType                             sType | 
|  | 2614 | const void*                                 pNext | 
|  | 2615 | VkXlibSurfaceCreateFlagsKHR                 flags | 
|  | 2616 | platform.Display*                           dpy | 
|  | 2617 | platform.Window                             window | 
|  | 2618 | } | 
|  | 2619 |  | 
|  | 2620 | @extension("VK_KHR_xcb_surface") | 
|  | 2621 | class VkXcbSurfaceCreateInfoKHR { | 
|  | 2622 | VkStructureType                             sType | 
|  | 2623 | const void*                                 pNext | 
|  | 2624 | VkXcbSurfaceCreateFlagsKHR                  flags | 
|  | 2625 | platform.xcb_connection_t*                  connection | 
|  | 2626 | platform.xcb_window_t                       window | 
|  | 2627 | } | 
|  | 2628 |  | 
|  | 2629 | @extension("VK_KHR_wayland_surface") | 
|  | 2630 | class VkWaylandSurfaceCreateInfoKHR { | 
|  | 2631 | VkStructureType                             sType | 
|  | 2632 | const void*                                 pNext | 
|  | 2633 | VkWaylandSurfaceCreateFlagsKHR              flags | 
|  | 2634 | platform.wl_display*                        display | 
|  | 2635 | platform.wl_surface*                        surface | 
|  | 2636 | } | 
|  | 2637 |  | 
|  | 2638 | @extension("VK_KHR_mir_surface") | 
|  | 2639 | class VkMirSurfaceCreateInfoKHR { | 
|  | 2640 | VkStructureType                             sType | 
|  | 2641 | const void*                                 pNext | 
|  | 2642 | VkMirSurfaceCreateFlagsKHR                  flags | 
|  | 2643 | platform.MirConnection*                     connection | 
|  | 2644 | platform.MirSurface*                        mirSurface | 
|  | 2645 | } | 
|  | 2646 |  | 
|  | 2647 | @extension("VK_KHR_android_surface") | 
|  | 2648 | class VkAndroidSurfaceCreateInfoKHR { | 
|  | 2649 | VkStructureType                             sType | 
|  | 2650 | const void*                                 pNext | 
|  | 2651 | VkAndroidSurfaceCreateFlagsKHR              flags | 
|  | 2652 | platform.ANativeWindow*                     window | 
|  | 2653 | } | 
|  | 2654 |  | 
|  | 2655 | @extension("VK_KHR_win32_surface") | 
|  | 2656 | class VkWin32SurfaceCreateInfoKHR { | 
|  | 2657 | VkStructureType                             sType | 
|  | 2658 | const void*                                 pNext | 
|  | 2659 | VkWin32SurfaceCreateFlagsKHR                flags | 
|  | 2660 | platform.HINSTANCE                          hinstance | 
|  | 2661 | platform.HWND                               hwnd | 
|  | 2662 | } | 
|  | 2663 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2664 | @extension("VK_ANDROID_native_buffer") | 
|  | 2665 | class VkNativeBufferANDROID { | 
|  | 2666 | VkStructureType                             sType | 
|  | 2667 | const void*                                 pNext | 
|  | 2668 | platform.buffer_handle_t                    handle | 
|  | 2669 | int                                         stride | 
|  | 2670 | int                                         format | 
|  | 2671 | int                                         usage | 
|  | 2672 | } | 
|  | 2673 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2674 | @extension("VK_EXT_debug_report") | 
|  | 2675 | class VkDebugReportCallbackCreateInfoEXT { | 
|  | 2676 | VkStructureType                             sType | 
|  | 2677 | const void*                                 pNext | 
|  | 2678 | VkDebugReportFlagsEXT                       flags | 
|  | 2679 | PFN_vkDebugReportCallbackEXT                pfnCallback | 
|  | 2680 | void*                                       pUserData | 
|  | 2681 | } | 
|  | 2682 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2683 | @extension("VK_AMD_rasterization_order") | 
|  | 2684 | class VkPipelineRasterizationStateRasterizationOrderAMD { | 
|  | 2685 | VkStructureType                             sType | 
|  | 2686 | const void*                                 pNext | 
|  | 2687 | VkRasterizationOrderAMD                     rasterizationOrder | 
|  | 2688 | } | 
|  | 2689 |  | 
|  | 2690 | @extension("VK_EXT_debug_marker") | 
|  | 2691 | class VkDebugMarkerObjectNameInfoEXT { | 
|  | 2692 | VkStructureType                             sType | 
|  | 2693 | const void*                                 pNext | 
|  | 2694 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2695 | u64                                         object | 
|  | 2696 | const char*                                 pObjectName | 
|  | 2697 | } | 
|  | 2698 |  | 
|  | 2699 | @extension("VK_EXT_debug_marker") | 
|  | 2700 | class VkDebugMarkerObjectTagInfoEXT { | 
|  | 2701 | VkStructureType                             sType | 
|  | 2702 | const void*                                 pNext | 
|  | 2703 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2704 | u64                                         object | 
|  | 2705 | u64                                         tagName | 
|  | 2706 | platform.size_t                             tagSize | 
|  | 2707 | const void*                                 pTag | 
|  | 2708 | } | 
|  | 2709 |  | 
|  | 2710 | @extension("VK_EXT_debug_marker") | 
|  | 2711 | class VkDebugMarkerMarkerInfoEXT { | 
|  | 2712 | VkStructureType                             sType | 
|  | 2713 | const void*                                 pNext | 
|  | 2714 | const char*                                 pMarkerName | 
|  | 2715 | f32[4]                                      color | 
|  | 2716 | } | 
|  | 2717 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2718 | @extension("VK_NV_dedicated_allocation") | 
|  | 2719 | class VkDedicatedAllocationImageCreateInfoNV { | 
|  | 2720 | VkStructureType                             sType | 
|  | 2721 | const void*                                 pNext | 
|  | 2722 | VkBool32                                    dedicatedAllocation | 
|  | 2723 | } | 
|  | 2724 |  | 
|  | 2725 | @extension("VK_NV_dedicated_allocation") | 
|  | 2726 | class VkDedicatedAllocationBufferCreateInfoNV { | 
|  | 2727 | VkStructureType                             sType | 
|  | 2728 | const void*                                 pNext | 
|  | 2729 | VkBool32                                    dedicatedAllocation | 
|  | 2730 | } | 
|  | 2731 |  | 
|  | 2732 | @extension("VK_NV_dedicated_allocation") | 
|  | 2733 | class VkDedicatedAllocationMemoryAllocateInfoNV { | 
|  | 2734 | VkStructureType                             sType | 
|  | 2735 | const void*                                 pNext | 
|  | 2736 | VkImage                                     image | 
|  | 2737 | VkBuffer                                    buffer | 
|  | 2738 | } | 
|  | 2739 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2740 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2741 | //////////////// | 
|  | 2742 | //  Commands  // | 
|  | 2743 | //////////////// | 
|  | 2744 |  | 
|  | 2745 | // Function pointers. TODO: add support for function pointers. | 
|  | 2746 |  | 
|  | 2747 | @external type void* PFN_vkVoidFunction | 
|  | 2748 | @pfn cmd void vkVoidFunction() { | 
|  | 2749 | } | 
|  | 2750 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2751 | @external type void* PFN_vkAllocationFunction | 
|  | 2752 | @pfn cmd void* vkAllocationFunction( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2753 | void*                                       pUserData, | 
|  | 2754 | platform.size_t                             size, | 
|  | 2755 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2756 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2757 | return ? | 
|  | 2758 | } | 
|  | 2759 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2760 | @external type void* PFN_vkReallocationFunction | 
|  | 2761 | @pfn cmd void* vkReallocationFunction( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2762 | void*                                       pUserData, | 
|  | 2763 | void*                                       pOriginal, | 
|  | 2764 | platform.size_t                             size, | 
|  | 2765 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2766 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2767 | return ? | 
|  | 2768 | } | 
|  | 2769 |  | 
|  | 2770 | @external type void* PFN_vkFreeFunction | 
|  | 2771 | @pfn cmd void vkFreeFunction( | 
|  | 2772 | void*                                       pUserData, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2773 | void*                                       pMemory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2774 | } | 
|  | 2775 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2776 | @external type void* PFN_vkInternalAllocationNotification | 
|  | 2777 | @pfn cmd void vkInternalAllocationNotification( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2778 | void*                                       pUserData, | 
|  | 2779 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2780 | VkInternalAllocationType                    allocationType, | 
|  | 2781 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2782 | } | 
|  | 2783 |  | 
|  | 2784 | @external type void* PFN_vkInternalFreeNotification | 
|  | 2785 | @pfn cmd void vkInternalFreeNotification( | 
|  | 2786 | void*                                       pUserData, | 
|  | 2787 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2788 | VkInternalAllocationType                    allocationType, | 
|  | 2789 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2790 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2791 |  | 
|  | 2792 | // Global functions | 
|  | 2793 |  | 
|  | 2794 | @threadSafety("system") | 
|  | 2795 | cmd VkResult vkCreateInstance( | 
|  | 2796 | const VkInstanceCreateInfo*                 pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2797 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2798 | VkInstance*                                 pInstance) { | 
|  | 2799 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) | 
|  | 2800 |  | 
|  | 2801 | instance := ? | 
|  | 2802 | pInstance[0] = instance | 
|  | 2803 | State.Instances[instance] = new!InstanceObject() | 
|  | 2804 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2805 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] | 
|  | 2806 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2807 |  | 
|  | 2808 | return ? | 
|  | 2809 | } | 
|  | 2810 |  | 
|  | 2811 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2812 | cmd void vkDestroyInstance( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2813 | VkInstance                                  instance, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2814 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2815 | instanceObject := GetInstance(instance) | 
|  | 2816 |  | 
|  | 2817 | State.Instances[instance] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2818 | } | 
|  | 2819 |  | 
|  | 2820 | @threadSafety("system") | 
|  | 2821 | cmd VkResult vkEnumeratePhysicalDevices( | 
|  | 2822 | VkInstance                                  instance, | 
|  | 2823 | u32*                                        pPhysicalDeviceCount, | 
|  | 2824 | VkPhysicalDevice*                           pPhysicalDevices) { | 
|  | 2825 | instanceObject := GetInstance(instance) | 
|  | 2826 |  | 
|  | 2827 | physicalDeviceCount := as!u32(?) | 
|  | 2828 | pPhysicalDeviceCount[0] = physicalDeviceCount | 
|  | 2829 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] | 
|  | 2830 |  | 
|  | 2831 | for i in (0 .. physicalDeviceCount) { | 
|  | 2832 | physicalDevice := ? | 
|  | 2833 | physicalDevices[i] = physicalDevice | 
|  | 2834 | if !(physicalDevice in State.PhysicalDevices) { | 
|  | 2835 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) | 
|  | 2836 | } | 
|  | 2837 | } | 
|  | 2838 |  | 
|  | 2839 | return ? | 
|  | 2840 | } | 
|  | 2841 |  | 
|  | 2842 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( | 
|  | 2843 | VkDevice                                    device, | 
|  | 2844 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2845 | if device != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2846 | device := GetDevice(device) | 
|  | 2847 | } | 
|  | 2848 |  | 
|  | 2849 | return ? | 
|  | 2850 | } | 
|  | 2851 |  | 
|  | 2852 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( | 
|  | 2853 | VkInstance                                  instance, | 
|  | 2854 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2855 | if instance != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2856 | instanceObject := GetInstance(instance) | 
|  | 2857 | } | 
|  | 2858 |  | 
|  | 2859 | return ? | 
|  | 2860 | } | 
|  | 2861 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 2862 | cmd void vkGetPhysicalDeviceProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2863 | VkPhysicalDevice                            physicalDevice, | 
|  | 2864 | VkPhysicalDeviceProperties*                 pProperties) { | 
|  | 2865 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2866 |  | 
|  | 2867 | properties := ? | 
|  | 2868 | pProperties[0] = properties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2869 | } | 
|  | 2870 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 2871 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2872 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2873 | u32*                                        pQueueFamilyPropertyCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2874 | VkQueueFamilyProperties*                    pQueueFamilyProperties) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2875 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2876 | // TODO: Figure out how to express fetch-count-or-properties | 
|  | 2877 | // This version fails 'apic validate' with 'fence not allowed in | 
|  | 2878 | // *semantic.Branch'. Other attempts have failed with the same or other | 
|  | 2879 | // errors. | 
|  | 2880 | // if pQueueFamilyProperties != null { | 
|  | 2881 | //     queuesProperties := pQueueFamilyProperties[0:pCount[0]] | 
|  | 2882 | //     for i in (0 .. pCount[0]) { | 
|  | 2883 | //         queueProperties := as!VkQueueFamilyProperties(?) | 
|  | 2884 | //         queuesProperties[i] = queueProperties | 
|  | 2885 | //    } | 
|  | 2886 | // } else { | 
|  | 2887 | //     count := ? | 
|  | 2888 | //     pCount[0] = count | 
|  | 2889 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2890 | } | 
|  | 2891 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 2892 | cmd void vkGetPhysicalDeviceMemoryProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2893 | VkPhysicalDevice                            physicalDevice, | 
|  | 2894 | VkPhysicalDeviceMemoryProperties*           pMemoryProperties) { | 
|  | 2895 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2896 |  | 
|  | 2897 | memoryProperties := ? | 
|  | 2898 | pMemoryProperties[0] = memoryProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2899 | } | 
|  | 2900 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 2901 | cmd void vkGetPhysicalDeviceFeatures( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2902 | VkPhysicalDevice                            physicalDevice, | 
|  | 2903 | VkPhysicalDeviceFeatures*                   pFeatures) { | 
|  | 2904 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2905 |  | 
|  | 2906 | features := ? | 
|  | 2907 | pFeatures[0] = features | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2908 | } | 
|  | 2909 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 2910 | cmd void vkGetPhysicalDeviceFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2911 | VkPhysicalDevice                            physicalDevice, | 
|  | 2912 | VkFormat                                    format, | 
|  | 2913 | VkFormatProperties*                         pFormatProperties) { | 
|  | 2914 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2915 |  | 
|  | 2916 | formatProperties := ? | 
|  | 2917 | pFormatProperties[0] = formatProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2918 | } | 
|  | 2919 |  | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 2920 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2921 | VkPhysicalDevice                            physicalDevice, | 
|  | 2922 | VkFormat                                    format, | 
|  | 2923 | VkImageType                                 type, | 
|  | 2924 | VkImageTiling                               tiling, | 
|  | 2925 | VkImageUsageFlags                           usage, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2926 | VkImageCreateFlags                          flags, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2927 | VkImageFormatProperties*                    pImageFormatProperties) { | 
|  | 2928 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2929 |  | 
|  | 2930 | imageFormatProperties := ? | 
|  | 2931 | pImageFormatProperties[0] = imageFormatProperties | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 2932 |  | 
|  | 2933 | return ? | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2934 | } | 
|  | 2935 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2936 |  | 
|  | 2937 | // Device functions | 
|  | 2938 |  | 
|  | 2939 | @threadSafety("system") | 
|  | 2940 | cmd VkResult vkCreateDevice( | 
|  | 2941 | VkPhysicalDevice                            physicalDevice, | 
|  | 2942 | const VkDeviceCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2943 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2944 | VkDevice*                                   pDevice) { | 
|  | 2945 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) | 
|  | 2946 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 2947 |  | 
|  | 2948 | device := ? | 
|  | 2949 | pDevice[0] = device | 
|  | 2950 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) | 
|  | 2951 |  | 
|  | 2952 | return ? | 
|  | 2953 | } | 
|  | 2954 |  | 
|  | 2955 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2956 | cmd void vkDestroyDevice( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2957 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2958 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2959 | deviceObject := GetDevice(device) | 
|  | 2960 |  | 
|  | 2961 | State.Devices[device] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2962 | } | 
|  | 2963 |  | 
|  | 2964 |  | 
|  | 2965 | // Extension discovery functions | 
|  | 2966 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2967 | cmd VkResult vkEnumerateInstanceLayerProperties( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2968 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2969 | VkLayerProperties*                          pProperties) { | 
|  | 2970 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2971 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2972 |  | 
|  | 2973 | properties := pProperties[0:count] | 
|  | 2974 | for i in (0 .. count) { | 
|  | 2975 | property := ? | 
|  | 2976 | properties[i] = property | 
|  | 2977 | } | 
|  | 2978 |  | 
|  | 2979 | return ? | 
|  | 2980 | } | 
|  | 2981 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2982 | cmd VkResult vkEnumerateInstanceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2983 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2984 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2985 | VkExtensionProperties*                      pProperties) { | 
|  | 2986 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2987 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2988 |  | 
|  | 2989 | properties := pProperties[0:count] | 
|  | 2990 | for i in (0 .. count) { | 
|  | 2991 | property := ? | 
|  | 2992 | properties[i] = property | 
|  | 2993 | } | 
|  | 2994 |  | 
|  | 2995 | return ? | 
|  | 2996 | } | 
|  | 2997 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2998 | cmd VkResult vkEnumerateDeviceLayerProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2999 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3000 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3001 | VkLayerProperties*                          pProperties) { | 
|  | 3002 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3003 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3004 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3005 |  | 
|  | 3006 | properties := pProperties[0:count] | 
|  | 3007 | for i in (0 .. count) { | 
|  | 3008 | property := ? | 
|  | 3009 | properties[i] = property | 
|  | 3010 | } | 
|  | 3011 |  | 
|  | 3012 | return ? | 
|  | 3013 | } | 
|  | 3014 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3015 | cmd VkResult vkEnumerateDeviceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3016 | VkPhysicalDevice                            physicalDevice, | 
|  | 3017 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3018 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3019 | VkExtensionProperties*                      pProperties) { | 
|  | 3020 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3021 |  | 
|  | 3022 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3023 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3024 |  | 
|  | 3025 | properties := pProperties[0:count] | 
|  | 3026 | for i in (0 .. count) { | 
|  | 3027 | property := ? | 
|  | 3028 | properties[i] = property | 
|  | 3029 | } | 
|  | 3030 |  | 
|  | 3031 | return ? | 
|  | 3032 | } | 
|  | 3033 |  | 
|  | 3034 |  | 
|  | 3035 | // Queue functions | 
|  | 3036 |  | 
|  | 3037 | @threadSafety("system") | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3038 | cmd void vkGetDeviceQueue( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3039 | VkDevice                                    device, | 
|  | 3040 | u32                                         queueFamilyIndex, | 
|  | 3041 | u32                                         queueIndex, | 
|  | 3042 | VkQueue*                                    pQueue) { | 
|  | 3043 | deviceObject := GetDevice(device) | 
|  | 3044 |  | 
|  | 3045 | queue := ? | 
|  | 3046 | pQueue[0] = queue | 
|  | 3047 |  | 
|  | 3048 | if !(queue in State.Queues) { | 
|  | 3049 | State.Queues[queue] = new!QueueObject(device: device) | 
|  | 3050 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3051 | } | 
|  | 3052 |  | 
|  | 3053 | @threadSafety("app") | 
|  | 3054 | cmd VkResult vkQueueSubmit( | 
|  | 3055 | VkQueue                                     queue, | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3056 | u32                                         submitCount, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3057 | const VkSubmitInfo*                         pSubmits, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3058 | VkFence                                     fence) { | 
|  | 3059 | queueObject := GetQueue(queue) | 
|  | 3060 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3061 | if fence != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3062 | fenceObject := GetFence(fence) | 
|  | 3063 | assert(fenceObject.device == queueObject.device) | 
|  | 3064 | } | 
|  | 3065 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3066 | // commandBuffers := pcommandBuffers[0:commandBufferCount] | 
|  | 3067 | // for i in (0 .. commandBufferCount) { | 
|  | 3068 | //    commandBuffer := commandBuffers[i] | 
|  | 3069 | //    commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 3070 | //    assert(commandBufferObject.device == queueObject.device) | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3071 | // | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3072 | //    validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, | 
|  | 3073 | //        "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3074 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3075 |  | 
|  | 3076 | return ? | 
|  | 3077 | } | 
|  | 3078 |  | 
|  | 3079 | @threadSafety("system") | 
|  | 3080 | cmd VkResult vkQueueWaitIdle( | 
|  | 3081 | VkQueue                                     queue) { | 
|  | 3082 | queueObject := GetQueue(queue) | 
|  | 3083 |  | 
|  | 3084 | return ? | 
|  | 3085 | } | 
|  | 3086 |  | 
|  | 3087 | @threadSafety("system") | 
|  | 3088 | cmd VkResult vkDeviceWaitIdle( | 
|  | 3089 | VkDevice                                    device) { | 
|  | 3090 | deviceObject := GetDevice(device) | 
|  | 3091 |  | 
|  | 3092 | return ? | 
|  | 3093 | } | 
|  | 3094 |  | 
|  | 3095 |  | 
|  | 3096 | // Memory functions | 
|  | 3097 |  | 
|  | 3098 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3099 | cmd VkResult vkAllocateMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3100 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3101 | const VkMemoryAllocateInfo*                 pAllocateInfo, | 
|  | 3102 | const VkAllocationCallbacks*                pAllocator, | 
|  | 3103 | VkDeviceMemory*                             pMemory) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3104 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3105 | deviceObject := GetDevice(device) | 
|  | 3106 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3107 | memory := ? | 
|  | 3108 | pMemory[0] = memory | 
|  | 3109 | State.DeviceMemories[memory] = new!DeviceMemoryObject( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3110 | device: device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3111 | allocationSize: pAllocateInfo[0].allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3112 |  | 
|  | 3113 | return ? | 
|  | 3114 | } | 
|  | 3115 |  | 
|  | 3116 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3117 | cmd void vkFreeMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3118 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3119 | VkDeviceMemory                              memory, | 
|  | 3120 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3121 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3122 | memoryObject := GetDeviceMemory(memory) | 
|  | 3123 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3124 |  | 
|  | 3125 | // Check that no objects are still bound before freeing. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3126 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3127 | "vkFreeMemory: objects still bound") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3128 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, | 
|  | 3129 | "vkFreeMemory: commandBuffers still bound") | 
|  | 3130 | State.DeviceMemories[memory] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3131 | } | 
|  | 3132 |  | 
|  | 3133 | @threadSafety("app") | 
|  | 3134 | cmd VkResult vkMapMemory( | 
|  | 3135 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3136 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3137 | VkDeviceSize                                offset, | 
|  | 3138 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3139 | VkMemoryMapFlags                            flags, | 
|  | 3140 | void**                                      ppData) { | 
|  | 3141 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3142 | memoryObject := GetDeviceMemory(memory) | 
|  | 3143 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3144 |  | 
|  | 3145 | assert(flags == as!VkMemoryMapFlags(0)) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3146 | assert((offset + size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3147 |  | 
|  | 3148 | return ? | 
|  | 3149 | } | 
|  | 3150 |  | 
|  | 3151 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3152 | cmd void vkUnmapMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3153 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3154 | VkDeviceMemory                              memory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3155 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3156 | memoryObject := GetDeviceMemory(memory) | 
|  | 3157 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3158 | } | 
|  | 3159 |  | 
|  | 3160 | cmd VkResult vkFlushMappedMemoryRanges( | 
|  | 3161 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3162 | u32                                         memoryRangeCount | 
|  | 3163 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3164 | deviceObject := GetDevice(device) | 
|  | 3165 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3166 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3167 | for i in (0 .. memoryRangeCount) { | 
|  | 3168 | memoryRange := memoryRanges[i] | 
|  | 3169 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3170 | assert(memoryObject.device == device) | 
|  | 3171 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3172 | } | 
|  | 3173 |  | 
|  | 3174 | return ? | 
|  | 3175 | } | 
|  | 3176 |  | 
|  | 3177 | cmd VkResult vkInvalidateMappedMemoryRanges( | 
|  | 3178 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3179 | u32                                         memoryRangeCount, | 
|  | 3180 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3181 | deviceObject := GetDevice(device) | 
|  | 3182 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3183 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3184 | for i in (0 .. memoryRangeCount) { | 
|  | 3185 | memoryRange := memoryRanges[i] | 
|  | 3186 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3187 | assert(memoryObject.device == device) | 
|  | 3188 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3189 | } | 
|  | 3190 |  | 
|  | 3191 | return ? | 
|  | 3192 | } | 
|  | 3193 |  | 
|  | 3194 |  | 
|  | 3195 | // Memory management API functions | 
|  | 3196 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3197 | cmd void vkGetDeviceMemoryCommitment( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3198 | VkDevice                                    device, | 
|  | 3199 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3200 | VkDeviceSize*                               pCommittedMemoryInBytes) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3201 | deviceObject := GetDevice(device) | 
|  | 3202 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3203 | if memory != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3204 | memoryObject := GetDeviceMemory(memory) | 
|  | 3205 | assert(memoryObject.device == device) | 
|  | 3206 | } | 
|  | 3207 |  | 
|  | 3208 | committedMemoryInBytes := ? | 
|  | 3209 | pCommittedMemoryInBytes[0] = committedMemoryInBytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3210 | } | 
|  | 3211 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3212 | cmd void vkGetBufferMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3213 | VkDevice                                    device, | 
|  | 3214 | VkBuffer                                    buffer, | 
|  | 3215 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3216 | deviceObject := GetDevice(device) | 
|  | 3217 | bufferObject := GetBuffer(buffer) | 
|  | 3218 | assert(bufferObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3219 | } | 
|  | 3220 |  | 
|  | 3221 | cmd VkResult vkBindBufferMemory( | 
|  | 3222 | VkDevice                                    device, | 
|  | 3223 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3224 | VkDeviceMemory                              memory, | 
|  | 3225 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3226 | deviceObject := GetDevice(device) | 
|  | 3227 | bufferObject := GetBuffer(buffer) | 
|  | 3228 | assert(bufferObject.device == device) | 
|  | 3229 |  | 
|  | 3230 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3231 | if bufferObject.memory != NULL_HANDLE { | 
|  | 3232 | memoryObject := GetDeviceMemory(bufferObject.memory) | 
|  | 3233 | memoryObject.boundObjects[as!u64(buffer)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3234 | } | 
|  | 3235 |  | 
|  | 3236 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3237 | if memory != NULL_HANDLE { | 
|  | 3238 | memoryObject := GetDeviceMemory(memory) | 
|  | 3239 | assert(memoryObject.device == device) | 
|  | 3240 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3241 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3242 | bufferObject.memory = memory | 
|  | 3243 | bufferObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3244 |  | 
|  | 3245 | return ? | 
|  | 3246 | } | 
|  | 3247 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3248 | cmd void vkGetImageMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3249 | VkDevice                                    device, | 
|  | 3250 | VkImage                                     image, | 
|  | 3251 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3252 | deviceObject := GetDevice(device) | 
|  | 3253 | imageObject := GetImage(image) | 
|  | 3254 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3255 | } | 
|  | 3256 |  | 
|  | 3257 | cmd VkResult vkBindImageMemory( | 
|  | 3258 | VkDevice                                    device, | 
|  | 3259 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3260 | VkDeviceMemory                              memory, | 
|  | 3261 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3262 | deviceObject := GetDevice(device) | 
|  | 3263 | imageObject := GetImage(image) | 
|  | 3264 | assert(imageObject.device == device) | 
|  | 3265 |  | 
|  | 3266 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3267 | if imageObject.memory != NULL_HANDLE { | 
|  | 3268 | memoryObject := GetDeviceMemory(imageObject.memory) | 
|  | 3269 | memoryObject.boundObjects[as!u64(image)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3270 | } | 
|  | 3271 |  | 
|  | 3272 | // Bind image to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3273 | if memory != NULL_HANDLE { | 
|  | 3274 | memoryObject := GetDeviceMemory(memory) | 
|  | 3275 | assert(memoryObject.device == device) | 
|  | 3276 | memoryObject.boundObjects[as!u64(image)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3277 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3278 | imageObject.memory = memory | 
|  | 3279 | imageObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3280 |  | 
|  | 3281 | return ? | 
|  | 3282 | } | 
|  | 3283 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3284 | cmd void vkGetImageSparseMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3285 | VkDevice                                    device, | 
|  | 3286 | VkImage                                     image, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3287 | u32*                                        pSparseMemoryRequirementCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3288 | VkSparseImageMemoryRequirements*            pSparseMemoryRequirements) { | 
|  | 3289 | deviceObject := GetDevice(device) | 
|  | 3290 | imageObject := GetImage(image) | 
|  | 3291 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3292 | } | 
|  | 3293 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3294 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3295 | VkPhysicalDevice                            physicalDevice, | 
|  | 3296 | VkFormat                                    format, | 
|  | 3297 | VkImageType                                 type, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3298 | VkSampleCountFlagBits                       samples, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3299 | VkImageUsageFlags                           usage, | 
|  | 3300 | VkImageTiling                               tiling, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3301 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3302 | VkSparseImageFormatProperties*              pProperties) { | 
|  | 3303 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3304 | } | 
|  | 3305 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3306 | cmd VkResult vkQueueBindSparse( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3307 | VkQueue                                     queue, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3308 | u32                                         bindInfoCount, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3309 | const VkBindSparseInfo*                     pBindInfo, | 
|  | 3310 | VkFence                                     fence) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3311 | queueObject := GetQueue(queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3312 |  | 
|  | 3313 | return ? | 
|  | 3314 | } | 
|  | 3315 |  | 
|  | 3316 |  | 
|  | 3317 | // Fence functions | 
|  | 3318 |  | 
|  | 3319 | @threadSafety("system") | 
|  | 3320 | cmd VkResult vkCreateFence( | 
|  | 3321 | VkDevice                                    device, | 
|  | 3322 | const VkFenceCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3323 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3324 | VkFence*                                    pFence) { | 
|  | 3325 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) | 
|  | 3326 | deviceObject := GetDevice(device) | 
|  | 3327 |  | 
|  | 3328 | fence := ? | 
|  | 3329 | pFence[0] = fence | 
|  | 3330 | State.Fences[fence] = new!FenceObject( | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3331 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3332 |  | 
|  | 3333 | return ? | 
|  | 3334 | } | 
|  | 3335 |  | 
|  | 3336 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3337 | cmd void vkDestroyFence( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3338 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3339 | VkFence                                     fence, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3340 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3341 | deviceObject := GetDevice(device) | 
|  | 3342 | fenceObject := GetFence(fence) | 
|  | 3343 | assert(fenceObject.device == device) | 
|  | 3344 |  | 
|  | 3345 | State.Fences[fence] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3346 | } | 
|  | 3347 |  | 
|  | 3348 | @threadSafety("system") | 
|  | 3349 | cmd VkResult vkResetFences( | 
|  | 3350 | VkDevice                                    device, | 
|  | 3351 | u32                                         fenceCount, | 
|  | 3352 | const VkFence*                              pFences) { | 
|  | 3353 | deviceObject := GetDevice(device) | 
|  | 3354 |  | 
|  | 3355 | fences := pFences[0:fenceCount] | 
|  | 3356 | for i in (0 .. fenceCount) { | 
|  | 3357 | fence := fences[i] | 
|  | 3358 | fenceObject := GetFence(fence) | 
|  | 3359 | assert(fenceObject.device == device) | 
|  | 3360 | fenceObject.signaled = false | 
|  | 3361 | } | 
|  | 3362 |  | 
|  | 3363 | return ? | 
|  | 3364 | } | 
|  | 3365 |  | 
|  | 3366 | @threadSafety("system") | 
|  | 3367 | cmd VkResult vkGetFenceStatus( | 
|  | 3368 | VkDevice                                    device, | 
|  | 3369 | VkFence                                     fence) { | 
|  | 3370 | deviceObject := GetDevice(device) | 
|  | 3371 | fenceObject := GetFence(fence) | 
|  | 3372 | assert(fenceObject.device == device) | 
|  | 3373 |  | 
|  | 3374 | return ? | 
|  | 3375 | } | 
|  | 3376 |  | 
|  | 3377 | @threadSafety("system") | 
|  | 3378 | cmd VkResult vkWaitForFences( | 
|  | 3379 | VkDevice                                    device, | 
|  | 3380 | u32                                         fenceCount, | 
|  | 3381 | const VkFence*                              pFences, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3382 | VkBool32                                    waitAll, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3383 | u64                                         timeout) {  /// timeout in nanoseconds | 
|  | 3384 | deviceObject := GetDevice(device) | 
|  | 3385 |  | 
|  | 3386 | fences := pFences[0:fenceCount] | 
|  | 3387 | for i in (0 .. fenceCount) { | 
|  | 3388 | fence := fences[i] | 
|  | 3389 | fenceObject := GetFence(fence) | 
|  | 3390 | assert(fenceObject.device == device) | 
|  | 3391 | } | 
|  | 3392 |  | 
|  | 3393 | return ? | 
|  | 3394 | } | 
|  | 3395 |  | 
|  | 3396 |  | 
|  | 3397 | // Queue semaphore functions | 
|  | 3398 |  | 
|  | 3399 | @threadSafety("system") | 
|  | 3400 | cmd VkResult vkCreateSemaphore( | 
|  | 3401 | VkDevice                                    device, | 
|  | 3402 | const VkSemaphoreCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3403 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3404 | VkSemaphore*                                pSemaphore) { | 
|  | 3405 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) | 
|  | 3406 | deviceObject := GetDevice(device) | 
|  | 3407 |  | 
|  | 3408 | semaphore := ? | 
|  | 3409 | pSemaphore[0] = semaphore | 
|  | 3410 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) | 
|  | 3411 |  | 
|  | 3412 | return ? | 
|  | 3413 | } | 
|  | 3414 |  | 
|  | 3415 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3416 | cmd void vkDestroySemaphore( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3417 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3418 | VkSemaphore                                 semaphore, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3419 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3420 | deviceObject := GetDevice(device) | 
|  | 3421 | semaphoreObject := GetSemaphore(semaphore) | 
|  | 3422 | assert(semaphoreObject.device == device) | 
|  | 3423 |  | 
|  | 3424 | State.Semaphores[semaphore] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3425 | } | 
|  | 3426 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3427 |  | 
|  | 3428 | // Event functions | 
|  | 3429 |  | 
|  | 3430 | @threadSafety("system") | 
|  | 3431 | cmd VkResult vkCreateEvent( | 
|  | 3432 | VkDevice                                    device, | 
|  | 3433 | const VkEventCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3434 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3435 | VkEvent*                                    pEvent) { | 
|  | 3436 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) | 
|  | 3437 | deviceObject := GetDevice(device) | 
|  | 3438 |  | 
|  | 3439 | event := ? | 
|  | 3440 | pEvent[0] = event | 
|  | 3441 | State.Events[event] = new!EventObject(device: device) | 
|  | 3442 |  | 
|  | 3443 | return ? | 
|  | 3444 | } | 
|  | 3445 |  | 
|  | 3446 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3447 | cmd void vkDestroyEvent( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3448 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3449 | VkEvent                                     event, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3450 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3451 | deviceObject := GetDevice(device) | 
|  | 3452 | eventObject := GetEvent(event) | 
|  | 3453 | assert(eventObject.device == device) | 
|  | 3454 |  | 
|  | 3455 | State.Events[event] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3456 | } | 
|  | 3457 |  | 
|  | 3458 | @threadSafety("system") | 
|  | 3459 | cmd VkResult vkGetEventStatus( | 
|  | 3460 | VkDevice                                    device, | 
|  | 3461 | VkEvent                                     event) { | 
|  | 3462 | deviceObject := GetDevice(device) | 
|  | 3463 | eventObject := GetEvent(event) | 
|  | 3464 | assert(eventObject.device == device) | 
|  | 3465 |  | 
|  | 3466 | return ? | 
|  | 3467 | } | 
|  | 3468 |  | 
|  | 3469 | @threadSafety("system") | 
|  | 3470 | cmd VkResult vkSetEvent( | 
|  | 3471 | VkDevice                                    device, | 
|  | 3472 | VkEvent                                     event) { | 
|  | 3473 | deviceObject := GetDevice(device) | 
|  | 3474 | eventObject := GetEvent(event) | 
|  | 3475 | assert(eventObject.device == device) | 
|  | 3476 |  | 
|  | 3477 | return ? | 
|  | 3478 | } | 
|  | 3479 |  | 
|  | 3480 | @threadSafety("system") | 
|  | 3481 | cmd VkResult vkResetEvent( | 
|  | 3482 | VkDevice                                    device, | 
|  | 3483 | VkEvent                                     event) { | 
|  | 3484 | deviceObject := GetDevice(device) | 
|  | 3485 | eventObject := GetEvent(event) | 
|  | 3486 | assert(eventObject.device == device) | 
|  | 3487 |  | 
|  | 3488 | return ? | 
|  | 3489 | } | 
|  | 3490 |  | 
|  | 3491 |  | 
|  | 3492 | // Query functions | 
|  | 3493 |  | 
|  | 3494 | @threadSafety("system") | 
|  | 3495 | cmd VkResult vkCreateQueryPool( | 
|  | 3496 | VkDevice                                    device, | 
|  | 3497 | const VkQueryPoolCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3498 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3499 | VkQueryPool*                                pQueryPool) { | 
|  | 3500 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) | 
|  | 3501 | deviceObject := GetDevice(device) | 
|  | 3502 |  | 
|  | 3503 | queryPool := ? | 
|  | 3504 | pQueryPool[0] = queryPool | 
|  | 3505 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) | 
|  | 3506 |  | 
|  | 3507 | return ? | 
|  | 3508 | } | 
|  | 3509 |  | 
|  | 3510 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3511 | cmd void vkDestroyQueryPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3512 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3513 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3514 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3515 | deviceObject := GetDevice(device) | 
|  | 3516 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 3517 | assert(queryPoolObject.device == device) | 
|  | 3518 |  | 
|  | 3519 | State.QueryPools[queryPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3520 | } | 
|  | 3521 |  | 
|  | 3522 | @threadSafety("system") | 
|  | 3523 | cmd VkResult vkGetQueryPoolResults( | 
|  | 3524 | VkDevice                                    device, | 
|  | 3525 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 3526 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3527 | u32                                         queryCount, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3528 | platform.size_t                             dataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3529 | void*                                       pData, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3530 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3531 | VkQueryResultFlags                          flags) { | 
|  | 3532 | deviceObject := GetDevice(device) | 
|  | 3533 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 3534 | assert(queryPoolObject.device == device) | 
|  | 3535 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3536 | data := pData[0:dataSize] | 
|  | 3537 |  | 
|  | 3538 | return ? | 
|  | 3539 | } | 
|  | 3540 |  | 
|  | 3541 | // Buffer functions | 
|  | 3542 |  | 
|  | 3543 | @threadSafety("system") | 
|  | 3544 | cmd VkResult vkCreateBuffer( | 
|  | 3545 | VkDevice                                    device, | 
|  | 3546 | const VkBufferCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3547 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3548 | VkBuffer*                                   pBuffer) { | 
|  | 3549 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) | 
|  | 3550 | deviceObject := GetDevice(device) | 
|  | 3551 |  | 
|  | 3552 | buffer := ? | 
|  | 3553 | pBuffer[0] = buffer | 
|  | 3554 | State.Buffers[buffer] = new!BufferObject(device: device) | 
|  | 3555 |  | 
|  | 3556 | return ? | 
|  | 3557 | } | 
|  | 3558 |  | 
|  | 3559 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3560 | cmd void vkDestroyBuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3561 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3562 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3563 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3564 | deviceObject := GetDevice(device) | 
|  | 3565 | bufferObject := GetBuffer(buffer) | 
|  | 3566 | assert(bufferObject.device == device) | 
|  | 3567 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3568 | assert(bufferObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3569 | State.Buffers[buffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3570 | } | 
|  | 3571 |  | 
|  | 3572 |  | 
|  | 3573 | // Buffer view functions | 
|  | 3574 |  | 
|  | 3575 | @threadSafety("system") | 
|  | 3576 | cmd VkResult vkCreateBufferView( | 
|  | 3577 | VkDevice                                    device, | 
|  | 3578 | const VkBufferViewCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3579 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3580 | VkBufferView*                               pView) { | 
|  | 3581 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) | 
|  | 3582 | deviceObject := GetDevice(device) | 
|  | 3583 |  | 
|  | 3584 | bufferObject := GetBuffer(pCreateInfo.buffer) | 
|  | 3585 | assert(bufferObject.device == device) | 
|  | 3586 |  | 
|  | 3587 | view := ? | 
|  | 3588 | pView[0] = view | 
|  | 3589 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) | 
|  | 3590 |  | 
|  | 3591 | return ? | 
|  | 3592 | } | 
|  | 3593 |  | 
|  | 3594 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3595 | cmd void vkDestroyBufferView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3596 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3597 | VkBufferView                                bufferView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3598 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3599 | deviceObject := GetDevice(device) | 
|  | 3600 | bufferViewObject := GetBufferView(bufferView) | 
|  | 3601 | assert(bufferViewObject.device == device) | 
|  | 3602 |  | 
|  | 3603 | State.BufferViews[bufferView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3604 | } | 
|  | 3605 |  | 
|  | 3606 |  | 
|  | 3607 | // Image functions | 
|  | 3608 |  | 
|  | 3609 | @threadSafety("system") | 
|  | 3610 | cmd VkResult vkCreateImage( | 
|  | 3611 | VkDevice                                    device, | 
|  | 3612 | const VkImageCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3613 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3614 | VkImage*                                    pImage) { | 
|  | 3615 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) | 
|  | 3616 | deviceObject := GetDevice(device) | 
|  | 3617 |  | 
|  | 3618 | image := ? | 
|  | 3619 | pImage[0] = image | 
|  | 3620 | State.Images[image] = new!ImageObject(device: device) | 
|  | 3621 |  | 
|  | 3622 | return ? | 
|  | 3623 | } | 
|  | 3624 |  | 
|  | 3625 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3626 | cmd void vkDestroyImage( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3627 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3628 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3629 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3630 | deviceObject := GetDevice(device) | 
|  | 3631 | imageObject := GetImage(image) | 
|  | 3632 | assert(imageObject.device == device) | 
|  | 3633 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3634 | assert(imageObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3635 | State.Images[image] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3636 | } | 
|  | 3637 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3638 | cmd void vkGetImageSubresourceLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3639 | VkDevice                                    device, | 
|  | 3640 | VkImage                                     image, | 
|  | 3641 | const VkImageSubresource*                   pSubresource, | 
|  | 3642 | VkSubresourceLayout*                        pLayout) { | 
|  | 3643 | deviceObject := GetDevice(device) | 
|  | 3644 | imageObject := GetImage(image) | 
|  | 3645 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3646 | } | 
|  | 3647 |  | 
|  | 3648 |  | 
|  | 3649 | // Image view functions | 
|  | 3650 |  | 
|  | 3651 | @threadSafety("system") | 
|  | 3652 | cmd VkResult vkCreateImageView( | 
|  | 3653 | VkDevice                                    device, | 
|  | 3654 | const VkImageViewCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3655 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3656 | VkImageView*                                pView) { | 
|  | 3657 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) | 
|  | 3658 | deviceObject := GetDevice(device) | 
|  | 3659 |  | 
|  | 3660 | imageObject := GetImage(pCreateInfo.image) | 
|  | 3661 | assert(imageObject.device == device) | 
|  | 3662 |  | 
|  | 3663 | view := ? | 
|  | 3664 | pView[0] = view | 
|  | 3665 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) | 
|  | 3666 |  | 
|  | 3667 | return ? | 
|  | 3668 | } | 
|  | 3669 |  | 
|  | 3670 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3671 | cmd void vkDestroyImageView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3672 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3673 | VkImageView                                 imageView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3674 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3675 | deviceObject := GetDevice(device) | 
|  | 3676 | imageViewObject := GetImageView(imageView) | 
|  | 3677 | assert(imageViewObject.device == device) | 
|  | 3678 |  | 
|  | 3679 | State.ImageViews[imageView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3680 | } | 
|  | 3681 |  | 
|  | 3682 |  | 
|  | 3683 | // Shader functions | 
|  | 3684 |  | 
|  | 3685 | cmd VkResult vkCreateShaderModule( | 
|  | 3686 | VkDevice                                    device, | 
|  | 3687 | const VkShaderModuleCreateInfo*             pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3688 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3689 | VkShaderModule*                             pShaderModule) { | 
|  | 3690 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) | 
|  | 3691 | deviceObject := GetDevice(device) | 
|  | 3692 |  | 
|  | 3693 | shaderModule := ? | 
|  | 3694 | pShaderModule[0] = shaderModule | 
|  | 3695 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) | 
|  | 3696 |  | 
|  | 3697 | return ? | 
|  | 3698 | } | 
|  | 3699 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3700 | cmd void vkDestroyShaderModule( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3701 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3702 | VkShaderModule                              shaderModule, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3703 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3704 | deviceObject := GetDevice(device) | 
|  | 3705 | shaderModuleObject := GetShaderModule(shaderModule) | 
|  | 3706 | assert(shaderModuleObject.device == device) | 
|  | 3707 |  | 
|  | 3708 | State.ShaderModules[shaderModule] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3709 | } | 
|  | 3710 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3711 |  | 
|  | 3712 | // Pipeline functions | 
|  | 3713 |  | 
|  | 3714 | cmd VkResult vkCreatePipelineCache( | 
|  | 3715 | VkDevice                                    device, | 
|  | 3716 | const VkPipelineCacheCreateInfo*            pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3717 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3718 | VkPipelineCache*                            pPipelineCache) { | 
|  | 3719 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) | 
|  | 3720 | deviceObject := GetDevice(device) | 
|  | 3721 |  | 
|  | 3722 | pipelineCache := ? | 
|  | 3723 | pPipelineCache[0] = pipelineCache | 
|  | 3724 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) | 
|  | 3725 |  | 
|  | 3726 | return ? | 
|  | 3727 | } | 
|  | 3728 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3729 | cmd void vkDestroyPipelineCache( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3730 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3731 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3732 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3733 | deviceObject := GetDevice(device) | 
|  | 3734 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 3735 | assert(pipelineCacheObject.device == device) | 
|  | 3736 |  | 
|  | 3737 | State.PipelineCaches[pipelineCache] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3738 | } | 
|  | 3739 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3740 | cmd VkResult vkGetPipelineCacheData( | 
|  | 3741 | VkDevice                                    device, | 
|  | 3742 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 3743 | platform.size_t*                            pDataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3744 | void*                                       pData) { | 
|  | 3745 | deviceObject := GetDevice(device) | 
|  | 3746 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 3747 | assert(pipelineCacheObject.device == device) | 
|  | 3748 |  | 
|  | 3749 | return ? | 
|  | 3750 | } | 
|  | 3751 |  | 
|  | 3752 | cmd VkResult vkMergePipelineCaches( | 
|  | 3753 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3754 | VkPipelineCache                             dstCache, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3755 | u32                                         srcCacheCount, | 
|  | 3756 | const VkPipelineCache*                      pSrcCaches) { | 
|  | 3757 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3758 | dstCacheObject := GetPipelineCache(dstCache) | 
|  | 3759 | assert(dstCacheObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3760 |  | 
|  | 3761 | srcCaches := pSrcCaches[0:srcCacheCount] | 
|  | 3762 | for i in (0 .. srcCacheCount) { | 
|  | 3763 | srcCache := srcCaches[i] | 
|  | 3764 | srcCacheObject := GetPipelineCache(srcCache) | 
|  | 3765 | assert(srcCacheObject.device == device) | 
|  | 3766 | } | 
|  | 3767 |  | 
|  | 3768 | return ? | 
|  | 3769 | } | 
|  | 3770 |  | 
|  | 3771 | cmd VkResult vkCreateGraphicsPipelines( | 
|  | 3772 | VkDevice                                    device, | 
|  | 3773 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3774 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3775 | const VkGraphicsPipelineCreateInfo*         pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3776 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3777 | VkPipeline*                                 pPipelines) { | 
|  | 3778 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3779 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3780 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 3781 | assert(pipelineCacheObject.device == device) | 
|  | 3782 | } | 
|  | 3783 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3784 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 3785 | pipelines := pPipelines[0:createInfoCount] | 
|  | 3786 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3787 | pipeline := ? | 
|  | 3788 | pipelines[i] = pipeline | 
|  | 3789 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 3790 | } | 
|  | 3791 |  | 
|  | 3792 | return ? | 
|  | 3793 | } | 
|  | 3794 |  | 
|  | 3795 | cmd VkResult vkCreateComputePipelines( | 
|  | 3796 | VkDevice                                    device, | 
|  | 3797 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3798 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3799 | const VkComputePipelineCreateInfo*          pCreateInfos, | 
| 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 | VkPipeline*                                 pPipelines) { | 
|  | 3802 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3803 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3804 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 3805 | assert(pipelineCacheObject.device == device) | 
|  | 3806 | } | 
|  | 3807 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3808 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 3809 | pipelines := pPipelines[0:createInfoCount] | 
|  | 3810 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3811 | pipeline := ? | 
|  | 3812 | pipelines[i] = pipeline | 
|  | 3813 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 3814 | } | 
|  | 3815 |  | 
|  | 3816 | return ? | 
|  | 3817 | } | 
|  | 3818 |  | 
|  | 3819 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3820 | cmd void vkDestroyPipeline( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3821 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3822 | VkPipeline                                  pipeline, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3823 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3824 | deviceObject := GetDevice(device) | 
|  | 3825 | pipelineObjects := GetPipeline(pipeline) | 
|  | 3826 | assert(pipelineObjects.device == device) | 
|  | 3827 |  | 
|  | 3828 | State.Pipelines[pipeline] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3829 | } | 
|  | 3830 |  | 
|  | 3831 |  | 
|  | 3832 | // Pipeline layout functions | 
|  | 3833 |  | 
|  | 3834 | @threadSafety("system") | 
|  | 3835 | cmd VkResult vkCreatePipelineLayout( | 
|  | 3836 | VkDevice                                    device, | 
|  | 3837 | const VkPipelineLayoutCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3838 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3839 | VkPipelineLayout*                           pPipelineLayout) { | 
|  | 3840 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) | 
|  | 3841 | deviceObject := GetDevice(device) | 
|  | 3842 |  | 
|  | 3843 | pipelineLayout := ? | 
|  | 3844 | pPipelineLayout[0] = pipelineLayout | 
|  | 3845 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) | 
|  | 3846 |  | 
|  | 3847 | return ? | 
|  | 3848 | } | 
|  | 3849 |  | 
|  | 3850 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3851 | cmd void vkDestroyPipelineLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3852 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3853 | VkPipelineLayout                            pipelineLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3854 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3855 | deviceObject := GetDevice(device) | 
|  | 3856 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) | 
|  | 3857 | assert(pipelineLayoutObjects.device == device) | 
|  | 3858 |  | 
|  | 3859 | State.PipelineLayouts[pipelineLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3860 | } | 
|  | 3861 |  | 
|  | 3862 |  | 
|  | 3863 | // Sampler functions | 
|  | 3864 |  | 
|  | 3865 | @threadSafety("system") | 
|  | 3866 | cmd VkResult vkCreateSampler( | 
|  | 3867 | VkDevice                                    device, | 
|  | 3868 | const VkSamplerCreateInfo*                  pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3869 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3870 | VkSampler*                                  pSampler) { | 
|  | 3871 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) | 
|  | 3872 | deviceObject := GetDevice(device) | 
|  | 3873 |  | 
|  | 3874 | sampler := ? | 
|  | 3875 | pSampler[0] = sampler | 
|  | 3876 | State.Samplers[sampler] = new!SamplerObject(device: device) | 
|  | 3877 |  | 
|  | 3878 | return ? | 
|  | 3879 | } | 
|  | 3880 |  | 
|  | 3881 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3882 | cmd void vkDestroySampler( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3883 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3884 | VkSampler                                   sampler, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3885 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3886 | deviceObject := GetDevice(device) | 
|  | 3887 | samplerObject := GetSampler(sampler) | 
|  | 3888 | assert(samplerObject.device == device) | 
|  | 3889 |  | 
|  | 3890 | State.Samplers[sampler] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3891 | } | 
|  | 3892 |  | 
|  | 3893 |  | 
|  | 3894 | // Descriptor set functions | 
|  | 3895 |  | 
|  | 3896 | @threadSafety("system") | 
|  | 3897 | cmd VkResult vkCreateDescriptorSetLayout( | 
|  | 3898 | VkDevice                                    device, | 
|  | 3899 | const VkDescriptorSetLayoutCreateInfo*      pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3900 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3901 | VkDescriptorSetLayout*                      pSetLayout) { | 
|  | 3902 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) | 
|  | 3903 | deviceObject := GetDevice(device) | 
|  | 3904 |  | 
|  | 3905 | setLayout := ? | 
|  | 3906 | pSetLayout[0] = setLayout | 
|  | 3907 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) | 
|  | 3908 |  | 
|  | 3909 | return ? | 
|  | 3910 | } | 
|  | 3911 |  | 
|  | 3912 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3913 | cmd void vkDestroyDescriptorSetLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3914 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3915 | VkDescriptorSetLayout                       descriptorSetLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3916 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3917 | deviceObject := GetDevice(device) | 
|  | 3918 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) | 
|  | 3919 | assert(descriptorSetLayoutObject.device == device) | 
|  | 3920 |  | 
|  | 3921 | State.DescriptorSetLayouts[descriptorSetLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3922 | } | 
|  | 3923 |  | 
|  | 3924 | @threadSafety("system") | 
|  | 3925 | cmd VkResult vkCreateDescriptorPool( | 
|  | 3926 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3927 | const VkDescriptorPoolCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3928 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3929 | VkDescriptorPool*                           pDescriptorPool) { | 
|  | 3930 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) | 
|  | 3931 | deviceObject := GetDevice(device) | 
|  | 3932 |  | 
|  | 3933 | descriptorPool := ? | 
|  | 3934 | pDescriptorPool[0] = descriptorPool | 
|  | 3935 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) | 
|  | 3936 |  | 
|  | 3937 | return ? | 
|  | 3938 | } | 
|  | 3939 |  | 
|  | 3940 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3941 | cmd void vkDestroyDescriptorPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3942 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3943 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3944 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3945 | deviceObject := GetDevice(device) | 
|  | 3946 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 3947 | assert(descriptorPoolObject.device == device) | 
|  | 3948 |  | 
|  | 3949 | State.DescriptorPools[descriptorPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3950 | } | 
|  | 3951 |  | 
|  | 3952 | @threadSafety("app") | 
|  | 3953 | cmd VkResult vkResetDescriptorPool( | 
|  | 3954 | VkDevice                                    device, | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3955 | VkDescriptorPool                            descriptorPool, | 
|  | 3956 | VkDescriptorPoolResetFlags                  flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3957 | deviceObject := GetDevice(device) | 
|  | 3958 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 3959 | assert(descriptorPoolObject.device == device) | 
|  | 3960 |  | 
|  | 3961 | return ? | 
|  | 3962 | } | 
|  | 3963 |  | 
|  | 3964 | @threadSafety("app") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3965 | cmd VkResult vkAllocateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3966 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3967 | const VkDescriptorSetAllocateInfo*          pAllocateInfo, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3968 | VkDescriptorSet*                            pDescriptorSets) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3969 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3970 | allocInfo := pAllocateInfo[0] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 3971 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3972 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3973 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] | 
|  | 3974 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3975 | setLayout := setLayouts[i] | 
|  | 3976 | setLayoutObject := GetDescriptorSetLayout(setLayout) | 
|  | 3977 | assert(setLayoutObject.device == device) | 
|  | 3978 | } | 
|  | 3979 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3980 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] | 
|  | 3981 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3982 | descriptorSet := ? | 
|  | 3983 | descriptorSets[i] = descriptorSet | 
|  | 3984 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) | 
|  | 3985 | } | 
|  | 3986 |  | 
|  | 3987 | return ? | 
|  | 3988 | } | 
|  | 3989 |  | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 3990 | cmd VkResult vkFreeDescriptorSets( | 
|  | 3991 | VkDevice                                    device, | 
|  | 3992 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3993 | u32                                         descriptorSetCount, | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 3994 | const VkDescriptorSet*                      pDescriptorSets) { | 
|  | 3995 | deviceObject := GetDevice(device) | 
|  | 3996 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 3997 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3998 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 3999 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4000 | descriptorSet := descriptorSets[i] | 
|  | 4001 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
|  | 4002 | assert(descriptorSetObject.device == device) | 
|  | 4003 | State.DescriptorSets[descriptorSet] = null | 
|  | 4004 | } | 
|  | 4005 |  | 
|  | 4006 | return ? | 
|  | 4007 | } | 
|  | 4008 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4009 | cmd void vkUpdateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4010 | VkDevice                                    device, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4011 | u32                                         descriptorWriteCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4012 | const VkWriteDescriptorSet*                 pDescriptorWrites, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4013 | u32                                         descriptorCopyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4014 | const VkCopyDescriptorSet*                  pDescriptorCopies) { | 
|  | 4015 | deviceObject := GetDevice(device) | 
|  | 4016 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4017 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] | 
|  | 4018 | for i in (0 .. descriptorWriteCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4019 | descriptorWrite := descriptorWrites[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4020 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4021 | assert(descriptorWriteObject.device == device) | 
|  | 4022 | } | 
|  | 4023 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4024 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] | 
|  | 4025 | for i in (0 .. descriptorCopyCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4026 | descriptorCopy := descriptorCopies[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4027 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4028 | assert(descriptorCopyObject.device == device) | 
|  | 4029 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4030 | } | 
|  | 4031 |  | 
|  | 4032 |  | 
|  | 4033 | // Framebuffer functions | 
|  | 4034 |  | 
|  | 4035 | @threadSafety("system") | 
|  | 4036 | cmd VkResult vkCreateFramebuffer( | 
|  | 4037 | VkDevice                                    device, | 
|  | 4038 | const VkFramebufferCreateInfo*              pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4039 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4040 | VkFramebuffer*                              pFramebuffer) { | 
|  | 4041 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) | 
|  | 4042 | deviceObject := GetDevice(device) | 
|  | 4043 |  | 
|  | 4044 | framebuffer := ? | 
|  | 4045 | pFramebuffer[0] = framebuffer | 
|  | 4046 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) | 
|  | 4047 |  | 
|  | 4048 | return ? | 
|  | 4049 | } | 
|  | 4050 |  | 
|  | 4051 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4052 | cmd void vkDestroyFramebuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4053 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4054 | VkFramebuffer                               framebuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4055 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4056 | deviceObject := GetDevice(device) | 
|  | 4057 | framebufferObject := GetFramebuffer(framebuffer) | 
|  | 4058 | assert(framebufferObject.device == device) | 
|  | 4059 |  | 
|  | 4060 | State.Framebuffers[framebuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4061 | } | 
|  | 4062 |  | 
|  | 4063 |  | 
|  | 4064 | // Renderpass functions | 
|  | 4065 |  | 
|  | 4066 | @threadSafety("system") | 
|  | 4067 | cmd VkResult vkCreateRenderPass( | 
|  | 4068 | VkDevice                                    device, | 
|  | 4069 | const VkRenderPassCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4070 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4071 | VkRenderPass*                               pRenderPass) { | 
|  | 4072 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) | 
|  | 4073 | deviceObject := GetDevice(device) | 
|  | 4074 |  | 
|  | 4075 | renderpass := ? | 
|  | 4076 | pRenderPass[0] = renderpass | 
|  | 4077 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) | 
|  | 4078 |  | 
|  | 4079 | return ? | 
|  | 4080 | } | 
|  | 4081 |  | 
|  | 4082 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4083 | cmd void vkDestroyRenderPass( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4084 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4085 | VkRenderPass                                renderPass, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4086 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4087 | deviceObject := GetDevice(device) | 
|  | 4088 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4089 | assert(renderPassObject.device == device) | 
|  | 4090 |  | 
|  | 4091 | State.RenderPasses[renderPass] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4092 | } | 
|  | 4093 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4094 | cmd void vkGetRenderAreaGranularity( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4095 | VkDevice                                    device, | 
|  | 4096 | VkRenderPass                                renderPass, | 
|  | 4097 | VkExtent2D*                                 pGranularity) { | 
|  | 4098 | deviceObject := GetDevice(device) | 
|  | 4099 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4100 |  | 
|  | 4101 | granularity := ? | 
|  | 4102 | pGranularity[0] = granularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4103 | } | 
|  | 4104 |  | 
|  | 4105 | // Command pool functions | 
|  | 4106 |  | 
|  | 4107 | cmd VkResult vkCreateCommandPool( | 
|  | 4108 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4109 | const VkCommandPoolCreateInfo*              pCreateInfo, | 
|  | 4110 | const VkAllocationCallbacks*                pAllocator, | 
|  | 4111 | VkCommandPool*                              pCommandPool) { | 
|  | 4112 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4113 | deviceObject := GetDevice(device) | 
|  | 4114 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4115 | commandPool := ? | 
|  | 4116 | pCommandPool[0] = commandPool | 
|  | 4117 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4118 |  | 
|  | 4119 | return ? | 
|  | 4120 | } | 
|  | 4121 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4122 | cmd void vkDestroyCommandPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4123 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4124 | VkCommandPool                               commandPool, | 
|  | 4125 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4126 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4127 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4128 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4129 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4130 | State.CommandPools[commandPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4131 | } | 
|  | 4132 |  | 
|  | 4133 | cmd VkResult vkResetCommandPool( | 
|  | 4134 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4135 | VkCommandPool                               commandPool, | 
|  | 4136 | VkCommandPoolResetFlags                     flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4137 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4138 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4139 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4140 |  | 
|  | 4141 | return ? | 
|  | 4142 | } | 
|  | 4143 |  | 
|  | 4144 | // Command buffer functions | 
|  | 4145 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4146 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4147 | memoryObject := GetDeviceMemory(memory) | 
|  | 4148 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4149 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4150 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4151 | commandBufferObject.boundObjects[as!u64(obj)] = memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4152 | } | 
|  | 4153 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4154 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4155 | memoryObject := GetDeviceMemory(memory) | 
|  | 4156 | memoryObject.boundCommandBuffers[commandBuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4157 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4158 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4159 | commandBufferObject.boundObjects[as!u64(obj)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4160 | } | 
|  | 4161 |  | 
|  | 4162 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4163 | cmd VkResult vkAllocateCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4164 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4165 | const VkCommandBufferAllocateInfo*          pAllocateInfo, | 
|  | 4166 | VkCommandBuffer*                            pCommandBuffers) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4167 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4168 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4169 | count := pAllocateInfo[0].commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4170 | commandBuffers := pCommandBuffers[0:count] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4171 | for i in (0 .. count) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4172 | commandBuffer := ? | 
|  | 4173 | commandBuffers[i] = commandBuffer | 
|  | 4174 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4175 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4176 |  | 
|  | 4177 | return ? | 
|  | 4178 | } | 
|  | 4179 |  | 
|  | 4180 | @threadSafety("system") | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4181 | cmd void vkFreeCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4182 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4183 | VkCommandPool                               commandPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4184 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4185 | const VkCommandBuffer*                      pCommandBuffers) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4186 | deviceObject := GetDevice(device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4187 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4188 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4189 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4190 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) | 
|  | 4191 | assert(commandBufferObject.device == device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4192 | // TODO: iterate over boundObjects and clear memory bindings | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4193 | State.CommandBuffers[commandBuffers[i]] = null | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4194 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4195 | } | 
|  | 4196 |  | 
|  | 4197 | @threadSafety("app") | 
|  | 4198 | cmd VkResult vkBeginCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4199 | VkCommandBuffer                             commandBuffer, | 
|  | 4200 | const VkCommandBufferBeginInfo*             pBeginInfo) { | 
|  | 4201 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) | 
|  | 4202 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4203 |  | 
|  | 4204 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4205 |  | 
|  | 4206 | return ? | 
|  | 4207 | } | 
|  | 4208 |  | 
|  | 4209 | @threadSafety("app") | 
|  | 4210 | cmd VkResult vkEndCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4211 | VkCommandBuffer                             commandBuffer) { | 
|  | 4212 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4213 |  | 
|  | 4214 | return ? | 
|  | 4215 | } | 
|  | 4216 |  | 
|  | 4217 | @threadSafety("app") | 
|  | 4218 | cmd VkResult vkResetCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4219 | VkCommandBuffer                             commandBuffer, | 
|  | 4220 | VkCommandBufferResetFlags                   flags) { | 
|  | 4221 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4222 |  | 
|  | 4223 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4224 |  | 
|  | 4225 | return ? | 
|  | 4226 | } | 
|  | 4227 |  | 
|  | 4228 |  | 
|  | 4229 | // Command buffer building functions | 
|  | 4230 |  | 
|  | 4231 | @threadSafety("app") | 
|  | 4232 | cmd void vkCmdBindPipeline( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4233 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4234 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4235 | VkPipeline                                  pipeline) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4236 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4237 | pipelineObject := GetPipeline(pipeline) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4238 | assert(commandBufferObject.device == pipelineObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4239 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4240 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4241 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4242 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4243 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4244 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4245 | } | 
|  | 4246 |  | 
|  | 4247 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4248 | cmd void vkCmdSetViewport( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4249 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4250 | u32                                         firstViewport, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4251 | u32                                         viewportCount, | 
|  | 4252 | const VkViewport*                           pViewports) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4253 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4254 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4255 | } | 
|  | 4256 |  | 
|  | 4257 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4258 | cmd void vkCmdSetScissor( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4259 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4260 | u32                                         firstScissor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4261 | u32                                         scissorCount, | 
|  | 4262 | const VkRect2D*                             pScissors) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4263 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4264 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4265 | } | 
|  | 4266 |  | 
|  | 4267 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4268 | cmd void vkCmdSetLineWidth( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4269 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4270 | f32                                         lineWidth) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4271 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4272 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4273 | } | 
|  | 4274 |  | 
|  | 4275 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4276 | cmd void vkCmdSetDepthBias( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4277 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4278 | f32                                         depthBiasConstantFactor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4279 | f32                                         depthBiasClamp, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4280 | f32                                         depthBiasSlopeFactor) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4281 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4282 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4283 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4284 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4285 | @threadSafety("app") | 
|  | 4286 | cmd void vkCmdSetBlendConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4287 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4288 | // TODO(jessehall): apic only supports 'const' on pointer types. Using | 
|  | 4289 | // an annotation as a quick hack to pass this to the template without | 
|  | 4290 | // having to modify the AST and semantic model. | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4291 | @readonly f32[4]                            blendConstants) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4292 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4293 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4294 | } | 
|  | 4295 |  | 
|  | 4296 | @threadSafety("app") | 
|  | 4297 | cmd void vkCmdSetDepthBounds( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4298 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4299 | f32                                         minDepthBounds, | 
|  | 4300 | f32                                         maxDepthBounds) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4301 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4302 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4303 | } | 
|  | 4304 |  | 
|  | 4305 | @threadSafety("app") | 
|  | 4306 | cmd void vkCmdSetStencilCompareMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4307 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4308 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4309 | u32                                         compareMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4310 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4311 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4312 | } | 
|  | 4313 |  | 
|  | 4314 | @threadSafety("app") | 
|  | 4315 | cmd void vkCmdSetStencilWriteMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4316 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4317 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4318 | u32                                         writeMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4319 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4320 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4321 | } | 
|  | 4322 |  | 
|  | 4323 | @threadSafety("app") | 
|  | 4324 | cmd void vkCmdSetStencilReference( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4325 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4326 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4327 | u32                                         reference) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4328 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4329 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4330 | } | 
|  | 4331 |  | 
|  | 4332 | @threadSafety("app") | 
|  | 4333 | cmd void vkCmdBindDescriptorSets( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4334 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4335 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4336 | VkPipelineLayout                            layout, | 
|  | 4337 | u32                                         firstSet, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4338 | u32                                         descriptorSetCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4339 | const VkDescriptorSet*                      pDescriptorSets, | 
|  | 4340 | u32                                         dynamicOffsetCount, | 
|  | 4341 | const u32*                                  pDynamicOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4342 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4343 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4344 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4345 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4346 | descriptorSet := descriptorSets[i] | 
|  | 4347 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4348 | assert(commandBufferObject.device == descriptorSetObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4349 | } | 
|  | 4350 |  | 
|  | 4351 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] | 
|  | 4352 | for i in (0 .. dynamicOffsetCount) { | 
|  | 4353 | dynamicOffset := dynamicOffsets[i] | 
|  | 4354 | } | 
|  | 4355 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4356 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4357 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4358 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4359 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4360 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4361 | } | 
|  | 4362 |  | 
|  | 4363 | @threadSafety("app") | 
|  | 4364 | cmd void vkCmdBindIndexBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4365 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4366 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4367 | VkDeviceSize                                offset, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4368 | VkIndexType                                 indexType) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4369 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4370 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4371 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4372 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4373 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4374 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4375 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4376 | } | 
|  | 4377 |  | 
|  | 4378 | @threadSafety("app") | 
|  | 4379 | cmd void vkCmdBindVertexBuffers( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4380 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4381 | u32                                         firstBinding, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4382 | u32                                         bindingCount, | 
|  | 4383 | const VkBuffer*                             pBuffers, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4384 | const VkDeviceSize*                         pOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4385 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4386 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4387 | // TODO: check if not [firstBinding:firstBinding+bindingCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4388 | buffers := pBuffers[0:bindingCount] | 
|  | 4389 | offsets := pOffsets[0:bindingCount] | 
|  | 4390 | for i in (0 .. bindingCount) { | 
|  | 4391 | buffer := buffers[i] | 
|  | 4392 | offset := offsets[i] | 
|  | 4393 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4394 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4395 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4396 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4397 | } | 
|  | 4398 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4399 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4400 | } | 
|  | 4401 |  | 
|  | 4402 | @threadSafety("app") | 
|  | 4403 | cmd void vkCmdDraw( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4404 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4405 | u32                                         vertexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4406 | u32                                         instanceCount, | 
|  | 4407 | u32                                         firstVertex, | 
|  | 4408 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4409 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4410 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4411 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4412 | } | 
|  | 4413 |  | 
|  | 4414 | @threadSafety("app") | 
|  | 4415 | cmd void vkCmdDrawIndexed( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4416 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4417 | u32                                         indexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4418 | u32                                         instanceCount, | 
|  | 4419 | u32                                         firstIndex, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4420 | s32                                         vertexOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4421 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4422 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4423 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4424 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4425 | } | 
|  | 4426 |  | 
|  | 4427 | @threadSafety("app") | 
|  | 4428 | cmd void vkCmdDrawIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4429 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4430 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4431 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4432 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4433 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4434 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4435 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4436 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4437 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4438 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4439 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4440 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4441 | } | 
|  | 4442 |  | 
|  | 4443 | @threadSafety("app") | 
|  | 4444 | cmd void vkCmdDrawIndexedIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4445 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4446 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4447 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4448 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4449 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4450 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4451 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4452 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4453 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4454 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4455 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4456 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4457 | } | 
|  | 4458 |  | 
|  | 4459 | @threadSafety("app") | 
|  | 4460 | cmd void vkCmdDispatch( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4461 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4462 | u32                                         x, | 
|  | 4463 | u32                                         y, | 
|  | 4464 | u32                                         z) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4465 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4466 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4467 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4468 | } | 
|  | 4469 |  | 
|  | 4470 | @threadSafety("app") | 
|  | 4471 | cmd void vkCmdDispatchIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4472 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4473 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4474 | VkDeviceSize                                offset) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4475 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4476 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4477 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4478 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4479 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4480 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4481 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4482 | } | 
|  | 4483 |  | 
|  | 4484 | @threadSafety("app") | 
|  | 4485 | cmd void vkCmdCopyBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4486 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4487 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4488 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4489 | u32                                         regionCount, | 
|  | 4490 | const VkBufferCopy*                         pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4491 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4492 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4493 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4494 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 4495 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4496 |  | 
|  | 4497 | regions := pRegions[0:regionCount] | 
|  | 4498 | for i in (0 .. regionCount) { | 
|  | 4499 | region := regions[i] | 
|  | 4500 | } | 
|  | 4501 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4502 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 4503 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4504 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4505 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4506 | } | 
|  | 4507 |  | 
|  | 4508 | @threadSafety("app") | 
|  | 4509 | cmd void vkCmdCopyImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4510 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4511 | VkImage                                     srcImage, | 
|  | 4512 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4513 | VkImage                                     dstImage, | 
|  | 4514 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4515 | u32                                         regionCount, | 
|  | 4516 | const VkImageCopy*                          pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4517 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4518 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4519 | dstImageObject := GetImage(dstImage) | 
|  | 4520 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4521 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4522 |  | 
|  | 4523 | regions := pRegions[0:regionCount] | 
|  | 4524 | for i in (0 .. regionCount) { | 
|  | 4525 | region := regions[i] | 
|  | 4526 | } | 
|  | 4527 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4528 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4529 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4530 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4531 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4532 | } | 
|  | 4533 |  | 
|  | 4534 | @threadSafety("app") | 
|  | 4535 | cmd void vkCmdBlitImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4536 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4537 | VkImage                                     srcImage, | 
|  | 4538 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4539 | VkImage                                     dstImage, | 
|  | 4540 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4541 | u32                                         regionCount, | 
|  | 4542 | const VkImageBlit*                          pRegions, | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 4543 | VkFilter                                    filter) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4544 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4545 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4546 | dstImageObject := GetImage(dstImage) | 
|  | 4547 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4548 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4549 |  | 
|  | 4550 | regions := pRegions[0:regionCount] | 
|  | 4551 | for i in (0 .. regionCount) { | 
|  | 4552 | region := regions[i] | 
|  | 4553 | } | 
|  | 4554 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4555 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4556 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4557 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4558 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4559 | } | 
|  | 4560 |  | 
|  | 4561 | @threadSafety("app") | 
|  | 4562 | cmd void vkCmdCopyBufferToImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4563 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4564 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4565 | VkImage                                     dstImage, | 
|  | 4566 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4567 | u32                                         regionCount, | 
|  | 4568 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4569 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4570 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4571 | dstImageObject := GetImage(dstImage) | 
|  | 4572 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 4573 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4574 |  | 
|  | 4575 | regions := pRegions[0:regionCount] | 
|  | 4576 | for i in (0 .. regionCount) { | 
|  | 4577 | region := regions[i] | 
|  | 4578 | } | 
|  | 4579 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4580 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 4581 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4582 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4583 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4584 | } | 
|  | 4585 |  | 
|  | 4586 | @threadSafety("app") | 
|  | 4587 | cmd void vkCmdCopyImageToBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4588 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4589 | VkImage                                     srcImage, | 
|  | 4590 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4591 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4592 | u32                                         regionCount, | 
|  | 4593 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4594 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4595 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4596 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4597 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4598 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4599 |  | 
|  | 4600 | regions := pRegions[0:regionCount] | 
|  | 4601 | for i in (0 .. regionCount) { | 
|  | 4602 | region := regions[i] | 
|  | 4603 | } | 
|  | 4604 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4605 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4606 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4607 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4608 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4609 | } | 
|  | 4610 |  | 
|  | 4611 | @threadSafety("app") | 
|  | 4612 | cmd void vkCmdUpdateBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4613 | VkCommandBuffer                             commandBuffer, | 
|  | 4614 | VkBuffer                                    dstBuffer, | 
|  | 4615 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4616 | VkDeviceSize                                dataSize, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 4617 | const void*                                 pData) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4618 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4619 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4620 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4621 |  | 
|  | 4622 | data := pData[0:dataSize] | 
|  | 4623 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4624 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4625 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4626 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4627 | } | 
|  | 4628 |  | 
|  | 4629 | @threadSafety("app") | 
|  | 4630 | cmd void vkCmdFillBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4631 | VkCommandBuffer                             commandBuffer, | 
|  | 4632 | VkBuffer                                    dstBuffer, | 
|  | 4633 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4634 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4635 | u32                                         data) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4636 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4637 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4638 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4639 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4640 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4641 | } | 
|  | 4642 |  | 
|  | 4643 | @threadSafety("app") | 
|  | 4644 | cmd void vkCmdClearColorImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4645 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4646 | VkImage                                     image, | 
|  | 4647 | VkImageLayout                               imageLayout, | 
|  | 4648 | const VkClearColorValue*                    pColor, | 
|  | 4649 | u32                                         rangeCount, | 
|  | 4650 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4651 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4652 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4653 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4654 |  | 
|  | 4655 | ranges := pRanges[0:rangeCount] | 
|  | 4656 | for i in (0 .. rangeCount) { | 
|  | 4657 | range := ranges[i] | 
|  | 4658 | } | 
|  | 4659 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4660 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4661 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4662 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4663 | } | 
|  | 4664 |  | 
|  | 4665 | @threadSafety("app") | 
|  | 4666 | cmd void vkCmdClearDepthStencilImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4667 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4668 | VkImage                                     image, | 
|  | 4669 | VkImageLayout                               imageLayout, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4670 | const VkClearDepthStencilValue*             pDepthStencil, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4671 | u32                                         rangeCount, | 
|  | 4672 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4673 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4674 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4675 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4676 |  | 
|  | 4677 | ranges := pRanges[0:rangeCount] | 
|  | 4678 | for i in (0 .. rangeCount) { | 
|  | 4679 | range := ranges[i] | 
|  | 4680 | } | 
|  | 4681 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4682 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4683 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4684 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4685 | } | 
|  | 4686 |  | 
|  | 4687 | @threadSafety("app") | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 4688 | cmd void vkCmdClearAttachments( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4689 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 4690 | u32                                         attachmentCount, | 
|  | 4691 | const VkClearAttachment*                    pAttachments, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4692 | u32                                         rectCount, | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 4693 | const VkClearRect*                          pRects) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4694 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4695 |  | 
|  | 4696 | rects := pRects[0:rectCount] | 
|  | 4697 | for i in (0 .. rectCount) { | 
|  | 4698 | rect := rects[i] | 
|  | 4699 | } | 
|  | 4700 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4701 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4702 | } | 
|  | 4703 |  | 
|  | 4704 | @threadSafety("app") | 
|  | 4705 | cmd void vkCmdResolveImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4706 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4707 | VkImage                                     srcImage, | 
|  | 4708 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4709 | VkImage                                     dstImage, | 
|  | 4710 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 | u32                                         regionCount, | 
|  | 4712 | const VkImageResolve*                       pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4713 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4714 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4715 | dstImageObject := GetImage(dstImage) | 
|  | 4716 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 4717 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4718 |  | 
|  | 4719 | regions := pRegions[0:regionCount] | 
|  | 4720 | for i in (0 .. regionCount) { | 
|  | 4721 | region := regions[i] | 
|  | 4722 | } | 
|  | 4723 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4724 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 4725 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4726 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4727 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4728 | } | 
|  | 4729 |  | 
|  | 4730 | @threadSafety("app") | 
|  | 4731 | cmd void vkCmdSetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4732 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4733 | VkEvent                                     event, | 
|  | 4734 | VkPipelineStageFlags                        stageMask) { | 
| 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 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4737 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4738 | } | 
|  | 4739 |  | 
|  | 4740 | @threadSafety("app") | 
|  | 4741 | cmd void vkCmdResetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4742 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4743 | VkEvent                                     event, | 
|  | 4744 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4745 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4746 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4747 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4748 | } | 
|  | 4749 |  | 
|  | 4750 | @threadSafety("app") | 
|  | 4751 | cmd void vkCmdWaitEvents( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4752 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4753 | u32                                         eventCount, | 
|  | 4754 | const VkEvent*                              pEvents, | 
|  | 4755 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4756 | VkPipelineStageFlags                        dstStageMask, | 
|  | 4757 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4758 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 4759 | u32                                         bufferMemoryBarrierCount, | 
|  | 4760 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 4761 | u32                                         imageMemoryBarrierCount, | 
|  | 4762 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4763 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4764 |  | 
|  | 4765 | events := pEvents[0:eventCount] | 
|  | 4766 | for i in (0 .. eventCount) { | 
|  | 4767 | event := events[i] | 
|  | 4768 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4769 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4770 | } | 
|  | 4771 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4772 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4773 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4774 | memoryBarrier := memoryBarriers[i] | 
|  | 4775 | } | 
|  | 4776 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 4777 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 4778 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 4779 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 4780 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 4781 | } | 
|  | 4782 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 4783 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 4784 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 4785 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 4786 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4787 | } | 
|  | 4788 | } | 
|  | 4789 |  | 
|  | 4790 | @threadSafety("app") | 
|  | 4791 | cmd void vkCmdPipelineBarrier( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4792 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4793 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4794 | VkPipelineStageFlags                        dstStageMask, | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 4795 | VkDependencyFlags                           dependencyFlags, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4796 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4797 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 4798 | u32                                         bufferMemoryBarrierCount, | 
|  | 4799 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 4800 | u32                                         imageMemoryBarrierCount, | 
|  | 4801 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4802 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4803 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4804 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4805 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4806 | memoryBarrier := memoryBarriers[i] | 
|  | 4807 | } | 
|  | 4808 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 4809 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 4810 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 4811 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 4812 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 4813 | } | 
|  | 4814 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 4815 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 4816 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 4817 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 4818 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4819 | } | 
|  | 4820 | } | 
|  | 4821 |  | 
|  | 4822 | @threadSafety("app") | 
|  | 4823 | cmd void vkCmdBeginQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4824 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4825 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4826 | u32                                         query, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4827 | VkQueryControlFlags                         flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4828 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4829 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4830 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4831 | } | 
|  | 4832 |  | 
|  | 4833 | @threadSafety("app") | 
|  | 4834 | cmd void vkCmdEndQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4835 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4836 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4837 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4838 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4839 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4840 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4841 | } | 
|  | 4842 |  | 
|  | 4843 | @threadSafety("app") | 
|  | 4844 | cmd void vkCmdResetQueryPool( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4845 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4846 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4847 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4848 | u32                                         queryCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4849 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4850 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4851 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4852 | } | 
|  | 4853 |  | 
|  | 4854 | @threadSafety("app") | 
|  | 4855 | cmd void vkCmdWriteTimestamp( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4856 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 4857 | VkPipelineStageFlagBits                     pipelineStage, | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 4858 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4859 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4860 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 4861 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4862 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4863 | } | 
|  | 4864 |  | 
|  | 4865 | @threadSafety("app") | 
|  | 4866 | cmd void vkCmdCopyQueryPoolResults( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4867 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4869 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4870 | u32                                         queryCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4871 | VkBuffer                                    dstBuffer, | 
|  | 4872 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4873 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4874 | VkQueryResultFlags                          flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4875 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4876 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4877 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4878 | assert(commandBufferObject.device == queryPoolObject.device) | 
|  | 4879 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4880 | } | 
|  | 4881 |  | 
|  | 4882 | cmd void vkCmdPushConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4883 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4884 | VkPipelineLayout                            layout, | 
|  | 4885 | VkShaderStageFlags                          stageFlags, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4886 | u32                                         offset, | 
|  | 4887 | u32                                         size, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4888 | const void*                                 pValues) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4889 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4890 | layoutObject := GetPipelineLayout(layout) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4891 | assert(commandBufferObject.device == layoutObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4892 | } | 
|  | 4893 |  | 
|  | 4894 | @threadSafety("app") | 
|  | 4895 | cmd void vkCmdBeginRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4896 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4897 | const VkRenderPassBeginInfo*                pRenderPassBegin, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4898 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4899 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4900 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) | 
|  | 4901 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4902 | assert(commandBufferObject.device == renderPassObject.device) | 
|  | 4903 | assert(commandBufferObject.device == framebufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4904 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4905 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4906 | } | 
|  | 4907 |  | 
|  | 4908 | cmd void vkCmdNextSubpass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4909 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4910 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4911 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4912 | } | 
|  | 4913 |  | 
|  | 4914 | @threadSafety("app") | 
|  | 4915 | cmd void vkCmdEndRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4916 | VkCommandBuffer                             commandBuffer) { | 
|  | 4917 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4918 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4919 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 | } | 
|  | 4921 |  | 
|  | 4922 | cmd void vkCmdExecuteCommands( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4923 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4924 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4925 | const VkCommandBuffer*                      pCommandBuffers) { | 
|  | 4926 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4927 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4928 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
|  | 4929 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4930 | secondaryCommandBuffer := commandBuffers[i] | 
|  | 4931 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) | 
|  | 4932 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4933 | } | 
|  | 4934 | } | 
|  | 4935 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 4936 | @extension("VK_KHR_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4937 | cmd void vkDestroySurfaceKHR( | 
|  | 4938 | VkInstance                                  instance, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 4939 | VkSurfaceKHR                                surface, | 
|  | 4940 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4941 | instanceObject := GetInstance(instance) | 
|  | 4942 | surfaceObject := GetSurface(surface) | 
|  | 4943 | assert(surfaceObject.instance == instance) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 4944 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4945 | State.Surfaces[surface] = null | 
| Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 4946 | } | 
|  | 4947 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 4948 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 4949 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4950 | VkPhysicalDevice                            physicalDevice, | 
|  | 4951 | u32                                         queueFamilyIndex, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4952 | VkSurfaceKHR                                surface, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4953 | VkBool32*                                   pSupported) { | 
|  | 4954 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 4955 |  | 
|  | 4956 | return ? | 
|  | 4957 | } | 
|  | 4958 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 4959 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4960 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( | 
|  | 4961 | VkPhysicalDevice                            physicalDevice, | 
|  | 4962 | VkSurfaceKHR                                surface, | 
|  | 4963 | VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities) { | 
|  | 4964 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 4965 |  | 
|  | 4966 | surfaceCapabilities := ? | 
|  | 4967 | pSurfaceCapabilities[0] = surfaceCapabilities | 
|  | 4968 |  | 
|  | 4969 | return ? | 
|  | 4970 | } | 
|  | 4971 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 4972 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4973 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( | 
|  | 4974 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4975 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4976 | u32*                                        pSurfaceFormatCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4977 | VkSurfaceFormatKHR*                         pSurfaceFormats) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4978 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 4979 |  | 
|  | 4980 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4981 | pSurfaceFormatCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 4982 | surfaceFormats := pSurfaceFormats[0:count] | 
|  | 4983 |  | 
|  | 4984 | for i in (0 .. count) { | 
|  | 4985 | surfaceFormat := ? | 
|  | 4986 | surfaceFormats[i] = surfaceFormat | 
|  | 4987 | } | 
|  | 4988 |  | 
|  | 4989 | return ? | 
|  | 4990 | } | 
|  | 4991 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 4992 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4993 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( | 
|  | 4994 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4995 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4996 | u32*                                        pPresentModeCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 4997 | VkPresentModeKHR*                           pPresentModes) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4998 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 4999 |  | 
|  | 5000 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5001 | pPresentModeCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5002 | presentModes := pPresentModes[0:count] | 
|  | 5003 |  | 
|  | 5004 | for i in (0 .. count) { | 
|  | 5005 | presentMode := ? | 
|  | 5006 | presentModes[i] = presentMode | 
|  | 5007 | } | 
|  | 5008 |  | 
|  | 5009 | return ? | 
|  | 5010 | } | 
|  | 5011 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5012 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5013 | cmd VkResult vkCreateSwapchainKHR( | 
|  | 5014 | VkDevice                                 device, | 
|  | 5015 | const VkSwapchainCreateInfoKHR*          pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5016 | const VkAllocationCallbacks*             pAllocator, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5017 | VkSwapchainKHR*                          pSwapchain) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5018 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5019 | deviceObject := GetDevice(device) | 
|  | 5020 |  | 
|  | 5021 | swapchain := ? | 
|  | 5022 | pSwapchain[0] = swapchain | 
|  | 5023 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) | 
|  | 5024 |  | 
|  | 5025 | return ? | 
|  | 5026 | } | 
|  | 5027 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5028 | @extension("VK_KHR_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5029 | cmd void vkDestroySwapchainKHR( | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5030 | VkDevice                                 device, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5031 | VkSwapchainKHR                           swapchain, | 
|  | 5032 | const VkAllocationCallbacks*             pAllocator) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5033 | deviceObject := GetDevice(device) | 
|  | 5034 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5035 | assert(swapchainObject.device == device) | 
|  | 5036 |  | 
|  | 5037 | State.Swapchains[swapchain] = null | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5038 | } | 
|  | 5039 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5040 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5041 | cmd VkResult vkGetSwapchainImagesKHR( | 
|  | 5042 | VkDevice                                 device, | 
|  | 5043 | VkSwapchainKHR                           swapchain, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5044 | u32*                                     pSwapchainImageCount, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5045 | VkImage*                                 pSwapchainImages) { | 
|  | 5046 | deviceObject := GetDevice(device) | 
|  | 5047 |  | 
|  | 5048 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5049 | pSwapchainImageCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5050 | swapchainImages := pSwapchainImages[0:count] | 
|  | 5051 |  | 
|  | 5052 | for i in (0 .. count) { | 
|  | 5053 | swapchainImage := ? | 
|  | 5054 | swapchainImages[i] = swapchainImage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5055 | State.Images[swapchainImage] = new!ImageObject(device: device) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5056 | } | 
|  | 5057 |  | 
|  | 5058 | return ? | 
|  | 5059 | } | 
|  | 5060 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5061 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5062 | cmd VkResult vkAcquireNextImageKHR( | 
|  | 5063 | VkDevice                                 device, | 
|  | 5064 | VkSwapchainKHR                           swapchain, | 
|  | 5065 | u64                                      timeout, | 
|  | 5066 | VkSemaphore                              semaphore, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5067 | VkFence                                  fence, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5068 | u32*                                     pImageIndex) { | 
|  | 5069 | deviceObject := GetDevice(device) | 
|  | 5070 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5071 |  | 
|  | 5072 | imageIndex := ? | 
|  | 5073 | pImageIndex[0] = imageIndex | 
|  | 5074 |  | 
|  | 5075 | return ? | 
|  | 5076 | } | 
|  | 5077 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5078 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5079 | cmd VkResult vkQueuePresentKHR( | 
|  | 5080 | VkQueue                                  queue, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5081 | const VkPresentInfoKHR*                  pPresentInfo) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5082 | queueObject := GetQueue(queue) | 
|  | 5083 |  | 
|  | 5084 | presentInfo := ? | 
|  | 5085 | pPresentInfo[0] = presentInfo | 
|  | 5086 |  | 
|  | 5087 | return ? | 
|  | 5088 | } | 
|  | 5089 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5090 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5091 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( | 
|  | 5092 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5093 | u32*                                    pPropertyCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5094 | VkDisplayPropertiesKHR*                 pProperties) { | 
|  | 5095 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5096 | return ? | 
|  | 5097 | } | 
|  | 5098 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5099 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5100 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( | 
|  | 5101 | VkPhysicalDevice                        physicalDevice, | 
|  | 5102 | u32*                                    pPropertyCount, | 
|  | 5103 | VkDisplayPlanePropertiesKHR*            pProperties) { | 
|  | 5104 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5105 | return ? | 
|  | 5106 | } | 
|  | 5107 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5108 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5109 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( | 
|  | 5110 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5111 | u32                                     planeIndex, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5112 | u32*                                    pDisplayCount, | 
|  | 5113 | VkDisplayKHR*                           pDisplays) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5114 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5115 | return ? | 
|  | 5116 | } | 
|  | 5117 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5118 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5119 | cmd VkResult vkGetDisplayModePropertiesKHR( | 
|  | 5120 | VkPhysicalDevice                        physicalDevice, | 
|  | 5121 | VkDisplayKHR                            display, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5122 | u32*                                    pPropertyCount, | 
|  | 5123 | VkDisplayModePropertiesKHR*             pProperties) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5124 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5125 | return ? | 
|  | 5126 | } | 
|  | 5127 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5128 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5129 | cmd VkResult vkCreateDisplayModeKHR( | 
|  | 5130 | VkPhysicalDevice                        physicalDevice, | 
|  | 5131 | VkDisplayKHR                            display, | 
|  | 5132 | const VkDisplayModeCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5133 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5134 | VkDisplayModeKHR*                       pMode) { | 
|  | 5135 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5136 | return ? | 
|  | 5137 | } | 
|  | 5138 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5139 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5140 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5141 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5142 | VkDisplayModeKHR                        mode, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5143 | u32                                     planeIndex, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5144 | VkDisplayPlaneCapabilitiesKHR*          pCapabilities) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5145 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5146 | return ? | 
|  | 5147 | } | 
|  | 5148 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5149 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5150 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( | 
|  | 5151 | VkInstance                              instance, | 
|  | 5152 | const VkDisplaySurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5153 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5154 | VkSurfaceKHR*                           pSurface) { | 
|  | 5155 | return ? | 
|  | 5156 | } | 
|  | 5157 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5158 | @extension("VK_KHR_display_swapchain") | 
|  | 5159 | cmd VkResult vkCreateSharedSwapchainsKHR( | 
|  | 5160 | VkDevice                                device, | 
|  | 5161 | u32                                     swapchainCount, | 
|  | 5162 | const VkSwapchainCreateInfoKHR*         pCreateInfos, | 
|  | 5163 | const VkAllocationCallbacks*            pAllocator, | 
|  | 5164 | VkSwapchainKHR*                         pSwapchains) { | 
|  | 5165 | return ? | 
|  | 5166 | } | 
|  | 5167 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5168 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5169 | cmd VkResult vkCreateXlibSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5170 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5171 | const VkXlibSurfaceCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5172 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5173 | VkSurfaceKHR*                           pSurface) { | 
|  | 5174 | instanceObject := GetInstance(instance) | 
|  | 5175 | return ? | 
|  | 5176 | } | 
|  | 5177 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5178 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5179 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( | 
|  | 5180 | VkPhysicalDevice                        physicalDevice, | 
|  | 5181 | u32                                     queueFamilyIndex, | 
|  | 5182 | platform.Display*                       dpy, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5183 | platform.VisualID                       visualID) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5184 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5185 | return ? | 
|  | 5186 | } | 
|  | 5187 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5188 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5189 | cmd VkResult vkCreateXcbSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5190 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5191 | const VkXcbSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5192 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5193 | VkSurfaceKHR*                           pSurface) { | 
|  | 5194 | instanceObject := GetInstance(instance) | 
|  | 5195 | return ? | 
|  | 5196 | } | 
|  | 5197 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5198 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5199 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( | 
|  | 5200 | VkPhysicalDevice                        physicalDevice, | 
|  | 5201 | u32                                     queueFamilyIndex, | 
|  | 5202 | platform.xcb_connection_t*              connection, | 
|  | 5203 | platform.xcb_visualid_t                 visual_id) { | 
|  | 5204 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5205 | return ? | 
|  | 5206 | } | 
|  | 5207 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5208 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5209 | cmd VkResult vkCreateWaylandSurfaceKHR( | 
|  | 5210 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5211 | const VkWaylandSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5212 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5213 | VkSurfaceKHR*                           pSurface) { | 
|  | 5214 | instanceObject := GetInstance(instance) | 
|  | 5215 | return ? | 
|  | 5216 | } | 
|  | 5217 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5218 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5219 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( | 
|  | 5220 | VkPhysicalDevice                        physicalDevice, | 
|  | 5221 | u32                                     queueFamilyIndex, | 
|  | 5222 | platform.wl_display*                    display) { | 
|  | 5223 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5224 | return ? | 
|  | 5225 | } | 
|  | 5226 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5227 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5228 | cmd VkResult vkCreateMirSurfaceKHR( | 
|  | 5229 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5230 | const VkMirSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5231 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5232 | VkSurfaceKHR*                           pSurface) { | 
|  | 5233 | instanceObject := GetInstance(instance) | 
|  | 5234 | return ? | 
|  | 5235 | } | 
|  | 5236 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5237 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5238 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( | 
|  | 5239 | VkPhysicalDevice                        physicalDevice, | 
|  | 5240 | u32                                     queueFamilyIndex, | 
|  | 5241 | platform.MirConnection*                 connection) { | 
|  | 5242 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5243 | return ? | 
|  | 5244 | } | 
|  | 5245 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5246 | @extension("VK_KHR_android_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5247 | cmd VkResult vkCreateAndroidSurfaceKHR( | 
|  | 5248 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5249 | const VkAndroidSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5250 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5251 | VkSurfaceKHR*                           pSurface) { | 
|  | 5252 | instanceObject := GetInstance(instance) | 
|  | 5253 | return ? | 
|  | 5254 | } | 
|  | 5255 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5256 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5257 | cmd VkResult vkCreateWin32SurfaceKHR( | 
|  | 5258 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5259 | const VkWin32SurfaceCreateInfoKHR*      pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5260 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5261 | VkSurfaceKHR*                           pSurface) { | 
|  | 5262 | instanceObject := GetInstance(instance) | 
|  | 5263 | return ? | 
|  | 5264 | } | 
|  | 5265 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5266 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5267 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( | 
|  | 5268 | VkPhysicalDevice                        physicalDevice, | 
|  | 5269 | u32                                     queueFamilyIndex) { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5270 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5271 | return ? | 
|  | 5272 | } | 
|  | 5273 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5274 | @extension("VK_ANDROID_native_buffer") | 
|  | 5275 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( | 
|  | 5276 | VkDevice                                device, | 
|  | 5277 | VkFormat                                format, | 
|  | 5278 | VkImageUsageFlags                       imageUsage, | 
|  | 5279 | int*                                    grallocUsage) { | 
|  | 5280 | return ? | 
|  | 5281 | } | 
|  | 5282 |  | 
|  | 5283 | @extension("VK_ANDROID_native_buffer") | 
|  | 5284 | cmd VkResult vkAcquireImageANDROID( | 
|  | 5285 | VkDevice                                device, | 
|  | 5286 | VkImage                                 image, | 
|  | 5287 | int                                     nativeFenceFd, | 
|  | 5288 | VkSemaphore                             semaphore, | 
|  | 5289 | VkFence                                 fence) { | 
|  | 5290 | return ? | 
|  | 5291 | } | 
|  | 5292 |  | 
|  | 5293 | @extension("VK_ANDROID_native_buffer") | 
|  | 5294 | cmd VkResult vkQueueSignalReleaseImageANDROID( | 
|  | 5295 | VkQueue                                 queue, | 
|  | 5296 | u32                                     waitSemaphoreCount, | 
|  | 5297 | const VkSemaphore*                      pWaitSemaphores, | 
|  | 5298 | VkImage                                 image, | 
|  | 5299 | int*                                    pNativeFenceFd) { | 
|  | 5300 | return ? | 
|  | 5301 | } | 
|  | 5302 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5303 | @extension("VK_EXT_debug_report") | 
|  | 5304 | @external type void* PFN_vkDebugReportCallbackEXT | 
|  | 5305 | @extension("VK_EXT_debug_report") | 
|  | 5306 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( | 
|  | 5307 | VkDebugReportFlagsEXT                   flags, | 
|  | 5308 | VkDebugReportObjectTypeEXT              objectType, | 
|  | 5309 | u64                                     object, | 
|  | 5310 | platform.size_t                         location, | 
|  | 5311 | s32                                     messageCode, | 
|  | 5312 | const char*                             pLayerPrefix, | 
|  | 5313 | const char*                             pMessage, | 
|  | 5314 | void*                                   pUserData) { | 
|  | 5315 | return ? | 
|  | 5316 | } | 
|  | 5317 |  | 
|  | 5318 | @extension("VK_EXT_debug_report") | 
|  | 5319 | cmd VkResult vkCreateDebugReportCallbackEXT( | 
|  | 5320 | VkInstance                                  instance, | 
|  | 5321 | const VkDebugReportCallbackCreateInfoEXT*   pCreateInfo, | 
|  | 5322 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5323 | VkDebugReportCallbackEXT*                   pCallback) { | 
|  | 5324 | return ? | 
|  | 5325 | } | 
|  | 5326 |  | 
|  | 5327 | @extension("VK_EXT_debug_report") | 
|  | 5328 | cmd void vkDestroyDebugReportCallbackEXT( | 
|  | 5329 | VkInstance                                  instance, | 
|  | 5330 | VkDebugReportCallbackEXT                    callback, | 
|  | 5331 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5332 | } | 
|  | 5333 |  | 
|  | 5334 | @extension("VK_EXT_debug_report") | 
|  | 5335 | cmd void vkDebugReportMessageEXT( | 
|  | 5336 | VkInstance                                  instance, | 
|  | 5337 | VkDebugReportFlagsEXT                       flags, | 
|  | 5338 | VkDebugReportObjectTypeEXT                  objectType, | 
|  | 5339 | u64                                         object, | 
|  | 5340 | platform.size_t                             location, | 
|  | 5341 | s32                                         messageCode, | 
|  | 5342 | const char*                                 pLayerPrefix, | 
|  | 5343 | const char*                                 pMessage) { | 
|  | 5344 | } | 
|  | 5345 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5346 | @extension("VK_EXT_debug_marker") | 
|  | 5347 | cmd VkResult vkDebugMarkerSetObjectTagEXT( | 
|  | 5348 | VkDevice                                    device, | 
|  | 5349 | VkDebugMarkerObjectTagInfoEXT*              pTagInfo) { | 
|  | 5350 | return ? | 
|  | 5351 | } | 
|  | 5352 |  | 
|  | 5353 | @extension("VK_EXT_debug_marker") | 
|  | 5354 | cmd VkResult vkDebugMarkerSetObjectNameEXT( | 
|  | 5355 | VkDevice                                    device, | 
|  | 5356 | VkDebugMarkerObjectNameInfoEXT*             pNameInfo) { | 
|  | 5357 | return ? | 
|  | 5358 | } | 
|  | 5359 |  | 
|  | 5360 | @extension("VK_EXT_debug_marker") | 
|  | 5361 | cmd void vkCmdDebugMarkerBeginEXT( | 
|  | 5362 | VkCommandBuffer                             commandBuffer, | 
|  | 5363 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5364 | } | 
|  | 5365 |  | 
|  | 5366 | @extension("VK_EXT_debug_marker") | 
|  | 5367 | cmd void vkCmdDebugMarkerEndEXT( | 
|  | 5368 | VkCommandBuffer                             commandBuffer) { | 
|  | 5369 | } | 
|  | 5370 |  | 
|  | 5371 | @extension("VK_EXT_debug_marker") | 
|  | 5372 | cmd void vkCmdDebugMarkerInsertEXT( | 
|  | 5373 | VkCommandBuffer                             commandBuffer, | 
|  | 5374 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5375 | } | 
|  | 5376 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5377 |  | 
|  | 5378 | //////////////// | 
|  | 5379 | // Validation // | 
|  | 5380 | //////////////// | 
|  | 5381 |  | 
|  | 5382 | extern void validate(string layerName, bool condition, string message) | 
|  | 5383 |  | 
|  | 5384 |  | 
|  | 5385 | ///////////////////////////// | 
|  | 5386 | // Internal State Tracking // | 
|  | 5387 | ///////////////////////////// | 
|  | 5388 |  | 
|  | 5389 | StateObject State | 
|  | 5390 |  | 
|  | 5391 | @internal class StateObject { | 
|  | 5392 | // Dispatchable objects. | 
|  | 5393 | map!(VkInstance,       ref!InstanceObject)       Instances | 
|  | 5394 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices | 
|  | 5395 | map!(VkDevice,         ref!DeviceObject)         Devices | 
|  | 5396 | map!(VkQueue,          ref!QueueObject)          Queues | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5397 | map!(VkCommandBuffer,  ref!CommandBufferObject)  CommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5398 |  | 
|  | 5399 | // Non-dispatchable objects. | 
|  | 5400 | map!(VkDeviceMemory,             ref!DeviceMemoryObject)             DeviceMemories | 
|  | 5401 | map!(VkBuffer,                   ref!BufferObject)                   Buffers | 
|  | 5402 | map!(VkBufferView,               ref!BufferViewObject)               BufferViews | 
|  | 5403 | map!(VkImage,                    ref!ImageObject)                    Images | 
|  | 5404 | map!(VkImageView,                ref!ImageViewObject)                ImageViews | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5405 | map!(VkShaderModule,             ref!ShaderModuleObject)             ShaderModules | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5406 | map!(VkPipeline,                 ref!PipelineObject)                 Pipelines | 
|  | 5407 | map!(VkPipelineLayout,           ref!PipelineLayoutObject)           PipelineLayouts | 
|  | 5408 | map!(VkSampler,                  ref!SamplerObject)                  Samplers | 
|  | 5409 | map!(VkDescriptorSet,            ref!DescriptorSetObject)            DescriptorSets | 
|  | 5410 | map!(VkDescriptorSetLayout,      ref!DescriptorSetLayoutObject)      DescriptorSetLayouts | 
|  | 5411 | map!(VkDescriptorPool,           ref!DescriptorPoolObject)           DescriptorPools | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5412 | map!(VkFence,                    ref!FenceObject)                    Fences | 
|  | 5413 | map!(VkSemaphore,                ref!SemaphoreObject)                Semaphores | 
|  | 5414 | map!(VkEvent,                    ref!EventObject)                    Events | 
|  | 5415 | map!(VkQueryPool,                ref!QueryPoolObject)                QueryPools | 
|  | 5416 | map!(VkFramebuffer,              ref!FramebufferObject)              Framebuffers | 
|  | 5417 | map!(VkRenderPass,               ref!RenderPassObject)               RenderPasses | 
|  | 5418 | map!(VkPipelineCache,            ref!PipelineCacheObject)            PipelineCaches | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5419 | map!(VkCommandPool,              ref!CommandPoolObject)              CommandPools | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5420 | map!(VkSurfaceKHR,               ref!SurfaceObject)                  Surfaces | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5421 | map!(VkSwapchainKHR,             ref!SwapchainObject)                Swapchains | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5422 | } | 
|  | 5423 |  | 
|  | 5424 | @internal class InstanceObject { | 
|  | 5425 | } | 
|  | 5426 |  | 
|  | 5427 | @internal class PhysicalDeviceObject { | 
|  | 5428 | VkInstance instance | 
|  | 5429 | } | 
|  | 5430 |  | 
|  | 5431 | @internal class DeviceObject { | 
|  | 5432 | VkPhysicalDevice physicalDevice | 
|  | 5433 | } | 
|  | 5434 |  | 
|  | 5435 | @internal class QueueObject { | 
|  | 5436 | VkDevice      device | 
|  | 5437 | VkQueueFlags  flags | 
|  | 5438 | } | 
|  | 5439 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5440 | @internal class CommandBufferObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5441 | VkDevice                  device | 
|  | 5442 | map!(u64, VkDeviceMemory) boundObjects | 
|  | 5443 | VkQueueFlags              queueFlags | 
|  | 5444 | } | 
|  | 5445 |  | 
|  | 5446 | @internal class DeviceMemoryObject { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5447 | VkDevice                                device | 
|  | 5448 | VkDeviceSize                            allocationSize | 
|  | 5449 | map!(u64, VkDeviceSize)                 boundObjects | 
|  | 5450 | map!(VkCommandBuffer, VkCommandBuffer)  boundCommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5451 | } | 
|  | 5452 |  | 
|  | 5453 | @internal class BufferObject { | 
|  | 5454 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5455 | VkDeviceMemory        memory | 
|  | 5456 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5457 | } | 
|  | 5458 |  | 
|  | 5459 | @internal class BufferViewObject { | 
|  | 5460 | VkDevice      device | 
|  | 5461 | VkBuffer      buffer | 
|  | 5462 | } | 
|  | 5463 |  | 
|  | 5464 | @internal class ImageObject { | 
|  | 5465 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5466 | VkDeviceMemory        memory | 
|  | 5467 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5468 | } | 
|  | 5469 |  | 
|  | 5470 | @internal class ImageViewObject { | 
|  | 5471 | VkDevice      device | 
|  | 5472 | VkImage       image | 
|  | 5473 | } | 
|  | 5474 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5475 | @internal class ShaderObject { | 
|  | 5476 | VkDevice      device | 
|  | 5477 | } | 
|  | 5478 |  | 
|  | 5479 | @internal class ShaderModuleObject { | 
|  | 5480 | VkDevice      device | 
|  | 5481 | } | 
|  | 5482 |  | 
|  | 5483 | @internal class PipelineObject { | 
|  | 5484 | VkDevice      device | 
|  | 5485 | } | 
|  | 5486 |  | 
|  | 5487 | @internal class PipelineLayoutObject { | 
|  | 5488 | VkDevice      device | 
|  | 5489 | } | 
|  | 5490 |  | 
|  | 5491 | @internal class SamplerObject { | 
|  | 5492 | VkDevice      device | 
|  | 5493 | } | 
|  | 5494 |  | 
|  | 5495 | @internal class DescriptorSetObject { | 
|  | 5496 | VkDevice      device | 
|  | 5497 | } | 
|  | 5498 |  | 
|  | 5499 | @internal class DescriptorSetLayoutObject { | 
|  | 5500 | VkDevice      device | 
|  | 5501 | } | 
|  | 5502 |  | 
|  | 5503 | @internal class DescriptorPoolObject { | 
|  | 5504 | VkDevice      device | 
|  | 5505 | } | 
|  | 5506 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5507 | @internal class FenceObject { | 
|  | 5508 | VkDevice      device | 
|  | 5509 | bool          signaled | 
|  | 5510 | } | 
|  | 5511 |  | 
|  | 5512 | @internal class SemaphoreObject { | 
|  | 5513 | VkDevice      device | 
|  | 5514 | } | 
|  | 5515 |  | 
|  | 5516 | @internal class EventObject { | 
|  | 5517 | VkDevice      device | 
|  | 5518 | } | 
|  | 5519 |  | 
|  | 5520 | @internal class QueryPoolObject { | 
|  | 5521 | VkDevice      device | 
|  | 5522 | } | 
|  | 5523 |  | 
|  | 5524 | @internal class FramebufferObject { | 
|  | 5525 | VkDevice      device | 
|  | 5526 | } | 
|  | 5527 |  | 
|  | 5528 | @internal class RenderPassObject { | 
|  | 5529 | VkDevice      device | 
|  | 5530 | } | 
|  | 5531 |  | 
|  | 5532 | @internal class PipelineCacheObject { | 
|  | 5533 | VkDevice      device | 
|  | 5534 | } | 
|  | 5535 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5536 | @internal class CommandPoolObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5537 | VkDevice      device | 
|  | 5538 | } | 
|  | 5539 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5540 | @internal class SurfaceObject { | 
|  | 5541 | VkInstance    instance | 
|  | 5542 | } | 
|  | 5543 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5544 | @internal class SwapchainObject { | 
|  | 5545 | VkDevice      device | 
|  | 5546 | } | 
|  | 5547 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5548 | macro ref!InstanceObject GetInstance(VkInstance instance) { | 
|  | 5549 | assert(instance in State.Instances) | 
|  | 5550 | return State.Instances[instance] | 
|  | 5551 | } | 
|  | 5552 |  | 
|  | 5553 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { | 
|  | 5554 | assert(physicalDevice in State.PhysicalDevices) | 
|  | 5555 | return State.PhysicalDevices[physicalDevice] | 
|  | 5556 | } | 
|  | 5557 |  | 
|  | 5558 | macro ref!DeviceObject GetDevice(VkDevice device) { | 
|  | 5559 | assert(device in State.Devices) | 
|  | 5560 | return State.Devices[device] | 
|  | 5561 | } | 
|  | 5562 |  | 
|  | 5563 | macro ref!QueueObject GetQueue(VkQueue queue) { | 
|  | 5564 | assert(queue in State.Queues) | 
|  | 5565 | return State.Queues[queue] | 
|  | 5566 | } | 
|  | 5567 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5568 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { | 
|  | 5569 | assert(commandBuffer in State.CommandBuffers) | 
|  | 5570 | return State.CommandBuffers[commandBuffer] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5571 | } | 
|  | 5572 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5573 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { | 
|  | 5574 | assert(memory in State.DeviceMemories) | 
|  | 5575 | return State.DeviceMemories[memory] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5576 | } | 
|  | 5577 |  | 
|  | 5578 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { | 
|  | 5579 | assert(buffer in State.Buffers) | 
|  | 5580 | return State.Buffers[buffer] | 
|  | 5581 | } | 
|  | 5582 |  | 
|  | 5583 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { | 
|  | 5584 | assert(bufferView in State.BufferViews) | 
|  | 5585 | return State.BufferViews[bufferView] | 
|  | 5586 | } | 
|  | 5587 |  | 
|  | 5588 | macro ref!ImageObject GetImage(VkImage image) { | 
|  | 5589 | assert(image in State.Images) | 
|  | 5590 | return State.Images[image] | 
|  | 5591 | } | 
|  | 5592 |  | 
|  | 5593 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { | 
|  | 5594 | assert(imageView in State.ImageViews) | 
|  | 5595 | return State.ImageViews[imageView] | 
|  | 5596 | } | 
|  | 5597 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5598 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { | 
|  | 5599 | assert(shaderModule in State.ShaderModules) | 
|  | 5600 | return State.ShaderModules[shaderModule] | 
|  | 5601 | } | 
|  | 5602 |  | 
|  | 5603 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { | 
|  | 5604 | assert(pipeline in State.Pipelines) | 
|  | 5605 | return State.Pipelines[pipeline] | 
|  | 5606 | } | 
|  | 5607 |  | 
|  | 5608 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { | 
|  | 5609 | assert(pipelineLayout in State.PipelineLayouts) | 
|  | 5610 | return State.PipelineLayouts[pipelineLayout] | 
|  | 5611 | } | 
|  | 5612 |  | 
|  | 5613 | macro ref!SamplerObject GetSampler(VkSampler sampler) { | 
|  | 5614 | assert(sampler in State.Samplers) | 
|  | 5615 | return State.Samplers[sampler] | 
|  | 5616 | } | 
|  | 5617 |  | 
|  | 5618 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { | 
|  | 5619 | assert(descriptorSet in State.DescriptorSets) | 
|  | 5620 | return State.DescriptorSets[descriptorSet] | 
|  | 5621 | } | 
|  | 5622 |  | 
|  | 5623 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { | 
|  | 5624 | assert(descriptorSetLayout in State.DescriptorSetLayouts) | 
|  | 5625 | return State.DescriptorSetLayouts[descriptorSetLayout] | 
|  | 5626 | } | 
|  | 5627 |  | 
|  | 5628 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { | 
|  | 5629 | assert(descriptorPool in State.DescriptorPools) | 
|  | 5630 | return State.DescriptorPools[descriptorPool] | 
|  | 5631 | } | 
|  | 5632 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5633 | macro ref!FenceObject GetFence(VkFence fence) { | 
|  | 5634 | assert(fence in State.Fences) | 
|  | 5635 | return State.Fences[fence] | 
|  | 5636 | } | 
|  | 5637 |  | 
|  | 5638 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { | 
|  | 5639 | assert(semaphore in State.Semaphores) | 
|  | 5640 | return State.Semaphores[semaphore] | 
|  | 5641 | } | 
|  | 5642 |  | 
|  | 5643 | macro ref!EventObject GetEvent(VkEvent event) { | 
|  | 5644 | assert(event in State.Events) | 
|  | 5645 | return State.Events[event] | 
|  | 5646 | } | 
|  | 5647 |  | 
|  | 5648 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { | 
|  | 5649 | assert(queryPool in State.QueryPools) | 
|  | 5650 | return State.QueryPools[queryPool] | 
|  | 5651 | } | 
|  | 5652 |  | 
|  | 5653 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { | 
|  | 5654 | assert(framebuffer in State.Framebuffers) | 
|  | 5655 | return State.Framebuffers[framebuffer] | 
|  | 5656 | } | 
|  | 5657 |  | 
|  | 5658 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { | 
|  | 5659 | assert(renderPass in State.RenderPasses) | 
|  | 5660 | return State.RenderPasses[renderPass] | 
|  | 5661 | } | 
|  | 5662 |  | 
|  | 5663 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { | 
|  | 5664 | assert(pipelineCache in State.PipelineCaches) | 
|  | 5665 | return State.PipelineCaches[pipelineCache] | 
|  | 5666 | } | 
|  | 5667 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5668 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { | 
|  | 5669 | assert(commandPool in State.CommandPools) | 
|  | 5670 | return State.CommandPools[commandPool] | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 5671 | } | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5672 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5673 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { | 
|  | 5674 | assert(surface in State.Surfaces) | 
|  | 5675 | return State.Surfaces[surface] | 
|  | 5676 | } | 
|  | 5677 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5678 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { | 
|  | 5679 | assert(swapchain in State.Swapchains) | 
|  | 5680 | return State.Swapchains[swapchain] | 
|  | 5681 | } | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 5682 |  | 
|  | 5683 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { | 
|  | 5684 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) | 
|  | 5685 | } |