| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1 | // Copyright (c) 2015 The Khronos Group Inc. | 
|  | 2 | // | 
|  | 3 | // Permission is hereby granted, free of charge, to any person obtaining a | 
|  | 4 | // copy of this software and/or associated documentation files (the | 
|  | 5 | // "Materials"), to deal in the Materials without restriction, including | 
|  | 6 | // without limitation the rights to use, copy, modify, merge, publish, | 
|  | 7 | // distribute, sublicense, and/or sell copies of the Materials, and to | 
|  | 8 | // permit persons to whom the Materials are furnished to do so, subject to | 
|  | 9 | // the following conditions: | 
|  | 10 | // | 
|  | 11 | // The above copyright notice and this permission notice shall be included | 
|  | 12 | // in all copies or substantial portions of the Materials. | 
|  | 13 | // | 
|  | 14 | // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | 
|  | 15 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | 
|  | 16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 
|  | 17 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | 
|  | 18 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | 
|  | 19 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 
|  | 20 | // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | 
|  | 21 |  | 
|  | 22 | import platform "platform.api" | 
|  | 23 |  | 
|  | 24 | /////////////// | 
|  | 25 | // Constants // | 
|  | 26 | /////////////// | 
|  | 27 |  | 
|  | 28 | // API version (major.minor.patch) | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 29 | define VERSION_MAJOR 1 | 
|  | 30 | define VERSION_MINOR 0 | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 31 | define VERSION_PATCH 38 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 32 |  | 
|  | 33 | // API limits | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 34 | define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 | 
|  | 35 | define VK_UUID_SIZE                     16 | 
|  | 36 | define VK_MAX_EXTENSION_NAME_SIZE       256 | 
|  | 37 | define VK_MAX_DESCRIPTION_SIZE          256 | 
|  | 38 | define VK_MAX_MEMORY_TYPES              32 | 
|  | 39 | define VK_MAX_MEMORY_HEAPS              16    /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types. | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 40 |  | 
|  | 41 | // API keywords | 
|  | 42 | define VK_TRUE        1 | 
|  | 43 | define VK_FALSE       0 | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 44 |  | 
|  | 45 | // API keyword, but needs special handling by some templates | 
|  | 46 | define NULL_HANDLE 0 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 47 |  | 
| Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 48 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION                 25 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 49 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME               "VK_KHR_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 50 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 51 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION             68 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 52 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME           "VK_KHR_swapchain" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 53 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 54 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION                 21 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 55 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME               "VK_KHR_display" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 56 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 57 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION     9 | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 58 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME   "VK_KHR_display_swapchain" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 59 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 60 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION       6 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 61 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME               "VK_KHR_xlib_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 62 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 63 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION         6 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 64 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME                 "VK_KHR_xcb_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 65 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 66 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 67 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME         "VK_KHR_wayland_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 68 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 69 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION         4 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 70 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME                 "VK_KHR_mir_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 71 |  | 
| Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 72 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 73 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME         "VK_KHR_android_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 74 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 75 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION     5 | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 76 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME             "VK_KHR_win32_surface" | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 77 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 78 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION     6 | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 79 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME             "VK_ANDROID_native_buffer" | 
|  | 80 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 81 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_SPEC_VERSION       4 | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 82 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME               "VK_EXT_debug_report" | 
|  | 83 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 84 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION           1 | 
|  | 85 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME                   "VK_NV_glsl_shader" | 
|  | 86 |  | 
|  | 87 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION   1 | 
|  | 88 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME           "VK_KHR_sampler_mirror_clamp_to_edge" | 
|  | 89 |  | 
|  | 90 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION       1 | 
|  | 91 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME               "VK_IMG_filter_cubic" | 
|  | 92 |  | 
|  | 93 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION   1 | 
|  | 94 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME           "VK_AMD_rasterization_order" | 
|  | 95 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 96 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 | 
|  | 97 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" | 
|  | 98 |  | 
|  | 99 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 | 
|  | 100 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" | 
|  | 101 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 102 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION       3 | 
|  | 103 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME               "VK_EXT_debug_marker" | 
|  | 104 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 105 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 | 
|  | 106 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" | 
|  | 107 |  | 
|  | 108 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 | 
|  | 109 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" | 
|  | 110 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 111 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 | 
|  | 112 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" | 
|  | 113 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 114 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 | 
|  | 115 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" | 
|  | 116 |  | 
|  | 117 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 | 
|  | 118 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" | 
|  | 119 |  | 
|  | 120 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 | 
|  | 121 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" | 
|  | 122 |  | 
|  | 123 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 | 
|  | 124 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" | 
|  | 125 |  | 
|  | 126 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 | 
|  | 127 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" | 
|  | 128 |  | 
|  | 129 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 | 
|  | 130 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" | 
|  | 131 |  | 
|  | 132 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 | 
|  | 133 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" | 
|  | 134 |  | 
|  | 135 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 | 
|  | 136 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" | 
|  | 137 |  | 
|  | 138 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 | 
|  | 139 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" | 
|  | 140 |  | 
|  | 141 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 | 
|  | 142 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" | 
|  | 143 |  | 
|  | 144 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 | 
|  | 145 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" | 
|  | 146 |  | 
|  | 147 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 148 |  | 
|  | 149 | ///////////// | 
|  | 150 | //  Types  // | 
|  | 151 | ///////////// | 
|  | 152 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 153 | type u32 VkBool32 | 
|  | 154 | type u32 VkFlags | 
|  | 155 | type u64 VkDeviceSize | 
|  | 156 | type u32 VkSampleMask | 
|  | 157 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 158 | /// Dispatchable handle types. | 
|  | 159 | @dispatchHandle type u64 VkInstance | 
|  | 160 | @dispatchHandle type u64 VkPhysicalDevice | 
|  | 161 | @dispatchHandle type u64 VkDevice | 
|  | 162 | @dispatchHandle type u64 VkQueue | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 163 | @dispatchHandle type u64 VkCommandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 164 |  | 
|  | 165 | /// Non dispatchable handle types. | 
|  | 166 | @nonDispatchHandle type u64 VkDeviceMemory | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 167 | @nonDispatchHandle type u64 VkCommandPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 168 | @nonDispatchHandle type u64 VkBuffer | 
|  | 169 | @nonDispatchHandle type u64 VkBufferView | 
|  | 170 | @nonDispatchHandle type u64 VkImage | 
|  | 171 | @nonDispatchHandle type u64 VkImageView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 172 | @nonDispatchHandle type u64 VkShaderModule | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 173 | @nonDispatchHandle type u64 VkPipeline | 
|  | 174 | @nonDispatchHandle type u64 VkPipelineLayout | 
|  | 175 | @nonDispatchHandle type u64 VkSampler | 
|  | 176 | @nonDispatchHandle type u64 VkDescriptorSet | 
|  | 177 | @nonDispatchHandle type u64 VkDescriptorSetLayout | 
|  | 178 | @nonDispatchHandle type u64 VkDescriptorPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 179 | @nonDispatchHandle type u64 VkFence | 
|  | 180 | @nonDispatchHandle type u64 VkSemaphore | 
|  | 181 | @nonDispatchHandle type u64 VkEvent | 
|  | 182 | @nonDispatchHandle type u64 VkQueryPool | 
|  | 183 | @nonDispatchHandle type u64 VkFramebuffer | 
|  | 184 | @nonDispatchHandle type u64 VkRenderPass | 
|  | 185 | @nonDispatchHandle type u64 VkPipelineCache | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 186 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 187 | @extension("VK_KHR_surface")    @nonDispatchHandle type u64 VkSurfaceKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 188 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 189 | @extension("VK_KHR_swapchain")  @nonDispatchHandle type u64 VkSwapchainKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 190 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 191 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayKHR | 
|  | 192 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayModeKHR | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 193 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 194 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT | 
|  | 195 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 196 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX | 
|  | 197 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX | 
|  | 198 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 199 |  | 
|  | 200 | ///////////// | 
|  | 201 | //  Enums  // | 
|  | 202 | ///////////// | 
|  | 203 |  | 
|  | 204 | enum VkImageLayout { | 
|  | 205 | VK_IMAGE_LAYOUT_UNDEFINED                               = 0x00000000,   /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) | 
|  | 206 | VK_IMAGE_LAYOUT_GENERAL                                 = 0x00000001,   /// General layout when image can be used for any kind of access | 
|  | 207 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL                = 0x00000002,   /// Optimal layout when image is only used for color attachment read/write | 
|  | 208 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL        = 0x00000003,   /// Optimal layout when image is only used for depth/stencil attachment read/write | 
|  | 209 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL         = 0x00000004,   /// Optimal layout when image is used for read only depth/stencil attachment and shader access | 
|  | 210 | 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] | 211 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL                    = 0x00000006,   /// Optimal layout when image is used only as source of transfer operations | 
|  | 212 | 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] | 213 | 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] | 214 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 215 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 216 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR                         = 1000001002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 217 | } | 
|  | 218 |  | 
|  | 219 | enum VkAttachmentLoadOp { | 
|  | 220 | VK_ATTACHMENT_LOAD_OP_LOAD                              = 0x00000000, | 
|  | 221 | VK_ATTACHMENT_LOAD_OP_CLEAR                             = 0x00000001, | 
|  | 222 | VK_ATTACHMENT_LOAD_OP_DONT_CARE                         = 0x00000002, | 
|  | 223 | } | 
|  | 224 |  | 
|  | 225 | enum VkAttachmentStoreOp { | 
|  | 226 | VK_ATTACHMENT_STORE_OP_STORE                            = 0x00000000, | 
|  | 227 | VK_ATTACHMENT_STORE_OP_DONT_CARE                        = 0x00000001, | 
|  | 228 | } | 
|  | 229 |  | 
|  | 230 | enum VkImageType { | 
|  | 231 | VK_IMAGE_TYPE_1D                                        = 0x00000000, | 
|  | 232 | VK_IMAGE_TYPE_2D                                        = 0x00000001, | 
|  | 233 | VK_IMAGE_TYPE_3D                                        = 0x00000002, | 
|  | 234 | } | 
|  | 235 |  | 
|  | 236 | enum VkImageTiling { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 237 | VK_IMAGE_TILING_OPTIMAL                                 = 0x00000000, | 
|  | 238 | VK_IMAGE_TILING_LINEAR                                  = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 239 | } | 
|  | 240 |  | 
|  | 241 | enum VkImageViewType { | 
|  | 242 | VK_IMAGE_VIEW_TYPE_1D                                   = 0x00000000, | 
|  | 243 | VK_IMAGE_VIEW_TYPE_2D                                   = 0x00000001, | 
|  | 244 | VK_IMAGE_VIEW_TYPE_3D                                   = 0x00000002, | 
|  | 245 | VK_IMAGE_VIEW_TYPE_CUBE                                 = 0x00000003, | 
|  | 246 | VK_IMAGE_VIEW_TYPE_1D_ARRAY                             = 0x00000004, | 
|  | 247 | VK_IMAGE_VIEW_TYPE_2D_ARRAY                             = 0x00000005, | 
|  | 248 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY                           = 0x00000006, | 
|  | 249 | } | 
|  | 250 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 251 | enum VkCommandBufferLevel { | 
|  | 252 | VK_COMMAND_BUFFER_LEVEL_PRIMARY                         = 0x00000000, | 
|  | 253 | VK_COMMAND_BUFFER_LEVEL_SECONDARY                       = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 254 | } | 
|  | 255 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 256 | enum VkComponentSwizzle { | 
|  | 257 | VK_COMPONENT_SWIZZLE_IDENTITY                           = 0x00000000, | 
|  | 258 | VK_COMPONENT_SWIZZLE_ZERO                               = 0x00000001, | 
|  | 259 | VK_COMPONENT_SWIZZLE_ONE                                = 0x00000002, | 
|  | 260 | VK_COMPONENT_SWIZZLE_R                                  = 0x00000003, | 
|  | 261 | VK_COMPONENT_SWIZZLE_G                                  = 0x00000004, | 
|  | 262 | VK_COMPONENT_SWIZZLE_B                                  = 0x00000005, | 
|  | 263 | VK_COMPONENT_SWIZZLE_A                                  = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 264 | } | 
|  | 265 |  | 
|  | 266 | enum VkDescriptorType { | 
|  | 267 | VK_DESCRIPTOR_TYPE_SAMPLER                              = 0x00000000, | 
|  | 268 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER               = 0x00000001, | 
|  | 269 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE                        = 0x00000002, | 
|  | 270 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE                        = 0x00000003, | 
|  | 271 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER                 = 0x00000004, | 
|  | 272 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER                 = 0x00000005, | 
|  | 273 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER                       = 0x00000006, | 
|  | 274 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER                       = 0x00000007, | 
|  | 275 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC               = 0x00000008, | 
|  | 276 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC               = 0x00000009, | 
|  | 277 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT                     = 0x0000000a, | 
|  | 278 | } | 
|  | 279 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 280 | enum VkQueryType { | 
|  | 281 | VK_QUERY_TYPE_OCCLUSION                                 = 0x00000000, | 
|  | 282 | VK_QUERY_TYPE_PIPELINE_STATISTICS                       = 0x00000001, /// Optional | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 283 | VK_QUERY_TYPE_TIMESTAMP                                 = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 284 | } | 
|  | 285 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 286 | enum VkBorderColor { | 
|  | 287 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK                 = 0x00000000, | 
|  | 288 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK                   = 0x00000001, | 
|  | 289 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK                      = 0x00000002, | 
|  | 290 | VK_BORDER_COLOR_INT_OPAQUE_BLACK                        = 0x00000003, | 
|  | 291 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE                      = 0x00000004, | 
|  | 292 | VK_BORDER_COLOR_INT_OPAQUE_WHITE                        = 0x00000005, | 
|  | 293 | } | 
|  | 294 |  | 
|  | 295 | enum VkPipelineBindPoint { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 296 | VK_PIPELINE_BIND_POINT_GRAPHICS                         = 0x00000000, | 
|  | 297 | VK_PIPELINE_BIND_POINT_COMPUTE                          = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 298 | } | 
|  | 299 |  | 
|  | 300 | enum VkPrimitiveTopology { | 
|  | 301 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST                        = 0x00000000, | 
|  | 302 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST                         = 0x00000001, | 
|  | 303 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP                        = 0x00000002, | 
|  | 304 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST                     = 0x00000003, | 
|  | 305 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP                    = 0x00000004, | 
|  | 306 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN                      = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 307 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY          = 0x00000006, | 
|  | 308 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY         = 0x00000007, | 
|  | 309 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY      = 0x00000008, | 
|  | 310 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY     = 0x00000009, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 311 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST                        = 0x0000000a, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 312 | } | 
|  | 313 |  | 
|  | 314 | enum VkSharingMode { | 
|  | 315 | VK_SHARING_MODE_EXCLUSIVE                               = 0x00000000, | 
|  | 316 | VK_SHARING_MODE_CONCURRENT                              = 0x00000001, | 
|  | 317 | } | 
|  | 318 |  | 
|  | 319 | enum VkIndexType { | 
|  | 320 | VK_INDEX_TYPE_UINT16                                    = 0x00000000, | 
|  | 321 | VK_INDEX_TYPE_UINT32                                    = 0x00000001, | 
|  | 322 | } | 
|  | 323 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 324 | enum VkFilter { | 
|  | 325 | VK_FILTER_NEAREST                                       = 0x00000000, | 
|  | 326 | VK_FILTER_LINEAR                                        = 0x00000001, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 327 |  | 
|  | 328 | //@extension("VK_IMG_filter_cubic") | 
|  | 329 | VK_FILTER_CUBIC_IMG                                     = 1000015000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 330 | } | 
|  | 331 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 332 | enum VkSamplerMipmapMode { | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 333 | VK_SAMPLER_MIPMAP_MODE_NEAREST                          = 0x00000001,   /// Choose nearest mip level | 
|  | 334 | VK_SAMPLER_MIPMAP_MODE_LINEAR                           = 0x00000002,   /// Linear filter between mip levels | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 335 | } | 
|  | 336 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 337 | enum VkSamplerAddressMode { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 338 | VK_SAMPLER_ADDRESS_MODE_REPEAT                          = 0x00000000, | 
|  | 339 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT                 = 0x00000001, | 
|  | 340 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE                   = 0x00000002, | 
|  | 341 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER                 = 0x00000003, | 
|  | 342 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 343 | } | 
|  | 344 |  | 
|  | 345 | enum VkCompareOp { | 
|  | 346 | VK_COMPARE_OP_NEVER                                     = 0x00000000, | 
|  | 347 | VK_COMPARE_OP_LESS                                      = 0x00000001, | 
|  | 348 | VK_COMPARE_OP_EQUAL                                     = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 349 | VK_COMPARE_OP_LESS_OR_EQUAL                             = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 350 | VK_COMPARE_OP_GREATER                                   = 0x00000004, | 
|  | 351 | VK_COMPARE_OP_NOT_EQUAL                                 = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 352 | VK_COMPARE_OP_GREATER_OR_EQUAL                          = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 353 | VK_COMPARE_OP_ALWAYS                                    = 0x00000007, | 
|  | 354 | } | 
|  | 355 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 356 | enum VkPolygonMode { | 
|  | 357 | VK_POLYGON_MODE_FILL                                    = 0x00000000, | 
|  | 358 | VK_POLYGON_MODE_LINE                                    = 0x00000001, | 
|  | 359 | VK_POLYGON_MODE_POINT                                   = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 360 | } | 
|  | 361 |  | 
|  | 362 | enum VkFrontFace { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 363 | VK_FRONT_FACE_COUNTER_CLOCKWISE                         = 0x00000000, | 
|  | 364 | VK_FRONT_FACE_CLOCKWISE                                 = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 365 | } | 
|  | 366 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 367 | enum VkBlendFactor { | 
|  | 368 | VK_BLEND_FACTOR_ZERO                                    = 0x00000000, | 
|  | 369 | VK_BLEND_FACTOR_ONE                                     = 0x00000001, | 
|  | 370 | VK_BLEND_FACTOR_SRC_COLOR                               = 0x00000002, | 
|  | 371 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR                     = 0x00000003, | 
|  | 372 | VK_BLEND_FACTOR_DST_COLOR                               = 0x00000004, | 
|  | 373 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR                     = 0x00000005, | 
|  | 374 | VK_BLEND_FACTOR_SRC_ALPHA                               = 0x00000006, | 
|  | 375 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA                     = 0x00000007, | 
|  | 376 | VK_BLEND_FACTOR_DST_ALPHA                               = 0x00000008, | 
|  | 377 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA                     = 0x00000009, | 
|  | 378 | VK_BLEND_FACTOR_CONSTANT_COLOR                          = 0x0000000a, | 
|  | 379 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR                = 0x0000000b, | 
|  | 380 | VK_BLEND_FACTOR_CONSTANT_ALPHA                          = 0x0000000c, | 
|  | 381 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA                = 0x0000000d, | 
|  | 382 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE                      = 0x0000000e, | 
|  | 383 | VK_BLEND_FACTOR_SRC1_COLOR                              = 0x0000000f, | 
|  | 384 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR                    = 0x00000010, | 
|  | 385 | VK_BLEND_FACTOR_SRC1_ALPHA                              = 0x00000011, | 
|  | 386 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA                    = 0x00000012, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 387 | } | 
|  | 388 |  | 
|  | 389 | enum VkBlendOp { | 
|  | 390 | VK_BLEND_OP_ADD                                         = 0x00000000, | 
|  | 391 | VK_BLEND_OP_SUBTRACT                                    = 0x00000001, | 
|  | 392 | VK_BLEND_OP_REVERSE_SUBTRACT                            = 0x00000002, | 
|  | 393 | VK_BLEND_OP_MIN                                         = 0x00000003, | 
|  | 394 | VK_BLEND_OP_MAX                                         = 0x00000004, | 
|  | 395 | } | 
|  | 396 |  | 
|  | 397 | enum VkStencilOp { | 
|  | 398 | VK_STENCIL_OP_KEEP                                      = 0x00000000, | 
|  | 399 | VK_STENCIL_OP_ZERO                                      = 0x00000001, | 
|  | 400 | VK_STENCIL_OP_REPLACE                                   = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 401 | VK_STENCIL_OP_INCREMENT_AND_CLAMP                       = 0x00000003, | 
|  | 402 | VK_STENCIL_OP_DECREMENT_AND_CLAMP                       = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 403 | VK_STENCIL_OP_INVERT                                    = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 404 | VK_STENCIL_OP_INCREMENT_AND_WRAP                        = 0x00000006, | 
|  | 405 | VK_STENCIL_OP_DECREMENT_AND_WRAP                        = 0x00000007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 406 | } | 
|  | 407 |  | 
|  | 408 | enum VkLogicOp { | 
|  | 409 | VK_LOGIC_OP_CLEAR                                       = 0x00000000, | 
|  | 410 | VK_LOGIC_OP_AND                                         = 0x00000001, | 
|  | 411 | VK_LOGIC_OP_AND_REVERSE                                 = 0x00000002, | 
|  | 412 | VK_LOGIC_OP_COPY                                        = 0x00000003, | 
|  | 413 | VK_LOGIC_OP_AND_INVERTED                                = 0x00000004, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 414 | VK_LOGIC_OP_NO_OP                                       = 0x00000005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 415 | VK_LOGIC_OP_XOR                                         = 0x00000006, | 
|  | 416 | VK_LOGIC_OP_OR                                          = 0x00000007, | 
|  | 417 | VK_LOGIC_OP_NOR                                         = 0x00000008, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 418 | VK_LOGIC_OP_EQUIVALENT                                  = 0x00000009, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 419 | VK_LOGIC_OP_INVERT                                      = 0x0000000a, | 
|  | 420 | VK_LOGIC_OP_OR_REVERSE                                  = 0x0000000b, | 
|  | 421 | VK_LOGIC_OP_COPY_INVERTED                               = 0x0000000c, | 
|  | 422 | VK_LOGIC_OP_OR_INVERTED                                 = 0x0000000d, | 
|  | 423 | VK_LOGIC_OP_NAND                                        = 0x0000000e, | 
|  | 424 | VK_LOGIC_OP_SET                                         = 0x0000000f, | 
|  | 425 | } | 
|  | 426 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 427 | enum VkSystemAllocationScope { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 428 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND                      = 0x00000000, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 429 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT                       = 0x00000001, | 
|  | 430 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE                        = 0x00000002, | 
|  | 431 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE                       = 0x00000003, | 
|  | 432 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE                     = 0x00000004, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 433 | } | 
|  | 434 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 435 | enum VkInternalAllocationType { | 
|  | 436 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE                  = 0x00000000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 437 | } | 
|  | 438 |  | 
|  | 439 | enum VkPhysicalDeviceType { | 
|  | 440 | VK_PHYSICAL_DEVICE_TYPE_OTHER                           = 0x00000000, | 
|  | 441 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU                  = 0x00000001, | 
|  | 442 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU                    = 0x00000002, | 
|  | 443 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU                     = 0x00000003, | 
|  | 444 | VK_PHYSICAL_DEVICE_TYPE_CPU                             = 0x00000004, | 
|  | 445 | } | 
|  | 446 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 447 | enum VkVertexInputRate { | 
|  | 448 | VK_VERTEX_INPUT_RATE_VERTEX                             = 0x00000000, | 
|  | 449 | VK_VERTEX_INPUT_RATE_INSTANCE                           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 450 | } | 
|  | 451 |  | 
|  | 452 | /// Vulkan format definitions | 
|  | 453 | enum VkFormat { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 454 | VK_FORMAT_UNDEFINED                                     = 0, | 
|  | 455 | VK_FORMAT_R4G4_UNORM_PACK8                              = 1, | 
|  | 456 | VK_FORMAT_R4G4B4A4_UNORM_PACK16                         = 2, | 
|  | 457 | VK_FORMAT_B4G4R4A4_UNORM_PACK16                         = 3, | 
|  | 458 | VK_FORMAT_R5G6B5_UNORM_PACK16                           = 4, | 
|  | 459 | VK_FORMAT_B5G6R5_UNORM_PACK16                           = 5, | 
|  | 460 | VK_FORMAT_R5G5B5A1_UNORM_PACK16                         = 6, | 
|  | 461 | VK_FORMAT_B5G5R5A1_UNORM_PACK16                         = 7, | 
|  | 462 | VK_FORMAT_A1R5G5B5_UNORM_PACK16                         = 8, | 
|  | 463 | VK_FORMAT_R8_UNORM                                      = 9, | 
|  | 464 | VK_FORMAT_R8_SNORM                                      = 10, | 
|  | 465 | VK_FORMAT_R8_USCALED                                    = 11, | 
|  | 466 | VK_FORMAT_R8_SSCALED                                    = 12, | 
|  | 467 | VK_FORMAT_R8_UINT                                       = 13, | 
|  | 468 | VK_FORMAT_R8_SINT                                       = 14, | 
|  | 469 | VK_FORMAT_R8_SRGB                                       = 15, | 
|  | 470 | VK_FORMAT_R8G8_UNORM                                    = 16, | 
|  | 471 | VK_FORMAT_R8G8_SNORM                                    = 17, | 
|  | 472 | VK_FORMAT_R8G8_USCALED                                  = 18, | 
|  | 473 | VK_FORMAT_R8G8_SSCALED                                  = 19, | 
|  | 474 | VK_FORMAT_R8G8_UINT                                     = 20, | 
|  | 475 | VK_FORMAT_R8G8_SINT                                     = 21, | 
|  | 476 | VK_FORMAT_R8G8_SRGB                                     = 22, | 
|  | 477 | VK_FORMAT_R8G8B8_UNORM                                  = 23, | 
|  | 478 | VK_FORMAT_R8G8B8_SNORM                                  = 24, | 
|  | 479 | VK_FORMAT_R8G8B8_USCALED                                = 25, | 
|  | 480 | VK_FORMAT_R8G8B8_SSCALED                                = 26, | 
|  | 481 | VK_FORMAT_R8G8B8_UINT                                   = 27, | 
|  | 482 | VK_FORMAT_R8G8B8_SINT                                   = 28, | 
|  | 483 | VK_FORMAT_R8G8B8_SRGB                                   = 29, | 
|  | 484 | VK_FORMAT_B8G8R8_UNORM                                  = 30, | 
|  | 485 | VK_FORMAT_B8G8R8_SNORM                                  = 31, | 
|  | 486 | VK_FORMAT_B8G8R8_USCALED                                = 32, | 
|  | 487 | VK_FORMAT_B8G8R8_SSCALED                                = 33, | 
|  | 488 | VK_FORMAT_B8G8R8_UINT                                   = 34, | 
|  | 489 | VK_FORMAT_B8G8R8_SINT                                   = 35, | 
|  | 490 | VK_FORMAT_B8G8R8_SRGB                                   = 36, | 
|  | 491 | VK_FORMAT_R8G8B8A8_UNORM                                = 37, | 
|  | 492 | VK_FORMAT_R8G8B8A8_SNORM                                = 38, | 
|  | 493 | VK_FORMAT_R8G8B8A8_USCALED                              = 39, | 
|  | 494 | VK_FORMAT_R8G8B8A8_SSCALED                              = 40, | 
|  | 495 | VK_FORMAT_R8G8B8A8_UINT                                 = 41, | 
|  | 496 | VK_FORMAT_R8G8B8A8_SINT                                 = 42, | 
|  | 497 | VK_FORMAT_R8G8B8A8_SRGB                                 = 43, | 
|  | 498 | VK_FORMAT_B8G8R8A8_UNORM                                = 44, | 
|  | 499 | VK_FORMAT_B8G8R8A8_SNORM                                = 45, | 
|  | 500 | VK_FORMAT_B8G8R8A8_USCALED                              = 46, | 
|  | 501 | VK_FORMAT_B8G8R8A8_SSCALED                              = 47, | 
|  | 502 | VK_FORMAT_B8G8R8A8_UINT                                 = 48, | 
|  | 503 | VK_FORMAT_B8G8R8A8_SINT                                 = 49, | 
|  | 504 | VK_FORMAT_B8G8R8A8_SRGB                                 = 50, | 
|  | 505 | VK_FORMAT_A8B8G8R8_UNORM_PACK32                         = 51, | 
|  | 506 | VK_FORMAT_A8B8G8R8_SNORM_PACK32                         = 52, | 
|  | 507 | VK_FORMAT_A8B8G8R8_USCALED_PACK32                       = 53, | 
|  | 508 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32                       = 54, | 
|  | 509 | VK_FORMAT_A8B8G8R8_UINT_PACK32                          = 55, | 
|  | 510 | VK_FORMAT_A8B8G8R8_SINT_PACK32                          = 56, | 
|  | 511 | VK_FORMAT_A8B8G8R8_SRGB_PACK32                          = 57, | 
|  | 512 | VK_FORMAT_A2R10G10B10_UNORM_PACK32                      = 58, | 
|  | 513 | VK_FORMAT_A2R10G10B10_SNORM_PACK32                      = 59, | 
|  | 514 | VK_FORMAT_A2R10G10B10_USCALED_PACK32                    = 60, | 
|  | 515 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32                    = 61, | 
|  | 516 | VK_FORMAT_A2R10G10B10_UINT_PACK32                       = 62, | 
|  | 517 | VK_FORMAT_A2R10G10B10_SINT_PACK32                       = 63, | 
|  | 518 | VK_FORMAT_A2B10G10R10_UNORM_PACK32                      = 64, | 
|  | 519 | VK_FORMAT_A2B10G10R10_SNORM_PACK32                      = 65, | 
|  | 520 | VK_FORMAT_A2B10G10R10_USCALED_PACK32                    = 66, | 
|  | 521 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32                    = 67, | 
|  | 522 | VK_FORMAT_A2B10G10R10_UINT_PACK32                       = 68, | 
|  | 523 | VK_FORMAT_A2B10G10R10_SINT_PACK32                       = 69, | 
|  | 524 | VK_FORMAT_R16_UNORM                                     = 70, | 
|  | 525 | VK_FORMAT_R16_SNORM                                     = 71, | 
|  | 526 | VK_FORMAT_R16_USCALED                                   = 72, | 
|  | 527 | VK_FORMAT_R16_SSCALED                                   = 73, | 
|  | 528 | VK_FORMAT_R16_UINT                                      = 74, | 
|  | 529 | VK_FORMAT_R16_SINT                                      = 75, | 
|  | 530 | VK_FORMAT_R16_SFLOAT                                    = 76, | 
|  | 531 | VK_FORMAT_R16G16_UNORM                                  = 77, | 
|  | 532 | VK_FORMAT_R16G16_SNORM                                  = 78, | 
|  | 533 | VK_FORMAT_R16G16_USCALED                                = 79, | 
|  | 534 | VK_FORMAT_R16G16_SSCALED                                = 80, | 
|  | 535 | VK_FORMAT_R16G16_UINT                                   = 81, | 
|  | 536 | VK_FORMAT_R16G16_SINT                                   = 82, | 
|  | 537 | VK_FORMAT_R16G16_SFLOAT                                 = 83, | 
|  | 538 | VK_FORMAT_R16G16B16_UNORM                               = 84, | 
|  | 539 | VK_FORMAT_R16G16B16_SNORM                               = 85, | 
|  | 540 | VK_FORMAT_R16G16B16_USCALED                             = 86, | 
|  | 541 | VK_FORMAT_R16G16B16_SSCALED                             = 87, | 
|  | 542 | VK_FORMAT_R16G16B16_UINT                                = 88, | 
|  | 543 | VK_FORMAT_R16G16B16_SINT                                = 89, | 
|  | 544 | VK_FORMAT_R16G16B16_SFLOAT                              = 90, | 
|  | 545 | VK_FORMAT_R16G16B16A16_UNORM                            = 91, | 
|  | 546 | VK_FORMAT_R16G16B16A16_SNORM                            = 92, | 
|  | 547 | VK_FORMAT_R16G16B16A16_USCALED                          = 93, | 
|  | 548 | VK_FORMAT_R16G16B16A16_SSCALED                          = 94, | 
|  | 549 | VK_FORMAT_R16G16B16A16_UINT                             = 95, | 
|  | 550 | VK_FORMAT_R16G16B16A16_SINT                             = 96, | 
|  | 551 | VK_FORMAT_R16G16B16A16_SFLOAT                           = 97, | 
|  | 552 | VK_FORMAT_R32_UINT                                      = 98, | 
|  | 553 | VK_FORMAT_R32_SINT                                      = 99, | 
|  | 554 | VK_FORMAT_R32_SFLOAT                                    = 100, | 
|  | 555 | VK_FORMAT_R32G32_UINT                                   = 101, | 
|  | 556 | VK_FORMAT_R32G32_SINT                                   = 102, | 
|  | 557 | VK_FORMAT_R32G32_SFLOAT                                 = 103, | 
|  | 558 | VK_FORMAT_R32G32B32_UINT                                = 104, | 
|  | 559 | VK_FORMAT_R32G32B32_SINT                                = 105, | 
|  | 560 | VK_FORMAT_R32G32B32_SFLOAT                              = 106, | 
|  | 561 | VK_FORMAT_R32G32B32A32_UINT                             = 107, | 
|  | 562 | VK_FORMAT_R32G32B32A32_SINT                             = 108, | 
|  | 563 | VK_FORMAT_R32G32B32A32_SFLOAT                           = 109, | 
|  | 564 | VK_FORMAT_R64_UINT                                      = 110, | 
|  | 565 | VK_FORMAT_R64_SINT                                      = 111, | 
|  | 566 | VK_FORMAT_R64_SFLOAT                                    = 112, | 
|  | 567 | VK_FORMAT_R64G64_UINT                                   = 113, | 
|  | 568 | VK_FORMAT_R64G64_SINT                                   = 114, | 
|  | 569 | VK_FORMAT_R64G64_SFLOAT                                 = 115, | 
|  | 570 | VK_FORMAT_R64G64B64_UINT                                = 116, | 
|  | 571 | VK_FORMAT_R64G64B64_SINT                                = 117, | 
|  | 572 | VK_FORMAT_R64G64B64_SFLOAT                              = 118, | 
|  | 573 | VK_FORMAT_R64G64B64A64_UINT                             = 119, | 
|  | 574 | VK_FORMAT_R64G64B64A64_SINT                             = 120, | 
|  | 575 | VK_FORMAT_R64G64B64A64_SFLOAT                           = 121, | 
|  | 576 | VK_FORMAT_B10G11R11_UFLOAT_PACK32                       = 122, | 
|  | 577 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32                        = 123, | 
|  | 578 | VK_FORMAT_D16_UNORM                                     = 124, | 
|  | 579 | VK_FORMAT_X8_D24_UNORM_PACK32                           = 125, | 
|  | 580 | VK_FORMAT_D32_SFLOAT                                    = 126, | 
|  | 581 | VK_FORMAT_S8_UINT                                       = 127, | 
|  | 582 | VK_FORMAT_D16_UNORM_S8_UINT                             = 128, | 
|  | 583 | VK_FORMAT_D24_UNORM_S8_UINT                             = 129, | 
|  | 584 | VK_FORMAT_D32_SFLOAT_S8_UINT                            = 130, | 
|  | 585 | VK_FORMAT_BC1_RGB_UNORM_BLOCK                           = 131, | 
|  | 586 | VK_FORMAT_BC1_RGB_SRGB_BLOCK                            = 132, | 
|  | 587 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK                          = 133, | 
|  | 588 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK                           = 134, | 
|  | 589 | VK_FORMAT_BC2_UNORM_BLOCK                               = 135, | 
|  | 590 | VK_FORMAT_BC2_SRGB_BLOCK                                = 136, | 
|  | 591 | VK_FORMAT_BC3_UNORM_BLOCK                               = 137, | 
|  | 592 | VK_FORMAT_BC3_SRGB_BLOCK                                = 138, | 
|  | 593 | VK_FORMAT_BC4_UNORM_BLOCK                               = 139, | 
|  | 594 | VK_FORMAT_BC4_SNORM_BLOCK                               = 140, | 
|  | 595 | VK_FORMAT_BC5_UNORM_BLOCK                               = 141, | 
|  | 596 | VK_FORMAT_BC5_SNORM_BLOCK                               = 142, | 
|  | 597 | VK_FORMAT_BC6H_UFLOAT_BLOCK                             = 143, | 
|  | 598 | VK_FORMAT_BC6H_SFLOAT_BLOCK                             = 144, | 
|  | 599 | VK_FORMAT_BC7_UNORM_BLOCK                               = 145, | 
|  | 600 | VK_FORMAT_BC7_SRGB_BLOCK                                = 146, | 
|  | 601 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK                       = 147, | 
|  | 602 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK                        = 148, | 
|  | 603 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK                     = 149, | 
|  | 604 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK                      = 150, | 
|  | 605 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK                     = 151, | 
|  | 606 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK                      = 152, | 
|  | 607 | VK_FORMAT_EAC_R11_UNORM_BLOCK                           = 153, | 
|  | 608 | VK_FORMAT_EAC_R11_SNORM_BLOCK                           = 154, | 
|  | 609 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK                        = 155, | 
|  | 610 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK                        = 156, | 
|  | 611 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK                          = 157, | 
|  | 612 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK                           = 158, | 
|  | 613 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK                          = 159, | 
|  | 614 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK                           = 160, | 
|  | 615 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK                          = 161, | 
|  | 616 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK                           = 162, | 
|  | 617 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK                          = 163, | 
|  | 618 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK                           = 164, | 
|  | 619 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK                          = 165, | 
|  | 620 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK                           = 166, | 
|  | 621 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK                          = 167, | 
|  | 622 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK                           = 168, | 
|  | 623 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK                          = 169, | 
|  | 624 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK                           = 170, | 
|  | 625 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK                          = 171, | 
|  | 626 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK                           = 172, | 
|  | 627 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK                         = 173, | 
|  | 628 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK                          = 174, | 
|  | 629 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK                         = 175, | 
|  | 630 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK                          = 176, | 
|  | 631 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK                         = 177, | 
|  | 632 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK                          = 178, | 
|  | 633 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK                        = 179, | 
|  | 634 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK                         = 180, | 
|  | 635 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK                        = 181, | 
|  | 636 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK                         = 182, | 
|  | 637 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK                        = 183, | 
|  | 638 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK                         = 184, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 639 |  | 
|  | 640 | //@extension("VK_IMG_format_pvrtc") | 
|  | 641 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, | 
|  | 642 |  | 
|  | 643 | //@extension("VK_IMG_format_pvrtc") | 
|  | 644 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, | 
|  | 645 |  | 
|  | 646 | //@extension("VK_IMG_format_pvrtc") | 
|  | 647 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, | 
|  | 648 |  | 
|  | 649 | //@extension("VK_IMG_format_pvrtc") | 
|  | 650 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, | 
|  | 651 |  | 
|  | 652 | //@extension("VK_IMG_format_pvrtc") | 
|  | 653 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, | 
|  | 654 |  | 
|  | 655 | //@extension("VK_IMG_format_pvrtc") | 
|  | 656 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, | 
|  | 657 |  | 
|  | 658 | //@extension("VK_IMG_format_pvrtc") | 
|  | 659 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, | 
|  | 660 |  | 
|  | 661 | //@extension("VK_IMG_format_pvrtc") | 
|  | 662 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 663 | } | 
|  | 664 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 665 | /// Structure type enumerant | 
|  | 666 | enum VkStructureType { | 
|  | 667 | VK_STRUCTURE_TYPE_APPLICATION_INFO                          = 0, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 668 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO                      = 1, | 
|  | 669 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO                  = 2, | 
|  | 670 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO                        = 3, | 
|  | 671 | VK_STRUCTURE_TYPE_SUBMIT_INFO                               = 4, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 672 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO                      = 5, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 673 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE                       = 6, | 
|  | 674 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO                          = 7, | 
|  | 675 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO                         = 8, | 
|  | 676 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO                     = 9, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 677 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO                         = 10, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 678 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO                    = 11, | 
|  | 679 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO                        = 12, | 
|  | 680 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO                   = 13, | 
|  | 681 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO                         = 14, | 
|  | 682 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO                    = 15, | 
|  | 683 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO                 = 16, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 684 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO                = 17, | 
|  | 685 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO         = 18, | 
|  | 686 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO   = 19, | 
|  | 687 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, | 
|  | 688 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO   = 21, | 
|  | 689 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO       = 22, | 
|  | 690 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO  = 23, | 
|  | 691 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO    = 24, | 
|  | 692 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO  = 25, | 
|  | 693 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO    = 26, | 
|  | 694 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO        = 27, | 
|  | 695 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO             = 28, | 
|  | 696 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO              = 29, | 
|  | 697 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO               = 30, | 
|  | 698 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO                       = 31, | 
|  | 699 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO         = 32, | 
|  | 700 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO               = 33, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 701 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO              = 34, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 702 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET                      = 35, | 
|  | 703 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET                       = 36, | 
|  | 704 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO                   = 37, | 
|  | 705 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO                   = 38, | 
|  | 706 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO                  = 39, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 707 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO              = 40, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 708 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO           = 41, | 
|  | 709 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO                 = 42, | 
|  | 710 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO                    = 43, | 
|  | 711 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER                     = 44, | 
|  | 712 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER                      = 45, | 
|  | 713 | VK_STRUCTURE_TYPE_MEMORY_BARRIER                            = 46, | 
|  | 714 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO               = 47, | 
|  | 715 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO                 = 48, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 716 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 717 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 718 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR                 = 1000001000, | 
|  | 719 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR                          = 1000001001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 720 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 721 | //@extension("VK_KHR_display") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 722 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR              = 1000002000, | 
|  | 723 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR           = 1000002001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 724 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 725 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 726 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR          = 1000003000, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 727 |  | 
|  | 728 | //@extension("VK_KHR_xlib_surface") | 
|  | 729 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR              = 1000004000, | 
|  | 730 |  | 
|  | 731 | //@extension("VK_KHR_xcb_surface") | 
|  | 732 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR               = 1000005000, | 
|  | 733 |  | 
|  | 734 | //@extension("VK_KHR_wayland_surface") | 
|  | 735 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR           = 1000006000, | 
|  | 736 |  | 
|  | 737 | //@extension("VK_KHR_mir_surface") | 
|  | 738 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR               = 1000007000, | 
|  | 739 |  | 
|  | 740 | //@extension("VK_KHR_android_surface") | 
|  | 741 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR           = 1000008000, | 
|  | 742 |  | 
|  | 743 | //@extension("VK_KHR_win32_surface") | 
|  | 744 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR             = 1000009000, | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 745 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 746 | //@extension("VK_ANDROID_native_buffer") | 
|  | 747 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID                     = 1000010000, | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 748 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID       = 1000010001, | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 749 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 750 | //@extension("VK_EXT_debug_report") | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 751 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT     = 1000011000, | 
|  | 752 |  | 
|  | 753 | //@extension("VK_AMD_rasterization_order") | 
|  | 754 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, | 
|  | 755 |  | 
|  | 756 | //@extension("VK_EXT_debug_marker") | 
|  | 757 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT         = 1000022000, | 
|  | 758 |  | 
|  | 759 | //@extension("VK_EXT_debug_marker") | 
|  | 760 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT          = 1000022001, | 
|  | 761 |  | 
|  | 762 | //@extension("VK_EXT_debug_marker") | 
|  | 763 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT              = 1000022002, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 764 |  | 
|  | 765 | //@extension("VK_NV_dedicated_allocation") | 
|  | 766 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, | 
|  | 767 |  | 
|  | 768 | //@extension("VK_NV_dedicated_allocation") | 
|  | 769 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, | 
|  | 770 |  | 
|  | 771 | //@extension("VK_NV_dedicated_allocation") | 
|  | 772 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 773 |  | 
|  | 774 | //@extension("VK_NV_external_memory") | 
|  | 775 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, | 
|  | 776 |  | 
|  | 777 | //@extension("VK_NV_external_memory") | 
|  | 778 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, | 
|  | 779 |  | 
|  | 780 | //@extension("VK_NV_external_memory_win32") | 
|  | 781 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, | 
|  | 782 |  | 
|  | 783 | //@extension("VK_NV_external_memory_win32") | 
|  | 784 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, | 
|  | 785 |  | 
|  | 786 | //@extension("VK_NV_win32_keyed_mutex") | 
|  | 787 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, | 
|  | 788 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 789 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 790 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, | 
|  | 791 |  | 
|  | 792 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 793 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, | 
|  | 794 |  | 
|  | 795 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 796 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, | 
|  | 797 |  | 
|  | 798 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 799 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, | 
|  | 800 |  | 
|  | 801 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 802 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, | 
|  | 803 |  | 
|  | 804 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 805 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, | 
|  | 806 |  | 
|  | 807 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 808 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, | 
|  | 809 |  | 
|  | 810 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 811 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, | 
|  | 812 |  | 
|  | 813 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 814 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, | 
|  | 815 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 816 | //@extension("VK_EXT_validation_flags") | 
|  | 817 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, | 
|  | 818 |  | 
|  | 819 | //@extension("VK_KHR_incremental_present") | 
|  | 820 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, | 
|  | 821 |  | 
|  | 822 | //@extension("VK_NVX_device_generated_commands") | 
|  | 823 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, | 
|  | 824 |  | 
|  | 825 | //@extension("VK_NVX_device_generated_commands") | 
|  | 826 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, | 
|  | 827 |  | 
|  | 828 | //@extension("VK_NVX_device_generated_commands") | 
|  | 829 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, | 
|  | 830 |  | 
|  | 831 | //@extension("VK_NVX_device_generated_commands") | 
|  | 832 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, | 
|  | 833 |  | 
|  | 834 | //@extension("VK_NVX_device_generated_commands") | 
|  | 835 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, | 
|  | 836 |  | 
|  | 837 | //@extension("VK_NVX_device_generated_commands") | 
|  | 838 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 839 | } | 
|  | 840 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 841 | enum VkSubpassContents { | 
|  | 842 | VK_SUBPASS_CONTENTS_INLINE                              = 0x00000000, | 
|  | 843 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 844 | } | 
|  | 845 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 846 | enum VkPipelineCacheHeaderVersion { | 
|  | 847 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE                    = 1, | 
|  | 848 | } | 
|  | 849 |  | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 850 | @lastUnused(-11) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 851 | /// Error and return codes | 
|  | 852 | enum VkResult { | 
|  | 853 | // Return codes for successful operation execution (positive values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 854 | VK_SUCCESS                                              = 0, | 
|  | 855 | VK_NOT_READY                                            = 1, | 
|  | 856 | VK_TIMEOUT                                              = 2, | 
|  | 857 | VK_EVENT_SET                                            = 3, | 
|  | 858 | VK_EVENT_RESET                                          = 4, | 
|  | 859 | VK_INCOMPLETE                                           = 5, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 860 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 861 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 862 | VK_SUBOPTIMAL_KHR                                       = 1000001003, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 863 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 864 | // Error codes (negative values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 865 | VK_ERROR_OUT_OF_HOST_MEMORY                             = 0xFFFFFFFF, // -1 | 
|  | 866 | VK_ERROR_OUT_OF_DEVICE_MEMORY                           = 0xFFFFFFFE, // -2 | 
|  | 867 | VK_ERROR_INITIALIZATION_FAILED                          = 0xFFFFFFFD, // -3 | 
|  | 868 | VK_ERROR_DEVICE_LOST                                    = 0xFFFFFFFC, // -4 | 
|  | 869 | VK_ERROR_MEMORY_MAP_FAILED                              = 0xFFFFFFFB, // -5 | 
|  | 870 | VK_ERROR_LAYER_NOT_PRESENT                              = 0xFFFFFFFA, // -6 | 
|  | 871 | VK_ERROR_EXTENSION_NOT_PRESENT                          = 0xFFFFFFF9, // -7 | 
|  | 872 | VK_ERROR_FEATURE_NOT_PRESENT                            = 0xFFFFFFF8, // -8 | 
|  | 873 | VK_ERROR_INCOMPATIBLE_DRIVER                            = 0xFFFFFFF7, // -9 | 
|  | 874 | VK_ERROR_TOO_MANY_OBJECTS                               = 0xFFFFFFF6, // -10 | 
|  | 875 | VK_ERROR_FORMAT_NOT_SUPPORTED                           = 0xFFFFFFF5, // -11 | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 876 | VK_ERROR_FRAGMENTED_POOL                                = 0xFFFFFFF4, // -12 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 877 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 878 | //@extension("VK_KHR_surface") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 879 | VK_ERROR_SURFACE_LOST_KHR                               = 0xC4653600, // -1000000000 | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 880 |  | 
| Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 881 | //@extension("VK_KHR_surface") | 
|  | 882 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46535FF, // -1000008001 | 
|  | 883 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 884 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 885 | VK_ERROR_OUT_OF_DATE_KHR                                = 0xC4653214, // -1000001004 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 886 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 887 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 888 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                       = 0xC4652A47, // -1000003001 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 889 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 890 | //@extension("VK_EXT_debug_report") | 
|  | 891 | VK_ERROR_VALIDATION_FAILED_EXT                          = 0xC4650B07, // -1000011001 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 892 |  | 
|  | 893 | //@extension("VK_NV_glsl_shader") | 
|  | 894 | VK_ERROR_INVALID_SHADER_NV                              = 0xC4650720, // -1000012000 | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 895 | } | 
|  | 896 |  | 
|  | 897 | enum VkDynamicState { | 
|  | 898 | VK_DYNAMIC_STATE_VIEWPORT                               = 0x00000000, | 
|  | 899 | VK_DYNAMIC_STATE_SCISSOR                                = 0x00000001, | 
|  | 900 | VK_DYNAMIC_STATE_LINE_WIDTH                             = 0x00000002, | 
|  | 901 | VK_DYNAMIC_STATE_DEPTH_BIAS                             = 0x00000003, | 
|  | 902 | VK_DYNAMIC_STATE_BLEND_CONSTANTS                        = 0x00000004, | 
|  | 903 | VK_DYNAMIC_STATE_DEPTH_BOUNDS                           = 0x00000005, | 
|  | 904 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK                   = 0x00000006, | 
|  | 905 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK                     = 0x00000007, | 
|  | 906 | VK_DYNAMIC_STATE_STENCIL_REFERENCE                      = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 907 | } | 
|  | 908 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 909 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 910 | enum VkPresentModeKHR { | 
|  | 911 | VK_PRESENT_MODE_IMMEDIATE_KHR                           = 0x00000000, | 
|  | 912 | VK_PRESENT_MODE_MAILBOX_KHR                             = 0x00000001, | 
|  | 913 | VK_PRESENT_MODE_FIFO_KHR                                = 0x00000002, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 914 | VK_PRESENT_MODE_FIFO_RELAXED_KHR                        = 0x00000003, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 915 | } | 
|  | 916 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 917 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 918 | enum VkColorSpaceKHR { | 
|  | 919 | VK_COLORSPACE_SRGB_NONLINEAR_KHR                        = 0x00000000, | 
|  | 920 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 921 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 922 | @extension("VK_EXT_debug_report") | 
|  | 923 | enum VkDebugReportObjectTypeEXT { | 
|  | 924 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT                 = 0, | 
|  | 925 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT                = 1, | 
|  | 926 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT         = 2, | 
|  | 927 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT                  = 3, | 
|  | 928 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT                   = 4, | 
|  | 929 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT               = 5, | 
|  | 930 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT          = 6, | 
|  | 931 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT                   = 7, | 
|  | 932 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT           = 8, | 
|  | 933 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT                  = 9, | 
|  | 934 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT                   = 10, | 
|  | 935 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT                   = 11, | 
|  | 936 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT              = 12, | 
|  | 937 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT             = 13, | 
|  | 938 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT              = 14, | 
|  | 939 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT           = 15, | 
|  | 940 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT          = 16, | 
|  | 941 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT         = 17, | 
|  | 942 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT             = 18, | 
|  | 943 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT                = 19, | 
|  | 944 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT   = 20, | 
|  | 945 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT                 = 21, | 
|  | 946 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT         = 22, | 
|  | 947 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT          = 23, | 
|  | 948 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT             = 24, | 
|  | 949 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT            = 25, | 
|  | 950 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT             = 26, | 
|  | 951 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT           = 27, | 
|  | 952 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT            = 28, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 953 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT             = 29, | 
|  | 954 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT        = 30, | 
|  | 955 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT        = 31, | 
|  | 956 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 957 | } | 
|  | 958 |  | 
|  | 959 | @extension("VK_EXT_debug_report") | 
|  | 960 | enum VkDebugReportErrorEXT { | 
|  | 961 | VK_DEBUG_REPORT_ERROR_NONE_EXT                          = 0, | 
|  | 962 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT                  = 1, | 
|  | 963 | } | 
|  | 964 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 965 | @extension("VK_AMD_rasterization_order") | 
|  | 966 | enum VkRasterizationOrderAMD { | 
|  | 967 | VK_RASTERIZATION_ORDER_STRICT_AMD                       = 0, | 
|  | 968 | VK_RASTERIZATION_ORDER_RELAXED_AMD                      = 1, | 
|  | 969 | } | 
|  | 970 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 971 | @extension("VK_EXT_validation_flags") | 
|  | 972 | enum VkValidationCheckEXT { | 
|  | 973 | VK_VALIDATION_CHECK_ALL_EXT                             = 0, | 
|  | 974 | } | 
|  | 975 |  | 
|  | 976 | @extension("VK_NVX_device_generated_commands") | 
|  | 977 | enum VkIndirectCommandsTokenTypeNVX { | 
|  | 978 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, | 
|  | 979 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, | 
|  | 980 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, | 
|  | 981 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, | 
|  | 982 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, | 
|  | 983 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, | 
|  | 984 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, | 
|  | 985 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, | 
|  | 986 | } | 
|  | 987 |  | 
|  | 988 | @extension("VK_NVX_device_generated_commands") | 
|  | 989 | enum VkObjectEntryTypeNVX { | 
|  | 990 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, | 
|  | 991 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, | 
|  | 992 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, | 
|  | 993 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, | 
|  | 994 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, | 
|  | 995 | } | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 996 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 997 | ///////////////// | 
|  | 998 | //  Bitfields  // | 
|  | 999 | ///////////////// | 
|  | 1000 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1001 | /// Queue capabilities | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1002 | type VkFlags VkQueueFlags | 
|  | 1003 | bitfield VkQueueFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1004 | VK_QUEUE_GRAPHICS_BIT                                   = 0x00000001,    /// Queue supports graphics operations | 
|  | 1005 | VK_QUEUE_COMPUTE_BIT                                    = 0x00000002,    /// Queue supports compute operations | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1006 | VK_QUEUE_TRANSFER_BIT                                   = 0x00000004,    /// Queue supports transfer operations | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1007 | 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] | 1008 | } | 
|  | 1009 |  | 
|  | 1010 | /// Memory properties passed into vkAllocMemory(). | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1011 | type VkFlags VkMemoryPropertyFlags | 
|  | 1012 | bitfield VkMemoryPropertyFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1013 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT                     = 0x00000001, | 
|  | 1014 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT                     = 0x00000002, | 
|  | 1015 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT                    = 0x00000004, | 
|  | 1016 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT                      = 0x00000008, | 
|  | 1017 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT                 = 0x00000010, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1018 | } | 
|  | 1019 |  | 
|  | 1020 | /// Memory heap flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1021 | type VkFlags VkMemoryHeapFlags | 
|  | 1022 | bitfield VkMemoryHeapFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1023 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT                         = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1024 | } | 
|  | 1025 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1026 | /// Access flags | 
|  | 1027 | type VkFlags VkAccessFlags | 
|  | 1028 | bitfield VkAccessFlagBits { | 
|  | 1029 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT                     = 0x00000001, | 
|  | 1030 | VK_ACCESS_INDEX_READ_BIT                                = 0x00000002, | 
|  | 1031 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT                     = 0x00000004, | 
|  | 1032 | VK_ACCESS_UNIFORM_READ_BIT                              = 0x00000008, | 
|  | 1033 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT                     = 0x00000010, | 
|  | 1034 | VK_ACCESS_SHADER_READ_BIT                               = 0x00000020, | 
|  | 1035 | VK_ACCESS_SHADER_WRITE_BIT                              = 0x00000040, | 
|  | 1036 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT                     = 0x00000080, | 
|  | 1037 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT                    = 0x00000100, | 
|  | 1038 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT             = 0x00000200, | 
|  | 1039 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT            = 0x00000400, | 
|  | 1040 | VK_ACCESS_TRANSFER_READ_BIT                             = 0x00000800, | 
|  | 1041 | VK_ACCESS_TRANSFER_WRITE_BIT                            = 0x00001000, | 
|  | 1042 | VK_ACCESS_HOST_READ_BIT                                 = 0x00002000, | 
|  | 1043 | VK_ACCESS_HOST_WRITE_BIT                                = 0x00004000, | 
|  | 1044 | VK_ACCESS_MEMORY_READ_BIT                               = 0x00008000, | 
|  | 1045 | VK_ACCESS_MEMORY_WRITE_BIT                              = 0x00010000, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1046 |  | 
|  | 1047 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1048 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX                  = 0x00020000, | 
|  | 1049 |  | 
|  | 1050 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1051 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX                 = 0x00040000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1052 | } | 
|  | 1053 |  | 
|  | 1054 | /// Buffer usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1055 | type VkFlags VkBufferUsageFlags | 
|  | 1056 | bitfield VkBufferUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1057 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT                        = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1058 | 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] | 1059 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT                = 0x00000004,    /// Can be used as TBO | 
|  | 1060 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT                = 0x00000008,    /// Can be used as IBO | 
|  | 1061 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT                      = 0x00000010,    /// Can be used as UBO | 
|  | 1062 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT                      = 0x00000020,    /// Can be used as SSBO | 
|  | 1063 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT                        = 0x00000040,    /// Can be used as source of fixed function index fetch (index buffer) | 
|  | 1064 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT                       = 0x00000080,    /// Can be used as source of fixed function vertex fetch (VBO) | 
|  | 1065 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT                     = 0x00000100,    /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) | 
|  | 1066 | } | 
|  | 1067 |  | 
|  | 1068 | /// Buffer creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1069 | type VkFlags VkBufferCreateFlags | 
|  | 1070 | bitfield VkBufferCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1071 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT                     = 0x00000001,    /// Buffer should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1072 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT                   = 0x00000002,    /// Buffer should support sparse backing with partial residency | 
|  | 1073 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT                     = 0x00000004,    /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers | 
|  | 1074 | } | 
|  | 1075 |  | 
|  | 1076 | /// Shader stage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1077 | type VkFlags VkShaderStageFlags | 
|  | 1078 | bitfield VkShaderStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1079 | VK_SHADER_STAGE_VERTEX_BIT                              = 0x00000001, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1080 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT                = 0x00000002, | 
|  | 1081 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT             = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1082 | VK_SHADER_STAGE_GEOMETRY_BIT                            = 0x00000008, | 
|  | 1083 | VK_SHADER_STAGE_FRAGMENT_BIT                            = 0x00000010, | 
|  | 1084 | VK_SHADER_STAGE_COMPUTE_BIT                             = 0x00000020, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1085 | VK_SHADER_STAGE_ALL_GRAPHICS                            = 0x0000001F, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1086 |  | 
|  | 1087 | VK_SHADER_STAGE_ALL                                     = 0x7FFFFFFF, | 
|  | 1088 | } | 
|  | 1089 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1090 | /// Descriptor pool create flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1091 | type VkFlags VkDescriptorPoolCreateFlags | 
|  | 1092 | bitfield VkDescriptorPoolCreateFlagBits { | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1093 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT       = 0x00000001, | 
|  | 1094 | } | 
|  | 1095 |  | 
|  | 1096 | /// Descriptor pool reset flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1097 | type VkFlags VkDescriptorPoolResetFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1098 | //bitfield VkDescriptorPoolResetFlagBits { | 
|  | 1099 | //} | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1100 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1101 | /// Image usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1102 | type VkFlags VkImageUsageFlags | 
|  | 1103 | bitfield VkImageUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1104 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT                         = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1105 | 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] | 1106 | VK_IMAGE_USAGE_SAMPLED_BIT                              = 0x00000004,    /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1107 | VK_IMAGE_USAGE_STORAGE_BIT                              = 0x00000008,    /// Can be used as storage image (STORAGE_IMAGE descriptor type) | 
|  | 1108 | 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] | 1109 | 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] | 1110 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT                 = 0x00000040,    /// Image data not needed outside of rendering | 
|  | 1111 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT                     = 0x00000080,    /// Can be used as framebuffer input attachment | 
|  | 1112 | } | 
|  | 1113 |  | 
|  | 1114 | /// Image creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1115 | type VkFlags VkImageCreateFlags | 
|  | 1116 | bitfield VkImageCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1117 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT                      = 0x00000001,    /// Image should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1118 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT                    = 0x00000002,    /// Image should support sparse backing with partial residency | 
|  | 1119 | 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] | 1120 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT                      = 0x00000008,    /// Allows image views to have different format than the base image | 
|  | 1121 | 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] | 1122 | } | 
|  | 1123 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1124 | /// Image view creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1125 | type VkFlags VkImageViewCreateFlags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1126 | //bitfield VkImageViewCreateFlagBits { | 
|  | 1127 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1128 |  | 
|  | 1129 | /// Pipeline creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1130 | type VkFlags VkPipelineCreateFlags | 
|  | 1131 | bitfield VkPipelineCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1132 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT             = 0x00000001, | 
|  | 1133 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT                = 0x00000002, | 
|  | 1134 | VK_PIPELINE_CREATE_DERIVATIVE_BIT                       = 0x00000004, | 
|  | 1135 | } | 
|  | 1136 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1137 | /// Color component flags | 
|  | 1138 | type VkFlags VkColorComponentFlags | 
|  | 1139 | bitfield VkColorComponentFlagBits { | 
|  | 1140 | VK_COLOR_COMPONENT_R_BIT                                = 0x00000001, | 
|  | 1141 | VK_COLOR_COMPONENT_G_BIT                                = 0x00000002, | 
|  | 1142 | VK_COLOR_COMPONENT_B_BIT                                = 0x00000004, | 
|  | 1143 | VK_COLOR_COMPONENT_A_BIT                                = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1144 | } | 
|  | 1145 |  | 
|  | 1146 | /// Fence creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1147 | type VkFlags VkFenceCreateFlags | 
|  | 1148 | bitfield VkFenceCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1149 | VK_FENCE_CREATE_SIGNALED_BIT                            = 0x00000001, | 
|  | 1150 | } | 
|  | 1151 |  | 
|  | 1152 | /// Semaphore creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1153 | type VkFlags VkSemaphoreCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1154 | //bitfield VkSemaphoreCreateFlagBits { | 
|  | 1155 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1156 |  | 
|  | 1157 | /// Format capability flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1158 | type VkFlags VkFormatFeatureFlags | 
|  | 1159 | bitfield VkFormatFeatureFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1160 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT                     = 0x00000001,    /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1161 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT                     = 0x00000002,    /// Format can be used for storage images (STORAGE_IMAGE descriptor type) | 
|  | 1162 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT              = 0x00000004,    /// Format supports atomic operations in case it's used for storage images | 
|  | 1163 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT              = 0x00000008,    /// Format can be used for uniform texel buffers (TBOs) | 
|  | 1164 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT              = 0x00000010,    /// Format can be used for storage texel buffers (IBOs) | 
|  | 1165 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT       = 0x00000020,    /// Format supports atomic operations in case it's used for storage texel buffers | 
|  | 1166 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT                     = 0x00000040,    /// Format can be used for vertex buffers (VBOs) | 
|  | 1167 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT                  = 0x00000080,    /// Format can be used for color attachment images | 
|  | 1168 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT            = 0x00000100,    /// Format supports blending in case it's used for color attachment images | 
|  | 1169 | 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] | 1170 | VK_FORMAT_FEATURE_BLIT_SRC_BIT                          = 0x00000400,    /// Format can be used as the source image of blits with vkCommandBlitImage | 
|  | 1171 | 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] | 1172 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT       = 0x00001000, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1173 |  | 
|  | 1174 | //@extension("VK_IMG_filter_cubic") | 
|  | 1175 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG    = 0x00002000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1176 | } | 
|  | 1177 |  | 
|  | 1178 | /// Query control flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1179 | type VkFlags VkQueryControlFlags | 
|  | 1180 | bitfield VkQueryControlFlagBits { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1181 | VK_QUERY_CONTROL_PRECISE_BIT                            = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1182 | } | 
|  | 1183 |  | 
|  | 1184 | /// Query result flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1185 | type VkFlags VkQueryResultFlags | 
|  | 1186 | bitfield VkQueryResultFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1187 | VK_QUERY_RESULT_64_BIT                                  = 0x00000001,   /// Results of the queries are written to the destination buffer as 64-bit values | 
|  | 1188 | VK_QUERY_RESULT_WAIT_BIT                                = 0x00000002,   /// Results of the queries are waited on before proceeding with the result copy | 
|  | 1189 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT                   = 0x00000004,   /// Besides the results of the query, the availability of the results is also written | 
|  | 1190 | VK_QUERY_RESULT_PARTIAL_BIT                             = 0x00000008,   /// Copy the partial results of the query even if the final results aren't available | 
|  | 1191 | } | 
|  | 1192 |  | 
|  | 1193 | /// Shader module creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1194 | type VkFlags VkShaderModuleCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1195 | //bitfield VkShaderModuleCreateFlagBits { | 
|  | 1196 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1197 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1198 | /// Event creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1199 | type VkFlags VkEventCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1200 | //bitfield VkEventCreateFlagBits { | 
|  | 1201 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1202 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1203 | /// Command buffer usage flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1204 | type VkFlags VkCommandBufferUsageFlags | 
|  | 1205 | bitfield VkCommandBufferUsageFlagBits { | 
|  | 1206 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT             = 0x00000001, | 
|  | 1207 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT        = 0x00000002, | 
|  | 1208 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1209 | } | 
|  | 1210 |  | 
|  | 1211 | /// Pipeline statistics flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1212 | type VkFlags VkQueryPipelineStatisticFlags | 
|  | 1213 | bitfield VkQueryPipelineStatisticFlagBits { | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1214 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT                     = 0x00000001,  /// Optional | 
|  | 1215 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT                   = 0x00000002,  /// Optional | 
|  | 1216 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT                   = 0x00000004,  /// Optional | 
|  | 1217 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT                 = 0x00000008,  /// Optional | 
|  | 1218 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT                  = 0x00000010,  /// Optional | 
|  | 1219 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT                        = 0x00000020,  /// Optional | 
|  | 1220 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT                         = 0x00000040,  /// Optional | 
|  | 1221 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT                 = 0x00000080,  /// Optional | 
|  | 1222 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT         = 0x00000100,  /// Optional | 
|  | 1223 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT  = 0x00000200,  /// Optional | 
|  | 1224 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT                  = 0x00000400,  /// Optional | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1225 | } | 
|  | 1226 |  | 
|  | 1227 | /// Memory mapping flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1228 | type VkFlags VkMemoryMapFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1229 | //bitfield VkMemoryMapFlagBits { | 
|  | 1230 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1231 |  | 
|  | 1232 | /// Bitfield of image aspects | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1233 | type VkFlags VkImageAspectFlags | 
|  | 1234 | bitfield VkImageAspectFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1235 | VK_IMAGE_ASPECT_COLOR_BIT                               = 0x00000001, | 
|  | 1236 | VK_IMAGE_ASPECT_DEPTH_BIT                               = 0x00000002, | 
|  | 1237 | VK_IMAGE_ASPECT_STENCIL_BIT                             = 0x00000004, | 
|  | 1238 | VK_IMAGE_ASPECT_METADATA_BIT                            = 0x00000008, | 
|  | 1239 | } | 
|  | 1240 |  | 
|  | 1241 | /// Sparse memory bind flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1242 | type VkFlags VkSparseMemoryBindFlags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1243 | bitfield VkSparseMemoryBindFlagBits { | 
|  | 1244 | VK_SPARSE_MEMORY_BIND_METADATA_BIT                      = 0x00000001, | 
|  | 1245 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1246 |  | 
|  | 1247 | /// Sparse image memory requirements flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1248 | type VkFlags VkSparseImageFormatFlags | 
|  | 1249 | bitfield VkSparseImageFormatFlagBits { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1250 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT                  = 0x00000001,  /// Image uses a single miptail region for all array slices | 
|  | 1251 | 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. | 
|  | 1252 | 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] | 1253 | } | 
|  | 1254 |  | 
|  | 1255 | /// Pipeline stages | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1256 | type VkFlags VkPipelineStageFlags | 
|  | 1257 | bitfield VkPipelineStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1258 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT                       = 0x00000001,  /// Before subsequent commands are processed | 
|  | 1259 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT                     = 0x00000002,  /// Draw/DispatchIndirect command fetch | 
|  | 1260 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT                      = 0x00000004,  /// Vertex/index fetch | 
|  | 1261 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT                     = 0x00000008,  /// Vertex shading | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1262 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT       = 0x00000010,  /// Tessellation control shading | 
|  | 1263 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT    = 0x00000020,  /// Tessellation evaluation shading | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1264 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT                   = 0x00000040,  /// Geometry shading | 
|  | 1265 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT                   = 0x00000080,  /// Fragment shading | 
|  | 1266 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT              = 0x00000100,  /// Early fragment (depth/stencil) tests | 
|  | 1267 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT               = 0x00000200,  /// Late fragment (depth/stencil) tests | 
|  | 1268 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT           = 0x00000400,  /// Color attachment writes | 
|  | 1269 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT                    = 0x00000800,  /// Compute shading | 
|  | 1270 | VK_PIPELINE_STAGE_TRANSFER_BIT                          = 0x00001000,  /// Transfer/copy operations | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1271 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT                    = 0x00002000, | 
|  | 1272 | 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] | 1273 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1274 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT                      = 0x00008000,  /// All stages of the graphics pipeline | 
|  | 1275 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT                      = 0x00010000,  /// All graphics, compute, copy, and transition commands | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1276 |  | 
|  | 1277 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1278 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX               = 0x00020000, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1279 | } | 
|  | 1280 |  | 
|  | 1281 | /// Render pass attachment description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1282 | type VkFlags VkAttachmentDescriptionFlags | 
|  | 1283 | bitfield VkAttachmentDescriptionFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1284 | 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] | 1285 | } | 
|  | 1286 |  | 
|  | 1287 | /// Subpass description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1288 | type VkFlags VkSubpassDescriptionFlags | 
|  | 1289 | bitfield VkSubpassDescriptionFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1290 | } | 
|  | 1291 |  | 
|  | 1292 | /// Command pool creation flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1293 | type VkFlags VkCommandPoolCreateFlags | 
|  | 1294 | bitfield VkCommandPoolCreateFlagBits { | 
|  | 1295 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT                    = 0x00000001,  /// Command buffers have a short lifetime | 
|  | 1296 | 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] | 1297 | } | 
|  | 1298 |  | 
|  | 1299 | /// Command pool reset flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1300 | type VkFlags VkCommandPoolResetFlags | 
|  | 1301 | bitfield VkCommandPoolResetFlagBits { | 
|  | 1302 | 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] | 1303 | } | 
|  | 1304 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1305 | type VkFlags VkCommandBufferResetFlags | 
|  | 1306 | bitfield VkCommandBufferResetFlagBits { | 
|  | 1307 | 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] | 1308 | } | 
|  | 1309 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1310 | type VkFlags VkSampleCountFlags | 
|  | 1311 | bitfield VkSampleCountFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1312 | VK_SAMPLE_COUNT_1_BIT                                   = 0x00000001, | 
|  | 1313 | VK_SAMPLE_COUNT_2_BIT                                   = 0x00000002, | 
|  | 1314 | VK_SAMPLE_COUNT_4_BIT                                   = 0x00000004, | 
|  | 1315 | VK_SAMPLE_COUNT_8_BIT                                   = 0x00000008, | 
|  | 1316 | VK_SAMPLE_COUNT_16_BIT                                  = 0x00000010, | 
|  | 1317 | VK_SAMPLE_COUNT_32_BIT                                  = 0x00000020, | 
|  | 1318 | VK_SAMPLE_COUNT_64_BIT                                  = 0x00000040, | 
|  | 1319 | } | 
|  | 1320 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1321 | type VkFlags VkStencilFaceFlags | 
|  | 1322 | bitfield VkStencilFaceFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1323 | VK_STENCIL_FACE_FRONT_BIT                               = 0x00000001,   /// Front face | 
|  | 1324 | VK_STENCIL_FACE_BACK_BIT                                = 0x00000002,   /// Back face | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1325 | VK_STENCIL_FRONT_AND_BACK                               = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1326 | } | 
|  | 1327 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1328 | /// Instance creation flags | 
|  | 1329 | type VkFlags VkInstanceCreateFlags | 
|  | 1330 | //bitfield VkInstanceCreateFlagBits { | 
|  | 1331 | //} | 
|  | 1332 |  | 
|  | 1333 | /// Device creation flags | 
|  | 1334 | type VkFlags VkDeviceCreateFlags | 
|  | 1335 | //bitfield VkDeviceCreateFlagBits { | 
|  | 1336 | //} | 
|  | 1337 |  | 
|  | 1338 | /// Device queue creation flags | 
|  | 1339 | type VkFlags VkDeviceQueueCreateFlags | 
|  | 1340 | //bitfield VkDeviceQueueCreateFlagBits { | 
|  | 1341 | //} | 
|  | 1342 |  | 
|  | 1343 | /// Query pool creation flags | 
|  | 1344 | type VkFlags VkQueryPoolCreateFlags | 
|  | 1345 | //bitfield VkQueryPoolCreateFlagBits { | 
|  | 1346 | //} | 
|  | 1347 |  | 
|  | 1348 | /// Buffer view creation flags | 
|  | 1349 | type VkFlags VkBufferViewCreateFlags | 
|  | 1350 | //bitfield VkBufferViewCreateFlagBits { | 
|  | 1351 | //} | 
|  | 1352 |  | 
|  | 1353 | /// Pipeline cache creation flags | 
|  | 1354 | type VkFlags VkPipelineCacheCreateFlags | 
|  | 1355 | //bitfield VkPipelineCacheCreateFlagBits { | 
|  | 1356 | //} | 
|  | 1357 |  | 
|  | 1358 | /// Pipeline shader stage creation flags | 
|  | 1359 | type VkFlags VkPipelineShaderStageCreateFlags | 
|  | 1360 | //bitfield VkPipelineShaderStageCreateFlagBits { | 
|  | 1361 | //} | 
|  | 1362 |  | 
|  | 1363 | /// Descriptor set layout creation flags | 
|  | 1364 | type VkFlags VkDescriptorSetLayoutCreateFlags | 
|  | 1365 | //bitfield VkDescriptorSetLayoutCreateFlagBits { | 
|  | 1366 | //} | 
|  | 1367 |  | 
|  | 1368 | /// Pipeline vertex input state creation flags | 
|  | 1369 | type VkFlags VkPipelineVertexInputStateCreateFlags | 
|  | 1370 | //bitfield VkPipelineVertexInputStateCreateFlagBits { | 
|  | 1371 | //} | 
|  | 1372 |  | 
|  | 1373 | /// Pipeline input assembly state creation flags | 
|  | 1374 | type VkFlags VkPipelineInputAssemblyStateCreateFlags | 
|  | 1375 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { | 
|  | 1376 | //} | 
|  | 1377 |  | 
|  | 1378 | /// Tessellation state creation flags | 
|  | 1379 | type VkFlags VkPipelineTessellationStateCreateFlags | 
|  | 1380 | //bitfield VkPipelineTessellationStateCreateFlagBits { | 
|  | 1381 | //} | 
|  | 1382 |  | 
|  | 1383 | /// Viewport state creation flags | 
|  | 1384 | type VkFlags VkPipelineViewportStateCreateFlags | 
|  | 1385 | //bitfield VkPipelineViewportStateCreateFlagBits { | 
|  | 1386 | //} | 
|  | 1387 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1388 | /// Rasterization state creation flags | 
|  | 1389 | type VkFlags VkPipelineRasterizationStateCreateFlags | 
|  | 1390 | //bitfield VkPipelineRasterizationStateCreateFlagBits { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1391 | //} | 
|  | 1392 |  | 
|  | 1393 | /// Multisample state creation flags | 
|  | 1394 | type VkFlags VkPipelineMultisampleStateCreateFlags | 
|  | 1395 | //bitfield VkPipelineMultisampleStateCreateFlagBits { | 
|  | 1396 | //} | 
|  | 1397 |  | 
|  | 1398 | /// Color blend state creation flags | 
|  | 1399 | type VkFlags VkPipelineColorBlendStateCreateFlags | 
|  | 1400 | //bitfield VkPipelineColorBlendStateCreateFlagBits { | 
|  | 1401 | //} | 
|  | 1402 |  | 
|  | 1403 | /// Depth/stencil state creation flags | 
|  | 1404 | type VkFlags VkPipelineDepthStencilStateCreateFlags | 
|  | 1405 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { | 
|  | 1406 | //} | 
|  | 1407 |  | 
|  | 1408 | /// Dynamic state creation flags | 
|  | 1409 | type VkFlags VkPipelineDynamicStateCreateFlags | 
|  | 1410 | //bitfield VkPipelineDynamicStateCreateFlagBits { | 
|  | 1411 | //} | 
|  | 1412 |  | 
|  | 1413 | /// Pipeline layout creation flags | 
|  | 1414 | type VkFlags VkPipelineLayoutCreateFlags | 
|  | 1415 | //bitfield VkPipelineLayoutCreateFlagBits { | 
|  | 1416 | //} | 
|  | 1417 |  | 
|  | 1418 | /// Sampler creation flags | 
|  | 1419 | type VkFlags VkSamplerCreateFlags | 
|  | 1420 | //bitfield VkSamplerCreateFlagBits { | 
|  | 1421 | //} | 
|  | 1422 |  | 
|  | 1423 | /// Render pass creation flags | 
|  | 1424 | type VkFlags VkRenderPassCreateFlags | 
|  | 1425 | //bitfield VkRenderPassCreateFlagBits { | 
|  | 1426 | //} | 
|  | 1427 |  | 
|  | 1428 | /// Framebuffer creation flags | 
|  | 1429 | type VkFlags VkFramebufferCreateFlags | 
|  | 1430 | //bitfield VkFramebufferCreateFlagBits { | 
|  | 1431 | //} | 
|  | 1432 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1433 | /// Dependency flags | 
|  | 1434 | type VkFlags VkDependencyFlags | 
|  | 1435 | bitfield VkDependencyFlagBits { | 
|  | 1436 | VK_DEPENDENCY_BY_REGION_BIT                             = 0x00000001, | 
|  | 1437 | } | 
|  | 1438 |  | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1439 | /// Cull mode flags | 
|  | 1440 | type VkFlags VkCullModeFlags | 
|  | 1441 | bitfield VkCullModeFlagBits { | 
|  | 1442 | VK_CULL_MODE_NONE                                       = 0x00000000, | 
|  | 1443 | VK_CULL_MODE_FRONT_BIT                                  = 0x00000001, | 
|  | 1444 | VK_CULL_MODE_BACK_BIT                                   = 0x00000002, | 
|  | 1445 | VK_CULL_MODE_FRONT_AND_BACK                             = 0x00000003, | 
|  | 1446 | } | 
|  | 1447 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1448 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1449 | type VkFlags VkSurfaceTransformFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1450 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1451 | bitfield VkSurfaceTransformFlagBitsKHR { | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1452 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR                       = 0x00000001, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1453 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR                      = 0x00000002, | 
|  | 1454 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR                     = 0x00000004, | 
|  | 1455 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR                     = 0x00000008, | 
|  | 1456 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR              = 0x00000010, | 
|  | 1457 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR    = 0x00000020, | 
|  | 1458 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR   = 0x00000040, | 
|  | 1459 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR   = 0x00000080, | 
|  | 1460 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR                        = 0x00000100, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1461 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1462 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1463 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1464 | type VkFlags VkCompositeAlphaFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1465 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1466 | bitfield VkCompositeAlphaFlagBitsKHR { | 
|  | 1467 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR                       = 0x00000001, | 
|  | 1468 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR               = 0x00000002, | 
|  | 1469 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR              = 0x00000004, | 
|  | 1470 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR                      = 0x00000008, | 
|  | 1471 | } | 
|  | 1472 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1473 | @extension("VK_KHR_swapchain") | 
|  | 1474 | type VkFlags VkSwapchainCreateFlagsKHR | 
|  | 1475 | //@extension("VK_KHR_swapchain") | 
|  | 1476 | //bitfield VkSwapchainCreateFlagBitsKHR { | 
|  | 1477 | //} | 
|  | 1478 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1479 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1480 | type VkFlags VkDisplayPlaneAlphaFlagsKHR | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1481 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1482 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1483 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR                   = 0x00000001, | 
|  | 1484 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR                   = 0x00000002, | 
|  | 1485 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR                = 0x00000004, | 
|  | 1486 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR  = 0x00000008, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1487 | } | 
|  | 1488 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1489 | @extension("VK_KHR_display") | 
|  | 1490 | type VkFlags VkDisplaySurfaceCreateFlagsKHR | 
|  | 1491 | //@extension("VK_KHR_display") | 
|  | 1492 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { | 
|  | 1493 | //} | 
|  | 1494 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1495 | @extension("VK_KHR_display") | 
|  | 1496 | type VkFlags VkDisplayModeCreateFlagsKHR | 
|  | 1497 | //@extension("VK_KHR_display") | 
|  | 1498 | //bitfield VkDisplayModeCreateFlagBitsKHR { | 
|  | 1499 | //} | 
|  | 1500 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1501 | @extension("VK_KHR_xlib_surface") | 
|  | 1502 | type VkFlags VkXlibSurfaceCreateFlagsKHR | 
|  | 1503 | //@extension("VK_KHR_xlib_surface") | 
|  | 1504 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { | 
|  | 1505 | //} | 
|  | 1506 |  | 
|  | 1507 | @extension("VK_KHR_xcb_surface") | 
|  | 1508 | type VkFlags VkXcbSurfaceCreateFlagsKHR | 
|  | 1509 | //@extension("VK_KHR_xcb_surface") | 
|  | 1510 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { | 
|  | 1511 | //} | 
|  | 1512 |  | 
|  | 1513 | @extension("VK_KHR_wayland_surface") | 
|  | 1514 | type VkFlags VkWaylandSurfaceCreateFlagsKHR | 
|  | 1515 | //@extension("VK_KHR_wayland_surface") | 
|  | 1516 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { | 
|  | 1517 | //} | 
|  | 1518 |  | 
|  | 1519 | @extension("VK_KHR_mir_surface") | 
|  | 1520 | type VkFlags VkMirSurfaceCreateFlagsKHR | 
|  | 1521 | //@extension("VK_KHR_mir_surface") | 
|  | 1522 | //bitfield VkMirSurfaceCreateFlagBitsKHR { | 
|  | 1523 | //} | 
|  | 1524 |  | 
|  | 1525 | @extension("VK_KHR_android_surface") | 
|  | 1526 | type VkFlags VkAndroidSurfaceCreateFlagsKHR | 
|  | 1527 | //@extension("VK_KHR_android_surface") | 
|  | 1528 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { | 
|  | 1529 | //} | 
|  | 1530 |  | 
|  | 1531 | @extension("VK_KHR_win32_surface") | 
|  | 1532 | type VkFlags VkWin32SurfaceCreateFlagsKHR | 
|  | 1533 | //@extension("VK_KHR_win32_surface") | 
|  | 1534 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { | 
|  | 1535 | //} | 
|  | 1536 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1537 | @extension("VK_EXT_debug_report") | 
|  | 1538 | type VkFlags VkDebugReportFlagsEXT | 
|  | 1539 | @extension("VK_EXT_debug_report") | 
|  | 1540 | bitfield VkDebugReportFlagBitsEXT { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1541 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT                     = 0x00000001, | 
|  | 1542 | VK_DEBUG_REPORT_WARNING_BIT_EXT                         = 0x00000002, | 
|  | 1543 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT             = 0x00000004, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1544 | VK_DEBUG_REPORT_ERROR_BIT_EXT                           = 0x00000008, | 
|  | 1545 | VK_DEBUG_REPORT_DEBUG_BIT_EXT                           = 0x00000010, | 
|  | 1546 | } | 
|  | 1547 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 1548 | @extension("VK_ANDROID_native_buffer") | 
|  | 1549 | type VkFlags VkSwapchainImageUsageFlagsANDROID | 
|  | 1550 | @extension("VK_ANDROID_native_buffer") | 
|  | 1551 | bitfield VkSwapchainImageUsageFlagBitsANDROID { | 
|  | 1552 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_FRONT_BUFFER_BIT_ANDROID = 0x00000001, | 
|  | 1553 | } | 
|  | 1554 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1555 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1556 | type VkFlags VkExternalMemoryHandleTypeFlagsNV | 
|  | 1557 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1558 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { | 
|  | 1559 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, | 
|  | 1560 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, | 
|  | 1561 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, | 
|  | 1562 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, | 
|  | 1563 | } | 
|  | 1564 |  | 
|  | 1565 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1566 | type VkFlags VkExternalMemoryFeatureFlagsNV | 
|  | 1567 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1568 | bitfield VkExternalMemoryFeatureFlagBitsNV { | 
|  | 1569 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, | 
|  | 1570 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, | 
|  | 1571 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, | 
|  | 1572 | } | 
|  | 1573 |  | 
|  | 1574 | @extension("VK_NVX_device_generated_commands") | 
|  | 1575 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX | 
|  | 1576 | @extension("VK_NVX_device_generated_commands") | 
|  | 1577 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { | 
|  | 1578 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, | 
|  | 1579 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, | 
|  | 1580 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, | 
|  | 1581 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, | 
|  | 1582 | } | 
|  | 1583 |  | 
|  | 1584 | @extension("VK_NVX_device_generated_commands") | 
|  | 1585 | type VkFlags VkObjectEntryUsageFlagsNVX | 
|  | 1586 | @extension("VK_NVX_device_generated_commands") | 
|  | 1587 | bitfield VkObjectEntryUsageFlagBitsNVX { | 
|  | 1588 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, | 
|  | 1589 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, | 
|  | 1590 | } | 
|  | 1591 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1592 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1593 | ////////////////// | 
|  | 1594 | //  Structures  // | 
|  | 1595 | ////////////////// | 
|  | 1596 |  | 
|  | 1597 | class VkOffset2D { | 
|  | 1598 | s32                                         x | 
|  | 1599 | s32                                         y | 
|  | 1600 | } | 
|  | 1601 |  | 
|  | 1602 | class VkOffset3D { | 
|  | 1603 | s32                                         x | 
|  | 1604 | s32                                         y | 
|  | 1605 | s32                                         z | 
|  | 1606 | } | 
|  | 1607 |  | 
|  | 1608 | class VkExtent2D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1609 | u32                                         width | 
|  | 1610 | u32                                         height | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1611 | } | 
|  | 1612 |  | 
|  | 1613 | class VkExtent3D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1614 | u32                                         width | 
|  | 1615 | u32                                         height | 
|  | 1616 | u32                                         depth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1617 | } | 
|  | 1618 |  | 
|  | 1619 | class VkViewport { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1620 | f32                                         x | 
|  | 1621 | f32                                         y | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1622 | f32                                         width | 
|  | 1623 | f32                                         height | 
|  | 1624 | f32                                         minDepth | 
|  | 1625 | f32                                         maxDepth | 
|  | 1626 | } | 
|  | 1627 |  | 
|  | 1628 | class VkRect2D { | 
|  | 1629 | VkOffset2D                                  offset | 
|  | 1630 | VkExtent2D                                  extent | 
|  | 1631 | } | 
|  | 1632 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1633 | class VkClearRect { | 
|  | 1634 | VkRect2D                                    rect | 
|  | 1635 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1636 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1637 | } | 
|  | 1638 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1639 | class VkComponentMapping { | 
|  | 1640 | VkComponentSwizzle                          r | 
|  | 1641 | VkComponentSwizzle                          g | 
|  | 1642 | VkComponentSwizzle                          b | 
|  | 1643 | VkComponentSwizzle                          a | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1644 | } | 
|  | 1645 |  | 
|  | 1646 | class VkPhysicalDeviceProperties { | 
|  | 1647 | u32                                         apiVersion | 
|  | 1648 | u32                                         driverVersion | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1649 | u32                                         vendorID | 
|  | 1650 | u32                                         deviceID | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1651 | VkPhysicalDeviceType                        deviceType | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1652 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]      deviceName | 
|  | 1653 | u8[VK_UUID_SIZE]                            pipelineCacheUUID | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1654 | VkPhysicalDeviceLimits                      limits | 
|  | 1655 | VkPhysicalDeviceSparseProperties            sparseProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1656 | } | 
|  | 1657 |  | 
|  | 1658 | class VkExtensionProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1659 | char[VK_MAX_EXTENSION_NAME_SIZE]            extensionName      /// extension name | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1660 | u32                                         specVersion        /// version of the extension specification implemented | 
|  | 1661 | } | 
|  | 1662 |  | 
|  | 1663 | class VkLayerProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1664 | char[VK_MAX_EXTENSION_NAME_SIZE]            layerName               /// layer name | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1665 | u32                                         specVersion             /// version of the layer specification implemented | 
|  | 1666 | u32                                         implementationVersion   /// build or release version of the layer's library | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1667 | char[VK_MAX_DESCRIPTION_SIZE]               description             /// Free-form description of the layer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1668 | } | 
|  | 1669 |  | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1670 | class VkSubmitInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1671 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO | 
|  | 1672 | const void*                                 pNext              /// Next structure in chain | 
|  | 1673 | u32                                         waitSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1674 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1675 | const VkPipelineStageFlags*                 pWaitDstStageMask | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1676 | u32                                         commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1677 | const VkCommandBuffer*                      pCommandBuffers | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1678 | u32                                         signalSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1679 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1680 | } | 
|  | 1681 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1682 | class VkApplicationInfo { | 
|  | 1683 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO | 
|  | 1684 | const void*                                 pNext              /// Next structure in chain | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1685 | const char*                                 pApplicationName | 
|  | 1686 | u32                                         applicationVersion | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1687 | const char*                                 pEngineName | 
|  | 1688 | u32                                         engineVersion | 
|  | 1689 | u32                                         apiVersion | 
|  | 1690 | } | 
|  | 1691 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1692 | class VkAllocationCallbacks { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1693 | void*                                       pUserData | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1694 | PFN_vkAllocationFunction                    pfnAllocation | 
|  | 1695 | PFN_vkReallocationFunction                  pfnReallocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1696 | PFN_vkFreeFunction                          pfnFree | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1697 | PFN_vkInternalAllocationNotification        pfnInternalAllocation | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1698 | PFN_vkInternalFreeNotification              pfnInternalFree | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1699 | } | 
|  | 1700 |  | 
|  | 1701 | class VkDeviceQueueCreateInfo { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1702 | VkStructureType                             sStype                    /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO | 
|  | 1703 | const void*                                 pNext                     /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1704 | VkDeviceQueueCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1705 | u32                                         queueFamilyIndex | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1706 | u32                                         queueCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1707 | const f32*                                  pQueuePriorities | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1708 | } | 
|  | 1709 |  | 
|  | 1710 | class VkDeviceCreateInfo { | 
|  | 1711 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO | 
|  | 1712 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1713 | VkDeviceCreateFlags                         flags | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1714 | u32                                         queueCreateInfoCount | 
|  | 1715 | const VkDeviceQueueCreateInfo*              pQueueCreateInfos | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1716 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1717 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1718 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1719 | const char* const*                          ppEnabledExtensionNames | 
|  | 1720 | const VkPhysicalDeviceFeatures*             pEnabledFeatures | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1721 | } | 
|  | 1722 |  | 
|  | 1723 | class VkInstanceCreateInfo { | 
|  | 1724 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO | 
|  | 1725 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1726 | VkInstanceCreateFlags                       flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1727 | const VkApplicationInfo*                    pApplicationInfo | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1728 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1729 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1730 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1731 | const char* const*                          ppEnabledExtensionNames    /// Extension names to be enabled | 
|  | 1732 | } | 
|  | 1733 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1734 | class VkQueueFamilyProperties { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1735 | VkQueueFlags                                queueFlags                 /// Queue flags | 
|  | 1736 | u32                                         queueCount | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1737 | u32                                         timestampValidBits | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1738 | VkExtent3D                                  minImageTransferGranularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1739 | } | 
|  | 1740 |  | 
|  | 1741 | class VkPhysicalDeviceMemoryProperties { | 
|  | 1742 | u32                                         memoryTypeCount | 
|  | 1743 | VkMemoryType[VK_MAX_MEMORY_TYPES]           memoryTypes | 
|  | 1744 | u32                                         memoryHeapCount | 
|  | 1745 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS]           memoryHeaps | 
|  | 1746 | } | 
|  | 1747 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1748 | class VkMemoryAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1749 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1750 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1751 | VkDeviceSize                                allocationSize             /// Size of memory allocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1752 | u32                                         memoryTypeIndex            /// Index of the of the memory type to allocate from | 
|  | 1753 | } | 
|  | 1754 |  | 
|  | 1755 | class VkMemoryRequirements { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1756 | VkDeviceSize                                size                       /// Specified in bytes | 
|  | 1757 | VkDeviceSize                                alignment                  /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1758 | u32                                         memoryTypeBits             /// Bitfield of the allowed memory type indices into memoryTypes[] for this object | 
|  | 1759 | } | 
|  | 1760 |  | 
|  | 1761 | class VkSparseImageFormatProperties { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1762 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1763 | VkExtent3D                                  imageGranularity | 
|  | 1764 | VkSparseImageFormatFlags                    flags | 
|  | 1765 | } | 
|  | 1766 |  | 
|  | 1767 | class VkSparseImageMemoryRequirements { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1768 | VkSparseImageFormatProperties               formatProperties | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1769 | u32                                         imageMipTailFirstLod | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1770 | VkDeviceSize                                imageMipTailSize           /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1771 | VkDeviceSize                                imageMipTailOffset         /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1772 | 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] | 1773 | } | 
|  | 1774 |  | 
|  | 1775 | class VkMemoryType { | 
|  | 1776 | VkMemoryPropertyFlags                       propertyFlags              /// Memory properties of this memory type | 
|  | 1777 | u32                                         heapIndex                  /// Index of the memory heap allocations of this memory type are taken from | 
|  | 1778 | } | 
|  | 1779 |  | 
|  | 1780 | class VkMemoryHeap { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1781 | VkDeviceSize                                size                       /// Available memory in the heap | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1782 | VkMemoryHeapFlags                           flags                      /// Flags for the heap | 
|  | 1783 | } | 
|  | 1784 |  | 
|  | 1785 | class VkMappedMemoryRange { | 
|  | 1786 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE | 
|  | 1787 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1788 | VkDeviceMemory                              memory                     /// Mapped memory object | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1789 | VkDeviceSize                                offset                     /// Offset within the mapped memory the range starts from | 
|  | 1790 | VkDeviceSize                                size                       /// Size of the range within the mapped memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1791 | } | 
|  | 1792 |  | 
|  | 1793 | class VkFormatProperties { | 
|  | 1794 | VkFormatFeatureFlags                        linearTilingFeatures       /// Format features in case of linear tiling | 
|  | 1795 | VkFormatFeatureFlags                        optimalTilingFeatures      /// Format features in case of optimal tiling | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1796 | VkFormatFeatureFlags                        bufferFeatures             /// Format features supported by buffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1797 | } | 
|  | 1798 |  | 
|  | 1799 | class VkImageFormatProperties { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1800 | VkExtent3D                                  maxExtent                  /// max image dimensions for this resource type | 
|  | 1801 | u32                                         maxMipLevels               /// max number of mipmap levels for this resource type | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1802 | u32                                         maxArrayLayers             /// max array layers for this resource type | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1803 | VkSampleCountFlags                          sampleCounts               /// supported sample counts for this resource type | 
|  | 1804 | VkDeviceSize                                maxResourceSize            /// max size (in bytes) of this resource type | 
|  | 1805 | } | 
|  | 1806 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1807 | class VkDescriptorImageInfo { | 
|  | 1808 | VkSampler                                   sampler | 
|  | 1809 | VkImageView                                 imageView | 
|  | 1810 | VkImageLayout                               imageLayout | 
|  | 1811 | } | 
|  | 1812 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1813 | class VkDescriptorBufferInfo { | 
|  | 1814 | VkBuffer                                    buffer                     /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] | 
|  | 1815 | VkDeviceSize                                offset                     /// Base offset from buffer start in bytes to update in the descriptor set. | 
|  | 1816 | 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] | 1817 | } | 
|  | 1818 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1819 | class VkWriteDescriptorSet { | 
|  | 1820 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET | 
|  | 1821 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1822 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1823 | u32                                         dstBinding                 /// Binding within the destination descriptor set to write | 
|  | 1824 | u32                                         dstArrayElement            /// Array element within the destination binding to write | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1825 | 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] | 1826 | 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] | 1827 | const VkDescriptorImageInfo*                pImageInfo | 
|  | 1828 | const VkDescriptorBufferInfo*               pBufferInfo | 
|  | 1829 | const VkBufferView*                         pTexelBufferView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1830 | } | 
|  | 1831 |  | 
|  | 1832 | class VkCopyDescriptorSet { | 
|  | 1833 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET | 
|  | 1834 | const void*                                 pNext                      /// Pointer to next structure | 
|  | 1835 | VkDescriptorSet                             srcSet                     /// Source descriptor set | 
|  | 1836 | u32                                         srcBinding                 /// Binding within the source descriptor set to copy from | 
|  | 1837 | u32                                         srcArrayElement            /// Array element within the source binding to copy from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1838 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1839 | u32                                         dstBinding                 /// Binding within the destination descriptor set to copy to | 
|  | 1840 | u32                                         dstArrayElement            /// Array element within the destination binding to copy to | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1841 | u32                                         descriptorCount            /// Number of descriptors to copy | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1842 | } | 
|  | 1843 |  | 
|  | 1844 | class VkBufferCreateInfo { | 
|  | 1845 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO | 
|  | 1846 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1847 | VkBufferCreateFlags                         flags                      /// Buffer creation flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1848 | VkDeviceSize                                size                       /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1849 | VkBufferUsageFlags                          usage                      /// Buffer usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1850 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1851 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1852 | const u32*                                  pQueueFamilyIndices | 
|  | 1853 | } | 
|  | 1854 |  | 
|  | 1855 | class VkBufferViewCreateInfo { | 
|  | 1856 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO | 
|  | 1857 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1858 | VkBufferViewCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1859 | VkBuffer                                    buffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1860 | VkFormat                                    format                     /// Optionally specifies format of elements | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1861 | VkDeviceSize                                offset                     /// Specified in bytes | 
|  | 1862 | VkDeviceSize                                range                      /// View size specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1863 | } | 
|  | 1864 |  | 
|  | 1865 | class VkImageSubresource { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1866 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1867 | u32                                         mipLevel | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1868 | u32                                         arrayLayer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1869 | } | 
|  | 1870 |  | 
|  | 1871 | class VkImageSubresourceRange { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1872 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1873 | u32                                         baseMipLevel | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1874 | u32                                         levelCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1875 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1876 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1877 | } | 
|  | 1878 |  | 
|  | 1879 | class VkMemoryBarrier { | 
|  | 1880 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER | 
|  | 1881 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1882 | VkAccessFlags                               srcAccessMask | 
|  | 1883 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1884 | } | 
|  | 1885 |  | 
|  | 1886 | class VkBufferMemoryBarrier { | 
|  | 1887 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER | 
|  | 1888 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1889 | VkAccessFlags                               srcAccessMask | 
|  | 1890 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1891 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1892 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1893 | VkBuffer                                    buffer                     /// Buffer to sync | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1894 | VkDeviceSize                                offset                     /// Offset within the buffer to sync | 
|  | 1895 | VkDeviceSize                                size                       /// Amount of bytes to sync | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1896 | } | 
|  | 1897 |  | 
|  | 1898 | class VkImageMemoryBarrier { | 
|  | 1899 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER | 
|  | 1900 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1901 | VkAccessFlags                               srcAccessMask | 
|  | 1902 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1903 | VkImageLayout                               oldLayout                  /// Current layout of the image | 
|  | 1904 | VkImageLayout                               newLayout                  /// New layout to transition the image to | 
|  | 1905 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1906 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1907 | VkImage                                     image                      /// Image to sync | 
|  | 1908 | VkImageSubresourceRange                     subresourceRange           /// Subresource range to sync | 
|  | 1909 | } | 
|  | 1910 |  | 
|  | 1911 | class VkImageCreateInfo { | 
|  | 1912 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO | 
|  | 1913 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1914 | VkImageCreateFlags                          flags                      /// Image creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1915 | VkImageType                                 imageType | 
|  | 1916 | VkFormat                                    format | 
|  | 1917 | VkExtent3D                                  extent | 
|  | 1918 | u32                                         mipLevels | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1919 | u32                                         arrayLayers | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1920 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1921 | VkImageTiling                               tiling | 
|  | 1922 | VkImageUsageFlags                           usage                      /// Image usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1923 | VkSharingMode                               sharingMode                /// Cross-queue-family sharing mode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1924 | u32                                         queueFamilyIndexCount      /// Number of queue families to share across | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1925 | const u32*                                  pQueueFamilyIndices        /// Array of queue family indices to share across | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1926 | VkImageLayout                               initialLayout              /// Initial image layout for all subresources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1927 | } | 
|  | 1928 |  | 
|  | 1929 | class VkSubresourceLayout { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1930 | VkDeviceSize                                offset                 /// Specified in bytes | 
|  | 1931 | VkDeviceSize                                size                   /// Specified in bytes | 
|  | 1932 | VkDeviceSize                                rowPitch               /// Specified in bytes | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1933 | VkDeviceSize                                arrayPitch             /// Specified in bytes | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1934 | VkDeviceSize                                depthPitch             /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1935 | } | 
|  | 1936 |  | 
|  | 1937 | class VkImageViewCreateInfo { | 
|  | 1938 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO | 
|  | 1939 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1940 | VkImageViewCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1941 | VkImage                                     image | 
|  | 1942 | VkImageViewType                             viewType | 
|  | 1943 | VkFormat                                    format | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1944 | VkComponentMapping                          components | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1945 | VkImageSubresourceRange                     subresourceRange | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1946 | } | 
|  | 1947 |  | 
|  | 1948 | class VkBufferCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1949 | VkDeviceSize                                srcOffset              /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1950 | VkDeviceSize                                dstOffset              /// Specified in bytes | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1951 | VkDeviceSize                                size                   /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1952 | } | 
|  | 1953 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1954 | class VkSparseMemoryBind { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1955 | VkDeviceSize                                resourceOffset        /// Specified in bytes | 
|  | 1956 | VkDeviceSize                                size                  /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1957 | VkDeviceMemory                              memory | 
|  | 1958 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1959 | VkSparseMemoryBindFlags                     flags | 
|  | 1960 | } | 
|  | 1961 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1962 | class VkSparseImageMemoryBind { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1963 | VkImageSubresource                          subresource | 
|  | 1964 | VkOffset3D                                  offset | 
|  | 1965 | VkExtent3D                                  extent | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1966 | VkDeviceMemory                              memory | 
|  | 1967 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1968 | VkSparseMemoryBindFlags                     flags | 
|  | 1969 | } | 
|  | 1970 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1971 | class VkSparseBufferMemoryBindInfo { | 
|  | 1972 | VkBuffer                                    buffer | 
|  | 1973 | u32                                         bindCount | 
|  | 1974 | const VkSparseMemoryBind*                   pBinds | 
|  | 1975 | } | 
|  | 1976 |  | 
|  | 1977 | class VkSparseImageOpaqueMemoryBindInfo { | 
|  | 1978 | VkImage                                     image | 
|  | 1979 | u32                                         bindCount | 
|  | 1980 | const VkSparseMemoryBind*                   pBinds | 
|  | 1981 | } | 
|  | 1982 |  | 
|  | 1983 | class VkSparseImageMemoryBindInfo { | 
|  | 1984 | VkImage                                     image | 
|  | 1985 | u32                                         bindCount | 
|  | 1986 | const VkSparseMemoryBind*                   pBinds | 
|  | 1987 | } | 
|  | 1988 |  | 
|  | 1989 | class VkBindSparseInfo { | 
|  | 1990 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO | 
|  | 1991 | const void*                                 pNext | 
|  | 1992 | u32                                         waitSemaphoreCount | 
|  | 1993 | const VkSemaphore*                          pWaitSemaphores | 
|  | 1994 | u32                                         numBufferBinds | 
|  | 1995 | const VkSparseBufferMemoryBindInfo*         pBufferBinds | 
|  | 1996 | u32                                         numImageOpaqueBinds | 
|  | 1997 | const VkSparseImageOpaqueMemoryBindInfo*    pImageOpaqueBinds | 
|  | 1998 | u32                                         numImageBinds | 
|  | 1999 | const VkSparseImageMemoryBindInfo*          pImageBinds | 
|  | 2000 | u32                                         signalSemaphoreCount | 
|  | 2001 | const VkSemaphore*                          pSignalSemaphores | 
|  | 2002 | } | 
|  | 2003 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2004 | class VkImageSubresourceLayers { | 
|  | 2005 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2006 | u32                                         mipLevel | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2007 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2008 | u32                                         layerCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2009 | } | 
|  | 2010 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2011 | class VkImageCopy { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2012 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2013 | VkOffset3D                                  srcOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2014 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2015 | VkOffset3D                                  dstOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2016 | VkExtent3D                                  extent                /// Specified in pixels for both compressed and uncompressed images | 
|  | 2017 | } | 
|  | 2018 |  | 
|  | 2019 | class VkImageBlit { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2020 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2021 | VkOffset3D[2]                               srcOffsets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2022 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2023 | VkOffset3D[2]                               dstOffsets | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2024 | } | 
|  | 2025 |  | 
|  | 2026 | class VkBufferImageCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2027 | VkDeviceSize                                bufferOffset           /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2028 | u32                                         bufferRowLength        /// Specified in texels | 
|  | 2029 | u32                                         bufferImageHeight | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2030 | VkImageSubresourceLayers                    imageSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2031 | VkOffset3D                                  imageOffset            /// Specified in pixels for both compressed and uncompressed images | 
|  | 2032 | VkExtent3D                                  imageExtent            /// Specified in pixels for both compressed and uncompressed images | 
|  | 2033 | } | 
|  | 2034 |  | 
|  | 2035 | class VkImageResolve { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2036 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2037 | VkOffset3D                                  srcOffset | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2038 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2039 | VkOffset3D                                  dstOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2040 | VkExtent3D                                  extent | 
|  | 2041 | } | 
|  | 2042 |  | 
|  | 2043 | class VkShaderModuleCreateInfo { | 
|  | 2044 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO | 
|  | 2045 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2046 | VkShaderModuleCreateFlags                   flags                  /// Reserved | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2047 | platform.size_t                             codeSize               /// Specified in bytes | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2048 | const u32*                                  pCode                  /// Binary code of size codeSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2049 | } | 
|  | 2050 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2051 | class VkDescriptorSetLayoutBinding { | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2052 | u32                                         binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2053 | VkDescriptorType                            descriptorType     /// Type of the descriptors in this binding | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2054 | u32                                         descriptorCount    /// Number of descriptors in this binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2055 | VkShaderStageFlags                          stageFlags         /// Shader stages this binding is visible to | 
|  | 2056 | const VkSampler*                            pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) | 
|  | 2057 | } | 
|  | 2058 |  | 
|  | 2059 | class VkDescriptorSetLayoutCreateInfo { | 
|  | 2060 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO | 
|  | 2061 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2062 | VkDescriptorSetLayoutCreateFlags            flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2063 | u32                                         bindingCount       /// Number of bindings in the descriptor set layout | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2064 | const VkDescriptorSetLayoutBinding*         pBindings          /// Array of descriptor set layout bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2065 | } | 
|  | 2066 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2067 | class VkDescriptorPoolSize { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2068 | VkDescriptorType                            type | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2069 | u32                                         descriptorCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2070 | } | 
|  | 2071 |  | 
|  | 2072 | class VkDescriptorPoolCreateInfo { | 
|  | 2073 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO | 
|  | 2074 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2075 | VkDescriptorPoolCreateFlags                 flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2076 | u32                                         maxSets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2077 | u32                                         poolSizeCount | 
|  | 2078 | const VkDescriptorPoolSize*                 pPoolSizes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2079 | } | 
|  | 2080 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2081 | class VkDescriptorSetAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2082 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2083 | const void*                                 pNext              /// Pointer to next structure | 
|  | 2084 | VkDescriptorPool                            descriptorPool | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2085 | u32                                         setCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2086 | const VkDescriptorSetLayout*                pSetLayouts | 
|  | 2087 | } | 
|  | 2088 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2089 | class VkSpecializationMapEntry { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2090 | u32                                         constantID         /// The SpecConstant ID specified in the BIL | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2091 | u32                                         offset             /// Offset of the value in the data block | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2092 | platform.size_t                             size               /// Size in bytes of the SpecConstant | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2093 | } | 
|  | 2094 |  | 
|  | 2095 | class VkSpecializationInfo { | 
|  | 2096 | u32                                         mapEntryCount      /// Number of entries in the map | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2097 | const VkSpecializationMapEntry*             pMapEntries        /// Array of map entries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2098 | platform.size_t                             dataSize           /// Size in bytes of pData | 
|  | 2099 | const void*                                 pData              /// Pointer to SpecConstant data | 
|  | 2100 | } | 
|  | 2101 |  | 
|  | 2102 | class VkPipelineShaderStageCreateInfo { | 
|  | 2103 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO | 
|  | 2104 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2105 | VkPipelineShaderStageCreateFlags            flags | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2106 | VkShaderStageFlagBits                       stage | 
|  | 2107 | VkShaderModule                              module | 
|  | 2108 | const char*                                 pName | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2109 | const VkSpecializationInfo*                 pSpecializationInfo | 
|  | 2110 | } | 
|  | 2111 |  | 
|  | 2112 | class VkComputePipelineCreateInfo { | 
|  | 2113 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO | 
|  | 2114 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2115 | VkPipelineCreateFlags                       flags              /// Pipeline creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2116 | VkPipelineShaderStageCreateInfo             stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2117 | VkPipelineLayout                            layout             /// Interface layout of the pipeline | 
|  | 2118 | 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 | 
|  | 2119 | 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 | 
|  | 2120 | } | 
|  | 2121 |  | 
|  | 2122 | class VkVertexInputBindingDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2123 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2124 | u32                                         stride                /// Distance between vertices in bytes (0 = no advancement) | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2125 | VkVertexInputRate                           inputRate             /// Rate at which binding is incremented | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2126 | } | 
|  | 2127 |  | 
|  | 2128 | class VkVertexInputAttributeDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2129 | u32                                         location              /// location of the shader vertex attrib | 
|  | 2130 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2131 | VkFormat                                    format                /// format of source data | 
|  | 2132 | u32                                         offset                /// Offset of first element in bytes from base of vertex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2133 | } | 
|  | 2134 |  | 
|  | 2135 | class VkPipelineVertexInputStateCreateInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2136 | VkStructureType                             sType                           /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO | 
|  | 2137 | const void*                                 pNext                           /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2138 | VkPipelineVertexInputStateCreateFlags       flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2139 | u32                                         vertexBindingDescriptionCount   /// number of bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2140 | const VkVertexInputBindingDescription*      pVertexBindingDescriptions | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2141 | u32                                         vertexAttributeDescriptionCount /// number of attributes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2142 | const VkVertexInputAttributeDescription*    pVertexAttributeDescriptions | 
|  | 2143 | } | 
|  | 2144 |  | 
|  | 2145 | class VkPipelineInputAssemblyStateCreateInfo { | 
|  | 2146 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO | 
|  | 2147 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2148 | VkPipelineInputAssemblyStateCreateFlags     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2149 | VkPrimitiveTopology                         topology | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2150 | VkBool32                                    primitiveRestartEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2151 | } | 
|  | 2152 |  | 
|  | 2153 | class VkPipelineTessellationStateCreateInfo { | 
|  | 2154 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO | 
|  | 2155 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2156 | VkPipelineTessellationStateCreateFlags      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2157 | u32                                         patchControlPoints | 
|  | 2158 | } | 
|  | 2159 |  | 
|  | 2160 | class VkPipelineViewportStateCreateInfo { | 
|  | 2161 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO | 
|  | 2162 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2163 | VkPipelineViewportStateCreateFlags          flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2164 | u32                                         viewportCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2165 | const VkViewport*                           pViewports | 
|  | 2166 | u32                                         scissorCount | 
|  | 2167 | const VkRect2D*                             pScissors | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2168 | } | 
|  | 2169 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2170 | class VkPipelineRasterizationStateCreateInfo { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2171 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2172 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2173 | VkPipelineRasterizationStateCreateFlags     flags | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2174 | VkBool32                                    depthClampEnable | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2175 | VkBool32                                    rasterizerDiscardEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2176 | VkPolygonMode                               polygonMode                   /// optional (GL45) | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2177 | VkCullModeFlags                             cullMode | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2178 | VkFrontFace                                 frontFace | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2179 | VkBool32                                    depthBiasEnable | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2180 | f32                                         depthBiasConstantFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2181 | f32                                         depthBiasClamp | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2182 | f32                                         depthBiasSlopeFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2183 | f32                                         lineWidth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2184 | } | 
|  | 2185 |  | 
|  | 2186 | class VkPipelineMultisampleStateCreateInfo { | 
|  | 2187 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO | 
|  | 2188 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2189 | VkPipelineMultisampleStateCreateFlags       flags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2190 | VkSampleCountFlagBits                       rasterizationSamples       /// Number of samples used for rasterization | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2191 | VkBool32                                    sampleShadingEnable        /// optional (GL45) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2192 | f32                                         minSampleShading           /// optional (GL45) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2193 | const VkSampleMask*                         pSampleMask | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2194 | VkBool32                                    alphaToCoverageEnable | 
|  | 2195 | VkBool32                                    alphaToOneEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2196 | } | 
|  | 2197 |  | 
|  | 2198 | class VkPipelineColorBlendAttachmentState { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2199 | VkBool32                                    blendEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2200 | VkBlendFactor                               srcColorBlendFactor | 
|  | 2201 | VkBlendFactor                               dstColorBlendFactor | 
|  | 2202 | VkBlendOp                                   colorBlendOp | 
|  | 2203 | VkBlendFactor                               srcAlphaBlendFactor | 
|  | 2204 | VkBlendFactor                               dstAlphaBlendFactor | 
|  | 2205 | VkBlendOp                                   alphaBlendOp | 
|  | 2206 | VkColorComponentFlags                       colorWriteMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2207 | } | 
|  | 2208 |  | 
|  | 2209 | class VkPipelineColorBlendStateCreateInfo { | 
|  | 2210 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO | 
|  | 2211 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2212 | VkPipelineColorBlendStateCreateFlags        flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2213 | VkBool32                                    logicOpEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2214 | VkLogicOp                                   logicOp | 
|  | 2215 | u32                                         attachmentCount    /// # of pAttachments | 
|  | 2216 | const VkPipelineColorBlendAttachmentState*  pAttachments | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2217 | f32[4]                                      blendConstants | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2218 | } | 
|  | 2219 |  | 
|  | 2220 | class VkStencilOpState { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2221 | VkStencilOp                                 failOp | 
|  | 2222 | VkStencilOp                                 passOp | 
|  | 2223 | VkStencilOp                                 depthFailOp | 
|  | 2224 | VkCompareOp                                 compareOp | 
|  | 2225 | u32                                         compareMask | 
|  | 2226 | u32                                         writeMask | 
|  | 2227 | u32                                         reference | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2228 | } | 
|  | 2229 |  | 
|  | 2230 | class VkPipelineDepthStencilStateCreateInfo { | 
|  | 2231 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO | 
|  | 2232 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2233 | VkPipelineDepthStencilStateCreateFlags      flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2234 | VkBool32                                    depthTestEnable | 
|  | 2235 | VkBool32                                    depthWriteEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2236 | VkCompareOp                                 depthCompareOp | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2237 | VkBool32                                    depthBoundsTestEnable  /// optional (depth_bounds_test) | 
|  | 2238 | VkBool32                                    stencilTestEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2239 | VkStencilOpState                            front | 
|  | 2240 | VkStencilOpState                            back | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2241 | f32                                         minDepthBounds | 
|  | 2242 | f32                                         maxDepthBounds | 
|  | 2243 | } | 
|  | 2244 |  | 
|  | 2245 | class VkPipelineDynamicStateCreateInfo { | 
|  | 2246 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO | 
|  | 2247 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2248 | VkPipelineDynamicStateCreateFlags           flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2249 | u32                                         dynamicStateCount | 
|  | 2250 | const VkDynamicState*                       pDynamicStates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2251 | } | 
|  | 2252 |  | 
|  | 2253 | class VkGraphicsPipelineCreateInfo { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2254 | VkStructureType                                 sType               /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO | 
|  | 2255 | const void*                                     pNext               /// Pointer to next structure | 
|  | 2256 | VkPipelineCreateFlags                           flags               /// Pipeline creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2257 | u32                                             stageCount | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2258 | const VkPipelineShaderStageCreateInfo*          pStages             /// One entry for each active shader stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2259 | const VkPipelineVertexInputStateCreateInfo*     pVertexInputState | 
|  | 2260 | const VkPipelineInputAssemblyStateCreateInfo*   pInputAssemblyState | 
|  | 2261 | const VkPipelineTessellationStateCreateInfo*    pTessellationState | 
|  | 2262 | const VkPipelineViewportStateCreateInfo*        pViewportState | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2263 | const VkPipelineRasterizationStateCreateInfo*   pRasterizationState | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2264 | const VkPipelineMultisampleStateCreateInfo*     pMultisampleState | 
|  | 2265 | const VkPipelineDepthStencilStateCreateInfo*    pDepthStencilState | 
|  | 2266 | const VkPipelineColorBlendStateCreateInfo*      pColorBlendState | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2267 | const VkPipelineDynamicStateCreateInfo*         pDynamicState | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2268 | VkPipelineLayout                                layout              /// Interface layout of the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2269 | VkRenderPass                                    renderPass | 
|  | 2270 | u32                                             subpass | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2271 | 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 | 
|  | 2272 | 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] | 2273 | } | 
|  | 2274 |  | 
|  | 2275 | class VkPipelineCacheCreateInfo { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2276 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO | 
|  | 2277 | const void*                                 pNext                 /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2278 | VkPipelineCacheCreateFlags                  flags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2279 | platform.size_t                             initialDataSize       /// Size of initial data to populate cache, in bytes | 
|  | 2280 | const void*                                 pInitialData          /// Initial data to populate cache | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2281 | } | 
|  | 2282 |  | 
|  | 2283 | class VkPushConstantRange { | 
|  | 2284 | VkShaderStageFlags                          stageFlags   /// Which stages use the range | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2285 | u32                                         offset       /// Start of the range, in bytes | 
|  | 2286 | u32                                         size        /// Length of the range, in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2287 | } | 
|  | 2288 |  | 
|  | 2289 | class VkPipelineLayoutCreateInfo { | 
|  | 2290 | VkStructureType                             sType                   /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO | 
|  | 2291 | const void*                                 pNext                   /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2292 | VkPipelineLayoutCreateFlags                 flags | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2293 | u32                                         descriptorSetCount      /// Number of descriptor sets interfaced by the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2294 | const VkDescriptorSetLayout*                pSetLayouts             /// Array of <setCount> number of descriptor set layout objects defining the layout of the | 
|  | 2295 | u32                                         pushConstantRangeCount  /// Number of push-constant ranges used by the pipeline | 
|  | 2296 | const VkPushConstantRange*                  pPushConstantRanges     /// Array of pushConstantRangeCount number of ranges used by various shader stages | 
|  | 2297 | } | 
|  | 2298 |  | 
|  | 2299 | class VkSamplerCreateInfo { | 
|  | 2300 | VkStructureType                             sType          /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO | 
|  | 2301 | const void*                                 pNext          /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2302 | VkSamplerCreateFlags                        flags | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2303 | VkFilter                                    magFilter      /// Filter mode for magnification | 
|  | 2304 | VkFilter                                    minFilter      /// Filter mode for minifiation | 
|  | 2305 | VkSamplerMipmapMode                         mipmapMode     /// Mipmap selection mode | 
|  | 2306 | VkSamplerAddressMode                        addressModeU | 
|  | 2307 | VkSamplerAddressMode                        addressModeV | 
|  | 2308 | VkSamplerAddressMode                        addressModeW | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2309 | f32                                         mipLodBias | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2310 | VkBool32                                    anisotropyEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2311 | f32                                         maxAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2312 | VkBool32                                    compareEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | VkCompareOp                                 compareOp | 
|  | 2314 | f32                                         minLod | 
|  | 2315 | f32                                         maxLod | 
|  | 2316 | VkBorderColor                               borderColor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2317 | VkBool32                                    unnormalizedCoordinates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2318 | } | 
|  | 2319 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2320 | class VkCommandPoolCreateInfo { | 
|  | 2321 | VkStructureType                             sType            /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2322 | const void*                                 pNext            /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2323 | VkCommandPoolCreateFlags                    flags            /// Command pool creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2324 | u32                                         queueFamilyIndex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2325 | } | 
|  | 2326 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2327 | class VkCommandBufferAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2328 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2329 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2330 | VkCommandPool                               commandPool | 
|  | 2331 | VkCommandBufferLevel                        level | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2332 | u32                                         commandBufferCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2333 | } | 
|  | 2334 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2335 | class VkCommandBufferInheritanceInfo { | 
|  | 2336 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2337 | const void*                                 pNext       /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2338 | VkRenderPass                                renderPass  /// Render pass for secondary command buffers | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2339 | u32                                         subpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2340 | VkFramebuffer                               framebuffer /// Framebuffer for secondary command buffers | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2341 | VkBool32                                    occlusionQueryEnable | 
|  | 2342 | VkQueryControlFlags                         queryFlags | 
|  | 2343 | VkQueryPipelineStatisticFlags               pipelineStatistics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2344 | } | 
|  | 2345 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2346 | class VkCommandBufferBeginInfo { | 
|  | 2347 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO | 
|  | 2348 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2349 | VkCommandBufferUsageFlags                   flags       /// Command buffer usage flags | 
|  | 2350 | const VkCommandBufferInheritanceInfo*       pInheritanceInfo | 
|  | 2351 | } | 
|  | 2352 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2353 | class VkRenderPassBeginInfo { | 
|  | 2354 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO | 
|  | 2355 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2356 | VkRenderPass                                renderPass | 
|  | 2357 | VkFramebuffer                               framebuffer | 
|  | 2358 | VkRect2D                                    renderArea | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2359 | u32                                         clearValueCount | 
|  | 2360 | const VkClearValue*                         pClearValues | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2361 | } | 
|  | 2362 |  | 
|  | 2363 | @union | 
|  | 2364 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. | 
|  | 2365 | class VkClearColorValue { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2366 | f32[4]                                      float32 | 
|  | 2367 | s32[4]                                      int32 | 
|  | 2368 | u32[4]                                      uint32 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2369 | } | 
|  | 2370 |  | 
|  | 2371 | class VkClearDepthStencilValue { | 
|  | 2372 | f32                                         depth | 
|  | 2373 | u32                                         stencil | 
|  | 2374 | } | 
|  | 2375 |  | 
|  | 2376 | @union | 
|  | 2377 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. | 
|  | 2378 | class VkClearValue { | 
|  | 2379 | VkClearColorValue                           color | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2380 | VkClearDepthStencilValue                    depthStencil | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2381 | } | 
|  | 2382 |  | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2383 | class VkClearAttachment { | 
|  | 2384 | VkImageAspectFlags                          aspectMask | 
|  | 2385 | u32                                         colorAttachment | 
|  | 2386 | VkClearValue                                clearValue | 
|  | 2387 | } | 
|  | 2388 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2389 | class VkAttachmentDescription { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2390 | VkAttachmentDescriptionFlags                flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2391 | VkFormat                                    format | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2392 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2393 | VkAttachmentLoadOp                          loadOp          /// Load op for color or depth data | 
|  | 2394 | VkAttachmentStoreOp                         storeOp         /// Store op for color or depth data | 
|  | 2395 | VkAttachmentLoadOp                          stencilLoadOp   /// Load op for stencil data | 
|  | 2396 | VkAttachmentStoreOp                         stencilStoreOp  /// Store op for stencil data | 
|  | 2397 | VkImageLayout                               initialLayout | 
|  | 2398 | VkImageLayout                               finalLayout | 
|  | 2399 | } | 
|  | 2400 |  | 
|  | 2401 | class VkAttachmentReference { | 
|  | 2402 | u32                                         attachment | 
|  | 2403 | VkImageLayout                               layout | 
|  | 2404 | } | 
|  | 2405 |  | 
|  | 2406 | class VkSubpassDescription { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2407 | VkSubpassDescriptionFlags                   flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2408 | VkPipelineBindPoint                         pipelineBindPoint  /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2409 | u32                                         inputAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2410 | const VkAttachmentReference*                pInputAttachments | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2411 | u32                                         colorAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2412 | const VkAttachmentReference*                pColorAttachments | 
|  | 2413 | const VkAttachmentReference*                pResolveAttachments | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2414 | const VkAttachmentReference*                pDepthStencilAttachment | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2415 | u32                                         preserveAttachmentCount | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2416 | const u32*                                  pPreserveAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2417 | } | 
|  | 2418 |  | 
|  | 2419 | class VkSubpassDependency { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2420 | u32                                         srcSubpass | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2421 | u32                                         dstSubpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2422 | VkPipelineStageFlags                        srcStageMask | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2423 | VkPipelineStageFlags                        dstStageMask | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2424 | VkAccessFlags                               srcAccessMask | 
|  | 2425 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2426 | VkDependencyFlags                           dependencyFlags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2427 | } | 
|  | 2428 |  | 
|  | 2429 | class VkRenderPassCreateInfo { | 
|  | 2430 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO | 
|  | 2431 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2432 | VkRenderPassCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2433 | u32                                         attachmentCount | 
|  | 2434 | const VkAttachmentDescription*              pAttachments | 
|  | 2435 | u32                                         subpassCount | 
|  | 2436 | const VkSubpassDescription*                 pSubpasses | 
|  | 2437 | u32                                         dependencyCount | 
|  | 2438 | const VkSubpassDependency*                  pDependencies | 
|  | 2439 | } | 
|  | 2440 |  | 
|  | 2441 | class VkEventCreateInfo { | 
|  | 2442 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO | 
|  | 2443 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2444 | VkEventCreateFlags                          flags      /// Event creation flags | 
|  | 2445 | } | 
|  | 2446 |  | 
|  | 2447 | class VkFenceCreateInfo { | 
|  | 2448 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO | 
|  | 2449 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2450 | VkFenceCreateFlags                          flags      /// Fence creation flags | 
|  | 2451 | } | 
|  | 2452 |  | 
|  | 2453 | class VkPhysicalDeviceFeatures { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2454 | VkBool32                                    robustBufferAccess                        /// out of bounds buffer accesses are well defined | 
|  | 2455 | VkBool32                                    fullDrawIndexUint32                       /// full 32-bit range of indices for indexed draw calls | 
|  | 2456 | VkBool32                                    imageCubeArray                            /// image views which are arrays of cube maps | 
|  | 2457 | VkBool32                                    independentBlend                          /// blending operations are controlled per-attachment | 
|  | 2458 | VkBool32                                    geometryShader                            /// geometry stage | 
|  | 2459 | VkBool32                                    tessellationShader                        /// tessellation control and evaluation stage | 
|  | 2460 | VkBool32                                    sampleRateShading                         /// per-sample shading and interpolation | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2461 | VkBool32                                    dualSrcBlend                              /// blend operations which take two sources | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2462 | VkBool32                                    logicOp                                   /// logic operations | 
|  | 2463 | VkBool32                                    multiDrawIndirect                         /// multi draw indirect | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2464 | VkBool32                                    drawIndirectFirstInstance | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2465 | VkBool32                                    depthClamp                                /// depth clamping | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2466 | VkBool32                                    depthBiasClamp                            /// depth bias clamping | 
|  | 2467 | VkBool32                                    fillModeNonSolid                          /// point and wireframe fill modes | 
|  | 2468 | VkBool32                                    depthBounds                               /// depth bounds test | 
|  | 2469 | VkBool32                                    wideLines                                 /// lines with width greater than 1 | 
|  | 2470 | VkBool32                                    largePoints                               /// points with size greater than 1 | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2471 | VkBool32                                    alphaToOne                                /// The fragment alpha channel can be forced to maximum representable alpha value | 
|  | 2472 | VkBool32                                    multiViewport | 
|  | 2473 | VkBool32                                    samplerAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2474 | VkBool32                                    textureCompressionETC2                    /// ETC texture compression formats | 
|  | 2475 | VkBool32                                    textureCompressionASTC_LDR                /// ASTC LDR texture compression formats | 
|  | 2476 | VkBool32                                    textureCompressionBC                      /// BC1-7 texture compressed formats | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2477 | VkBool32                                    occlusionQueryPrecise | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2478 | VkBool32                                    pipelineStatisticsQuery                   /// pipeline statistics query | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2479 | VkBool32                                    vertexPipelineStoresAndAtomics | 
|  | 2480 | VkBool32                                    fragmentStoresAndAtomics | 
|  | 2481 | VkBool32                                    shaderTessellationAndGeometryPointSize | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2482 | VkBool32                                    shaderImageGatherExtended                 /// texture gather with run-time values and independent offsets | 
|  | 2483 | VkBool32                                    shaderStorageImageExtendedFormats         /// the extended set of formats can be used for storage images | 
|  | 2484 | VkBool32                                    shaderStorageImageMultisample             /// multisample images can be used for storage images | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2485 | VkBool32                                    shaderStorageImageReadWithoutFormat | 
|  | 2486 | VkBool32                                    shaderStorageImageWriteWithoutFormat | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2487 | VkBool32                                    shaderUniformBufferArrayDynamicIndexing   /// arrays of uniform buffers can be accessed with dynamically uniform indices | 
|  | 2488 | VkBool32                                    shaderSampledImageArrayDynamicIndexing    /// arrays of sampled images can be accessed with dynamically uniform indices | 
|  | 2489 | VkBool32                                    shaderStorageBufferArrayDynamicIndexing   /// arrays of storage buffers can be accessed with dynamically uniform indices | 
|  | 2490 | VkBool32                                    shaderStorageImageArrayDynamicIndexing    /// arrays of storage images can be accessed with dynamically uniform indices | 
|  | 2491 | VkBool32                                    shaderClipDistance                        /// clip distance in shaders | 
|  | 2492 | VkBool32                                    shaderCullDistance                        /// cull distance in shaders | 
|  | 2493 | VkBool32                                    shaderFloat64                             /// 64-bit floats (doubles) in shaders | 
|  | 2494 | VkBool32                                    shaderInt64                               /// 64-bit integers in shaders | 
|  | 2495 | VkBool32                                    shaderInt16                               /// 16-bit integers in shaders | 
|  | 2496 | 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] | 2497 | VkBool32                                    shaderResourceMinLod                      /// shader can use texture operations that specify minimum resource LOD | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2498 | VkBool32                                    sparseBinding                             /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level | 
|  | 2499 | VkBool32                                    sparseResidencyBuffer                     /// Sparse resources support: GPU can access partially resident buffers | 
|  | 2500 | VkBool32                                    sparseResidencyImage2D                    /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images | 
|  | 2501 | VkBool32                                    sparseResidencyImage3D                    /// Sparse resources support: GPU can access partially resident 3D images | 
|  | 2502 | VkBool32                                    sparseResidency2Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples | 
|  | 2503 | VkBool32                                    sparseResidency4Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples | 
|  | 2504 | VkBool32                                    sparseResidency8Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples | 
|  | 2505 | VkBool32                                    sparseResidency16Samples                  /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples | 
|  | 2506 | 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] | 2507 | VkBool32                                    variableMultisampleRate | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2508 | VkBool32                                    inheritedQueries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2509 | } | 
|  | 2510 |  | 
|  | 2511 | class VkPhysicalDeviceLimits { | 
|  | 2512 | /// resource maximum sizes | 
|  | 2513 | u32                                         maxImageDimension1D                       /// max 1D image dimension | 
|  | 2514 | u32                                         maxImageDimension2D                       /// max 2D image dimension | 
|  | 2515 | u32                                         maxImageDimension3D                       /// max 3D image dimension | 
|  | 2516 | u32                                         maxImageDimensionCube                     /// max cubemap image dimension | 
|  | 2517 | u32                                         maxImageArrayLayers                       /// max layers for image arrays | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2518 | u32                                         maxTexelBufferElements | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2519 | u32                                         maxUniformBufferRange                     /// max uniform buffer size (bytes) | 
|  | 2520 | u32                                         maxStorageBufferRange                     /// max storage buffer size (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2521 | u32                                         maxPushConstantsSize                      /// max size of the push constants pool (bytes) | 
|  | 2522 | /// memory limits | 
|  | 2523 | u32                                         maxMemoryAllocationCount                  /// max number of device memory allocations supported | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2524 | u32                                         maxSamplerAllocationCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2525 | VkDeviceSize                                bufferImageGranularity                    /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage | 
|  | 2526 | VkDeviceSize                                sparseAddressSpaceSize                    /// Total address space available for sparse allocations (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2527 | /// descriptor set limits | 
|  | 2528 | 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] | 2529 | u32                                         maxPerStageDescriptorSamplers             /// max num of samplers allowed per-stage in a descriptor set | 
|  | 2530 | u32                                         maxPerStageDescriptorUniformBuffers       /// max num of uniform buffers allowed per-stage in a descriptor set | 
|  | 2531 | u32                                         maxPerStageDescriptorStorageBuffers       /// max num of storage buffers allowed per-stage in a descriptor set | 
|  | 2532 | u32                                         maxPerStageDescriptorSampledImages        /// max num of sampled images allowed per-stage in a descriptor set | 
|  | 2533 | 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] | 2534 | u32                                         maxPerStageDescriptorInputAttachments | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2535 | u32                                         maxPerStageResources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2536 | u32                                         maxDescriptorSetSamplers                  /// max num of samplers allowed in all stages in a descriptor set | 
|  | 2537 | 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] | 2538 | 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] | 2539 | 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] | 2540 | 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] | 2541 | u32                                         maxDescriptorSetSampledImages             /// max num of sampled images allowed in all stages in a descriptor set | 
|  | 2542 | 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] | 2543 | u32                                         maxDescriptorSetInputAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2544 | /// vertex stage limits | 
|  | 2545 | u32                                         maxVertexInputAttributes                  /// max num of vertex input attribute slots | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2546 | u32                                         maxVertexInputBindings                    /// max num of vertex input binding slots | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2547 | u32                                         maxVertexInputAttributeOffset             /// max vertex input attribute offset added to vertex buffer offset | 
|  | 2548 | u32                                         maxVertexInputBindingStride               /// max vertex input binding stride | 
|  | 2549 | u32                                         maxVertexOutputComponents                 /// max num of output components written by vertex shader | 
|  | 2550 | /// tessellation control stage limits | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2551 | u32                                         maxTessellationGenerationLevel                  /// max level supported by tess primitive generator | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2552 | u32                                         maxTessellationPatchSize                        /// max patch size (vertices) | 
|  | 2553 | u32                                         maxTessellationControlPerVertexInputComponents  /// max num of input components per-vertex in TCS | 
|  | 2554 | u32                                         maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS | 
|  | 2555 | u32                                         maxTessellationControlPerPatchOutputComponents  /// max num of output components per-patch in TCS | 
|  | 2556 | u32                                         maxTessellationControlTotalOutputComponents     /// max total num of per-vertex and per-patch output components in TCS | 
|  | 2557 | u32                                         maxTessellationEvaluationInputComponents        /// max num of input components per vertex in TES | 
|  | 2558 | u32                                         maxTessellationEvaluationOutputComponents       /// max num of output components per vertex in TES | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2559 | /// geometry stage limits | 
|  | 2560 | u32                                         maxGeometryShaderInvocations              /// max invocation count supported in geometry shader | 
|  | 2561 | u32                                         maxGeometryInputComponents                /// max num of input components read in geometry stage | 
|  | 2562 | u32                                         maxGeometryOutputComponents               /// max num of output components written in geometry stage | 
|  | 2563 | u32                                         maxGeometryOutputVertices                 /// max num of vertices that can be emitted in geometry stage | 
|  | 2564 | u32                                         maxGeometryTotalOutputComponents          /// max total num of components (all vertices) written in geometry stage | 
|  | 2565 | /// fragment stage limits | 
|  | 2566 | u32                                         maxFragmentInputComponents                /// max num of input compontents read in fragment stage | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2567 | u32                                         maxFragmentOutputAttachments              /// max num of output attachments written in fragment stage | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2568 | 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] | 2569 | u32                                         maxFragmentCombinedOutputResources        /// max total num of storage buffers, storage images and output buffers | 
|  | 2570 | /// compute stage limits | 
|  | 2571 | u32                                         maxComputeSharedMemorySize                /// max total storage size of work group local storage (bytes) | 
|  | 2572 | u32[3]                                      maxComputeWorkGroupCount                  /// max num of compute work groups that may be dispatched by a single command (x,y,z) | 
|  | 2573 | u32                                         maxComputeWorkGroupInvocations            /// max total compute invocations in a single local work group | 
|  | 2574 | u32[3]                                      maxComputeWorkGroupSize                   /// max local size of a compute work group (x,y,z) | 
|  | 2575 |  | 
|  | 2576 | u32                                         subPixelPrecisionBits                     /// num bits of subpixel precision in screen x and y | 
|  | 2577 | u32                                         subTexelPrecisionBits                     /// num bits of subtexel precision | 
|  | 2578 | u32                                         mipmapPrecisionBits                       /// num bits of mipmap precision | 
|  | 2579 |  | 
|  | 2580 | 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] | 2581 | u32                                         maxDrawIndirectCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2582 |  | 
|  | 2583 | f32                                         maxSamplerLodBias                         /// max absolute sampler level of detail bias | 
|  | 2584 | f32                                         maxSamplerAnisotropy                      /// max degree of sampler anisotropy | 
|  | 2585 |  | 
|  | 2586 | u32                                         maxViewports                              /// max number of active viewports | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2587 | u32[2]                                      maxViewportDimensions                     /// max viewport dimensions (x,y) | 
|  | 2588 | f32[2]                                      viewportBoundsRange                       /// viewport bounds range (min,max) | 
|  | 2589 | u32                                         viewportSubPixelBits                      /// num bits of subpixel precision for viewport | 
|  | 2590 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2591 | platform.size_t                             minMemoryMapAlignment                     /// min required alignment of pointers returned by MapMemory (bytes) | 
|  | 2592 | VkDeviceSize                                minTexelBufferOffsetAlignment             /// min required alignment for texel buffer offsets (bytes) | 
|  | 2593 | VkDeviceSize                                minUniformBufferOffsetAlignment           /// min required alignment for uniform buffer sizes and offsets (bytes) | 
|  | 2594 | VkDeviceSize                                minStorageBufferOffsetAlignment           /// min required alignment for storage buffer offsets (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2595 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2596 | s32                                         minTexelOffset                            /// min texel offset for OpTextureSampleOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2597 | u32                                         maxTexelOffset                            /// max texel offset for OpTextureSampleOffset | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2598 | s32                                         minTexelGatherOffset                      /// min texel offset for OpTextureGatherOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2599 | u32                                         maxTexelGatherOffset                      /// max texel offset for OpTextureGatherOffset | 
|  | 2600 | f32                                         minInterpolationOffset                    /// furthest negative offset for interpolateAtOffset | 
|  | 2601 | f32                                         maxInterpolationOffset                    /// furthest positive offset for interpolateAtOffset | 
|  | 2602 | u32                                         subPixelInterpolationOffsetBits           /// num of subpixel bits for interpolateAtOffset | 
|  | 2603 |  | 
|  | 2604 | u32                                         maxFramebufferWidth                       /// max width for a framebuffer | 
|  | 2605 | u32                                         maxFramebufferHeight                      /// max height for a framebuffer | 
|  | 2606 | u32                                         maxFramebufferLayers                      /// max layer count for a layered framebuffer | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2607 | VkSampleCountFlags                          framebufferColorSampleCounts | 
|  | 2608 | VkSampleCountFlags                          framebufferDepthSampleCounts | 
|  | 2609 | VkSampleCountFlags                          framebufferStencilSampleCounts | 
|  | 2610 | VkSampleCountFlags                          framebufferNoAttachmentSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2611 | u32                                         maxColorAttachments                       /// max num of framebuffer color attachments | 
|  | 2612 |  | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2613 | VkSampleCountFlags                          sampledImageColorSampleCounts | 
|  | 2614 | VkSampleCountFlags                          sampledImageIntegerSampleCounts | 
|  | 2615 | VkSampleCountFlags                          sampledImageDepthSampleCounts | 
|  | 2616 | VkSampleCountFlags                          sampledImageStencilSampleCounts | 
|  | 2617 | VkSampleCountFlags                          storageImageSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2618 | u32                                         maxSampleMaskWords                        /// max num of sample mask words | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2619 | VkBool32                                    timestampComputeAndGraphics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2620 |  | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2621 | f32                                         timestampPeriod | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2622 |  | 
|  | 2623 | u32                                         maxClipDistances                          /// max number of clip distances | 
|  | 2624 | u32                                         maxCullDistances                          /// max number of cull distances | 
|  | 2625 | u32                                         maxCombinedClipAndCullDistances           /// max combined number of user clipping | 
|  | 2626 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2627 | u32                                         discreteQueuePriorities | 
|  | 2628 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2629 | f32[2]                                      pointSizeRange                            /// range (min,max) of supported point sizes | 
|  | 2630 | f32[2]                                      lineWidthRange                            /// range (min,max) of supported line widths | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2631 | f32                                         pointSizeGranularity                      /// granularity of supported point sizes | 
|  | 2632 | f32                                         lineWidthGranularity                      /// granularity of supported line widths | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2633 | VkBool32                                    strictLines | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2634 | VkBool32                                    standardSampleLocations | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2635 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2636 | VkDeviceSize                                optimalBufferCopyOffsetAlignment | 
|  | 2637 | VkDeviceSize                                optimalBufferCopyRowPitchAlignment | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2638 | VkDeviceSize                                nonCoherentAtomSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2639 | } | 
|  | 2640 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2641 | class VkPhysicalDeviceSparseProperties { | 
|  | 2642 | 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] | 2643 | 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] | 2644 | VkBool32                                    residencyStandard3DBlockShape             /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) | 
|  | 2645 | 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] | 2646 | 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 | 
|  | 2647 | } | 
|  | 2648 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2649 | class VkSemaphoreCreateInfo { | 
|  | 2650 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO | 
|  | 2651 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2652 | VkSemaphoreCreateFlags                      flags      /// Semaphore creation flags | 
|  | 2653 | } | 
|  | 2654 |  | 
|  | 2655 | class VkQueryPoolCreateInfo { | 
|  | 2656 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO | 
|  | 2657 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2658 | VkQueryPoolCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2659 | VkQueryType                                 queryType | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2660 | u32                                         queryCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2661 | VkQueryPipelineStatisticFlags               pipelineStatistics /// Optional | 
|  | 2662 | } | 
|  | 2663 |  | 
|  | 2664 | class VkFramebufferCreateInfo { | 
|  | 2665 | VkStructureType                             sType  /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO | 
|  | 2666 | const void*                                 pNext  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2667 | VkFramebufferCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2668 | VkRenderPass                                renderPass | 
|  | 2669 | u32                                         attachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2670 | const VkImageView*                          pAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2671 | u32                                         width | 
|  | 2672 | u32                                         height | 
|  | 2673 | u32                                         layers | 
|  | 2674 | } | 
|  | 2675 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2676 | class VkDrawIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2677 | u32                                         vertexCount | 
|  | 2678 | u32                                         instanceCount | 
|  | 2679 | u32                                         firstVertex | 
|  | 2680 | u32                                         firstInstance | 
|  | 2681 | } | 
|  | 2682 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2683 | class VkDrawIndexedIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2684 | u32                                         indexCount | 
|  | 2685 | u32                                         instanceCount | 
|  | 2686 | u32                                         firstIndex | 
|  | 2687 | s32                                         vertexOffset | 
|  | 2688 | u32                                         firstInstance | 
|  | 2689 | } | 
|  | 2690 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2691 | class VkDispatchIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2692 | u32                                         x | 
|  | 2693 | u32                                         y | 
|  | 2694 | u32                                         z | 
|  | 2695 | } | 
|  | 2696 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2697 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2698 | class VkSurfaceCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2699 | u32                                         minImageCount | 
|  | 2700 | u32                                         maxImageCount | 
|  | 2701 | VkExtent2D                                  currentExtent | 
|  | 2702 | VkExtent2D                                  minImageExtent | 
|  | 2703 | VkExtent2D                                  maxImageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2704 | u32                                         maxImageArrayLayers | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2705 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2706 | VkSurfaceTransformFlagBitsKHR               currentTransform | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2707 | VkCompositeAlphaFlagsKHR                    supportedCompositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2708 | VkImageUsageFlags                           supportedUsageFlags | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2709 | } | 
|  | 2710 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2711 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2712 | class VkSurfaceFormatKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2713 | VkFormat                                    format | 
|  | 2714 | VkColorSpaceKHR                             colorSpace | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2715 | } | 
|  | 2716 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2717 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2718 | class VkSwapchainCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2719 | VkStructureType                             sType | 
|  | 2720 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2721 | VkSwapchainCreateFlagsKHR                   flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2722 | VkSurfaceKHR                                surface | 
|  | 2723 | u32                                         minImageCount | 
|  | 2724 | VkFormat                                    imageFormat | 
|  | 2725 | VkColorSpaceKHR                             imageColorSpace | 
|  | 2726 | VkExtent2D                                  imageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2727 | u32                                         imageArrayLayers | 
|  | 2728 | VkImageUsageFlags                           imageUsage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2729 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2730 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2731 | const u32*                                  pQueueFamilyIndices | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2732 | VkSurfaceTransformFlagBitsKHR               preTransform | 
|  | 2733 | VkCompositeAlphaFlagBitsKHR                 compositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2734 | VkPresentModeKHR                            presentMode | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2735 | VkBool32                                    clipped | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2736 | VkSwapchainKHR                              oldSwapchain | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2737 | } | 
|  | 2738 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2739 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2740 | class VkPresentInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2741 | VkStructureType                             sType | 
|  | 2742 | const void*                                 pNext | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2743 | u32                                         waitSemaphoreCount | 
|  | 2744 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2745 | u32                                         swapchainCount | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2746 | const VkSwapchainKHR*                       pSwapchains | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2747 | const u32*                                  pImageIndices | 
| Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2748 | VkResult*                                   pResults | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2749 | } | 
|  | 2750 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2751 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2752 | class VkDisplayPropertiesKHR { | 
|  | 2753 | VkDisplayKHR                                display | 
|  | 2754 | const char*                                 displayName | 
|  | 2755 | VkExtent2D                                  physicalDimensions | 
|  | 2756 | VkExtent2D                                  physicalResolution | 
|  | 2757 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2758 | VkBool32                                    planeReorderPossible | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2759 | VkBool32                                    persistentContent | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2760 | } | 
|  | 2761 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2762 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2763 | class VkDisplayModeParametersKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2764 | VkExtent2D                                  visibleRegion | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2765 | u32                                         refreshRate | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2766 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2767 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2768 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2769 | class VkDisplayModePropertiesKHR { | 
|  | 2770 | VkDisplayModeKHR                            displayMode | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2771 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2772 | } | 
|  | 2773 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2774 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2775 | class VkDisplayModeCreateInfoKHR { | 
|  | 2776 | VkStructureType                             sType | 
|  | 2777 | const void*                                 pNext | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2778 | VkDisplayModeCreateFlagsKHR                 flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2779 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2780 | } | 
|  | 2781 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2782 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2783 | class VkDisplayPlanePropertiesKHR { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2784 | VkDisplayKHR                                currentDisplay | 
|  | 2785 | u32                                         currentStackIndex | 
|  | 2786 | } | 
|  | 2787 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2788 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2789 | class VkDisplayPlaneCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2790 | VkDisplayPlaneAlphaFlagsKHR                 supportedAlpha | 
|  | 2791 | VkOffset2D                                  minSrcPosition | 
|  | 2792 | VkOffset2D                                  maxSrcPosition | 
|  | 2793 | VkExtent2D                                  minSrcExtent | 
|  | 2794 | VkExtent2D                                  maxSrcExtent | 
|  | 2795 | VkOffset2D                                  minDstPosition | 
|  | 2796 | VkOffset2D                                  maxDstPosition | 
|  | 2797 | VkExtent2D                                  minDstExtent | 
|  | 2798 | VkExtent2D                                  maxDstExtent | 
|  | 2799 | } | 
|  | 2800 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2801 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2802 | class VkDisplaySurfaceCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2803 | VkStructureType                             sType | 
|  | 2804 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2805 | VkDisplaySurfaceCreateFlagsKHR              flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2806 | VkDisplayModeKHR                            displayMode | 
|  | 2807 | u32                                         planeIndex | 
|  | 2808 | u32                                         planeStackIndex | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2809 | VkSurfaceTransformFlagBitsKHR               transform | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2810 | f32                                         globalAlpha | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2811 | VkDisplayPlaneAlphaFlagBitsKHR              alphaMode | 
|  | 2812 | VkExtent2D                                  imageExtent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2813 | } | 
|  | 2814 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2815 | @extension("VK_KHR_display_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2816 | class VkDisplayPresentInfoKHR { | 
|  | 2817 | VkStructureType                             sType | 
|  | 2818 | const void*                                 pNext | 
|  | 2819 | VkRect2D                                    srcRect | 
|  | 2820 | VkRect2D                                    dstRect | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2821 | VkBool32                                    persistent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2822 | } | 
|  | 2823 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2824 | @extension("VK_KHR_xlib_surface") | 
|  | 2825 | class VkXlibSurfaceCreateInfoKHR { | 
|  | 2826 | VkStructureType                             sType | 
|  | 2827 | const void*                                 pNext | 
|  | 2828 | VkXlibSurfaceCreateFlagsKHR                 flags | 
|  | 2829 | platform.Display*                           dpy | 
|  | 2830 | platform.Window                             window | 
|  | 2831 | } | 
|  | 2832 |  | 
|  | 2833 | @extension("VK_KHR_xcb_surface") | 
|  | 2834 | class VkXcbSurfaceCreateInfoKHR { | 
|  | 2835 | VkStructureType                             sType | 
|  | 2836 | const void*                                 pNext | 
|  | 2837 | VkXcbSurfaceCreateFlagsKHR                  flags | 
|  | 2838 | platform.xcb_connection_t*                  connection | 
|  | 2839 | platform.xcb_window_t                       window | 
|  | 2840 | } | 
|  | 2841 |  | 
|  | 2842 | @extension("VK_KHR_wayland_surface") | 
|  | 2843 | class VkWaylandSurfaceCreateInfoKHR { | 
|  | 2844 | VkStructureType                             sType | 
|  | 2845 | const void*                                 pNext | 
|  | 2846 | VkWaylandSurfaceCreateFlagsKHR              flags | 
|  | 2847 | platform.wl_display*                        display | 
|  | 2848 | platform.wl_surface*                        surface | 
|  | 2849 | } | 
|  | 2850 |  | 
|  | 2851 | @extension("VK_KHR_mir_surface") | 
|  | 2852 | class VkMirSurfaceCreateInfoKHR { | 
|  | 2853 | VkStructureType                             sType | 
|  | 2854 | const void*                                 pNext | 
|  | 2855 | VkMirSurfaceCreateFlagsKHR                  flags | 
|  | 2856 | platform.MirConnection*                     connection | 
|  | 2857 | platform.MirSurface*                        mirSurface | 
|  | 2858 | } | 
|  | 2859 |  | 
|  | 2860 | @extension("VK_KHR_android_surface") | 
|  | 2861 | class VkAndroidSurfaceCreateInfoKHR { | 
|  | 2862 | VkStructureType                             sType | 
|  | 2863 | const void*                                 pNext | 
|  | 2864 | VkAndroidSurfaceCreateFlagsKHR              flags | 
|  | 2865 | platform.ANativeWindow*                     window | 
|  | 2866 | } | 
|  | 2867 |  | 
|  | 2868 | @extension("VK_KHR_win32_surface") | 
|  | 2869 | class VkWin32SurfaceCreateInfoKHR { | 
|  | 2870 | VkStructureType                             sType | 
|  | 2871 | const void*                                 pNext | 
|  | 2872 | VkWin32SurfaceCreateFlagsKHR                flags | 
|  | 2873 | platform.HINSTANCE                          hinstance | 
|  | 2874 | platform.HWND                               hwnd | 
|  | 2875 | } | 
|  | 2876 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2877 | @extension("VK_ANDROID_native_buffer") | 
|  | 2878 | class VkNativeBufferANDROID { | 
|  | 2879 | VkStructureType                             sType | 
|  | 2880 | const void*                                 pNext | 
|  | 2881 | platform.buffer_handle_t                    handle | 
|  | 2882 | int                                         stride | 
|  | 2883 | int                                         format | 
|  | 2884 | int                                         usage | 
|  | 2885 | } | 
|  | 2886 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2887 | @extension("VK_ANDROID_native_buffer") | 
|  | 2888 | class VkSwapchainImageCreateInfoANDROID { | 
|  | 2889 | VkStructureType                             sType | 
|  | 2890 | const void*                                 pNext | 
|  | 2891 | VkSwapchainImageUsageFlagBitsANDROID        flags | 
|  | 2892 | } | 
|  | 2893 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2894 | @extension("VK_EXT_debug_report") | 
|  | 2895 | class VkDebugReportCallbackCreateInfoEXT { | 
|  | 2896 | VkStructureType                             sType | 
|  | 2897 | const void*                                 pNext | 
|  | 2898 | VkDebugReportFlagsEXT                       flags | 
|  | 2899 | PFN_vkDebugReportCallbackEXT                pfnCallback | 
|  | 2900 | void*                                       pUserData | 
|  | 2901 | } | 
|  | 2902 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2903 | @extension("VK_AMD_rasterization_order") | 
|  | 2904 | class VkPipelineRasterizationStateRasterizationOrderAMD { | 
|  | 2905 | VkStructureType                             sType | 
|  | 2906 | const void*                                 pNext | 
|  | 2907 | VkRasterizationOrderAMD                     rasterizationOrder | 
|  | 2908 | } | 
|  | 2909 |  | 
|  | 2910 | @extension("VK_EXT_debug_marker") | 
|  | 2911 | class VkDebugMarkerObjectNameInfoEXT { | 
|  | 2912 | VkStructureType                             sType | 
|  | 2913 | const void*                                 pNext | 
|  | 2914 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2915 | u64                                         object | 
|  | 2916 | const char*                                 pObjectName | 
|  | 2917 | } | 
|  | 2918 |  | 
|  | 2919 | @extension("VK_EXT_debug_marker") | 
|  | 2920 | class VkDebugMarkerObjectTagInfoEXT { | 
|  | 2921 | VkStructureType                             sType | 
|  | 2922 | const void*                                 pNext | 
|  | 2923 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2924 | u64                                         object | 
|  | 2925 | u64                                         tagName | 
|  | 2926 | platform.size_t                             tagSize | 
|  | 2927 | const void*                                 pTag | 
|  | 2928 | } | 
|  | 2929 |  | 
|  | 2930 | @extension("VK_EXT_debug_marker") | 
|  | 2931 | class VkDebugMarkerMarkerInfoEXT { | 
|  | 2932 | VkStructureType                             sType | 
|  | 2933 | const void*                                 pNext | 
|  | 2934 | const char*                                 pMarkerName | 
|  | 2935 | f32[4]                                      color | 
|  | 2936 | } | 
|  | 2937 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2938 | @extension("VK_NV_dedicated_allocation") | 
|  | 2939 | class VkDedicatedAllocationImageCreateInfoNV { | 
|  | 2940 | VkStructureType                             sType | 
|  | 2941 | const void*                                 pNext | 
|  | 2942 | VkBool32                                    dedicatedAllocation | 
|  | 2943 | } | 
|  | 2944 |  | 
|  | 2945 | @extension("VK_NV_dedicated_allocation") | 
|  | 2946 | class VkDedicatedAllocationBufferCreateInfoNV { | 
|  | 2947 | VkStructureType                             sType | 
|  | 2948 | const void*                                 pNext | 
|  | 2949 | VkBool32                                    dedicatedAllocation | 
|  | 2950 | } | 
|  | 2951 |  | 
|  | 2952 | @extension("VK_NV_dedicated_allocation") | 
|  | 2953 | class VkDedicatedAllocationMemoryAllocateInfoNV { | 
|  | 2954 | VkStructureType                             sType | 
|  | 2955 | const void*                                 pNext | 
|  | 2956 | VkImage                                     image | 
|  | 2957 | VkBuffer                                    buffer | 
|  | 2958 | } | 
|  | 2959 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 2960 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 2961 | class VkPhysicalDeviceFeatures2KHR { | 
|  | 2962 | VkStructureType                             sType | 
|  | 2963 | void*                                       pNext | 
|  | 2964 | VkPhysicalDeviceFeatures                    features | 
|  | 2965 | } | 
|  | 2966 |  | 
|  | 2967 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 2968 | class VkPhysicalDeviceProperties2KHR { | 
|  | 2969 | VkStructureType                             sType | 
|  | 2970 | void*                                       pNext | 
|  | 2971 | VkPhysicalDeviceProperties                  properties | 
|  | 2972 | } | 
|  | 2973 |  | 
|  | 2974 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 2975 | class VkFormatProperties2KHR { | 
|  | 2976 | VkStructureType                             sType | 
|  | 2977 | void*                                       pNext | 
|  | 2978 | VkFormatProperties                          formatProperties | 
|  | 2979 | } | 
|  | 2980 |  | 
|  | 2981 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 2982 | class VkImageFormatProperties2KHR { | 
|  | 2983 | VkStructureType                             sType | 
|  | 2984 | void*                                       pNext | 
|  | 2985 | VkImageFormatProperties                     imageFormatProperties | 
|  | 2986 | } | 
|  | 2987 |  | 
|  | 2988 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 2989 | class VkPhysicalDeviceImageFormatInfo2KHR { | 
|  | 2990 | VkStructureType                             sType | 
|  | 2991 | const void*                                 pNext | 
|  | 2992 | VkFormat                                    format | 
|  | 2993 | VkImageType                                 type | 
|  | 2994 | VkImageTiling                               tiling | 
|  | 2995 | VkImageUsageFlags                           usage | 
|  | 2996 | VkImageCreateFlags                          flags | 
|  | 2997 | } | 
|  | 2998 |  | 
|  | 2999 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3000 | class VkQueueFamilyProperties2KHR { | 
|  | 3001 | VkStructureType                             sType | 
|  | 3002 | void*                                       pNext | 
|  | 3003 | VkQueueFamilyProperties                     queueFamilyProperties | 
|  | 3004 | } | 
|  | 3005 |  | 
|  | 3006 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3007 | class VkPhysicalDeviceMemoryProperties2KHR { | 
|  | 3008 | VkStructureType                             sType | 
|  | 3009 | void*                                       pNext | 
|  | 3010 | VkPhysicalDeviceMemoryProperties            memoryProperties | 
|  | 3011 | } | 
|  | 3012 |  | 
|  | 3013 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3014 | class VkSparseImageFormatProperties2KHR { | 
|  | 3015 | VkStructureType                             sType | 
|  | 3016 | void*                                       pNext | 
|  | 3017 | VkSparseImageFormatProperties               properties | 
|  | 3018 | } | 
|  | 3019 |  | 
|  | 3020 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3021 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { | 
|  | 3022 | VkStructureType                             sType | 
|  | 3023 | const void*                                 pNext | 
|  | 3024 | VkFormat                                    format | 
|  | 3025 | VkImageType                                 type | 
|  | 3026 | VkSampleCountFlagBits                       samples | 
|  | 3027 | VkImageUsageFlags                           usage | 
|  | 3028 | VkImageTiling                               tiling | 
|  | 3029 | } | 
|  | 3030 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3031 | @extension("VK_KHR_incremental_present") | 
|  | 3032 | class VkRectLayerKHR { | 
|  | 3033 | VkOffset2D                                  offset | 
|  | 3034 | VkExtent2D                                  extent | 
|  | 3035 | u32                                         layer | 
|  | 3036 | } | 
|  | 3037 |  | 
|  | 3038 | @extension("VK_KHR_incremental_present") | 
|  | 3039 | class VkPresentRegionKHR { | 
|  | 3040 | u32                                         rectangleCount | 
|  | 3041 | const VkRectLayerKHR*                       pRectangles | 
|  | 3042 | } | 
|  | 3043 |  | 
|  | 3044 | @extension("VK_KHR_incremental_present") | 
|  | 3045 | class VkPresentRegionsKHR { | 
|  | 3046 | VkStructureType                             sType | 
|  | 3047 | const void*                                 pNext | 
|  | 3048 | u32                                         swapchainCount | 
|  | 3049 | const VkPresentRegionKHR*                   pRegions | 
|  | 3050 | } | 
|  | 3051 |  | 
|  | 3052 | @extension("VK_NV_external_memory_capabilities") | 
|  | 3053 | class VkExternalImageFormatPropertiesNV { | 
|  | 3054 | VkImageFormatProperties                     imageFormatProperties | 
|  | 3055 | VkExternalMemoryFeatureFlagsNV              externalMemoryFeatures | 
|  | 3056 | VkExternalMemoryHandleTypeFlagsNV           exportFromImportedHandleTypes | 
|  | 3057 | VkExternalMemoryHandleTypeFlagsNV           compatibleHandleTypes | 
|  | 3058 | } | 
|  | 3059 |  | 
|  | 3060 | @extension("VK_NV_external_memory") | 
|  | 3061 | class VkExternalMemoryImageCreateInfoNV { | 
|  | 3062 | VkStructureType                             sType | 
|  | 3063 | const void*                                 pNext | 
|  | 3064 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 3065 | } | 
|  | 3066 |  | 
|  | 3067 | @extension("VK_NV_external_memory") | 
|  | 3068 | class VkExportMemoryAllocateInfoNV { | 
|  | 3069 | VkStructureType                             sType | 
|  | 3070 | const void*                                 pNext | 
|  | 3071 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 3072 | } | 
|  | 3073 |  | 
|  | 3074 | @extension("VK_NV_external_memory_win32") | 
|  | 3075 | class VkImportMemoryWin32HandleInfoNV { | 
|  | 3076 | VkStructureType                             sType | 
|  | 3077 | const void*                                 pNext | 
|  | 3078 | VkExternalMemoryHandleTypeFlagsNV           handleType | 
|  | 3079 | platform.HANDLE                             handle | 
|  | 3080 | } | 
|  | 3081 |  | 
|  | 3082 | @extension("VK_NV_external_memory_win32") | 
|  | 3083 | class VkExportMemoryWin32HandleInfoNV { | 
|  | 3084 | VkStructureType                             sType | 
|  | 3085 | const void*                                 pNext | 
|  | 3086 | const platform.SECURITY_ATTRIBUTES*         pAttributes | 
|  | 3087 | u32                                         dwAccess | 
|  | 3088 | } | 
|  | 3089 |  | 
|  | 3090 | @extension("VK_NV_win32_keyed_mutex") | 
|  | 3091 | class VkWin32KeyedMutexAcquireReleaseInfoNV { | 
|  | 3092 | VkStructureType                             sType | 
|  | 3093 | const void*                                 pNext | 
|  | 3094 | u32                                         acquireCount | 
|  | 3095 | const VkDeviceMemory*                       pAcquireSyncs | 
|  | 3096 | const u64*                                  pAcquireKeys | 
|  | 3097 | const u32*                                  pAcquireTimeoutMilliseconds | 
|  | 3098 | u32                                         releaseCount | 
|  | 3099 | const VkDeviceMemory*                       pReleaseSyncs | 
|  | 3100 | const u64*                                  pReleaseKeys | 
|  | 3101 | } | 
|  | 3102 |  | 
|  | 3103 | @extension("VK_EXT_validation_flags") | 
|  | 3104 | class VkValidationFlagsEXT { | 
|  | 3105 | VkStructureType                             sType | 
|  | 3106 | const void*                                 pNext | 
|  | 3107 | u32                                         disabledValidationCheckCount | 
|  | 3108 | VkValidationCheckEXT*                       pDisabledValidationChecks | 
|  | 3109 | } | 
|  | 3110 |  | 
|  | 3111 | @extension("VK_NVX_device_generated_commands") | 
|  | 3112 | class VkDeviceGeneratedCommandsFeaturesNVX { | 
|  | 3113 | VkStructureType                             sType | 
|  | 3114 | const void*                                 pNext | 
|  | 3115 | VkBool32                                    computeBindingPointSupport | 
|  | 3116 | } | 
|  | 3117 |  | 
|  | 3118 | @extension("VK_NVX_device_generated_commands") | 
|  | 3119 | class VkDeviceGeneratedCommandsLimitsNVX { | 
|  | 3120 | VkStructureType                             sType | 
|  | 3121 | const void*                                 pNext | 
|  | 3122 | u32                                         maxIndirectCommandsLayoutTokenCount | 
|  | 3123 | u32                                         maxObjectEntryCounts | 
|  | 3124 | u32                                         minSequenceCountBufferOffsetAlignment | 
|  | 3125 | u32                                         minSequenceIndexBufferOffsetAlignment | 
|  | 3126 | u32                                         minCommandsTokenBufferOffsetAlignment | 
|  | 3127 | } | 
|  | 3128 |  | 
|  | 3129 | @extension("VK_NVX_device_generated_commands") | 
|  | 3130 | class VkIndirectCommandsTokenNVX { | 
|  | 3131 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 3132 | VkBuffer                                    buffer | 
|  | 3133 | VkDeviceSize                                offset | 
|  | 3134 | } | 
|  | 3135 |  | 
|  | 3136 | @extension("VK_NVX_device_generated_commands") | 
|  | 3137 | class VkIndirectCommandsLayoutTokenNVX { | 
|  | 3138 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 3139 | u32                                         bindingUnit | 
|  | 3140 | u32                                         dynamicCount | 
|  | 3141 | u32                                         divisor | 
|  | 3142 | } | 
|  | 3143 |  | 
|  | 3144 | @extension("VK_NVX_device_generated_commands") | 
|  | 3145 | class VkIndirectCommandsLayoutCreateInfoNVX { | 
|  | 3146 | VkStructureType                             sType | 
|  | 3147 | const void*                                 pNext | 
|  | 3148 | VkPipelineBindPoint                         pipelineBindPoint | 
|  | 3149 | VkIndirectCommandsLayoutUsageFlagsNVX       flags | 
|  | 3150 | u32                                         tokenCount | 
|  | 3151 | const VkIndirectCommandsLayoutTokenNVX*     pTokens | 
|  | 3152 | } | 
|  | 3153 |  | 
|  | 3154 | @extension("VK_NVX_device_generated_commands") | 
|  | 3155 | class VkCmdProcessCommandsInfoNVX { | 
|  | 3156 | VkStructureType                             sType | 
|  | 3157 | const void*                                 pNext | 
|  | 3158 | VkObjectTableNVX                            objectTable | 
|  | 3159 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3160 | u32                                         indirectCommandsTokenCount | 
|  | 3161 | const VkIndirectCommandsTokenNVX*           pIndirectCommandsTokens | 
|  | 3162 | u32                                         maxSequencesCount | 
|  | 3163 | VkCommandBuffer                             targetCommandBuffer | 
|  | 3164 | VkBuffer                                    sequencesCountBuffer | 
|  | 3165 | VkDeviceSize                                sequencesCountOffset | 
|  | 3166 | VkBuffer                                    sequencesIndexBuffer | 
|  | 3167 | VkDeviceSize                                sequencesIndexOffset | 
|  | 3168 | } | 
|  | 3169 |  | 
|  | 3170 | @extension("VK_NVX_device_generated_commands") | 
|  | 3171 | class VkCmdReserveSpaceForCommandsInfoNVX { | 
|  | 3172 | VkStructureType                             sType | 
|  | 3173 | const void*                                 pNext | 
|  | 3174 | VkObjectTableNVX                            objectTable | 
|  | 3175 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3176 | u32                                         maxSequencesCount | 
|  | 3177 | } | 
|  | 3178 |  | 
|  | 3179 | @extension("VK_NVX_device_generated_commands") | 
|  | 3180 | class VkObjectTableCreateInfoNVX { | 
|  | 3181 | VkStructureType                             sType | 
|  | 3182 | const void*                                 pNext | 
|  | 3183 | u32                                         objectCount | 
|  | 3184 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes | 
|  | 3185 | const u32*                                  pObjectEntryCounts | 
|  | 3186 | const VkObjectEntryUsageFlagsNVX*           pObjectEntryUsageFlags | 
|  | 3187 | u32                                         maxUniformBuffersPerDescriptor | 
|  | 3188 | u32                                         maxStorageBuffersPerDescriptor | 
|  | 3189 | u32                                         maxStorageImagesPerDescriptor | 
|  | 3190 | u32                                         maxSampledImagesPerDescriptor | 
|  | 3191 | u32                                         maxPipelineLayouts | 
|  | 3192 | } | 
|  | 3193 |  | 
|  | 3194 | @extension("VK_NVX_device_generated_commands") | 
|  | 3195 | class VkObjectTableEntryNVX { | 
|  | 3196 | VkObjectEntryTypeNVX                        type | 
|  | 3197 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3198 | } | 
|  | 3199 |  | 
|  | 3200 | @extension("VK_NVX_device_generated_commands") | 
|  | 3201 | class VkObjectTablePipelineEntryNVX { | 
|  | 3202 | VkObjectEntryTypeNVX                        type | 
|  | 3203 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3204 | VkPipeline                                  pipeline | 
|  | 3205 | } | 
|  | 3206 |  | 
|  | 3207 | @extension("VK_NVX_device_generated_commands") | 
|  | 3208 | class VkObjectTableDescriptorSetEntryNVX { | 
|  | 3209 | VkObjectEntryTypeNVX                        type | 
|  | 3210 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3211 | VkPipelineLayout                            pipelineLayout | 
|  | 3212 | VkDescriptorSet                             descriptorSet | 
|  | 3213 | } | 
|  | 3214 |  | 
|  | 3215 | @extension("VK_NVX_device_generated_commands") | 
|  | 3216 | class VkObjectTableVertexBufferEntryNVX { | 
|  | 3217 | VkObjectEntryTypeNVX                        type | 
|  | 3218 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3219 | VkBuffer                                    buffer | 
|  | 3220 | } | 
|  | 3221 |  | 
|  | 3222 | @extension("VK_NVX_device_generated_commands") | 
|  | 3223 | class VkObjectTableIndexBufferEntryNVX { | 
|  | 3224 | VkObjectEntryTypeNVX                        type | 
|  | 3225 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3226 | VkBuffer                                    buffer | 
|  | 3227 | } | 
|  | 3228 |  | 
|  | 3229 | @extension("VK_NVX_device_generated_commands") | 
|  | 3230 | class VkObjectTablePushConstantEntryNVX { | 
|  | 3231 | VkObjectEntryTypeNVX                        type | 
|  | 3232 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3233 | VkPipelineLayout                            pipelineLayout | 
|  | 3234 | VkShaderStageFlags                          stageFlags | 
|  | 3235 | } | 
|  | 3236 |  | 
|  | 3237 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3238 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3239 | //////////////// | 
|  | 3240 | //  Commands  // | 
|  | 3241 | //////////////// | 
|  | 3242 |  | 
|  | 3243 | // Function pointers. TODO: add support for function pointers. | 
|  | 3244 |  | 
|  | 3245 | @external type void* PFN_vkVoidFunction | 
|  | 3246 | @pfn cmd void vkVoidFunction() { | 
|  | 3247 | } | 
|  | 3248 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3249 | @external type void* PFN_vkAllocationFunction | 
|  | 3250 | @pfn cmd void* vkAllocationFunction( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3251 | void*                                       pUserData, | 
|  | 3252 | platform.size_t                             size, | 
|  | 3253 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3254 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3255 | return ? | 
|  | 3256 | } | 
|  | 3257 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3258 | @external type void* PFN_vkReallocationFunction | 
|  | 3259 | @pfn cmd void* vkReallocationFunction( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3260 | void*                                       pUserData, | 
|  | 3261 | void*                                       pOriginal, | 
|  | 3262 | platform.size_t                             size, | 
|  | 3263 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3264 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3265 | return ? | 
|  | 3266 | } | 
|  | 3267 |  | 
|  | 3268 | @external type void* PFN_vkFreeFunction | 
|  | 3269 | @pfn cmd void vkFreeFunction( | 
|  | 3270 | void*                                       pUserData, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3271 | void*                                       pMemory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3272 | } | 
|  | 3273 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3274 | @external type void* PFN_vkInternalAllocationNotification | 
|  | 3275 | @pfn cmd void vkInternalAllocationNotification( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3276 | void*                                       pUserData, | 
|  | 3277 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3278 | VkInternalAllocationType                    allocationType, | 
|  | 3279 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3280 | } | 
|  | 3281 |  | 
|  | 3282 | @external type void* PFN_vkInternalFreeNotification | 
|  | 3283 | @pfn cmd void vkInternalFreeNotification( | 
|  | 3284 | void*                                       pUserData, | 
|  | 3285 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3286 | VkInternalAllocationType                    allocationType, | 
|  | 3287 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3288 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3289 |  | 
|  | 3290 | // Global functions | 
|  | 3291 |  | 
|  | 3292 | @threadSafety("system") | 
|  | 3293 | cmd VkResult vkCreateInstance( | 
|  | 3294 | const VkInstanceCreateInfo*                 pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3295 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3296 | VkInstance*                                 pInstance) { | 
|  | 3297 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) | 
|  | 3298 |  | 
|  | 3299 | instance := ? | 
|  | 3300 | pInstance[0] = instance | 
|  | 3301 | State.Instances[instance] = new!InstanceObject() | 
|  | 3302 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3303 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] | 
|  | 3304 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3305 |  | 
|  | 3306 | return ? | 
|  | 3307 | } | 
|  | 3308 |  | 
|  | 3309 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3310 | cmd void vkDestroyInstance( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3311 | VkInstance                                  instance, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3312 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3313 | instanceObject := GetInstance(instance) | 
|  | 3314 |  | 
|  | 3315 | State.Instances[instance] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3316 | } | 
|  | 3317 |  | 
|  | 3318 | @threadSafety("system") | 
|  | 3319 | cmd VkResult vkEnumeratePhysicalDevices( | 
|  | 3320 | VkInstance                                  instance, | 
|  | 3321 | u32*                                        pPhysicalDeviceCount, | 
|  | 3322 | VkPhysicalDevice*                           pPhysicalDevices) { | 
|  | 3323 | instanceObject := GetInstance(instance) | 
|  | 3324 |  | 
|  | 3325 | physicalDeviceCount := as!u32(?) | 
|  | 3326 | pPhysicalDeviceCount[0] = physicalDeviceCount | 
|  | 3327 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] | 
|  | 3328 |  | 
|  | 3329 | for i in (0 .. physicalDeviceCount) { | 
|  | 3330 | physicalDevice := ? | 
|  | 3331 | physicalDevices[i] = physicalDevice | 
|  | 3332 | if !(physicalDevice in State.PhysicalDevices) { | 
|  | 3333 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) | 
|  | 3334 | } | 
|  | 3335 | } | 
|  | 3336 |  | 
|  | 3337 | return ? | 
|  | 3338 | } | 
|  | 3339 |  | 
|  | 3340 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( | 
|  | 3341 | VkDevice                                    device, | 
|  | 3342 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3343 | if device != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3344 | device := GetDevice(device) | 
|  | 3345 | } | 
|  | 3346 |  | 
|  | 3347 | return ? | 
|  | 3348 | } | 
|  | 3349 |  | 
|  | 3350 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( | 
|  | 3351 | VkInstance                                  instance, | 
|  | 3352 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3353 | if instance != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3354 | instanceObject := GetInstance(instance) | 
|  | 3355 | } | 
|  | 3356 |  | 
|  | 3357 | return ? | 
|  | 3358 | } | 
|  | 3359 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3360 | cmd void vkGetPhysicalDeviceProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3361 | VkPhysicalDevice                            physicalDevice, | 
|  | 3362 | VkPhysicalDeviceProperties*                 pProperties) { | 
|  | 3363 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3364 |  | 
|  | 3365 | properties := ? | 
|  | 3366 | pProperties[0] = properties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3367 | } | 
|  | 3368 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3369 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3370 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3371 | u32*                                        pQueueFamilyPropertyCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3372 | VkQueueFamilyProperties*                    pQueueFamilyProperties) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3373 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3374 | // TODO: Figure out how to express fetch-count-or-properties | 
|  | 3375 | // This version fails 'apic validate' with 'fence not allowed in | 
|  | 3376 | // *semantic.Branch'. Other attempts have failed with the same or other | 
|  | 3377 | // errors. | 
|  | 3378 | // if pQueueFamilyProperties != null { | 
|  | 3379 | //     queuesProperties := pQueueFamilyProperties[0:pCount[0]] | 
|  | 3380 | //     for i in (0 .. pCount[0]) { | 
|  | 3381 | //         queueProperties := as!VkQueueFamilyProperties(?) | 
|  | 3382 | //         queuesProperties[i] = queueProperties | 
|  | 3383 | //    } | 
|  | 3384 | // } else { | 
|  | 3385 | //     count := ? | 
|  | 3386 | //     pCount[0] = count | 
|  | 3387 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3388 | } | 
|  | 3389 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3390 | cmd void vkGetPhysicalDeviceMemoryProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3391 | VkPhysicalDevice                            physicalDevice, | 
|  | 3392 | VkPhysicalDeviceMemoryProperties*           pMemoryProperties) { | 
|  | 3393 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3394 |  | 
|  | 3395 | memoryProperties := ? | 
|  | 3396 | pMemoryProperties[0] = memoryProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3397 | } | 
|  | 3398 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3399 | cmd void vkGetPhysicalDeviceFeatures( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3400 | VkPhysicalDevice                            physicalDevice, | 
|  | 3401 | VkPhysicalDeviceFeatures*                   pFeatures) { | 
|  | 3402 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3403 |  | 
|  | 3404 | features := ? | 
|  | 3405 | pFeatures[0] = features | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3406 | } | 
|  | 3407 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3408 | cmd void vkGetPhysicalDeviceFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3409 | VkPhysicalDevice                            physicalDevice, | 
|  | 3410 | VkFormat                                    format, | 
|  | 3411 | VkFormatProperties*                         pFormatProperties) { | 
|  | 3412 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3413 |  | 
|  | 3414 | formatProperties := ? | 
|  | 3415 | pFormatProperties[0] = formatProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3416 | } | 
|  | 3417 |  | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3418 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3419 | VkPhysicalDevice                            physicalDevice, | 
|  | 3420 | VkFormat                                    format, | 
|  | 3421 | VkImageType                                 type, | 
|  | 3422 | VkImageTiling                               tiling, | 
|  | 3423 | VkImageUsageFlags                           usage, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3424 | VkImageCreateFlags                          flags, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3425 | VkImageFormatProperties*                    pImageFormatProperties) { | 
|  | 3426 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3427 |  | 
|  | 3428 | imageFormatProperties := ? | 
|  | 3429 | pImageFormatProperties[0] = imageFormatProperties | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3430 |  | 
|  | 3431 | return ? | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3432 | } | 
|  | 3433 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3434 |  | 
|  | 3435 | // Device functions | 
|  | 3436 |  | 
|  | 3437 | @threadSafety("system") | 
|  | 3438 | cmd VkResult vkCreateDevice( | 
|  | 3439 | VkPhysicalDevice                            physicalDevice, | 
|  | 3440 | const VkDeviceCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3441 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3442 | VkDevice*                                   pDevice) { | 
|  | 3443 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) | 
|  | 3444 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3445 |  | 
|  | 3446 | device := ? | 
|  | 3447 | pDevice[0] = device | 
|  | 3448 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) | 
|  | 3449 |  | 
|  | 3450 | return ? | 
|  | 3451 | } | 
|  | 3452 |  | 
|  | 3453 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3454 | cmd void vkDestroyDevice( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3455 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3456 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3457 | deviceObject := GetDevice(device) | 
|  | 3458 |  | 
|  | 3459 | State.Devices[device] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3460 | } | 
|  | 3461 |  | 
|  | 3462 |  | 
|  | 3463 | // Extension discovery functions | 
|  | 3464 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3465 | cmd VkResult vkEnumerateInstanceLayerProperties( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3466 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3467 | VkLayerProperties*                          pProperties) { | 
|  | 3468 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3469 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3470 |  | 
|  | 3471 | properties := pProperties[0:count] | 
|  | 3472 | for i in (0 .. count) { | 
|  | 3473 | property := ? | 
|  | 3474 | properties[i] = property | 
|  | 3475 | } | 
|  | 3476 |  | 
|  | 3477 | return ? | 
|  | 3478 | } | 
|  | 3479 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3480 | cmd VkResult vkEnumerateInstanceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3481 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3482 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3483 | VkExtensionProperties*                      pProperties) { | 
|  | 3484 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3485 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3486 |  | 
|  | 3487 | properties := pProperties[0:count] | 
|  | 3488 | for i in (0 .. count) { | 
|  | 3489 | property := ? | 
|  | 3490 | properties[i] = property | 
|  | 3491 | } | 
|  | 3492 |  | 
|  | 3493 | return ? | 
|  | 3494 | } | 
|  | 3495 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3496 | cmd VkResult vkEnumerateDeviceLayerProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3497 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3498 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3499 | VkLayerProperties*                          pProperties) { | 
|  | 3500 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3501 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3502 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3503 |  | 
|  | 3504 | properties := pProperties[0:count] | 
|  | 3505 | for i in (0 .. count) { | 
|  | 3506 | property := ? | 
|  | 3507 | properties[i] = property | 
|  | 3508 | } | 
|  | 3509 |  | 
|  | 3510 | return ? | 
|  | 3511 | } | 
|  | 3512 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3513 | cmd VkResult vkEnumerateDeviceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3514 | VkPhysicalDevice                            physicalDevice, | 
|  | 3515 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3516 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3517 | VkExtensionProperties*                      pProperties) { | 
|  | 3518 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3519 |  | 
|  | 3520 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3521 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3522 |  | 
|  | 3523 | properties := pProperties[0:count] | 
|  | 3524 | for i in (0 .. count) { | 
|  | 3525 | property := ? | 
|  | 3526 | properties[i] = property | 
|  | 3527 | } | 
|  | 3528 |  | 
|  | 3529 | return ? | 
|  | 3530 | } | 
|  | 3531 |  | 
|  | 3532 |  | 
|  | 3533 | // Queue functions | 
|  | 3534 |  | 
|  | 3535 | @threadSafety("system") | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3536 | cmd void vkGetDeviceQueue( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3537 | VkDevice                                    device, | 
|  | 3538 | u32                                         queueFamilyIndex, | 
|  | 3539 | u32                                         queueIndex, | 
|  | 3540 | VkQueue*                                    pQueue) { | 
|  | 3541 | deviceObject := GetDevice(device) | 
|  | 3542 |  | 
|  | 3543 | queue := ? | 
|  | 3544 | pQueue[0] = queue | 
|  | 3545 |  | 
|  | 3546 | if !(queue in State.Queues) { | 
|  | 3547 | State.Queues[queue] = new!QueueObject(device: device) | 
|  | 3548 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3549 | } | 
|  | 3550 |  | 
|  | 3551 | @threadSafety("app") | 
|  | 3552 | cmd VkResult vkQueueSubmit( | 
|  | 3553 | VkQueue                                     queue, | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3554 | u32                                         submitCount, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3555 | const VkSubmitInfo*                         pSubmits, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3556 | VkFence                                     fence) { | 
|  | 3557 | queueObject := GetQueue(queue) | 
|  | 3558 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3559 | if fence != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3560 | fenceObject := GetFence(fence) | 
|  | 3561 | assert(fenceObject.device == queueObject.device) | 
|  | 3562 | } | 
|  | 3563 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3564 | // commandBuffers := pcommandBuffers[0:commandBufferCount] | 
|  | 3565 | // for i in (0 .. commandBufferCount) { | 
|  | 3566 | //    commandBuffer := commandBuffers[i] | 
|  | 3567 | //    commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 3568 | //    assert(commandBufferObject.device == queueObject.device) | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3569 | // | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3570 | //    validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, | 
|  | 3571 | //        "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3572 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3573 |  | 
|  | 3574 | return ? | 
|  | 3575 | } | 
|  | 3576 |  | 
|  | 3577 | @threadSafety("system") | 
|  | 3578 | cmd VkResult vkQueueWaitIdle( | 
|  | 3579 | VkQueue                                     queue) { | 
|  | 3580 | queueObject := GetQueue(queue) | 
|  | 3581 |  | 
|  | 3582 | return ? | 
|  | 3583 | } | 
|  | 3584 |  | 
|  | 3585 | @threadSafety("system") | 
|  | 3586 | cmd VkResult vkDeviceWaitIdle( | 
|  | 3587 | VkDevice                                    device) { | 
|  | 3588 | deviceObject := GetDevice(device) | 
|  | 3589 |  | 
|  | 3590 | return ? | 
|  | 3591 | } | 
|  | 3592 |  | 
|  | 3593 |  | 
|  | 3594 | // Memory functions | 
|  | 3595 |  | 
|  | 3596 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3597 | cmd VkResult vkAllocateMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3598 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3599 | const VkMemoryAllocateInfo*                 pAllocateInfo, | 
|  | 3600 | const VkAllocationCallbacks*                pAllocator, | 
|  | 3601 | VkDeviceMemory*                             pMemory) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3602 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3603 | deviceObject := GetDevice(device) | 
|  | 3604 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3605 | memory := ? | 
|  | 3606 | pMemory[0] = memory | 
|  | 3607 | State.DeviceMemories[memory] = new!DeviceMemoryObject( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3608 | device: device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3609 | allocationSize: pAllocateInfo[0].allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3610 |  | 
|  | 3611 | return ? | 
|  | 3612 | } | 
|  | 3613 |  | 
|  | 3614 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3615 | cmd void vkFreeMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3616 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3617 | VkDeviceMemory                              memory, | 
|  | 3618 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3619 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3620 | memoryObject := GetDeviceMemory(memory) | 
|  | 3621 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3622 |  | 
|  | 3623 | // Check that no objects are still bound before freeing. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3624 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3625 | "vkFreeMemory: objects still bound") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3626 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, | 
|  | 3627 | "vkFreeMemory: commandBuffers still bound") | 
|  | 3628 | State.DeviceMemories[memory] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3629 | } | 
|  | 3630 |  | 
|  | 3631 | @threadSafety("app") | 
|  | 3632 | cmd VkResult vkMapMemory( | 
|  | 3633 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3634 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3635 | VkDeviceSize                                offset, | 
|  | 3636 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3637 | VkMemoryMapFlags                            flags, | 
|  | 3638 | void**                                      ppData) { | 
|  | 3639 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3640 | memoryObject := GetDeviceMemory(memory) | 
|  | 3641 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3642 |  | 
|  | 3643 | assert(flags == as!VkMemoryMapFlags(0)) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3644 | assert((offset + size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3645 |  | 
|  | 3646 | return ? | 
|  | 3647 | } | 
|  | 3648 |  | 
|  | 3649 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3650 | cmd void vkUnmapMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3651 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3652 | VkDeviceMemory                              memory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3653 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3654 | memoryObject := GetDeviceMemory(memory) | 
|  | 3655 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3656 | } | 
|  | 3657 |  | 
|  | 3658 | cmd VkResult vkFlushMappedMemoryRanges( | 
|  | 3659 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3660 | u32                                         memoryRangeCount | 
|  | 3661 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3662 | deviceObject := GetDevice(device) | 
|  | 3663 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3664 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3665 | for i in (0 .. memoryRangeCount) { | 
|  | 3666 | memoryRange := memoryRanges[i] | 
|  | 3667 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3668 | assert(memoryObject.device == device) | 
|  | 3669 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3670 | } | 
|  | 3671 |  | 
|  | 3672 | return ? | 
|  | 3673 | } | 
|  | 3674 |  | 
|  | 3675 | cmd VkResult vkInvalidateMappedMemoryRanges( | 
|  | 3676 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3677 | u32                                         memoryRangeCount, | 
|  | 3678 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3679 | deviceObject := GetDevice(device) | 
|  | 3680 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3681 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3682 | for i in (0 .. memoryRangeCount) { | 
|  | 3683 | memoryRange := memoryRanges[i] | 
|  | 3684 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3685 | assert(memoryObject.device == device) | 
|  | 3686 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3687 | } | 
|  | 3688 |  | 
|  | 3689 | return ? | 
|  | 3690 | } | 
|  | 3691 |  | 
|  | 3692 |  | 
|  | 3693 | // Memory management API functions | 
|  | 3694 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3695 | cmd void vkGetDeviceMemoryCommitment( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3696 | VkDevice                                    device, | 
|  | 3697 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3698 | VkDeviceSize*                               pCommittedMemoryInBytes) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3699 | deviceObject := GetDevice(device) | 
|  | 3700 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3701 | if memory != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3702 | memoryObject := GetDeviceMemory(memory) | 
|  | 3703 | assert(memoryObject.device == device) | 
|  | 3704 | } | 
|  | 3705 |  | 
|  | 3706 | committedMemoryInBytes := ? | 
|  | 3707 | pCommittedMemoryInBytes[0] = committedMemoryInBytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3708 | } | 
|  | 3709 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3710 | cmd void vkGetBufferMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3711 | VkDevice                                    device, | 
|  | 3712 | VkBuffer                                    buffer, | 
|  | 3713 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3714 | deviceObject := GetDevice(device) | 
|  | 3715 | bufferObject := GetBuffer(buffer) | 
|  | 3716 | assert(bufferObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3717 | } | 
|  | 3718 |  | 
|  | 3719 | cmd VkResult vkBindBufferMemory( | 
|  | 3720 | VkDevice                                    device, | 
|  | 3721 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3722 | VkDeviceMemory                              memory, | 
|  | 3723 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3724 | deviceObject := GetDevice(device) | 
|  | 3725 | bufferObject := GetBuffer(buffer) | 
|  | 3726 | assert(bufferObject.device == device) | 
|  | 3727 |  | 
|  | 3728 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3729 | if bufferObject.memory != NULL_HANDLE { | 
|  | 3730 | memoryObject := GetDeviceMemory(bufferObject.memory) | 
|  | 3731 | memoryObject.boundObjects[as!u64(buffer)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3732 | } | 
|  | 3733 |  | 
|  | 3734 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3735 | if memory != NULL_HANDLE { | 
|  | 3736 | memoryObject := GetDeviceMemory(memory) | 
|  | 3737 | assert(memoryObject.device == device) | 
|  | 3738 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3739 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3740 | bufferObject.memory = memory | 
|  | 3741 | bufferObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3742 |  | 
|  | 3743 | return ? | 
|  | 3744 | } | 
|  | 3745 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3746 | cmd void vkGetImageMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3747 | VkDevice                                    device, | 
|  | 3748 | VkImage                                     image, | 
|  | 3749 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3750 | deviceObject := GetDevice(device) | 
|  | 3751 | imageObject := GetImage(image) | 
|  | 3752 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3753 | } | 
|  | 3754 |  | 
|  | 3755 | cmd VkResult vkBindImageMemory( | 
|  | 3756 | VkDevice                                    device, | 
|  | 3757 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3758 | VkDeviceMemory                              memory, | 
|  | 3759 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3760 | deviceObject := GetDevice(device) | 
|  | 3761 | imageObject := GetImage(image) | 
|  | 3762 | assert(imageObject.device == device) | 
|  | 3763 |  | 
|  | 3764 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3765 | if imageObject.memory != NULL_HANDLE { | 
|  | 3766 | memoryObject := GetDeviceMemory(imageObject.memory) | 
|  | 3767 | memoryObject.boundObjects[as!u64(image)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3768 | } | 
|  | 3769 |  | 
|  | 3770 | // Bind image to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3771 | if memory != NULL_HANDLE { | 
|  | 3772 | memoryObject := GetDeviceMemory(memory) | 
|  | 3773 | assert(memoryObject.device == device) | 
|  | 3774 | memoryObject.boundObjects[as!u64(image)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3775 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3776 | imageObject.memory = memory | 
|  | 3777 | imageObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3778 |  | 
|  | 3779 | return ? | 
|  | 3780 | } | 
|  | 3781 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3782 | cmd void vkGetImageSparseMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3783 | VkDevice                                    device, | 
|  | 3784 | VkImage                                     image, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3785 | u32*                                        pSparseMemoryRequirementCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3786 | VkSparseImageMemoryRequirements*            pSparseMemoryRequirements) { | 
|  | 3787 | deviceObject := GetDevice(device) | 
|  | 3788 | imageObject := GetImage(image) | 
|  | 3789 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3790 | } | 
|  | 3791 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3792 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3793 | VkPhysicalDevice                            physicalDevice, | 
|  | 3794 | VkFormat                                    format, | 
|  | 3795 | VkImageType                                 type, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3796 | VkSampleCountFlagBits                       samples, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3797 | VkImageUsageFlags                           usage, | 
|  | 3798 | VkImageTiling                               tiling, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3799 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3800 | VkSparseImageFormatProperties*              pProperties) { | 
|  | 3801 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3802 | } | 
|  | 3803 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3804 | cmd VkResult vkQueueBindSparse( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3805 | VkQueue                                     queue, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3806 | u32                                         bindInfoCount, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3807 | const VkBindSparseInfo*                     pBindInfo, | 
|  | 3808 | VkFence                                     fence) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3809 | queueObject := GetQueue(queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3810 |  | 
|  | 3811 | return ? | 
|  | 3812 | } | 
|  | 3813 |  | 
|  | 3814 |  | 
|  | 3815 | // Fence functions | 
|  | 3816 |  | 
|  | 3817 | @threadSafety("system") | 
|  | 3818 | cmd VkResult vkCreateFence( | 
|  | 3819 | VkDevice                                    device, | 
|  | 3820 | const VkFenceCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3821 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3822 | VkFence*                                    pFence) { | 
|  | 3823 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) | 
|  | 3824 | deviceObject := GetDevice(device) | 
|  | 3825 |  | 
|  | 3826 | fence := ? | 
|  | 3827 | pFence[0] = fence | 
|  | 3828 | State.Fences[fence] = new!FenceObject( | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3829 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3830 |  | 
|  | 3831 | return ? | 
|  | 3832 | } | 
|  | 3833 |  | 
|  | 3834 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3835 | cmd void vkDestroyFence( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3836 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3837 | VkFence                                     fence, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3838 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3839 | deviceObject := GetDevice(device) | 
|  | 3840 | fenceObject := GetFence(fence) | 
|  | 3841 | assert(fenceObject.device == device) | 
|  | 3842 |  | 
|  | 3843 | State.Fences[fence] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3844 | } | 
|  | 3845 |  | 
|  | 3846 | @threadSafety("system") | 
|  | 3847 | cmd VkResult vkResetFences( | 
|  | 3848 | VkDevice                                    device, | 
|  | 3849 | u32                                         fenceCount, | 
|  | 3850 | const VkFence*                              pFences) { | 
|  | 3851 | deviceObject := GetDevice(device) | 
|  | 3852 |  | 
|  | 3853 | fences := pFences[0:fenceCount] | 
|  | 3854 | for i in (0 .. fenceCount) { | 
|  | 3855 | fence := fences[i] | 
|  | 3856 | fenceObject := GetFence(fence) | 
|  | 3857 | assert(fenceObject.device == device) | 
|  | 3858 | fenceObject.signaled = false | 
|  | 3859 | } | 
|  | 3860 |  | 
|  | 3861 | return ? | 
|  | 3862 | } | 
|  | 3863 |  | 
|  | 3864 | @threadSafety("system") | 
|  | 3865 | cmd VkResult vkGetFenceStatus( | 
|  | 3866 | VkDevice                                    device, | 
|  | 3867 | VkFence                                     fence) { | 
|  | 3868 | deviceObject := GetDevice(device) | 
|  | 3869 | fenceObject := GetFence(fence) | 
|  | 3870 | assert(fenceObject.device == device) | 
|  | 3871 |  | 
|  | 3872 | return ? | 
|  | 3873 | } | 
|  | 3874 |  | 
|  | 3875 | @threadSafety("system") | 
|  | 3876 | cmd VkResult vkWaitForFences( | 
|  | 3877 | VkDevice                                    device, | 
|  | 3878 | u32                                         fenceCount, | 
|  | 3879 | const VkFence*                              pFences, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3880 | VkBool32                                    waitAll, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3881 | u64                                         timeout) {  /// timeout in nanoseconds | 
|  | 3882 | deviceObject := GetDevice(device) | 
|  | 3883 |  | 
|  | 3884 | fences := pFences[0:fenceCount] | 
|  | 3885 | for i in (0 .. fenceCount) { | 
|  | 3886 | fence := fences[i] | 
|  | 3887 | fenceObject := GetFence(fence) | 
|  | 3888 | assert(fenceObject.device == device) | 
|  | 3889 | } | 
|  | 3890 |  | 
|  | 3891 | return ? | 
|  | 3892 | } | 
|  | 3893 |  | 
|  | 3894 |  | 
|  | 3895 | // Queue semaphore functions | 
|  | 3896 |  | 
|  | 3897 | @threadSafety("system") | 
|  | 3898 | cmd VkResult vkCreateSemaphore( | 
|  | 3899 | VkDevice                                    device, | 
|  | 3900 | const VkSemaphoreCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3901 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3902 | VkSemaphore*                                pSemaphore) { | 
|  | 3903 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) | 
|  | 3904 | deviceObject := GetDevice(device) | 
|  | 3905 |  | 
|  | 3906 | semaphore := ? | 
|  | 3907 | pSemaphore[0] = semaphore | 
|  | 3908 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) | 
|  | 3909 |  | 
|  | 3910 | return ? | 
|  | 3911 | } | 
|  | 3912 |  | 
|  | 3913 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3914 | cmd void vkDestroySemaphore( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3915 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3916 | VkSemaphore                                 semaphore, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3917 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3918 | deviceObject := GetDevice(device) | 
|  | 3919 | semaphoreObject := GetSemaphore(semaphore) | 
|  | 3920 | assert(semaphoreObject.device == device) | 
|  | 3921 |  | 
|  | 3922 | State.Semaphores[semaphore] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3923 | } | 
|  | 3924 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3925 |  | 
|  | 3926 | // Event functions | 
|  | 3927 |  | 
|  | 3928 | @threadSafety("system") | 
|  | 3929 | cmd VkResult vkCreateEvent( | 
|  | 3930 | VkDevice                                    device, | 
|  | 3931 | const VkEventCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3932 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3933 | VkEvent*                                    pEvent) { | 
|  | 3934 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) | 
|  | 3935 | deviceObject := GetDevice(device) | 
|  | 3936 |  | 
|  | 3937 | event := ? | 
|  | 3938 | pEvent[0] = event | 
|  | 3939 | State.Events[event] = new!EventObject(device: device) | 
|  | 3940 |  | 
|  | 3941 | return ? | 
|  | 3942 | } | 
|  | 3943 |  | 
|  | 3944 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3945 | cmd void vkDestroyEvent( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3946 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3947 | VkEvent                                     event, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3948 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3949 | deviceObject := GetDevice(device) | 
|  | 3950 | eventObject := GetEvent(event) | 
|  | 3951 | assert(eventObject.device == device) | 
|  | 3952 |  | 
|  | 3953 | State.Events[event] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3954 | } | 
|  | 3955 |  | 
|  | 3956 | @threadSafety("system") | 
|  | 3957 | cmd VkResult vkGetEventStatus( | 
|  | 3958 | VkDevice                                    device, | 
|  | 3959 | VkEvent                                     event) { | 
|  | 3960 | deviceObject := GetDevice(device) | 
|  | 3961 | eventObject := GetEvent(event) | 
|  | 3962 | assert(eventObject.device == device) | 
|  | 3963 |  | 
|  | 3964 | return ? | 
|  | 3965 | } | 
|  | 3966 |  | 
|  | 3967 | @threadSafety("system") | 
|  | 3968 | cmd VkResult vkSetEvent( | 
|  | 3969 | VkDevice                                    device, | 
|  | 3970 | VkEvent                                     event) { | 
|  | 3971 | deviceObject := GetDevice(device) | 
|  | 3972 | eventObject := GetEvent(event) | 
|  | 3973 | assert(eventObject.device == device) | 
|  | 3974 |  | 
|  | 3975 | return ? | 
|  | 3976 | } | 
|  | 3977 |  | 
|  | 3978 | @threadSafety("system") | 
|  | 3979 | cmd VkResult vkResetEvent( | 
|  | 3980 | VkDevice                                    device, | 
|  | 3981 | VkEvent                                     event) { | 
|  | 3982 | deviceObject := GetDevice(device) | 
|  | 3983 | eventObject := GetEvent(event) | 
|  | 3984 | assert(eventObject.device == device) | 
|  | 3985 |  | 
|  | 3986 | return ? | 
|  | 3987 | } | 
|  | 3988 |  | 
|  | 3989 |  | 
|  | 3990 | // Query functions | 
|  | 3991 |  | 
|  | 3992 | @threadSafety("system") | 
|  | 3993 | cmd VkResult vkCreateQueryPool( | 
|  | 3994 | VkDevice                                    device, | 
|  | 3995 | const VkQueryPoolCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3996 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3997 | VkQueryPool*                                pQueryPool) { | 
|  | 3998 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) | 
|  | 3999 | deviceObject := GetDevice(device) | 
|  | 4000 |  | 
|  | 4001 | queryPool := ? | 
|  | 4002 | pQueryPool[0] = queryPool | 
|  | 4003 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) | 
|  | 4004 |  | 
|  | 4005 | return ? | 
|  | 4006 | } | 
|  | 4007 |  | 
|  | 4008 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4009 | cmd void vkDestroyQueryPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4010 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4011 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4012 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4013 | deviceObject := GetDevice(device) | 
|  | 4014 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 4015 | assert(queryPoolObject.device == device) | 
|  | 4016 |  | 
|  | 4017 | State.QueryPools[queryPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4018 | } | 
|  | 4019 |  | 
|  | 4020 | @threadSafety("system") | 
|  | 4021 | cmd VkResult vkGetQueryPoolResults( | 
|  | 4022 | VkDevice                                    device, | 
|  | 4023 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4024 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4025 | u32                                         queryCount, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4026 | platform.size_t                             dataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4027 | void*                                       pData, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4028 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4029 | VkQueryResultFlags                          flags) { | 
|  | 4030 | deviceObject := GetDevice(device) | 
|  | 4031 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 4032 | assert(queryPoolObject.device == device) | 
|  | 4033 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4034 | data := pData[0:dataSize] | 
|  | 4035 |  | 
|  | 4036 | return ? | 
|  | 4037 | } | 
|  | 4038 |  | 
|  | 4039 | // Buffer functions | 
|  | 4040 |  | 
|  | 4041 | @threadSafety("system") | 
|  | 4042 | cmd VkResult vkCreateBuffer( | 
|  | 4043 | VkDevice                                    device, | 
|  | 4044 | const VkBufferCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4045 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4046 | VkBuffer*                                   pBuffer) { | 
|  | 4047 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) | 
|  | 4048 | deviceObject := GetDevice(device) | 
|  | 4049 |  | 
|  | 4050 | buffer := ? | 
|  | 4051 | pBuffer[0] = buffer | 
|  | 4052 | State.Buffers[buffer] = new!BufferObject(device: device) | 
|  | 4053 |  | 
|  | 4054 | return ? | 
|  | 4055 | } | 
|  | 4056 |  | 
|  | 4057 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4058 | cmd void vkDestroyBuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4059 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4060 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4061 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4062 | deviceObject := GetDevice(device) | 
|  | 4063 | bufferObject := GetBuffer(buffer) | 
|  | 4064 | assert(bufferObject.device == device) | 
|  | 4065 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4066 | assert(bufferObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4067 | State.Buffers[buffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4068 | } | 
|  | 4069 |  | 
|  | 4070 |  | 
|  | 4071 | // Buffer view functions | 
|  | 4072 |  | 
|  | 4073 | @threadSafety("system") | 
|  | 4074 | cmd VkResult vkCreateBufferView( | 
|  | 4075 | VkDevice                                    device, | 
|  | 4076 | const VkBufferViewCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4077 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4078 | VkBufferView*                               pView) { | 
|  | 4079 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) | 
|  | 4080 | deviceObject := GetDevice(device) | 
|  | 4081 |  | 
|  | 4082 | bufferObject := GetBuffer(pCreateInfo.buffer) | 
|  | 4083 | assert(bufferObject.device == device) | 
|  | 4084 |  | 
|  | 4085 | view := ? | 
|  | 4086 | pView[0] = view | 
|  | 4087 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) | 
|  | 4088 |  | 
|  | 4089 | return ? | 
|  | 4090 | } | 
|  | 4091 |  | 
|  | 4092 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4093 | cmd void vkDestroyBufferView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4094 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4095 | VkBufferView                                bufferView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4096 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4097 | deviceObject := GetDevice(device) | 
|  | 4098 | bufferViewObject := GetBufferView(bufferView) | 
|  | 4099 | assert(bufferViewObject.device == device) | 
|  | 4100 |  | 
|  | 4101 | State.BufferViews[bufferView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4102 | } | 
|  | 4103 |  | 
|  | 4104 |  | 
|  | 4105 | // Image functions | 
|  | 4106 |  | 
|  | 4107 | @threadSafety("system") | 
|  | 4108 | cmd VkResult vkCreateImage( | 
|  | 4109 | VkDevice                                    device, | 
|  | 4110 | const VkImageCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4111 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4112 | VkImage*                                    pImage) { | 
|  | 4113 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) | 
|  | 4114 | deviceObject := GetDevice(device) | 
|  | 4115 |  | 
|  | 4116 | image := ? | 
|  | 4117 | pImage[0] = image | 
|  | 4118 | State.Images[image] = new!ImageObject(device: device) | 
|  | 4119 |  | 
|  | 4120 | return ? | 
|  | 4121 | } | 
|  | 4122 |  | 
|  | 4123 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4124 | cmd void vkDestroyImage( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4125 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4126 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4127 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4128 | deviceObject := GetDevice(device) | 
|  | 4129 | imageObject := GetImage(image) | 
|  | 4130 | assert(imageObject.device == device) | 
|  | 4131 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4132 | assert(imageObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4133 | State.Images[image] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4134 | } | 
|  | 4135 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4136 | cmd void vkGetImageSubresourceLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4137 | VkDevice                                    device, | 
|  | 4138 | VkImage                                     image, | 
|  | 4139 | const VkImageSubresource*                   pSubresource, | 
|  | 4140 | VkSubresourceLayout*                        pLayout) { | 
|  | 4141 | deviceObject := GetDevice(device) | 
|  | 4142 | imageObject := GetImage(image) | 
|  | 4143 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4144 | } | 
|  | 4145 |  | 
|  | 4146 |  | 
|  | 4147 | // Image view functions | 
|  | 4148 |  | 
|  | 4149 | @threadSafety("system") | 
|  | 4150 | cmd VkResult vkCreateImageView( | 
|  | 4151 | VkDevice                                    device, | 
|  | 4152 | const VkImageViewCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4153 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4154 | VkImageView*                                pView) { | 
|  | 4155 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) | 
|  | 4156 | deviceObject := GetDevice(device) | 
|  | 4157 |  | 
|  | 4158 | imageObject := GetImage(pCreateInfo.image) | 
|  | 4159 | assert(imageObject.device == device) | 
|  | 4160 |  | 
|  | 4161 | view := ? | 
|  | 4162 | pView[0] = view | 
|  | 4163 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) | 
|  | 4164 |  | 
|  | 4165 | return ? | 
|  | 4166 | } | 
|  | 4167 |  | 
|  | 4168 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4169 | cmd void vkDestroyImageView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4170 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4171 | VkImageView                                 imageView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4172 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4173 | deviceObject := GetDevice(device) | 
|  | 4174 | imageViewObject := GetImageView(imageView) | 
|  | 4175 | assert(imageViewObject.device == device) | 
|  | 4176 |  | 
|  | 4177 | State.ImageViews[imageView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4178 | } | 
|  | 4179 |  | 
|  | 4180 |  | 
|  | 4181 | // Shader functions | 
|  | 4182 |  | 
|  | 4183 | cmd VkResult vkCreateShaderModule( | 
|  | 4184 | VkDevice                                    device, | 
|  | 4185 | const VkShaderModuleCreateInfo*             pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4186 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4187 | VkShaderModule*                             pShaderModule) { | 
|  | 4188 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) | 
|  | 4189 | deviceObject := GetDevice(device) | 
|  | 4190 |  | 
|  | 4191 | shaderModule := ? | 
|  | 4192 | pShaderModule[0] = shaderModule | 
|  | 4193 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) | 
|  | 4194 |  | 
|  | 4195 | return ? | 
|  | 4196 | } | 
|  | 4197 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4198 | cmd void vkDestroyShaderModule( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4199 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4200 | VkShaderModule                              shaderModule, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4201 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4202 | deviceObject := GetDevice(device) | 
|  | 4203 | shaderModuleObject := GetShaderModule(shaderModule) | 
|  | 4204 | assert(shaderModuleObject.device == device) | 
|  | 4205 |  | 
|  | 4206 | State.ShaderModules[shaderModule] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4207 | } | 
|  | 4208 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4209 |  | 
|  | 4210 | // Pipeline functions | 
|  | 4211 |  | 
|  | 4212 | cmd VkResult vkCreatePipelineCache( | 
|  | 4213 | VkDevice                                    device, | 
|  | 4214 | const VkPipelineCacheCreateInfo*            pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4215 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4216 | VkPipelineCache*                            pPipelineCache) { | 
|  | 4217 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) | 
|  | 4218 | deviceObject := GetDevice(device) | 
|  | 4219 |  | 
|  | 4220 | pipelineCache := ? | 
|  | 4221 | pPipelineCache[0] = pipelineCache | 
|  | 4222 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) | 
|  | 4223 |  | 
|  | 4224 | return ? | 
|  | 4225 | } | 
|  | 4226 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4227 | cmd void vkDestroyPipelineCache( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4228 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4229 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4230 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4231 | deviceObject := GetDevice(device) | 
|  | 4232 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4233 | assert(pipelineCacheObject.device == device) | 
|  | 4234 |  | 
|  | 4235 | State.PipelineCaches[pipelineCache] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4236 | } | 
|  | 4237 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4238 | cmd VkResult vkGetPipelineCacheData( | 
|  | 4239 | VkDevice                                    device, | 
|  | 4240 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4241 | platform.size_t*                            pDataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4242 | void*                                       pData) { | 
|  | 4243 | deviceObject := GetDevice(device) | 
|  | 4244 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4245 | assert(pipelineCacheObject.device == device) | 
|  | 4246 |  | 
|  | 4247 | return ? | 
|  | 4248 | } | 
|  | 4249 |  | 
|  | 4250 | cmd VkResult vkMergePipelineCaches( | 
|  | 4251 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4252 | VkPipelineCache                             dstCache, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4253 | u32                                         srcCacheCount, | 
|  | 4254 | const VkPipelineCache*                      pSrcCaches) { | 
|  | 4255 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4256 | dstCacheObject := GetPipelineCache(dstCache) | 
|  | 4257 | assert(dstCacheObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4258 |  | 
|  | 4259 | srcCaches := pSrcCaches[0:srcCacheCount] | 
|  | 4260 | for i in (0 .. srcCacheCount) { | 
|  | 4261 | srcCache := srcCaches[i] | 
|  | 4262 | srcCacheObject := GetPipelineCache(srcCache) | 
|  | 4263 | assert(srcCacheObject.device == device) | 
|  | 4264 | } | 
|  | 4265 |  | 
|  | 4266 | return ? | 
|  | 4267 | } | 
|  | 4268 |  | 
|  | 4269 | cmd VkResult vkCreateGraphicsPipelines( | 
|  | 4270 | VkDevice                                    device, | 
|  | 4271 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4272 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4273 | const VkGraphicsPipelineCreateInfo*         pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4274 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4275 | VkPipeline*                                 pPipelines) { | 
|  | 4276 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4277 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4278 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4279 | assert(pipelineCacheObject.device == device) | 
|  | 4280 | } | 
|  | 4281 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4282 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4283 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4284 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4285 | pipeline := ? | 
|  | 4286 | pipelines[i] = pipeline | 
|  | 4287 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4288 | } | 
|  | 4289 |  | 
|  | 4290 | return ? | 
|  | 4291 | } | 
|  | 4292 |  | 
|  | 4293 | cmd VkResult vkCreateComputePipelines( | 
|  | 4294 | VkDevice                                    device, | 
|  | 4295 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4296 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4297 | const VkComputePipelineCreateInfo*          pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4298 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4299 | VkPipeline*                                 pPipelines) { | 
|  | 4300 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4301 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4302 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4303 | assert(pipelineCacheObject.device == device) | 
|  | 4304 | } | 
|  | 4305 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4306 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4307 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4308 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4309 | pipeline := ? | 
|  | 4310 | pipelines[i] = pipeline | 
|  | 4311 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4312 | } | 
|  | 4313 |  | 
|  | 4314 | return ? | 
|  | 4315 | } | 
|  | 4316 |  | 
|  | 4317 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4318 | cmd void vkDestroyPipeline( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4319 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4320 | VkPipeline                                  pipeline, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4321 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4322 | deviceObject := GetDevice(device) | 
|  | 4323 | pipelineObjects := GetPipeline(pipeline) | 
|  | 4324 | assert(pipelineObjects.device == device) | 
|  | 4325 |  | 
|  | 4326 | State.Pipelines[pipeline] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4327 | } | 
|  | 4328 |  | 
|  | 4329 |  | 
|  | 4330 | // Pipeline layout functions | 
|  | 4331 |  | 
|  | 4332 | @threadSafety("system") | 
|  | 4333 | cmd VkResult vkCreatePipelineLayout( | 
|  | 4334 | VkDevice                                    device, | 
|  | 4335 | const VkPipelineLayoutCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4336 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4337 | VkPipelineLayout*                           pPipelineLayout) { | 
|  | 4338 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) | 
|  | 4339 | deviceObject := GetDevice(device) | 
|  | 4340 |  | 
|  | 4341 | pipelineLayout := ? | 
|  | 4342 | pPipelineLayout[0] = pipelineLayout | 
|  | 4343 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) | 
|  | 4344 |  | 
|  | 4345 | return ? | 
|  | 4346 | } | 
|  | 4347 |  | 
|  | 4348 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4349 | cmd void vkDestroyPipelineLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4350 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4351 | VkPipelineLayout                            pipelineLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4352 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4353 | deviceObject := GetDevice(device) | 
|  | 4354 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) | 
|  | 4355 | assert(pipelineLayoutObjects.device == device) | 
|  | 4356 |  | 
|  | 4357 | State.PipelineLayouts[pipelineLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4358 | } | 
|  | 4359 |  | 
|  | 4360 |  | 
|  | 4361 | // Sampler functions | 
|  | 4362 |  | 
|  | 4363 | @threadSafety("system") | 
|  | 4364 | cmd VkResult vkCreateSampler( | 
|  | 4365 | VkDevice                                    device, | 
|  | 4366 | const VkSamplerCreateInfo*                  pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4367 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4368 | VkSampler*                                  pSampler) { | 
|  | 4369 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) | 
|  | 4370 | deviceObject := GetDevice(device) | 
|  | 4371 |  | 
|  | 4372 | sampler := ? | 
|  | 4373 | pSampler[0] = sampler | 
|  | 4374 | State.Samplers[sampler] = new!SamplerObject(device: device) | 
|  | 4375 |  | 
|  | 4376 | return ? | 
|  | 4377 | } | 
|  | 4378 |  | 
|  | 4379 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4380 | cmd void vkDestroySampler( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4381 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4382 | VkSampler                                   sampler, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4383 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4384 | deviceObject := GetDevice(device) | 
|  | 4385 | samplerObject := GetSampler(sampler) | 
|  | 4386 | assert(samplerObject.device == device) | 
|  | 4387 |  | 
|  | 4388 | State.Samplers[sampler] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4389 | } | 
|  | 4390 |  | 
|  | 4391 |  | 
|  | 4392 | // Descriptor set functions | 
|  | 4393 |  | 
|  | 4394 | @threadSafety("system") | 
|  | 4395 | cmd VkResult vkCreateDescriptorSetLayout( | 
|  | 4396 | VkDevice                                    device, | 
|  | 4397 | const VkDescriptorSetLayoutCreateInfo*      pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4398 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4399 | VkDescriptorSetLayout*                      pSetLayout) { | 
|  | 4400 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) | 
|  | 4401 | deviceObject := GetDevice(device) | 
|  | 4402 |  | 
|  | 4403 | setLayout := ? | 
|  | 4404 | pSetLayout[0] = setLayout | 
|  | 4405 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) | 
|  | 4406 |  | 
|  | 4407 | return ? | 
|  | 4408 | } | 
|  | 4409 |  | 
|  | 4410 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4411 | cmd void vkDestroyDescriptorSetLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4412 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4413 | VkDescriptorSetLayout                       descriptorSetLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4414 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4415 | deviceObject := GetDevice(device) | 
|  | 4416 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) | 
|  | 4417 | assert(descriptorSetLayoutObject.device == device) | 
|  | 4418 |  | 
|  | 4419 | State.DescriptorSetLayouts[descriptorSetLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4420 | } | 
|  | 4421 |  | 
|  | 4422 | @threadSafety("system") | 
|  | 4423 | cmd VkResult vkCreateDescriptorPool( | 
|  | 4424 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4425 | const VkDescriptorPoolCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4426 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4427 | VkDescriptorPool*                           pDescriptorPool) { | 
|  | 4428 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) | 
|  | 4429 | deviceObject := GetDevice(device) | 
|  | 4430 |  | 
|  | 4431 | descriptorPool := ? | 
|  | 4432 | pDescriptorPool[0] = descriptorPool | 
|  | 4433 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) | 
|  | 4434 |  | 
|  | 4435 | return ? | 
|  | 4436 | } | 
|  | 4437 |  | 
|  | 4438 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4439 | cmd void vkDestroyDescriptorPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4440 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4441 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4442 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4443 | deviceObject := GetDevice(device) | 
|  | 4444 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4445 | assert(descriptorPoolObject.device == device) | 
|  | 4446 |  | 
|  | 4447 | State.DescriptorPools[descriptorPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4448 | } | 
|  | 4449 |  | 
|  | 4450 | @threadSafety("app") | 
|  | 4451 | cmd VkResult vkResetDescriptorPool( | 
|  | 4452 | VkDevice                                    device, | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4453 | VkDescriptorPool                            descriptorPool, | 
|  | 4454 | VkDescriptorPoolResetFlags                  flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4455 | deviceObject := GetDevice(device) | 
|  | 4456 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4457 | assert(descriptorPoolObject.device == device) | 
|  | 4458 |  | 
|  | 4459 | return ? | 
|  | 4460 | } | 
|  | 4461 |  | 
|  | 4462 | @threadSafety("app") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4463 | cmd VkResult vkAllocateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4464 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4465 | const VkDescriptorSetAllocateInfo*          pAllocateInfo, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4466 | VkDescriptorSet*                            pDescriptorSets) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4467 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4468 | allocInfo := pAllocateInfo[0] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4469 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4470 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4471 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] | 
|  | 4472 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4473 | setLayout := setLayouts[i] | 
|  | 4474 | setLayoutObject := GetDescriptorSetLayout(setLayout) | 
|  | 4475 | assert(setLayoutObject.device == device) | 
|  | 4476 | } | 
|  | 4477 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4478 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] | 
|  | 4479 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4480 | descriptorSet := ? | 
|  | 4481 | descriptorSets[i] = descriptorSet | 
|  | 4482 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) | 
|  | 4483 | } | 
|  | 4484 |  | 
|  | 4485 | return ? | 
|  | 4486 | } | 
|  | 4487 |  | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4488 | cmd VkResult vkFreeDescriptorSets( | 
|  | 4489 | VkDevice                                    device, | 
|  | 4490 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4491 | u32                                         descriptorSetCount, | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4492 | const VkDescriptorSet*                      pDescriptorSets) { | 
|  | 4493 | deviceObject := GetDevice(device) | 
|  | 4494 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4495 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4496 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4497 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4498 | descriptorSet := descriptorSets[i] | 
|  | 4499 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
|  | 4500 | assert(descriptorSetObject.device == device) | 
|  | 4501 | State.DescriptorSets[descriptorSet] = null | 
|  | 4502 | } | 
|  | 4503 |  | 
|  | 4504 | return ? | 
|  | 4505 | } | 
|  | 4506 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4507 | cmd void vkUpdateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4508 | VkDevice                                    device, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4509 | u32                                         descriptorWriteCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4510 | const VkWriteDescriptorSet*                 pDescriptorWrites, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4511 | u32                                         descriptorCopyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4512 | const VkCopyDescriptorSet*                  pDescriptorCopies) { | 
|  | 4513 | deviceObject := GetDevice(device) | 
|  | 4514 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4515 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] | 
|  | 4516 | for i in (0 .. descriptorWriteCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4517 | descriptorWrite := descriptorWrites[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4518 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4519 | assert(descriptorWriteObject.device == device) | 
|  | 4520 | } | 
|  | 4521 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4522 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] | 
|  | 4523 | for i in (0 .. descriptorCopyCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4524 | descriptorCopy := descriptorCopies[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4525 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4526 | assert(descriptorCopyObject.device == device) | 
|  | 4527 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4528 | } | 
|  | 4529 |  | 
|  | 4530 |  | 
|  | 4531 | // Framebuffer functions | 
|  | 4532 |  | 
|  | 4533 | @threadSafety("system") | 
|  | 4534 | cmd VkResult vkCreateFramebuffer( | 
|  | 4535 | VkDevice                                    device, | 
|  | 4536 | const VkFramebufferCreateInfo*              pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4537 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4538 | VkFramebuffer*                              pFramebuffer) { | 
|  | 4539 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) | 
|  | 4540 | deviceObject := GetDevice(device) | 
|  | 4541 |  | 
|  | 4542 | framebuffer := ? | 
|  | 4543 | pFramebuffer[0] = framebuffer | 
|  | 4544 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) | 
|  | 4545 |  | 
|  | 4546 | return ? | 
|  | 4547 | } | 
|  | 4548 |  | 
|  | 4549 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4550 | cmd void vkDestroyFramebuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4551 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4552 | VkFramebuffer                               framebuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4553 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4554 | deviceObject := GetDevice(device) | 
|  | 4555 | framebufferObject := GetFramebuffer(framebuffer) | 
|  | 4556 | assert(framebufferObject.device == device) | 
|  | 4557 |  | 
|  | 4558 | State.Framebuffers[framebuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4559 | } | 
|  | 4560 |  | 
|  | 4561 |  | 
|  | 4562 | // Renderpass functions | 
|  | 4563 |  | 
|  | 4564 | @threadSafety("system") | 
|  | 4565 | cmd VkResult vkCreateRenderPass( | 
|  | 4566 | VkDevice                                    device, | 
|  | 4567 | const VkRenderPassCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4568 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4569 | VkRenderPass*                               pRenderPass) { | 
|  | 4570 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) | 
|  | 4571 | deviceObject := GetDevice(device) | 
|  | 4572 |  | 
|  | 4573 | renderpass := ? | 
|  | 4574 | pRenderPass[0] = renderpass | 
|  | 4575 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) | 
|  | 4576 |  | 
|  | 4577 | return ? | 
|  | 4578 | } | 
|  | 4579 |  | 
|  | 4580 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4581 | cmd void vkDestroyRenderPass( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4582 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4583 | VkRenderPass                                renderPass, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4584 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4585 | deviceObject := GetDevice(device) | 
|  | 4586 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4587 | assert(renderPassObject.device == device) | 
|  | 4588 |  | 
|  | 4589 | State.RenderPasses[renderPass] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4590 | } | 
|  | 4591 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4592 | cmd void vkGetRenderAreaGranularity( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4593 | VkDevice                                    device, | 
|  | 4594 | VkRenderPass                                renderPass, | 
|  | 4595 | VkExtent2D*                                 pGranularity) { | 
|  | 4596 | deviceObject := GetDevice(device) | 
|  | 4597 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4598 |  | 
|  | 4599 | granularity := ? | 
|  | 4600 | pGranularity[0] = granularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4601 | } | 
|  | 4602 |  | 
|  | 4603 | // Command pool functions | 
|  | 4604 |  | 
|  | 4605 | cmd VkResult vkCreateCommandPool( | 
|  | 4606 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4607 | const VkCommandPoolCreateInfo*              pCreateInfo, | 
|  | 4608 | const VkAllocationCallbacks*                pAllocator, | 
|  | 4609 | VkCommandPool*                              pCommandPool) { | 
|  | 4610 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4611 | deviceObject := GetDevice(device) | 
|  | 4612 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4613 | commandPool := ? | 
|  | 4614 | pCommandPool[0] = commandPool | 
|  | 4615 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4616 |  | 
|  | 4617 | return ? | 
|  | 4618 | } | 
|  | 4619 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4620 | cmd void vkDestroyCommandPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4621 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4622 | VkCommandPool                               commandPool, | 
|  | 4623 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4624 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4625 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4626 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4627 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4628 | State.CommandPools[commandPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4629 | } | 
|  | 4630 |  | 
|  | 4631 | cmd VkResult vkResetCommandPool( | 
|  | 4632 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4633 | VkCommandPool                               commandPool, | 
|  | 4634 | VkCommandPoolResetFlags                     flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4635 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4636 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4637 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4638 |  | 
|  | 4639 | return ? | 
|  | 4640 | } | 
|  | 4641 |  | 
|  | 4642 | // Command buffer functions | 
|  | 4643 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4644 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4645 | memoryObject := GetDeviceMemory(memory) | 
|  | 4646 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4647 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4648 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4649 | commandBufferObject.boundObjects[as!u64(obj)] = memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4650 | } | 
|  | 4651 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4652 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4653 | memoryObject := GetDeviceMemory(memory) | 
|  | 4654 | memoryObject.boundCommandBuffers[commandBuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4655 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4656 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4657 | commandBufferObject.boundObjects[as!u64(obj)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4658 | } | 
|  | 4659 |  | 
|  | 4660 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4661 | cmd VkResult vkAllocateCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4662 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4663 | const VkCommandBufferAllocateInfo*          pAllocateInfo, | 
|  | 4664 | VkCommandBuffer*                            pCommandBuffers) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4665 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) | 
| 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 | count := pAllocateInfo[0].commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4668 | commandBuffers := pCommandBuffers[0:count] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4669 | for i in (0 .. count) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4670 | commandBuffer := ? | 
|  | 4671 | commandBuffers[i] = commandBuffer | 
|  | 4672 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4673 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4674 |  | 
|  | 4675 | return ? | 
|  | 4676 | } | 
|  | 4677 |  | 
|  | 4678 | @threadSafety("system") | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4679 | cmd void vkFreeCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4680 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4681 | VkCommandPool                               commandPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4682 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4683 | const VkCommandBuffer*                      pCommandBuffers) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4684 | deviceObject := GetDevice(device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4685 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4686 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4687 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4688 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) | 
|  | 4689 | assert(commandBufferObject.device == device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4690 | // TODO: iterate over boundObjects and clear memory bindings | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4691 | State.CommandBuffers[commandBuffers[i]] = null | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4692 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4693 | } | 
|  | 4694 |  | 
|  | 4695 | @threadSafety("app") | 
|  | 4696 | cmd VkResult vkBeginCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4697 | VkCommandBuffer                             commandBuffer, | 
|  | 4698 | const VkCommandBufferBeginInfo*             pBeginInfo) { | 
|  | 4699 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) | 
|  | 4700 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4701 |  | 
|  | 4702 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4703 |  | 
|  | 4704 | return ? | 
|  | 4705 | } | 
|  | 4706 |  | 
|  | 4707 | @threadSafety("app") | 
|  | 4708 | cmd VkResult vkEndCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4709 | VkCommandBuffer                             commandBuffer) { | 
|  | 4710 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 |  | 
|  | 4712 | return ? | 
|  | 4713 | } | 
|  | 4714 |  | 
|  | 4715 | @threadSafety("app") | 
|  | 4716 | cmd VkResult vkResetCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4717 | VkCommandBuffer                             commandBuffer, | 
|  | 4718 | VkCommandBufferResetFlags                   flags) { | 
|  | 4719 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4720 |  | 
|  | 4721 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4722 |  | 
|  | 4723 | return ? | 
|  | 4724 | } | 
|  | 4725 |  | 
|  | 4726 |  | 
|  | 4727 | // Command buffer building functions | 
|  | 4728 |  | 
|  | 4729 | @threadSafety("app") | 
|  | 4730 | cmd void vkCmdBindPipeline( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4731 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4732 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4733 | VkPipeline                                  pipeline) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4734 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4735 | pipelineObject := GetPipeline(pipeline) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4736 | assert(commandBufferObject.device == pipelineObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4737 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4738 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4739 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4740 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4741 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4742 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4743 | } | 
|  | 4744 |  | 
|  | 4745 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4746 | cmd void vkCmdSetViewport( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4747 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4748 | u32                                         firstViewport, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4749 | u32                                         viewportCount, | 
|  | 4750 | const VkViewport*                           pViewports) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4751 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4752 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4753 | } | 
|  | 4754 |  | 
|  | 4755 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4756 | cmd void vkCmdSetScissor( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4757 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4758 | u32                                         firstScissor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4759 | u32                                         scissorCount, | 
|  | 4760 | const VkRect2D*                             pScissors) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4761 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4762 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4763 | } | 
|  | 4764 |  | 
|  | 4765 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4766 | cmd void vkCmdSetLineWidth( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4767 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4768 | f32                                         lineWidth) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4769 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4770 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4771 | } | 
|  | 4772 |  | 
|  | 4773 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4774 | cmd void vkCmdSetDepthBias( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4775 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4776 | f32                                         depthBiasConstantFactor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4777 | f32                                         depthBiasClamp, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4778 | f32                                         depthBiasSlopeFactor) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4779 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4780 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4781 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4782 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4783 | @threadSafety("app") | 
|  | 4784 | cmd void vkCmdSetBlendConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4785 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4786 | // TODO(jessehall): apic only supports 'const' on pointer types. Using | 
|  | 4787 | // an annotation as a quick hack to pass this to the template without | 
|  | 4788 | // having to modify the AST and semantic model. | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4789 | @readonly f32[4]                            blendConstants) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4790 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4791 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4792 | } | 
|  | 4793 |  | 
|  | 4794 | @threadSafety("app") | 
|  | 4795 | cmd void vkCmdSetDepthBounds( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4796 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4797 | f32                                         minDepthBounds, | 
|  | 4798 | f32                                         maxDepthBounds) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4799 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4800 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4801 | } | 
|  | 4802 |  | 
|  | 4803 | @threadSafety("app") | 
|  | 4804 | cmd void vkCmdSetStencilCompareMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4805 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4806 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4807 | u32                                         compareMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4808 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4809 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4810 | } | 
|  | 4811 |  | 
|  | 4812 | @threadSafety("app") | 
|  | 4813 | cmd void vkCmdSetStencilWriteMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4814 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4815 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4816 | u32                                         writeMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4817 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4818 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4819 | } | 
|  | 4820 |  | 
|  | 4821 | @threadSafety("app") | 
|  | 4822 | cmd void vkCmdSetStencilReference( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4823 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4824 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4825 | u32                                         reference) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4826 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4827 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4828 | } | 
|  | 4829 |  | 
|  | 4830 | @threadSafety("app") | 
|  | 4831 | cmd void vkCmdBindDescriptorSets( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4832 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4833 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4834 | VkPipelineLayout                            layout, | 
|  | 4835 | u32                                         firstSet, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4836 | u32                                         descriptorSetCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4837 | const VkDescriptorSet*                      pDescriptorSets, | 
|  | 4838 | u32                                         dynamicOffsetCount, | 
|  | 4839 | const u32*                                  pDynamicOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4840 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4841 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4842 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4843 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4844 | descriptorSet := descriptorSets[i] | 
|  | 4845 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4846 | assert(commandBufferObject.device == descriptorSetObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4847 | } | 
|  | 4848 |  | 
|  | 4849 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] | 
|  | 4850 | for i in (0 .. dynamicOffsetCount) { | 
|  | 4851 | dynamicOffset := dynamicOffsets[i] | 
|  | 4852 | } | 
|  | 4853 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4854 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4855 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4856 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4857 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4858 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4859 | } | 
|  | 4860 |  | 
|  | 4861 | @threadSafety("app") | 
|  | 4862 | cmd void vkCmdBindIndexBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4863 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4864 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4865 | VkDeviceSize                                offset, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4866 | VkIndexType                                 indexType) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4867 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4869 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4870 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4871 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4872 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4873 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4874 | } | 
|  | 4875 |  | 
|  | 4876 | @threadSafety("app") | 
|  | 4877 | cmd void vkCmdBindVertexBuffers( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4878 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4879 | u32                                         firstBinding, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4880 | u32                                         bindingCount, | 
|  | 4881 | const VkBuffer*                             pBuffers, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4882 | const VkDeviceSize*                         pOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4883 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4884 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4885 | // TODO: check if not [firstBinding:firstBinding+bindingCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4886 | buffers := pBuffers[0:bindingCount] | 
|  | 4887 | offsets := pOffsets[0:bindingCount] | 
|  | 4888 | for i in (0 .. bindingCount) { | 
|  | 4889 | buffer := buffers[i] | 
|  | 4890 | offset := offsets[i] | 
|  | 4891 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4892 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4893 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4894 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4895 | } | 
|  | 4896 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4897 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4898 | } | 
|  | 4899 |  | 
|  | 4900 | @threadSafety("app") | 
|  | 4901 | cmd void vkCmdDraw( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4902 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4903 | u32                                         vertexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4904 | u32                                         instanceCount, | 
|  | 4905 | u32                                         firstVertex, | 
|  | 4906 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4907 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4908 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4909 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4910 | } | 
|  | 4911 |  | 
|  | 4912 | @threadSafety("app") | 
|  | 4913 | cmd void vkCmdDrawIndexed( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4914 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4915 | u32                                         indexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4916 | u32                                         instanceCount, | 
|  | 4917 | u32                                         firstIndex, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4918 | s32                                         vertexOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4919 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4920 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4921 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4922 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4923 | } | 
|  | 4924 |  | 
|  | 4925 | @threadSafety("app") | 
|  | 4926 | cmd void vkCmdDrawIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4927 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4928 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4929 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4930 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4931 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4932 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4933 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4934 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4935 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4936 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4937 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4938 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4939 | } | 
|  | 4940 |  | 
|  | 4941 | @threadSafety("app") | 
|  | 4942 | cmd void vkCmdDrawIndexedIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4943 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4944 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4945 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4946 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4947 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4948 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4949 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4950 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4951 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4952 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4953 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4954 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4955 | } | 
|  | 4956 |  | 
|  | 4957 | @threadSafety("app") | 
|  | 4958 | cmd void vkCmdDispatch( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4959 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4960 | u32                                         x, | 
|  | 4961 | u32                                         y, | 
|  | 4962 | u32                                         z) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4963 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4964 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4965 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4966 | } | 
|  | 4967 |  | 
|  | 4968 | @threadSafety("app") | 
|  | 4969 | cmd void vkCmdDispatchIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4972 | VkDeviceSize                                offset) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4973 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4974 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4975 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4976 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4977 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4978 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4979 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4980 | } | 
|  | 4981 |  | 
|  | 4982 | @threadSafety("app") | 
|  | 4983 | cmd void vkCmdCopyBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4984 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4985 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4986 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4987 | u32                                         regionCount, | 
|  | 4988 | const VkBufferCopy*                         pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4989 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4990 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4991 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 4992 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 4993 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4994 |  | 
|  | 4995 | regions := pRegions[0:regionCount] | 
|  | 4996 | for i in (0 .. regionCount) { | 
|  | 4997 | region := regions[i] | 
|  | 4998 | } | 
|  | 4999 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5000 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 5001 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5002 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5003 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5004 | } | 
|  | 5005 |  | 
|  | 5006 | @threadSafety("app") | 
|  | 5007 | cmd void vkCmdCopyImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5008 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5009 | VkImage                                     srcImage, | 
|  | 5010 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5011 | VkImage                                     dstImage, | 
|  | 5012 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5013 | u32                                         regionCount, | 
|  | 5014 | const VkImageCopy*                          pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5015 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5016 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5017 | dstImageObject := GetImage(dstImage) | 
|  | 5018 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5019 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5020 |  | 
|  | 5021 | regions := pRegions[0:regionCount] | 
|  | 5022 | for i in (0 .. regionCount) { | 
|  | 5023 | region := regions[i] | 
|  | 5024 | } | 
|  | 5025 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5026 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5027 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5028 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5029 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5030 | } | 
|  | 5031 |  | 
|  | 5032 | @threadSafety("app") | 
|  | 5033 | cmd void vkCmdBlitImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5034 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5035 | VkImage                                     srcImage, | 
|  | 5036 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5037 | VkImage                                     dstImage, | 
|  | 5038 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5039 | u32                                         regionCount, | 
|  | 5040 | const VkImageBlit*                          pRegions, | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 5041 | VkFilter                                    filter) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5042 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5043 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5044 | dstImageObject := GetImage(dstImage) | 
|  | 5045 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5046 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5047 |  | 
|  | 5048 | regions := pRegions[0:regionCount] | 
|  | 5049 | for i in (0 .. regionCount) { | 
|  | 5050 | region := regions[i] | 
|  | 5051 | } | 
|  | 5052 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5053 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5054 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5055 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5056 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5057 | } | 
|  | 5058 |  | 
|  | 5059 | @threadSafety("app") | 
|  | 5060 | cmd void vkCmdCopyBufferToImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5061 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5062 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5063 | VkImage                                     dstImage, | 
|  | 5064 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5065 | u32                                         regionCount, | 
|  | 5066 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5067 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5068 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5069 | dstImageObject := GetImage(dstImage) | 
|  | 5070 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 5071 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5072 |  | 
|  | 5073 | regions := pRegions[0:regionCount] | 
|  | 5074 | for i in (0 .. regionCount) { | 
|  | 5075 | region := regions[i] | 
|  | 5076 | } | 
|  | 5077 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5078 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 5079 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5080 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5081 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5082 | } | 
|  | 5083 |  | 
|  | 5084 | @threadSafety("app") | 
|  | 5085 | cmd void vkCmdCopyImageToBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5086 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5087 | VkImage                                     srcImage, | 
|  | 5088 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5089 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5090 | u32                                         regionCount, | 
|  | 5091 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5092 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5093 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5094 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5095 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5096 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5097 |  | 
|  | 5098 | regions := pRegions[0:regionCount] | 
|  | 5099 | for i in (0 .. regionCount) { | 
|  | 5100 | region := regions[i] | 
|  | 5101 | } | 
|  | 5102 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5103 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5104 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5105 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5106 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5107 | } | 
|  | 5108 |  | 
|  | 5109 | @threadSafety("app") | 
|  | 5110 | cmd void vkCmdUpdateBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5111 | VkCommandBuffer                             commandBuffer, | 
|  | 5112 | VkBuffer                                    dstBuffer, | 
|  | 5113 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5114 | VkDeviceSize                                dataSize, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 5115 | const void*                                 pData) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5116 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 5117 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5118 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5119 |  | 
|  | 5120 | data := pData[0:dataSize] | 
|  | 5121 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5122 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5123 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5124 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5125 | } | 
|  | 5126 |  | 
|  | 5127 | @threadSafety("app") | 
|  | 5128 | cmd void vkCmdFillBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5129 | VkCommandBuffer                             commandBuffer, | 
|  | 5130 | VkBuffer                                    dstBuffer, | 
|  | 5131 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5132 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5133 | u32                                         data) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5134 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 5135 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5136 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5137 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5138 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5139 | } | 
|  | 5140 |  | 
|  | 5141 | @threadSafety("app") | 
|  | 5142 | cmd void vkCmdClearColorImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5143 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5144 | VkImage                                     image, | 
|  | 5145 | VkImageLayout                               imageLayout, | 
|  | 5146 | const VkClearColorValue*                    pColor, | 
|  | 5147 | u32                                         rangeCount, | 
|  | 5148 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5149 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5150 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5151 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5152 |  | 
|  | 5153 | ranges := pRanges[0:rangeCount] | 
|  | 5154 | for i in (0 .. rangeCount) { | 
|  | 5155 | range := ranges[i] | 
|  | 5156 | } | 
|  | 5157 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5158 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5159 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5160 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5161 | } | 
|  | 5162 |  | 
|  | 5163 | @threadSafety("app") | 
|  | 5164 | cmd void vkCmdClearDepthStencilImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5165 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5166 | VkImage                                     image, | 
|  | 5167 | VkImageLayout                               imageLayout, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5168 | const VkClearDepthStencilValue*             pDepthStencil, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5169 | u32                                         rangeCount, | 
|  | 5170 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5171 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5172 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5173 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5174 |  | 
|  | 5175 | ranges := pRanges[0:rangeCount] | 
|  | 5176 | for i in (0 .. rangeCount) { | 
|  | 5177 | range := ranges[i] | 
|  | 5178 | } | 
|  | 5179 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5180 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5181 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5182 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5183 | } | 
|  | 5184 |  | 
|  | 5185 | @threadSafety("app") | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5186 | cmd void vkCmdClearAttachments( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5187 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5188 | u32                                         attachmentCount, | 
|  | 5189 | const VkClearAttachment*                    pAttachments, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5190 | u32                                         rectCount, | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5191 | const VkClearRect*                          pRects) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5192 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5193 |  | 
|  | 5194 | rects := pRects[0:rectCount] | 
|  | 5195 | for i in (0 .. rectCount) { | 
|  | 5196 | rect := rects[i] | 
|  | 5197 | } | 
|  | 5198 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5199 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5200 | } | 
|  | 5201 |  | 
|  | 5202 | @threadSafety("app") | 
|  | 5203 | cmd void vkCmdResolveImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5204 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5205 | VkImage                                     srcImage, | 
|  | 5206 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5207 | VkImage                                     dstImage, | 
|  | 5208 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5209 | u32                                         regionCount, | 
|  | 5210 | const VkImageResolve*                       pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5211 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5212 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5213 | dstImageObject := GetImage(dstImage) | 
|  | 5214 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5215 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5216 |  | 
|  | 5217 | regions := pRegions[0:regionCount] | 
|  | 5218 | for i in (0 .. regionCount) { | 
|  | 5219 | region := regions[i] | 
|  | 5220 | } | 
|  | 5221 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5222 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5223 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5224 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5225 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5226 | } | 
|  | 5227 |  | 
|  | 5228 | @threadSafety("app") | 
|  | 5229 | cmd void vkCmdSetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5230 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5231 | VkEvent                                     event, | 
|  | 5232 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5233 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5234 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5235 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5236 | } | 
|  | 5237 |  | 
|  | 5238 | @threadSafety("app") | 
|  | 5239 | cmd void vkCmdResetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5240 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5241 | VkEvent                                     event, | 
|  | 5242 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5243 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5244 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5245 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5246 | } | 
|  | 5247 |  | 
|  | 5248 | @threadSafety("app") | 
|  | 5249 | cmd void vkCmdWaitEvents( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5250 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5251 | u32                                         eventCount, | 
|  | 5252 | const VkEvent*                              pEvents, | 
|  | 5253 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5254 | VkPipelineStageFlags                        dstStageMask, | 
|  | 5255 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5256 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5257 | u32                                         bufferMemoryBarrierCount, | 
|  | 5258 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5259 | u32                                         imageMemoryBarrierCount, | 
|  | 5260 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5261 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5262 |  | 
|  | 5263 | events := pEvents[0:eventCount] | 
|  | 5264 | for i in (0 .. eventCount) { | 
|  | 5265 | event := events[i] | 
|  | 5266 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5267 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5268 | } | 
|  | 5269 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5270 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5271 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5272 | memoryBarrier := memoryBarriers[i] | 
|  | 5273 | } | 
|  | 5274 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5275 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5276 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5277 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5278 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5279 | } | 
|  | 5280 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5281 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5282 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5283 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5284 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5285 | } | 
|  | 5286 | } | 
|  | 5287 |  | 
|  | 5288 | @threadSafety("app") | 
|  | 5289 | cmd void vkCmdPipelineBarrier( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5290 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5291 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5292 | VkPipelineStageFlags                        dstStageMask, | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5293 | VkDependencyFlags                           dependencyFlags, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5294 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5295 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5296 | u32                                         bufferMemoryBarrierCount, | 
|  | 5297 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5298 | u32                                         imageMemoryBarrierCount, | 
|  | 5299 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5300 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5301 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5302 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5303 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5304 | memoryBarrier := memoryBarriers[i] | 
|  | 5305 | } | 
|  | 5306 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5307 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5308 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5309 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5310 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5311 | } | 
|  | 5312 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5313 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5314 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5315 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5316 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5317 | } | 
|  | 5318 | } | 
|  | 5319 |  | 
|  | 5320 | @threadSafety("app") | 
|  | 5321 | cmd void vkCmdBeginQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5322 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5323 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5324 | u32                                         query, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5325 | VkQueryControlFlags                         flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5326 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5327 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5328 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5329 | } | 
|  | 5330 |  | 
|  | 5331 | @threadSafety("app") | 
|  | 5332 | cmd void vkCmdEndQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5333 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5334 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5335 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5336 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5337 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5338 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5339 | } | 
|  | 5340 |  | 
|  | 5341 | @threadSafety("app") | 
|  | 5342 | cmd void vkCmdResetQueryPool( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5343 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5344 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5345 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5346 | u32                                         queryCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5347 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5348 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5349 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5350 | } | 
|  | 5351 |  | 
|  | 5352 | @threadSafety("app") | 
|  | 5353 | cmd void vkCmdWriteTimestamp( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5354 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5355 | VkPipelineStageFlagBits                     pipelineStage, | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5356 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5357 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5358 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5359 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5360 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5361 | } | 
|  | 5362 |  | 
|  | 5363 | @threadSafety("app") | 
|  | 5364 | cmd void vkCmdCopyQueryPoolResults( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5365 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5366 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5367 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5368 | u32                                         queryCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5369 | VkBuffer                                    dstBuffer, | 
|  | 5370 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5371 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5372 | VkQueryResultFlags                          flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5373 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5374 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5375 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5376 | assert(commandBufferObject.device == queryPoolObject.device) | 
|  | 5377 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5378 | } | 
|  | 5379 |  | 
|  | 5380 | cmd void vkCmdPushConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5381 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5382 | VkPipelineLayout                            layout, | 
|  | 5383 | VkShaderStageFlags                          stageFlags, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5384 | u32                                         offset, | 
|  | 5385 | u32                                         size, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5386 | const void*                                 pValues) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5387 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5388 | layoutObject := GetPipelineLayout(layout) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5389 | assert(commandBufferObject.device == layoutObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5390 | } | 
|  | 5391 |  | 
|  | 5392 | @threadSafety("app") | 
|  | 5393 | cmd void vkCmdBeginRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5394 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5395 | const VkRenderPassBeginInfo*                pRenderPassBegin, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5396 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5397 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5398 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) | 
|  | 5399 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5400 | assert(commandBufferObject.device == renderPassObject.device) | 
|  | 5401 | assert(commandBufferObject.device == framebufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5402 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5403 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5404 | } | 
|  | 5405 |  | 
|  | 5406 | cmd void vkCmdNextSubpass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5407 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5408 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5409 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5410 | } | 
|  | 5411 |  | 
|  | 5412 | @threadSafety("app") | 
|  | 5413 | cmd void vkCmdEndRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5414 | VkCommandBuffer                             commandBuffer) { | 
|  | 5415 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5416 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5417 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5418 | } | 
|  | 5419 |  | 
|  | 5420 | cmd void vkCmdExecuteCommands( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5421 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5422 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5423 | const VkCommandBuffer*                      pCommandBuffers) { | 
|  | 5424 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5425 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5426 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
|  | 5427 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5428 | secondaryCommandBuffer := commandBuffers[i] | 
|  | 5429 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) | 
|  | 5430 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5431 | } | 
|  | 5432 | } | 
|  | 5433 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5434 | @extension("VK_KHR_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5435 | cmd void vkDestroySurfaceKHR( | 
|  | 5436 | VkInstance                                  instance, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5437 | VkSurfaceKHR                                surface, | 
|  | 5438 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5439 | instanceObject := GetInstance(instance) | 
|  | 5440 | surfaceObject := GetSurface(surface) | 
|  | 5441 | assert(surfaceObject.instance == instance) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5442 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5443 | State.Surfaces[surface] = null | 
| Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5444 | } | 
|  | 5445 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5446 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5447 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5448 | VkPhysicalDevice                            physicalDevice, | 
|  | 5449 | u32                                         queueFamilyIndex, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5450 | VkSurfaceKHR                                surface, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5451 | VkBool32*                                   pSupported) { | 
|  | 5452 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5453 |  | 
|  | 5454 | return ? | 
|  | 5455 | } | 
|  | 5456 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5457 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5458 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( | 
|  | 5459 | VkPhysicalDevice                            physicalDevice, | 
|  | 5460 | VkSurfaceKHR                                surface, | 
|  | 5461 | VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities) { | 
|  | 5462 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5463 |  | 
|  | 5464 | surfaceCapabilities := ? | 
|  | 5465 | pSurfaceCapabilities[0] = surfaceCapabilities | 
|  | 5466 |  | 
|  | 5467 | return ? | 
|  | 5468 | } | 
|  | 5469 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5470 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5471 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( | 
|  | 5472 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5473 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5474 | u32*                                        pSurfaceFormatCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5475 | VkSurfaceFormatKHR*                         pSurfaceFormats) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5476 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5477 |  | 
|  | 5478 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5479 | pSurfaceFormatCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5480 | surfaceFormats := pSurfaceFormats[0:count] | 
|  | 5481 |  | 
|  | 5482 | for i in (0 .. count) { | 
|  | 5483 | surfaceFormat := ? | 
|  | 5484 | surfaceFormats[i] = surfaceFormat | 
|  | 5485 | } | 
|  | 5486 |  | 
|  | 5487 | return ? | 
|  | 5488 | } | 
|  | 5489 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5490 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5491 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( | 
|  | 5492 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5493 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5494 | u32*                                        pPresentModeCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5495 | VkPresentModeKHR*                           pPresentModes) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5496 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5497 |  | 
|  | 5498 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5499 | pPresentModeCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5500 | presentModes := pPresentModes[0:count] | 
|  | 5501 |  | 
|  | 5502 | for i in (0 .. count) { | 
|  | 5503 | presentMode := ? | 
|  | 5504 | presentModes[i] = presentMode | 
|  | 5505 | } | 
|  | 5506 |  | 
|  | 5507 | return ? | 
|  | 5508 | } | 
|  | 5509 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5510 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5511 | cmd VkResult vkCreateSwapchainKHR( | 
|  | 5512 | VkDevice                                 device, | 
|  | 5513 | const VkSwapchainCreateInfoKHR*          pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5514 | const VkAllocationCallbacks*             pAllocator, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5515 | VkSwapchainKHR*                          pSwapchain) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5516 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5517 | deviceObject := GetDevice(device) | 
|  | 5518 |  | 
|  | 5519 | swapchain := ? | 
|  | 5520 | pSwapchain[0] = swapchain | 
|  | 5521 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) | 
|  | 5522 |  | 
|  | 5523 | return ? | 
|  | 5524 | } | 
|  | 5525 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5526 | @extension("VK_KHR_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5527 | cmd void vkDestroySwapchainKHR( | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5528 | VkDevice                                 device, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5529 | VkSwapchainKHR                           swapchain, | 
|  | 5530 | const VkAllocationCallbacks*             pAllocator) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5531 | deviceObject := GetDevice(device) | 
|  | 5532 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5533 | assert(swapchainObject.device == device) | 
|  | 5534 |  | 
|  | 5535 | State.Swapchains[swapchain] = null | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5536 | } | 
|  | 5537 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5538 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5539 | cmd VkResult vkGetSwapchainImagesKHR( | 
|  | 5540 | VkDevice                                 device, | 
|  | 5541 | VkSwapchainKHR                           swapchain, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5542 | u32*                                     pSwapchainImageCount, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5543 | VkImage*                                 pSwapchainImages) { | 
|  | 5544 | deviceObject := GetDevice(device) | 
|  | 5545 |  | 
|  | 5546 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5547 | pSwapchainImageCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5548 | swapchainImages := pSwapchainImages[0:count] | 
|  | 5549 |  | 
|  | 5550 | for i in (0 .. count) { | 
|  | 5551 | swapchainImage := ? | 
|  | 5552 | swapchainImages[i] = swapchainImage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5553 | State.Images[swapchainImage] = new!ImageObject(device: device) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5554 | } | 
|  | 5555 |  | 
|  | 5556 | return ? | 
|  | 5557 | } | 
|  | 5558 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5559 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5560 | cmd VkResult vkAcquireNextImageKHR( | 
|  | 5561 | VkDevice                                 device, | 
|  | 5562 | VkSwapchainKHR                           swapchain, | 
|  | 5563 | u64                                      timeout, | 
|  | 5564 | VkSemaphore                              semaphore, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5565 | VkFence                                  fence, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5566 | u32*                                     pImageIndex) { | 
|  | 5567 | deviceObject := GetDevice(device) | 
|  | 5568 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5569 |  | 
|  | 5570 | imageIndex := ? | 
|  | 5571 | pImageIndex[0] = imageIndex | 
|  | 5572 |  | 
|  | 5573 | return ? | 
|  | 5574 | } | 
|  | 5575 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5576 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5577 | cmd VkResult vkQueuePresentKHR( | 
|  | 5578 | VkQueue                                  queue, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5579 | const VkPresentInfoKHR*                  pPresentInfo) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5580 | queueObject := GetQueue(queue) | 
|  | 5581 |  | 
|  | 5582 | presentInfo := ? | 
|  | 5583 | pPresentInfo[0] = presentInfo | 
|  | 5584 |  | 
|  | 5585 | return ? | 
|  | 5586 | } | 
|  | 5587 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5588 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5589 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( | 
|  | 5590 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5591 | u32*                                    pPropertyCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5592 | VkDisplayPropertiesKHR*                 pProperties) { | 
|  | 5593 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5594 | return ? | 
|  | 5595 | } | 
|  | 5596 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5597 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5598 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( | 
|  | 5599 | VkPhysicalDevice                        physicalDevice, | 
|  | 5600 | u32*                                    pPropertyCount, | 
|  | 5601 | VkDisplayPlanePropertiesKHR*            pProperties) { | 
|  | 5602 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5603 | return ? | 
|  | 5604 | } | 
|  | 5605 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5606 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5607 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( | 
|  | 5608 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5609 | u32                                     planeIndex, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5610 | u32*                                    pDisplayCount, | 
|  | 5611 | VkDisplayKHR*                           pDisplays) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5612 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5613 | return ? | 
|  | 5614 | } | 
|  | 5615 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5616 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5617 | cmd VkResult vkGetDisplayModePropertiesKHR( | 
|  | 5618 | VkPhysicalDevice                        physicalDevice, | 
|  | 5619 | VkDisplayKHR                            display, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5620 | u32*                                    pPropertyCount, | 
|  | 5621 | VkDisplayModePropertiesKHR*             pProperties) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5622 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5623 | return ? | 
|  | 5624 | } | 
|  | 5625 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5626 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5627 | cmd VkResult vkCreateDisplayModeKHR( | 
|  | 5628 | VkPhysicalDevice                        physicalDevice, | 
|  | 5629 | VkDisplayKHR                            display, | 
|  | 5630 | const VkDisplayModeCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5631 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5632 | VkDisplayModeKHR*                       pMode) { | 
|  | 5633 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5634 | return ? | 
|  | 5635 | } | 
|  | 5636 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5637 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5638 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5639 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5640 | VkDisplayModeKHR                        mode, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5641 | u32                                     planeIndex, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5642 | VkDisplayPlaneCapabilitiesKHR*          pCapabilities) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5643 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5644 | return ? | 
|  | 5645 | } | 
|  | 5646 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5647 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5648 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( | 
|  | 5649 | VkInstance                              instance, | 
|  | 5650 | const VkDisplaySurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5651 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5652 | VkSurfaceKHR*                           pSurface) { | 
|  | 5653 | return ? | 
|  | 5654 | } | 
|  | 5655 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5656 | @extension("VK_KHR_display_swapchain") | 
|  | 5657 | cmd VkResult vkCreateSharedSwapchainsKHR( | 
|  | 5658 | VkDevice                                device, | 
|  | 5659 | u32                                     swapchainCount, | 
|  | 5660 | const VkSwapchainCreateInfoKHR*         pCreateInfos, | 
|  | 5661 | const VkAllocationCallbacks*            pAllocator, | 
|  | 5662 | VkSwapchainKHR*                         pSwapchains) { | 
|  | 5663 | return ? | 
|  | 5664 | } | 
|  | 5665 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5666 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5667 | cmd VkResult vkCreateXlibSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5668 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5669 | const VkXlibSurfaceCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5670 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5671 | VkSurfaceKHR*                           pSurface) { | 
|  | 5672 | instanceObject := GetInstance(instance) | 
|  | 5673 | return ? | 
|  | 5674 | } | 
|  | 5675 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5676 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5677 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( | 
|  | 5678 | VkPhysicalDevice                        physicalDevice, | 
|  | 5679 | u32                                     queueFamilyIndex, | 
|  | 5680 | platform.Display*                       dpy, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5681 | platform.VisualID                       visualID) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5682 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5683 | return ? | 
|  | 5684 | } | 
|  | 5685 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5686 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5687 | cmd VkResult vkCreateXcbSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5688 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5689 | const VkXcbSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5690 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5691 | VkSurfaceKHR*                           pSurface) { | 
|  | 5692 | instanceObject := GetInstance(instance) | 
|  | 5693 | return ? | 
|  | 5694 | } | 
|  | 5695 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5696 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5697 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( | 
|  | 5698 | VkPhysicalDevice                        physicalDevice, | 
|  | 5699 | u32                                     queueFamilyIndex, | 
|  | 5700 | platform.xcb_connection_t*              connection, | 
|  | 5701 | platform.xcb_visualid_t                 visual_id) { | 
|  | 5702 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5703 | return ? | 
|  | 5704 | } | 
|  | 5705 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5706 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5707 | cmd VkResult vkCreateWaylandSurfaceKHR( | 
|  | 5708 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5709 | const VkWaylandSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5710 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5711 | VkSurfaceKHR*                           pSurface) { | 
|  | 5712 | instanceObject := GetInstance(instance) | 
|  | 5713 | return ? | 
|  | 5714 | } | 
|  | 5715 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5716 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5717 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( | 
|  | 5718 | VkPhysicalDevice                        physicalDevice, | 
|  | 5719 | u32                                     queueFamilyIndex, | 
|  | 5720 | platform.wl_display*                    display) { | 
|  | 5721 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5722 | return ? | 
|  | 5723 | } | 
|  | 5724 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5725 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5726 | cmd VkResult vkCreateMirSurfaceKHR( | 
|  | 5727 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5728 | const VkMirSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5729 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5730 | VkSurfaceKHR*                           pSurface) { | 
|  | 5731 | instanceObject := GetInstance(instance) | 
|  | 5732 | return ? | 
|  | 5733 | } | 
|  | 5734 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5735 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5736 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( | 
|  | 5737 | VkPhysicalDevice                        physicalDevice, | 
|  | 5738 | u32                                     queueFamilyIndex, | 
|  | 5739 | platform.MirConnection*                 connection) { | 
|  | 5740 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5741 | return ? | 
|  | 5742 | } | 
|  | 5743 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5744 | @extension("VK_KHR_android_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5745 | cmd VkResult vkCreateAndroidSurfaceKHR( | 
|  | 5746 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5747 | const VkAndroidSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5748 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5749 | VkSurfaceKHR*                           pSurface) { | 
|  | 5750 | instanceObject := GetInstance(instance) | 
|  | 5751 | return ? | 
|  | 5752 | } | 
|  | 5753 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5754 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5755 | cmd VkResult vkCreateWin32SurfaceKHR( | 
|  | 5756 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5757 | const VkWin32SurfaceCreateInfoKHR*      pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5758 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5759 | VkSurfaceKHR*                           pSurface) { | 
|  | 5760 | instanceObject := GetInstance(instance) | 
|  | 5761 | return ? | 
|  | 5762 | } | 
|  | 5763 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5764 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5765 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( | 
|  | 5766 | VkPhysicalDevice                        physicalDevice, | 
|  | 5767 | u32                                     queueFamilyIndex) { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5768 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5769 | return ? | 
|  | 5770 | } | 
|  | 5771 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5772 | @extension("VK_ANDROID_native_buffer") | 
|  | 5773 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( | 
|  | 5774 | VkDevice                                device, | 
|  | 5775 | VkFormat                                format, | 
|  | 5776 | VkImageUsageFlags                       imageUsage, | 
|  | 5777 | int*                                    grallocUsage) { | 
|  | 5778 | return ? | 
|  | 5779 | } | 
|  | 5780 |  | 
|  | 5781 | @extension("VK_ANDROID_native_buffer") | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 5782 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( | 
|  | 5783 | VkDevice                                device, | 
|  | 5784 | VkFormat                                format, | 
|  | 5785 | VkImageUsageFlags                       imageUsage, | 
|  | 5786 | VkSwapchainImageUsageFlagsANDROID       swapchainImageUsage, | 
|  | 5787 | int*                                    grallocUsage) { | 
|  | 5788 | return ? | 
|  | 5789 | } | 
|  | 5790 |  | 
|  | 5791 | @extension("VK_ANDROID_native_buffer") | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5792 | cmd VkResult vkAcquireImageANDROID( | 
|  | 5793 | VkDevice                                device, | 
|  | 5794 | VkImage                                 image, | 
|  | 5795 | int                                     nativeFenceFd, | 
|  | 5796 | VkSemaphore                             semaphore, | 
|  | 5797 | VkFence                                 fence) { | 
|  | 5798 | return ? | 
|  | 5799 | } | 
|  | 5800 |  | 
|  | 5801 | @extension("VK_ANDROID_native_buffer") | 
|  | 5802 | cmd VkResult vkQueueSignalReleaseImageANDROID( | 
|  | 5803 | VkQueue                                 queue, | 
|  | 5804 | u32                                     waitSemaphoreCount, | 
|  | 5805 | const VkSemaphore*                      pWaitSemaphores, | 
|  | 5806 | VkImage                                 image, | 
|  | 5807 | int*                                    pNativeFenceFd) { | 
|  | 5808 | return ? | 
|  | 5809 | } | 
|  | 5810 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5811 | @extension("VK_EXT_debug_report") | 
|  | 5812 | @external type void* PFN_vkDebugReportCallbackEXT | 
|  | 5813 | @extension("VK_EXT_debug_report") | 
|  | 5814 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( | 
|  | 5815 | VkDebugReportFlagsEXT                   flags, | 
|  | 5816 | VkDebugReportObjectTypeEXT              objectType, | 
|  | 5817 | u64                                     object, | 
|  | 5818 | platform.size_t                         location, | 
|  | 5819 | s32                                     messageCode, | 
|  | 5820 | const char*                             pLayerPrefix, | 
|  | 5821 | const char*                             pMessage, | 
|  | 5822 | void*                                   pUserData) { | 
|  | 5823 | return ? | 
|  | 5824 | } | 
|  | 5825 |  | 
|  | 5826 | @extension("VK_EXT_debug_report") | 
|  | 5827 | cmd VkResult vkCreateDebugReportCallbackEXT( | 
|  | 5828 | VkInstance                                  instance, | 
|  | 5829 | const VkDebugReportCallbackCreateInfoEXT*   pCreateInfo, | 
|  | 5830 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5831 | VkDebugReportCallbackEXT*                   pCallback) { | 
|  | 5832 | return ? | 
|  | 5833 | } | 
|  | 5834 |  | 
|  | 5835 | @extension("VK_EXT_debug_report") | 
|  | 5836 | cmd void vkDestroyDebugReportCallbackEXT( | 
|  | 5837 | VkInstance                                  instance, | 
|  | 5838 | VkDebugReportCallbackEXT                    callback, | 
|  | 5839 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5840 | } | 
|  | 5841 |  | 
|  | 5842 | @extension("VK_EXT_debug_report") | 
|  | 5843 | cmd void vkDebugReportMessageEXT( | 
|  | 5844 | VkInstance                                  instance, | 
|  | 5845 | VkDebugReportFlagsEXT                       flags, | 
|  | 5846 | VkDebugReportObjectTypeEXT                  objectType, | 
|  | 5847 | u64                                         object, | 
|  | 5848 | platform.size_t                             location, | 
|  | 5849 | s32                                         messageCode, | 
|  | 5850 | const char*                                 pLayerPrefix, | 
|  | 5851 | const char*                                 pMessage) { | 
|  | 5852 | } | 
|  | 5853 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5854 | @extension("VK_EXT_debug_marker") | 
|  | 5855 | cmd VkResult vkDebugMarkerSetObjectTagEXT( | 
|  | 5856 | VkDevice                                    device, | 
|  | 5857 | VkDebugMarkerObjectTagInfoEXT*              pTagInfo) { | 
|  | 5858 | return ? | 
|  | 5859 | } | 
|  | 5860 |  | 
|  | 5861 | @extension("VK_EXT_debug_marker") | 
|  | 5862 | cmd VkResult vkDebugMarkerSetObjectNameEXT( | 
|  | 5863 | VkDevice                                    device, | 
|  | 5864 | VkDebugMarkerObjectNameInfoEXT*             pNameInfo) { | 
|  | 5865 | return ? | 
|  | 5866 | } | 
|  | 5867 |  | 
|  | 5868 | @extension("VK_EXT_debug_marker") | 
|  | 5869 | cmd void vkCmdDebugMarkerBeginEXT( | 
|  | 5870 | VkCommandBuffer                             commandBuffer, | 
|  | 5871 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5872 | } | 
|  | 5873 |  | 
|  | 5874 | @extension("VK_EXT_debug_marker") | 
|  | 5875 | cmd void vkCmdDebugMarkerEndEXT( | 
|  | 5876 | VkCommandBuffer                             commandBuffer) { | 
|  | 5877 | } | 
|  | 5878 |  | 
|  | 5879 | @extension("VK_EXT_debug_marker") | 
|  | 5880 | cmd void vkCmdDebugMarkerInsertEXT( | 
|  | 5881 | VkCommandBuffer                             commandBuffer, | 
|  | 5882 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5883 | } | 
|  | 5884 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 5885 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5886 | cmd void vkGetPhysicalDeviceFeatures2KHR( | 
|  | 5887 | VkPhysicalDevice                            physicalDevice, | 
|  | 5888 | VkPhysicalDeviceFeatures2KHR*               pFeatures) { | 
|  | 5889 | } | 
|  | 5890 |  | 
|  | 5891 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5892 | cmd void vkGetPhysicalDeviceProperties2KHR( | 
|  | 5893 | VkPhysicalDevice                            physicalDevice, | 
|  | 5894 | VkPhysicalDeviceProperties2KHR*             pProperties) { | 
|  | 5895 | } | 
|  | 5896 |  | 
|  | 5897 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5898 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( | 
|  | 5899 | VkPhysicalDevice                            physicalDevice, | 
|  | 5900 | VkFormat                                    format, | 
|  | 5901 | VkFormatProperties2KHR*                     pFormatProperties) { | 
|  | 5902 | } | 
|  | 5903 |  | 
|  | 5904 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5905 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( | 
|  | 5906 | VkPhysicalDevice                            physicalDevice, | 
|  | 5907 | const VkPhysicalDeviceImageFormatInfo2KHR*  pImageFormatInfo, | 
|  | 5908 | VkImageFormatProperties2KHR*                pImageFormatProperties) { | 
|  | 5909 | return ? | 
|  | 5910 | } | 
|  | 5911 |  | 
|  | 5912 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5913 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( | 
|  | 5914 | VkPhysicalDevice                            physicalDevice, | 
|  | 5915 | u32*                                        pQueueFamilyPropertyCount, | 
|  | 5916 | VkQueueFamilyProperties2KHR*                pQueueFamilyProperties) { | 
|  | 5917 | } | 
|  | 5918 |  | 
|  | 5919 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5920 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( | 
|  | 5921 | VkPhysicalDevice                            physicalDevice, | 
|  | 5922 | VkPhysicalDeviceMemoryProperties2KHR*       pMemoryProperties) { | 
|  | 5923 | } | 
|  | 5924 |  | 
|  | 5925 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5926 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( | 
|  | 5927 | VkPhysicalDevice                            physicalDevice, | 
|  | 5928 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, | 
|  | 5929 | u32*                                        pPropertyCount, | 
|  | 5930 | VkSparseImageFormatProperties2KHR*          pProperties) { | 
|  | 5931 | } | 
|  | 5932 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 5933 | @extension("VK_AMD_draw_indirect_count") | 
|  | 5934 | cmd void vkCmdDrawIndirectCountAMD( | 
|  | 5935 | VkCommandBuffer                             commandBuffer, | 
|  | 5936 | VkBuffer                                    buffer, | 
|  | 5937 | VkDeviceSize                                offset, | 
|  | 5938 | VkBuffer                                    countBuffer, | 
|  | 5939 | VkDeviceSize                                countBufferOffset, | 
|  | 5940 | u32                                         maxDrawCount, | 
|  | 5941 | u32                                         stride) { | 
|  | 5942 | } | 
|  | 5943 |  | 
|  | 5944 | @extension("VK_AMD_draw_indirect_count") | 
|  | 5945 | cmd void vkCmdDrawIndexedIndirectCountAMD( | 
|  | 5946 | VkCommandBuffer                             commandBuffer, | 
|  | 5947 | VkBuffer                                    buffer, | 
|  | 5948 | VkDeviceSize                                offset, | 
|  | 5949 | VkBuffer                                    countBuffer, | 
|  | 5950 | VkDeviceSize                                countBufferOffset, | 
|  | 5951 | u32                                         maxDrawCount, | 
|  | 5952 | u32                                         stride) { | 
|  | 5953 | } | 
|  | 5954 |  | 
|  | 5955 | @extension("VK_NV_external_memory_capabilities") | 
|  | 5956 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( | 
|  | 5957 | VkPhysicalDevice                            physicalDevice, | 
|  | 5958 | VkFormat                                    format, | 
|  | 5959 | VkImageType                                 type, | 
|  | 5960 | VkImageTiling                               tiling, | 
|  | 5961 | VkImageUsageFlags                           usage, | 
|  | 5962 | VkImageCreateFlags                          flags, | 
|  | 5963 | VkExternalMemoryHandleTypeFlagsNV           externalHandleType, | 
|  | 5964 | VkExternalImageFormatPropertiesNV*          pExternalImageFormatProperties) { | 
|  | 5965 | return ? | 
|  | 5966 | } | 
|  | 5967 |  | 
|  | 5968 | @extension("VK_NV_external_memory_win32") | 
|  | 5969 | cmd VkResult vkGetMemoryWin32HandleNV( | 
|  | 5970 | VkDevice                                    device, | 
|  | 5971 | VkDeviceMemory                              memory, | 
|  | 5972 | VkExternalMemoryHandleTypeFlagsNV           handleType, | 
|  | 5973 | platform.HANDLE*                            pHandle) { | 
|  | 5974 | return ? | 
|  | 5975 | } | 
|  | 5976 |  | 
|  | 5977 | @extension("VK_NV_external_memory_win32") | 
|  | 5978 | cmd void  vkCmdProcessCommandsNVX( | 
|  | 5979 | VkCommandBuffer                             commandBuffer, | 
|  | 5980 | const VkCmdProcessCommandsInfoNVX*          pProcessCommandsInfo) { | 
|  | 5981 | } | 
|  | 5982 |  | 
|  | 5983 | @extension("VK_NV_external_memory_win32") | 
|  | 5984 | cmd void  vkCmdReserveSpaceForCommandsNVX( | 
|  | 5985 | VkCommandBuffer                             commandBuffer, | 
|  | 5986 | const VkCmdReserveSpaceForCommandsInfoNVX*  pReserveSpaceInfo) { | 
|  | 5987 | } | 
|  | 5988 |  | 
|  | 5989 | @extension("VK_NV_external_memory_win32") | 
|  | 5990 | cmd VkResult  vkCreateIndirectCommandsLayoutNVX( | 
|  | 5991 | VkDevice                                    device, | 
|  | 5992 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, | 
|  | 5993 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5994 | VkIndirectCommandsLayoutNVX*                pIndirectCommandsLayout) { | 
|  | 5995 | return ? | 
|  | 5996 | } | 
|  | 5997 |  | 
|  | 5998 | @extension("VK_NV_external_memory_win32") | 
|  | 5999 | cmd void  vkDestroyIndirectCommandsLayoutNVX( | 
|  | 6000 | VkDevice                                    device, | 
|  | 6001 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout, | 
|  | 6002 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 6003 | } | 
|  | 6004 |  | 
|  | 6005 | @extension("VK_NV_external_memory_win32") | 
|  | 6006 | cmd VkResult  vkCreateObjectTableNVX( | 
|  | 6007 | VkDevice                                    device, | 
|  | 6008 | const VkObjectTableCreateInfoNVX*           pCreateInfo, | 
|  | 6009 | const VkAllocationCallbacks*                pAllocator, | 
|  | 6010 | VkObjectTableNVX*                           pObjectTable) { | 
|  | 6011 | return ? | 
|  | 6012 | } | 
|  | 6013 |  | 
|  | 6014 | @extension("VK_NV_external_memory_win32") | 
|  | 6015 | cmd void  vkDestroyObjectTableNVX( | 
|  | 6016 | VkDevice                                    device, | 
|  | 6017 | VkObjectTableNVX                            objectTable, | 
|  | 6018 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 6019 | } | 
|  | 6020 |  | 
|  | 6021 | @extension("VK_NV_external_memory_win32") | 
|  | 6022 | cmd VkResult  vkRegisterObjectsNVX( | 
|  | 6023 | VkDevice                                    device, | 
|  | 6024 | VkObjectTableNVX                            objectTable, | 
|  | 6025 | u32                                         objectCount, | 
|  | 6026 | const VkObjectTableEntryNVX* const*         ppObjectTableEntries, | 
|  | 6027 | const u32*                                  pObjectIndices) { | 
|  | 6028 | return ? | 
|  | 6029 | } | 
|  | 6030 |  | 
|  | 6031 | @extension("VK_NV_external_memory_win32") | 
|  | 6032 | cmd VkResult  vkUnregisterObjectsNVX( | 
|  | 6033 | VkDevice                                    device, | 
|  | 6034 | VkObjectTableNVX                            objectTable, | 
|  | 6035 | u32                                         objectCount, | 
|  | 6036 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes, | 
|  | 6037 | const u32*                                  pObjectIndices) { | 
|  | 6038 | return ? | 
|  | 6039 | } | 
|  | 6040 |  | 
|  | 6041 | @extension("VK_NV_external_memory_win32") | 
|  | 6042 | cmd void  vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( | 
|  | 6043 | VkPhysicalDevice                            physicalDevice, | 
|  | 6044 | VkDeviceGeneratedCommandsFeaturesNVX*       pFeatures, | 
|  | 6045 | VkDeviceGeneratedCommandsLimitsNVX*         pLimits) { | 
|  | 6046 | } | 
|  | 6047 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6048 |  | 
|  | 6049 | //////////////// | 
|  | 6050 | // Validation // | 
|  | 6051 | //////////////// | 
|  | 6052 |  | 
|  | 6053 | extern void validate(string layerName, bool condition, string message) | 
|  | 6054 |  | 
|  | 6055 |  | 
|  | 6056 | ///////////////////////////// | 
|  | 6057 | // Internal State Tracking // | 
|  | 6058 | ///////////////////////////// | 
|  | 6059 |  | 
|  | 6060 | StateObject State | 
|  | 6061 |  | 
|  | 6062 | @internal class StateObject { | 
|  | 6063 | // Dispatchable objects. | 
|  | 6064 | map!(VkInstance,       ref!InstanceObject)       Instances | 
|  | 6065 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices | 
|  | 6066 | map!(VkDevice,         ref!DeviceObject)         Devices | 
|  | 6067 | map!(VkQueue,          ref!QueueObject)          Queues | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6068 | map!(VkCommandBuffer,  ref!CommandBufferObject)  CommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6069 |  | 
|  | 6070 | // Non-dispatchable objects. | 
|  | 6071 | map!(VkDeviceMemory,             ref!DeviceMemoryObject)             DeviceMemories | 
|  | 6072 | map!(VkBuffer,                   ref!BufferObject)                   Buffers | 
|  | 6073 | map!(VkBufferView,               ref!BufferViewObject)               BufferViews | 
|  | 6074 | map!(VkImage,                    ref!ImageObject)                    Images | 
|  | 6075 | map!(VkImageView,                ref!ImageViewObject)                ImageViews | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6076 | map!(VkShaderModule,             ref!ShaderModuleObject)             ShaderModules | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6077 | map!(VkPipeline,                 ref!PipelineObject)                 Pipelines | 
|  | 6078 | map!(VkPipelineLayout,           ref!PipelineLayoutObject)           PipelineLayouts | 
|  | 6079 | map!(VkSampler,                  ref!SamplerObject)                  Samplers | 
|  | 6080 | map!(VkDescriptorSet,            ref!DescriptorSetObject)            DescriptorSets | 
|  | 6081 | map!(VkDescriptorSetLayout,      ref!DescriptorSetLayoutObject)      DescriptorSetLayouts | 
|  | 6082 | map!(VkDescriptorPool,           ref!DescriptorPoolObject)           DescriptorPools | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6083 | map!(VkFence,                    ref!FenceObject)                    Fences | 
|  | 6084 | map!(VkSemaphore,                ref!SemaphoreObject)                Semaphores | 
|  | 6085 | map!(VkEvent,                    ref!EventObject)                    Events | 
|  | 6086 | map!(VkQueryPool,                ref!QueryPoolObject)                QueryPools | 
|  | 6087 | map!(VkFramebuffer,              ref!FramebufferObject)              Framebuffers | 
|  | 6088 | map!(VkRenderPass,               ref!RenderPassObject)               RenderPasses | 
|  | 6089 | map!(VkPipelineCache,            ref!PipelineCacheObject)            PipelineCaches | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6090 | map!(VkCommandPool,              ref!CommandPoolObject)              CommandPools | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6091 | map!(VkSurfaceKHR,               ref!SurfaceObject)                  Surfaces | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6092 | map!(VkSwapchainKHR,             ref!SwapchainObject)                Swapchains | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6093 | } | 
|  | 6094 |  | 
|  | 6095 | @internal class InstanceObject { | 
|  | 6096 | } | 
|  | 6097 |  | 
|  | 6098 | @internal class PhysicalDeviceObject { | 
|  | 6099 | VkInstance instance | 
|  | 6100 | } | 
|  | 6101 |  | 
|  | 6102 | @internal class DeviceObject { | 
|  | 6103 | VkPhysicalDevice physicalDevice | 
|  | 6104 | } | 
|  | 6105 |  | 
|  | 6106 | @internal class QueueObject { | 
|  | 6107 | VkDevice      device | 
|  | 6108 | VkQueueFlags  flags | 
|  | 6109 | } | 
|  | 6110 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6111 | @internal class CommandBufferObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6112 | VkDevice                  device | 
|  | 6113 | map!(u64, VkDeviceMemory) boundObjects | 
|  | 6114 | VkQueueFlags              queueFlags | 
|  | 6115 | } | 
|  | 6116 |  | 
|  | 6117 | @internal class DeviceMemoryObject { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6118 | VkDevice                                device | 
|  | 6119 | VkDeviceSize                            allocationSize | 
|  | 6120 | map!(u64, VkDeviceSize)                 boundObjects | 
|  | 6121 | map!(VkCommandBuffer, VkCommandBuffer)  boundCommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6122 | } | 
|  | 6123 |  | 
|  | 6124 | @internal class BufferObject { | 
|  | 6125 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6126 | VkDeviceMemory        memory | 
|  | 6127 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6128 | } | 
|  | 6129 |  | 
|  | 6130 | @internal class BufferViewObject { | 
|  | 6131 | VkDevice      device | 
|  | 6132 | VkBuffer      buffer | 
|  | 6133 | } | 
|  | 6134 |  | 
|  | 6135 | @internal class ImageObject { | 
|  | 6136 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6137 | VkDeviceMemory        memory | 
|  | 6138 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6139 | } | 
|  | 6140 |  | 
|  | 6141 | @internal class ImageViewObject { | 
|  | 6142 | VkDevice      device | 
|  | 6143 | VkImage       image | 
|  | 6144 | } | 
|  | 6145 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6146 | @internal class ShaderObject { | 
|  | 6147 | VkDevice      device | 
|  | 6148 | } | 
|  | 6149 |  | 
|  | 6150 | @internal class ShaderModuleObject { | 
|  | 6151 | VkDevice      device | 
|  | 6152 | } | 
|  | 6153 |  | 
|  | 6154 | @internal class PipelineObject { | 
|  | 6155 | VkDevice      device | 
|  | 6156 | } | 
|  | 6157 |  | 
|  | 6158 | @internal class PipelineLayoutObject { | 
|  | 6159 | VkDevice      device | 
|  | 6160 | } | 
|  | 6161 |  | 
|  | 6162 | @internal class SamplerObject { | 
|  | 6163 | VkDevice      device | 
|  | 6164 | } | 
|  | 6165 |  | 
|  | 6166 | @internal class DescriptorSetObject { | 
|  | 6167 | VkDevice      device | 
|  | 6168 | } | 
|  | 6169 |  | 
|  | 6170 | @internal class DescriptorSetLayoutObject { | 
|  | 6171 | VkDevice      device | 
|  | 6172 | } | 
|  | 6173 |  | 
|  | 6174 | @internal class DescriptorPoolObject { | 
|  | 6175 | VkDevice      device | 
|  | 6176 | } | 
|  | 6177 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6178 | @internal class FenceObject { | 
|  | 6179 | VkDevice      device | 
|  | 6180 | bool          signaled | 
|  | 6181 | } | 
|  | 6182 |  | 
|  | 6183 | @internal class SemaphoreObject { | 
|  | 6184 | VkDevice      device | 
|  | 6185 | } | 
|  | 6186 |  | 
|  | 6187 | @internal class EventObject { | 
|  | 6188 | VkDevice      device | 
|  | 6189 | } | 
|  | 6190 |  | 
|  | 6191 | @internal class QueryPoolObject { | 
|  | 6192 | VkDevice      device | 
|  | 6193 | } | 
|  | 6194 |  | 
|  | 6195 | @internal class FramebufferObject { | 
|  | 6196 | VkDevice      device | 
|  | 6197 | } | 
|  | 6198 |  | 
|  | 6199 | @internal class RenderPassObject { | 
|  | 6200 | VkDevice      device | 
|  | 6201 | } | 
|  | 6202 |  | 
|  | 6203 | @internal class PipelineCacheObject { | 
|  | 6204 | VkDevice      device | 
|  | 6205 | } | 
|  | 6206 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6207 | @internal class CommandPoolObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6208 | VkDevice      device | 
|  | 6209 | } | 
|  | 6210 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6211 | @internal class SurfaceObject { | 
|  | 6212 | VkInstance    instance | 
|  | 6213 | } | 
|  | 6214 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6215 | @internal class SwapchainObject { | 
|  | 6216 | VkDevice      device | 
|  | 6217 | } | 
|  | 6218 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6219 | macro ref!InstanceObject GetInstance(VkInstance instance) { | 
|  | 6220 | assert(instance in State.Instances) | 
|  | 6221 | return State.Instances[instance] | 
|  | 6222 | } | 
|  | 6223 |  | 
|  | 6224 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { | 
|  | 6225 | assert(physicalDevice in State.PhysicalDevices) | 
|  | 6226 | return State.PhysicalDevices[physicalDevice] | 
|  | 6227 | } | 
|  | 6228 |  | 
|  | 6229 | macro ref!DeviceObject GetDevice(VkDevice device) { | 
|  | 6230 | assert(device in State.Devices) | 
|  | 6231 | return State.Devices[device] | 
|  | 6232 | } | 
|  | 6233 |  | 
|  | 6234 | macro ref!QueueObject GetQueue(VkQueue queue) { | 
|  | 6235 | assert(queue in State.Queues) | 
|  | 6236 | return State.Queues[queue] | 
|  | 6237 | } | 
|  | 6238 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6239 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { | 
|  | 6240 | assert(commandBuffer in State.CommandBuffers) | 
|  | 6241 | return State.CommandBuffers[commandBuffer] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6242 | } | 
|  | 6243 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6244 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { | 
|  | 6245 | assert(memory in State.DeviceMemories) | 
|  | 6246 | return State.DeviceMemories[memory] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6247 | } | 
|  | 6248 |  | 
|  | 6249 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { | 
|  | 6250 | assert(buffer in State.Buffers) | 
|  | 6251 | return State.Buffers[buffer] | 
|  | 6252 | } | 
|  | 6253 |  | 
|  | 6254 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { | 
|  | 6255 | assert(bufferView in State.BufferViews) | 
|  | 6256 | return State.BufferViews[bufferView] | 
|  | 6257 | } | 
|  | 6258 |  | 
|  | 6259 | macro ref!ImageObject GetImage(VkImage image) { | 
|  | 6260 | assert(image in State.Images) | 
|  | 6261 | return State.Images[image] | 
|  | 6262 | } | 
|  | 6263 |  | 
|  | 6264 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { | 
|  | 6265 | assert(imageView in State.ImageViews) | 
|  | 6266 | return State.ImageViews[imageView] | 
|  | 6267 | } | 
|  | 6268 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6269 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { | 
|  | 6270 | assert(shaderModule in State.ShaderModules) | 
|  | 6271 | return State.ShaderModules[shaderModule] | 
|  | 6272 | } | 
|  | 6273 |  | 
|  | 6274 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { | 
|  | 6275 | assert(pipeline in State.Pipelines) | 
|  | 6276 | return State.Pipelines[pipeline] | 
|  | 6277 | } | 
|  | 6278 |  | 
|  | 6279 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { | 
|  | 6280 | assert(pipelineLayout in State.PipelineLayouts) | 
|  | 6281 | return State.PipelineLayouts[pipelineLayout] | 
|  | 6282 | } | 
|  | 6283 |  | 
|  | 6284 | macro ref!SamplerObject GetSampler(VkSampler sampler) { | 
|  | 6285 | assert(sampler in State.Samplers) | 
|  | 6286 | return State.Samplers[sampler] | 
|  | 6287 | } | 
|  | 6288 |  | 
|  | 6289 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { | 
|  | 6290 | assert(descriptorSet in State.DescriptorSets) | 
|  | 6291 | return State.DescriptorSets[descriptorSet] | 
|  | 6292 | } | 
|  | 6293 |  | 
|  | 6294 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { | 
|  | 6295 | assert(descriptorSetLayout in State.DescriptorSetLayouts) | 
|  | 6296 | return State.DescriptorSetLayouts[descriptorSetLayout] | 
|  | 6297 | } | 
|  | 6298 |  | 
|  | 6299 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { | 
|  | 6300 | assert(descriptorPool in State.DescriptorPools) | 
|  | 6301 | return State.DescriptorPools[descriptorPool] | 
|  | 6302 | } | 
|  | 6303 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6304 | macro ref!FenceObject GetFence(VkFence fence) { | 
|  | 6305 | assert(fence in State.Fences) | 
|  | 6306 | return State.Fences[fence] | 
|  | 6307 | } | 
|  | 6308 |  | 
|  | 6309 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { | 
|  | 6310 | assert(semaphore in State.Semaphores) | 
|  | 6311 | return State.Semaphores[semaphore] | 
|  | 6312 | } | 
|  | 6313 |  | 
|  | 6314 | macro ref!EventObject GetEvent(VkEvent event) { | 
|  | 6315 | assert(event in State.Events) | 
|  | 6316 | return State.Events[event] | 
|  | 6317 | } | 
|  | 6318 |  | 
|  | 6319 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { | 
|  | 6320 | assert(queryPool in State.QueryPools) | 
|  | 6321 | return State.QueryPools[queryPool] | 
|  | 6322 | } | 
|  | 6323 |  | 
|  | 6324 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { | 
|  | 6325 | assert(framebuffer in State.Framebuffers) | 
|  | 6326 | return State.Framebuffers[framebuffer] | 
|  | 6327 | } | 
|  | 6328 |  | 
|  | 6329 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { | 
|  | 6330 | assert(renderPass in State.RenderPasses) | 
|  | 6331 | return State.RenderPasses[renderPass] | 
|  | 6332 | } | 
|  | 6333 |  | 
|  | 6334 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { | 
|  | 6335 | assert(pipelineCache in State.PipelineCaches) | 
|  | 6336 | return State.PipelineCaches[pipelineCache] | 
|  | 6337 | } | 
|  | 6338 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6339 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { | 
|  | 6340 | assert(commandPool in State.CommandPools) | 
|  | 6341 | return State.CommandPools[commandPool] | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6342 | } | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6343 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6344 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { | 
|  | 6345 | assert(surface in State.Surfaces) | 
|  | 6346 | return State.Surfaces[surface] | 
|  | 6347 | } | 
|  | 6348 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6349 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { | 
|  | 6350 | assert(swapchain in State.Swapchains) | 
|  | 6351 | return State.Swapchains[swapchain] | 
|  | 6352 | } | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6353 |  | 
|  | 6354 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { | 
|  | 6355 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) | 
|  | 6356 | } |