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