| 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 |  | 
| Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame] | 78 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 | 
|  | 79 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME         "VK_KHR_incremental_present" | 
|  | 80 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 81 | @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] | 82 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME             "VK_ANDROID_native_buffer" | 
|  | 83 |  | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 84 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION     1 | 
|  | 85 | @extension("VK_GOOGLE_display_timing") define VK_GOOGLE_DISPLAY_TIMING_NAME             "VK_GOOGLE_display_timing" | 
|  | 86 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 87 | @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] | 88 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME               "VK_EXT_debug_report" | 
|  | 89 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 90 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION           1 | 
|  | 91 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME                   "VK_NV_glsl_shader" | 
|  | 92 |  | 
|  | 93 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION   1 | 
|  | 94 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME           "VK_KHR_sampler_mirror_clamp_to_edge" | 
|  | 95 |  | 
|  | 96 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION       1 | 
|  | 97 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME               "VK_IMG_filter_cubic" | 
|  | 98 |  | 
|  | 99 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION   1 | 
|  | 100 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME           "VK_AMD_rasterization_order" | 
|  | 101 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 102 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 | 
|  | 103 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" | 
|  | 104 |  | 
|  | 105 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 | 
|  | 106 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" | 
|  | 107 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 108 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION       3 | 
|  | 109 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME               "VK_EXT_debug_marker" | 
|  | 110 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 111 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 | 
|  | 112 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" | 
|  | 113 |  | 
|  | 114 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 | 
|  | 115 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" | 
|  | 116 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 117 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 | 
|  | 118 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" | 
|  | 119 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 120 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 | 
|  | 121 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" | 
|  | 122 |  | 
|  | 123 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 | 
|  | 124 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" | 
|  | 125 |  | 
|  | 126 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 | 
|  | 127 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" | 
|  | 128 |  | 
|  | 129 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 | 
|  | 130 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" | 
|  | 131 |  | 
|  | 132 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 | 
|  | 133 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" | 
|  | 134 |  | 
|  | 135 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 | 
|  | 136 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" | 
|  | 137 |  | 
|  | 138 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 | 
|  | 139 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" | 
|  | 140 |  | 
|  | 141 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 | 
|  | 142 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" | 
|  | 143 |  | 
|  | 144 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 | 
|  | 145 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" | 
|  | 146 |  | 
|  | 147 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 | 
|  | 148 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" | 
|  | 149 |  | 
|  | 150 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 | 
|  | 151 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" | 
|  | 152 |  | 
| Ian Elliott | b9ccf64 | 2017-01-26 14:04:17 -0700 | [diff] [blame] | 153 | @extension("VK_KHR_swapchain_front_buffered") define VK_KHR_SWAPCHAIN_FRONT_BUFFERED_SPEC_VERSION 1 | 
| Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 154 | @extension("VK_KHR_swapchain_front_buffered") define VK_KHR_SWAPCHAIN_FRONT_BUFFERED_EXTENSION_NAME "VK_KHR_swapchain_front_buffered" | 
|  | 155 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 156 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 157 |  | 
|  | 158 | ///////////// | 
|  | 159 | //  Types  // | 
|  | 160 | ///////////// | 
|  | 161 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 162 | type u32 VkBool32 | 
|  | 163 | type u32 VkFlags | 
|  | 164 | type u64 VkDeviceSize | 
|  | 165 | type u32 VkSampleMask | 
|  | 166 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 167 | /// Dispatchable handle types. | 
|  | 168 | @dispatchHandle type u64 VkInstance | 
|  | 169 | @dispatchHandle type u64 VkPhysicalDevice | 
|  | 170 | @dispatchHandle type u64 VkDevice | 
|  | 171 | @dispatchHandle type u64 VkQueue | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 172 | @dispatchHandle type u64 VkCommandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 173 |  | 
|  | 174 | /// Non dispatchable handle types. | 
|  | 175 | @nonDispatchHandle type u64 VkDeviceMemory | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 176 | @nonDispatchHandle type u64 VkCommandPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 177 | @nonDispatchHandle type u64 VkBuffer | 
|  | 178 | @nonDispatchHandle type u64 VkBufferView | 
|  | 179 | @nonDispatchHandle type u64 VkImage | 
|  | 180 | @nonDispatchHandle type u64 VkImageView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 181 | @nonDispatchHandle type u64 VkShaderModule | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 182 | @nonDispatchHandle type u64 VkPipeline | 
|  | 183 | @nonDispatchHandle type u64 VkPipelineLayout | 
|  | 184 | @nonDispatchHandle type u64 VkSampler | 
|  | 185 | @nonDispatchHandle type u64 VkDescriptorSet | 
|  | 186 | @nonDispatchHandle type u64 VkDescriptorSetLayout | 
|  | 187 | @nonDispatchHandle type u64 VkDescriptorPool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 188 | @nonDispatchHandle type u64 VkFence | 
|  | 189 | @nonDispatchHandle type u64 VkSemaphore | 
|  | 190 | @nonDispatchHandle type u64 VkEvent | 
|  | 191 | @nonDispatchHandle type u64 VkQueryPool | 
|  | 192 | @nonDispatchHandle type u64 VkFramebuffer | 
|  | 193 | @nonDispatchHandle type u64 VkRenderPass | 
|  | 194 | @nonDispatchHandle type u64 VkPipelineCache | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 195 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 196 | @extension("VK_KHR_surface")    @nonDispatchHandle type u64 VkSurfaceKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 197 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 198 | @extension("VK_KHR_swapchain")  @nonDispatchHandle type u64 VkSwapchainKHR | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 199 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 200 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayKHR | 
|  | 201 | @extension("VK_KHR_display")    @nonDispatchHandle type u64 VkDisplayModeKHR | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 202 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 203 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT | 
|  | 204 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 205 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX | 
|  | 206 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX | 
|  | 207 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 208 |  | 
|  | 209 | ///////////// | 
|  | 210 | //  Enums  // | 
|  | 211 | ///////////// | 
|  | 212 |  | 
|  | 213 | enum VkImageLayout { | 
|  | 214 | VK_IMAGE_LAYOUT_UNDEFINED                               = 0x00000000,   /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) | 
|  | 215 | VK_IMAGE_LAYOUT_GENERAL                                 = 0x00000001,   /// General layout when image can be used for any kind of access | 
|  | 216 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL                = 0x00000002,   /// Optimal layout when image is only used for color attachment read/write | 
|  | 217 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL        = 0x00000003,   /// Optimal layout when image is only used for depth/stencil attachment read/write | 
|  | 218 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL         = 0x00000004,   /// Optimal layout when image is used for read only depth/stencil attachment and shader access | 
|  | 219 | 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] | 220 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL                    = 0x00000006,   /// Optimal layout when image is used only as source of transfer operations | 
|  | 221 | 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] | 222 | 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] | 223 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 224 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 225 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR                         = 1000001002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 226 | } | 
|  | 227 |  | 
|  | 228 | enum VkAttachmentLoadOp { | 
|  | 229 | VK_ATTACHMENT_LOAD_OP_LOAD                              = 0x00000000, | 
|  | 230 | VK_ATTACHMENT_LOAD_OP_CLEAR                             = 0x00000001, | 
|  | 231 | VK_ATTACHMENT_LOAD_OP_DONT_CARE                         = 0x00000002, | 
|  | 232 | } | 
|  | 233 |  | 
|  | 234 | enum VkAttachmentStoreOp { | 
|  | 235 | VK_ATTACHMENT_STORE_OP_STORE                            = 0x00000000, | 
|  | 236 | VK_ATTACHMENT_STORE_OP_DONT_CARE                        = 0x00000001, | 
|  | 237 | } | 
|  | 238 |  | 
|  | 239 | enum VkImageType { | 
|  | 240 | VK_IMAGE_TYPE_1D                                        = 0x00000000, | 
|  | 241 | VK_IMAGE_TYPE_2D                                        = 0x00000001, | 
|  | 242 | VK_IMAGE_TYPE_3D                                        = 0x00000002, | 
|  | 243 | } | 
|  | 244 |  | 
|  | 245 | enum VkImageTiling { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 246 | VK_IMAGE_TILING_OPTIMAL                                 = 0x00000000, | 
|  | 247 | VK_IMAGE_TILING_LINEAR                                  = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 248 | } | 
|  | 249 |  | 
|  | 250 | enum VkImageViewType { | 
|  | 251 | VK_IMAGE_VIEW_TYPE_1D                                   = 0x00000000, | 
|  | 252 | VK_IMAGE_VIEW_TYPE_2D                                   = 0x00000001, | 
|  | 253 | VK_IMAGE_VIEW_TYPE_3D                                   = 0x00000002, | 
|  | 254 | VK_IMAGE_VIEW_TYPE_CUBE                                 = 0x00000003, | 
|  | 255 | VK_IMAGE_VIEW_TYPE_1D_ARRAY                             = 0x00000004, | 
|  | 256 | VK_IMAGE_VIEW_TYPE_2D_ARRAY                             = 0x00000005, | 
|  | 257 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY                           = 0x00000006, | 
|  | 258 | } | 
|  | 259 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 260 | enum VkCommandBufferLevel { | 
|  | 261 | VK_COMMAND_BUFFER_LEVEL_PRIMARY                         = 0x00000000, | 
|  | 262 | VK_COMMAND_BUFFER_LEVEL_SECONDARY                       = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 263 | } | 
|  | 264 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 265 | enum VkComponentSwizzle { | 
|  | 266 | VK_COMPONENT_SWIZZLE_IDENTITY                           = 0x00000000, | 
|  | 267 | VK_COMPONENT_SWIZZLE_ZERO                               = 0x00000001, | 
|  | 268 | VK_COMPONENT_SWIZZLE_ONE                                = 0x00000002, | 
|  | 269 | VK_COMPONENT_SWIZZLE_R                                  = 0x00000003, | 
|  | 270 | VK_COMPONENT_SWIZZLE_G                                  = 0x00000004, | 
|  | 271 | VK_COMPONENT_SWIZZLE_B                                  = 0x00000005, | 
|  | 272 | VK_COMPONENT_SWIZZLE_A                                  = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 273 | } | 
|  | 274 |  | 
|  | 275 | enum VkDescriptorType { | 
|  | 276 | VK_DESCRIPTOR_TYPE_SAMPLER                              = 0x00000000, | 
|  | 277 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER               = 0x00000001, | 
|  | 278 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE                        = 0x00000002, | 
|  | 279 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE                        = 0x00000003, | 
|  | 280 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER                 = 0x00000004, | 
|  | 281 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER                 = 0x00000005, | 
|  | 282 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER                       = 0x00000006, | 
|  | 283 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER                       = 0x00000007, | 
|  | 284 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC               = 0x00000008, | 
|  | 285 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC               = 0x00000009, | 
|  | 286 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT                     = 0x0000000a, | 
|  | 287 | } | 
|  | 288 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 289 | enum VkQueryType { | 
|  | 290 | VK_QUERY_TYPE_OCCLUSION                                 = 0x00000000, | 
|  | 291 | VK_QUERY_TYPE_PIPELINE_STATISTICS                       = 0x00000001, /// Optional | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 292 | VK_QUERY_TYPE_TIMESTAMP                                 = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 293 | } | 
|  | 294 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 295 | enum VkBorderColor { | 
|  | 296 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK                 = 0x00000000, | 
|  | 297 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK                   = 0x00000001, | 
|  | 298 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK                      = 0x00000002, | 
|  | 299 | VK_BORDER_COLOR_INT_OPAQUE_BLACK                        = 0x00000003, | 
|  | 300 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE                      = 0x00000004, | 
|  | 301 | VK_BORDER_COLOR_INT_OPAQUE_WHITE                        = 0x00000005, | 
|  | 302 | } | 
|  | 303 |  | 
|  | 304 | enum VkPipelineBindPoint { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 305 | VK_PIPELINE_BIND_POINT_GRAPHICS                         = 0x00000000, | 
|  | 306 | VK_PIPELINE_BIND_POINT_COMPUTE                          = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 307 | } | 
|  | 308 |  | 
|  | 309 | enum VkPrimitiveTopology { | 
|  | 310 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST                        = 0x00000000, | 
|  | 311 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST                         = 0x00000001, | 
|  | 312 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP                        = 0x00000002, | 
|  | 313 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST                     = 0x00000003, | 
|  | 314 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP                    = 0x00000004, | 
|  | 315 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN                      = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 316 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY          = 0x00000006, | 
|  | 317 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY         = 0x00000007, | 
|  | 318 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY      = 0x00000008, | 
|  | 319 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY     = 0x00000009, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 320 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST                        = 0x0000000a, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 321 | } | 
|  | 322 |  | 
|  | 323 | enum VkSharingMode { | 
|  | 324 | VK_SHARING_MODE_EXCLUSIVE                               = 0x00000000, | 
|  | 325 | VK_SHARING_MODE_CONCURRENT                              = 0x00000001, | 
|  | 326 | } | 
|  | 327 |  | 
|  | 328 | enum VkIndexType { | 
|  | 329 | VK_INDEX_TYPE_UINT16                                    = 0x00000000, | 
|  | 330 | VK_INDEX_TYPE_UINT32                                    = 0x00000001, | 
|  | 331 | } | 
|  | 332 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 333 | enum VkFilter { | 
|  | 334 | VK_FILTER_NEAREST                                       = 0x00000000, | 
|  | 335 | VK_FILTER_LINEAR                                        = 0x00000001, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 336 |  | 
|  | 337 | //@extension("VK_IMG_filter_cubic") | 
|  | 338 | VK_FILTER_CUBIC_IMG                                     = 1000015000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 339 | } | 
|  | 340 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 341 | enum VkSamplerMipmapMode { | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 342 | VK_SAMPLER_MIPMAP_MODE_NEAREST                          = 0x00000001,   /// Choose nearest mip level | 
|  | 343 | VK_SAMPLER_MIPMAP_MODE_LINEAR                           = 0x00000002,   /// Linear filter between mip levels | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 344 | } | 
|  | 345 |  | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 346 | enum VkSamplerAddressMode { | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 347 | VK_SAMPLER_ADDRESS_MODE_REPEAT                          = 0x00000000, | 
|  | 348 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT                 = 0x00000001, | 
|  | 349 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE                   = 0x00000002, | 
|  | 350 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER                 = 0x00000003, | 
|  | 351 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 352 | } | 
|  | 353 |  | 
|  | 354 | enum VkCompareOp { | 
|  | 355 | VK_COMPARE_OP_NEVER                                     = 0x00000000, | 
|  | 356 | VK_COMPARE_OP_LESS                                      = 0x00000001, | 
|  | 357 | VK_COMPARE_OP_EQUAL                                     = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 358 | VK_COMPARE_OP_LESS_OR_EQUAL                             = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 359 | VK_COMPARE_OP_GREATER                                   = 0x00000004, | 
|  | 360 | VK_COMPARE_OP_NOT_EQUAL                                 = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 361 | VK_COMPARE_OP_GREATER_OR_EQUAL                          = 0x00000006, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 362 | VK_COMPARE_OP_ALWAYS                                    = 0x00000007, | 
|  | 363 | } | 
|  | 364 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 365 | enum VkPolygonMode { | 
|  | 366 | VK_POLYGON_MODE_FILL                                    = 0x00000000, | 
|  | 367 | VK_POLYGON_MODE_LINE                                    = 0x00000001, | 
|  | 368 | VK_POLYGON_MODE_POINT                                   = 0x00000002, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 369 | } | 
|  | 370 |  | 
|  | 371 | enum VkFrontFace { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 372 | VK_FRONT_FACE_COUNTER_CLOCKWISE                         = 0x00000000, | 
|  | 373 | VK_FRONT_FACE_CLOCKWISE                                 = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 374 | } | 
|  | 375 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 376 | enum VkBlendFactor { | 
|  | 377 | VK_BLEND_FACTOR_ZERO                                    = 0x00000000, | 
|  | 378 | VK_BLEND_FACTOR_ONE                                     = 0x00000001, | 
|  | 379 | VK_BLEND_FACTOR_SRC_COLOR                               = 0x00000002, | 
|  | 380 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR                     = 0x00000003, | 
|  | 381 | VK_BLEND_FACTOR_DST_COLOR                               = 0x00000004, | 
|  | 382 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR                     = 0x00000005, | 
|  | 383 | VK_BLEND_FACTOR_SRC_ALPHA                               = 0x00000006, | 
|  | 384 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA                     = 0x00000007, | 
|  | 385 | VK_BLEND_FACTOR_DST_ALPHA                               = 0x00000008, | 
|  | 386 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA                     = 0x00000009, | 
|  | 387 | VK_BLEND_FACTOR_CONSTANT_COLOR                          = 0x0000000a, | 
|  | 388 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR                = 0x0000000b, | 
|  | 389 | VK_BLEND_FACTOR_CONSTANT_ALPHA                          = 0x0000000c, | 
|  | 390 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA                = 0x0000000d, | 
|  | 391 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE                      = 0x0000000e, | 
|  | 392 | VK_BLEND_FACTOR_SRC1_COLOR                              = 0x0000000f, | 
|  | 393 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR                    = 0x00000010, | 
|  | 394 | VK_BLEND_FACTOR_SRC1_ALPHA                              = 0x00000011, | 
|  | 395 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA                    = 0x00000012, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 396 | } | 
|  | 397 |  | 
|  | 398 | enum VkBlendOp { | 
|  | 399 | VK_BLEND_OP_ADD                                         = 0x00000000, | 
|  | 400 | VK_BLEND_OP_SUBTRACT                                    = 0x00000001, | 
|  | 401 | VK_BLEND_OP_REVERSE_SUBTRACT                            = 0x00000002, | 
|  | 402 | VK_BLEND_OP_MIN                                         = 0x00000003, | 
|  | 403 | VK_BLEND_OP_MAX                                         = 0x00000004, | 
|  | 404 | } | 
|  | 405 |  | 
|  | 406 | enum VkStencilOp { | 
|  | 407 | VK_STENCIL_OP_KEEP                                      = 0x00000000, | 
|  | 408 | VK_STENCIL_OP_ZERO                                      = 0x00000001, | 
|  | 409 | VK_STENCIL_OP_REPLACE                                   = 0x00000002, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 410 | VK_STENCIL_OP_INCREMENT_AND_CLAMP                       = 0x00000003, | 
|  | 411 | VK_STENCIL_OP_DECREMENT_AND_CLAMP                       = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 412 | VK_STENCIL_OP_INVERT                                    = 0x00000005, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 413 | VK_STENCIL_OP_INCREMENT_AND_WRAP                        = 0x00000006, | 
|  | 414 | VK_STENCIL_OP_DECREMENT_AND_WRAP                        = 0x00000007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 415 | } | 
|  | 416 |  | 
|  | 417 | enum VkLogicOp { | 
|  | 418 | VK_LOGIC_OP_CLEAR                                       = 0x00000000, | 
|  | 419 | VK_LOGIC_OP_AND                                         = 0x00000001, | 
|  | 420 | VK_LOGIC_OP_AND_REVERSE                                 = 0x00000002, | 
|  | 421 | VK_LOGIC_OP_COPY                                        = 0x00000003, | 
|  | 422 | VK_LOGIC_OP_AND_INVERTED                                = 0x00000004, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 423 | VK_LOGIC_OP_NO_OP                                       = 0x00000005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 424 | VK_LOGIC_OP_XOR                                         = 0x00000006, | 
|  | 425 | VK_LOGIC_OP_OR                                          = 0x00000007, | 
|  | 426 | VK_LOGIC_OP_NOR                                         = 0x00000008, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 427 | VK_LOGIC_OP_EQUIVALENT                                  = 0x00000009, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 428 | VK_LOGIC_OP_INVERT                                      = 0x0000000a, | 
|  | 429 | VK_LOGIC_OP_OR_REVERSE                                  = 0x0000000b, | 
|  | 430 | VK_LOGIC_OP_COPY_INVERTED                               = 0x0000000c, | 
|  | 431 | VK_LOGIC_OP_OR_INVERTED                                 = 0x0000000d, | 
|  | 432 | VK_LOGIC_OP_NAND                                        = 0x0000000e, | 
|  | 433 | VK_LOGIC_OP_SET                                         = 0x0000000f, | 
|  | 434 | } | 
|  | 435 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 436 | enum VkSystemAllocationScope { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 437 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND                      = 0x00000000, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 438 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT                       = 0x00000001, | 
|  | 439 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE                        = 0x00000002, | 
|  | 440 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE                       = 0x00000003, | 
|  | 441 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE                     = 0x00000004, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 442 | } | 
|  | 443 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 444 | enum VkInternalAllocationType { | 
|  | 445 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE                  = 0x00000000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 446 | } | 
|  | 447 |  | 
|  | 448 | enum VkPhysicalDeviceType { | 
|  | 449 | VK_PHYSICAL_DEVICE_TYPE_OTHER                           = 0x00000000, | 
|  | 450 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU                  = 0x00000001, | 
|  | 451 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU                    = 0x00000002, | 
|  | 452 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU                     = 0x00000003, | 
|  | 453 | VK_PHYSICAL_DEVICE_TYPE_CPU                             = 0x00000004, | 
|  | 454 | } | 
|  | 455 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 456 | enum VkVertexInputRate { | 
|  | 457 | VK_VERTEX_INPUT_RATE_VERTEX                             = 0x00000000, | 
|  | 458 | VK_VERTEX_INPUT_RATE_INSTANCE                           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 459 | } | 
|  | 460 |  | 
|  | 461 | /// Vulkan format definitions | 
|  | 462 | enum VkFormat { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 463 | VK_FORMAT_UNDEFINED                                     = 0, | 
|  | 464 | VK_FORMAT_R4G4_UNORM_PACK8                              = 1, | 
|  | 465 | VK_FORMAT_R4G4B4A4_UNORM_PACK16                         = 2, | 
|  | 466 | VK_FORMAT_B4G4R4A4_UNORM_PACK16                         = 3, | 
|  | 467 | VK_FORMAT_R5G6B5_UNORM_PACK16                           = 4, | 
|  | 468 | VK_FORMAT_B5G6R5_UNORM_PACK16                           = 5, | 
|  | 469 | VK_FORMAT_R5G5B5A1_UNORM_PACK16                         = 6, | 
|  | 470 | VK_FORMAT_B5G5R5A1_UNORM_PACK16                         = 7, | 
|  | 471 | VK_FORMAT_A1R5G5B5_UNORM_PACK16                         = 8, | 
|  | 472 | VK_FORMAT_R8_UNORM                                      = 9, | 
|  | 473 | VK_FORMAT_R8_SNORM                                      = 10, | 
|  | 474 | VK_FORMAT_R8_USCALED                                    = 11, | 
|  | 475 | VK_FORMAT_R8_SSCALED                                    = 12, | 
|  | 476 | VK_FORMAT_R8_UINT                                       = 13, | 
|  | 477 | VK_FORMAT_R8_SINT                                       = 14, | 
|  | 478 | VK_FORMAT_R8_SRGB                                       = 15, | 
|  | 479 | VK_FORMAT_R8G8_UNORM                                    = 16, | 
|  | 480 | VK_FORMAT_R8G8_SNORM                                    = 17, | 
|  | 481 | VK_FORMAT_R8G8_USCALED                                  = 18, | 
|  | 482 | VK_FORMAT_R8G8_SSCALED                                  = 19, | 
|  | 483 | VK_FORMAT_R8G8_UINT                                     = 20, | 
|  | 484 | VK_FORMAT_R8G8_SINT                                     = 21, | 
|  | 485 | VK_FORMAT_R8G8_SRGB                                     = 22, | 
|  | 486 | VK_FORMAT_R8G8B8_UNORM                                  = 23, | 
|  | 487 | VK_FORMAT_R8G8B8_SNORM                                  = 24, | 
|  | 488 | VK_FORMAT_R8G8B8_USCALED                                = 25, | 
|  | 489 | VK_FORMAT_R8G8B8_SSCALED                                = 26, | 
|  | 490 | VK_FORMAT_R8G8B8_UINT                                   = 27, | 
|  | 491 | VK_FORMAT_R8G8B8_SINT                                   = 28, | 
|  | 492 | VK_FORMAT_R8G8B8_SRGB                                   = 29, | 
|  | 493 | VK_FORMAT_B8G8R8_UNORM                                  = 30, | 
|  | 494 | VK_FORMAT_B8G8R8_SNORM                                  = 31, | 
|  | 495 | VK_FORMAT_B8G8R8_USCALED                                = 32, | 
|  | 496 | VK_FORMAT_B8G8R8_SSCALED                                = 33, | 
|  | 497 | VK_FORMAT_B8G8R8_UINT                                   = 34, | 
|  | 498 | VK_FORMAT_B8G8R8_SINT                                   = 35, | 
|  | 499 | VK_FORMAT_B8G8R8_SRGB                                   = 36, | 
|  | 500 | VK_FORMAT_R8G8B8A8_UNORM                                = 37, | 
|  | 501 | VK_FORMAT_R8G8B8A8_SNORM                                = 38, | 
|  | 502 | VK_FORMAT_R8G8B8A8_USCALED                              = 39, | 
|  | 503 | VK_FORMAT_R8G8B8A8_SSCALED                              = 40, | 
|  | 504 | VK_FORMAT_R8G8B8A8_UINT                                 = 41, | 
|  | 505 | VK_FORMAT_R8G8B8A8_SINT                                 = 42, | 
|  | 506 | VK_FORMAT_R8G8B8A8_SRGB                                 = 43, | 
|  | 507 | VK_FORMAT_B8G8R8A8_UNORM                                = 44, | 
|  | 508 | VK_FORMAT_B8G8R8A8_SNORM                                = 45, | 
|  | 509 | VK_FORMAT_B8G8R8A8_USCALED                              = 46, | 
|  | 510 | VK_FORMAT_B8G8R8A8_SSCALED                              = 47, | 
|  | 511 | VK_FORMAT_B8G8R8A8_UINT                                 = 48, | 
|  | 512 | VK_FORMAT_B8G8R8A8_SINT                                 = 49, | 
|  | 513 | VK_FORMAT_B8G8R8A8_SRGB                                 = 50, | 
|  | 514 | VK_FORMAT_A8B8G8R8_UNORM_PACK32                         = 51, | 
|  | 515 | VK_FORMAT_A8B8G8R8_SNORM_PACK32                         = 52, | 
|  | 516 | VK_FORMAT_A8B8G8R8_USCALED_PACK32                       = 53, | 
|  | 517 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32                       = 54, | 
|  | 518 | VK_FORMAT_A8B8G8R8_UINT_PACK32                          = 55, | 
|  | 519 | VK_FORMAT_A8B8G8R8_SINT_PACK32                          = 56, | 
|  | 520 | VK_FORMAT_A8B8G8R8_SRGB_PACK32                          = 57, | 
|  | 521 | VK_FORMAT_A2R10G10B10_UNORM_PACK32                      = 58, | 
|  | 522 | VK_FORMAT_A2R10G10B10_SNORM_PACK32                      = 59, | 
|  | 523 | VK_FORMAT_A2R10G10B10_USCALED_PACK32                    = 60, | 
|  | 524 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32                    = 61, | 
|  | 525 | VK_FORMAT_A2R10G10B10_UINT_PACK32                       = 62, | 
|  | 526 | VK_FORMAT_A2R10G10B10_SINT_PACK32                       = 63, | 
|  | 527 | VK_FORMAT_A2B10G10R10_UNORM_PACK32                      = 64, | 
|  | 528 | VK_FORMAT_A2B10G10R10_SNORM_PACK32                      = 65, | 
|  | 529 | VK_FORMAT_A2B10G10R10_USCALED_PACK32                    = 66, | 
|  | 530 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32                    = 67, | 
|  | 531 | VK_FORMAT_A2B10G10R10_UINT_PACK32                       = 68, | 
|  | 532 | VK_FORMAT_A2B10G10R10_SINT_PACK32                       = 69, | 
|  | 533 | VK_FORMAT_R16_UNORM                                     = 70, | 
|  | 534 | VK_FORMAT_R16_SNORM                                     = 71, | 
|  | 535 | VK_FORMAT_R16_USCALED                                   = 72, | 
|  | 536 | VK_FORMAT_R16_SSCALED                                   = 73, | 
|  | 537 | VK_FORMAT_R16_UINT                                      = 74, | 
|  | 538 | VK_FORMAT_R16_SINT                                      = 75, | 
|  | 539 | VK_FORMAT_R16_SFLOAT                                    = 76, | 
|  | 540 | VK_FORMAT_R16G16_UNORM                                  = 77, | 
|  | 541 | VK_FORMAT_R16G16_SNORM                                  = 78, | 
|  | 542 | VK_FORMAT_R16G16_USCALED                                = 79, | 
|  | 543 | VK_FORMAT_R16G16_SSCALED                                = 80, | 
|  | 544 | VK_FORMAT_R16G16_UINT                                   = 81, | 
|  | 545 | VK_FORMAT_R16G16_SINT                                   = 82, | 
|  | 546 | VK_FORMAT_R16G16_SFLOAT                                 = 83, | 
|  | 547 | VK_FORMAT_R16G16B16_UNORM                               = 84, | 
|  | 548 | VK_FORMAT_R16G16B16_SNORM                               = 85, | 
|  | 549 | VK_FORMAT_R16G16B16_USCALED                             = 86, | 
|  | 550 | VK_FORMAT_R16G16B16_SSCALED                             = 87, | 
|  | 551 | VK_FORMAT_R16G16B16_UINT                                = 88, | 
|  | 552 | VK_FORMAT_R16G16B16_SINT                                = 89, | 
|  | 553 | VK_FORMAT_R16G16B16_SFLOAT                              = 90, | 
|  | 554 | VK_FORMAT_R16G16B16A16_UNORM                            = 91, | 
|  | 555 | VK_FORMAT_R16G16B16A16_SNORM                            = 92, | 
|  | 556 | VK_FORMAT_R16G16B16A16_USCALED                          = 93, | 
|  | 557 | VK_FORMAT_R16G16B16A16_SSCALED                          = 94, | 
|  | 558 | VK_FORMAT_R16G16B16A16_UINT                             = 95, | 
|  | 559 | VK_FORMAT_R16G16B16A16_SINT                             = 96, | 
|  | 560 | VK_FORMAT_R16G16B16A16_SFLOAT                           = 97, | 
|  | 561 | VK_FORMAT_R32_UINT                                      = 98, | 
|  | 562 | VK_FORMAT_R32_SINT                                      = 99, | 
|  | 563 | VK_FORMAT_R32_SFLOAT                                    = 100, | 
|  | 564 | VK_FORMAT_R32G32_UINT                                   = 101, | 
|  | 565 | VK_FORMAT_R32G32_SINT                                   = 102, | 
|  | 566 | VK_FORMAT_R32G32_SFLOAT                                 = 103, | 
|  | 567 | VK_FORMAT_R32G32B32_UINT                                = 104, | 
|  | 568 | VK_FORMAT_R32G32B32_SINT                                = 105, | 
|  | 569 | VK_FORMAT_R32G32B32_SFLOAT                              = 106, | 
|  | 570 | VK_FORMAT_R32G32B32A32_UINT                             = 107, | 
|  | 571 | VK_FORMAT_R32G32B32A32_SINT                             = 108, | 
|  | 572 | VK_FORMAT_R32G32B32A32_SFLOAT                           = 109, | 
|  | 573 | VK_FORMAT_R64_UINT                                      = 110, | 
|  | 574 | VK_FORMAT_R64_SINT                                      = 111, | 
|  | 575 | VK_FORMAT_R64_SFLOAT                                    = 112, | 
|  | 576 | VK_FORMAT_R64G64_UINT                                   = 113, | 
|  | 577 | VK_FORMAT_R64G64_SINT                                   = 114, | 
|  | 578 | VK_FORMAT_R64G64_SFLOAT                                 = 115, | 
|  | 579 | VK_FORMAT_R64G64B64_UINT                                = 116, | 
|  | 580 | VK_FORMAT_R64G64B64_SINT                                = 117, | 
|  | 581 | VK_FORMAT_R64G64B64_SFLOAT                              = 118, | 
|  | 582 | VK_FORMAT_R64G64B64A64_UINT                             = 119, | 
|  | 583 | VK_FORMAT_R64G64B64A64_SINT                             = 120, | 
|  | 584 | VK_FORMAT_R64G64B64A64_SFLOAT                           = 121, | 
|  | 585 | VK_FORMAT_B10G11R11_UFLOAT_PACK32                       = 122, | 
|  | 586 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32                        = 123, | 
|  | 587 | VK_FORMAT_D16_UNORM                                     = 124, | 
|  | 588 | VK_FORMAT_X8_D24_UNORM_PACK32                           = 125, | 
|  | 589 | VK_FORMAT_D32_SFLOAT                                    = 126, | 
|  | 590 | VK_FORMAT_S8_UINT                                       = 127, | 
|  | 591 | VK_FORMAT_D16_UNORM_S8_UINT                             = 128, | 
|  | 592 | VK_FORMAT_D24_UNORM_S8_UINT                             = 129, | 
|  | 593 | VK_FORMAT_D32_SFLOAT_S8_UINT                            = 130, | 
|  | 594 | VK_FORMAT_BC1_RGB_UNORM_BLOCK                           = 131, | 
|  | 595 | VK_FORMAT_BC1_RGB_SRGB_BLOCK                            = 132, | 
|  | 596 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK                          = 133, | 
|  | 597 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK                           = 134, | 
|  | 598 | VK_FORMAT_BC2_UNORM_BLOCK                               = 135, | 
|  | 599 | VK_FORMAT_BC2_SRGB_BLOCK                                = 136, | 
|  | 600 | VK_FORMAT_BC3_UNORM_BLOCK                               = 137, | 
|  | 601 | VK_FORMAT_BC3_SRGB_BLOCK                                = 138, | 
|  | 602 | VK_FORMAT_BC4_UNORM_BLOCK                               = 139, | 
|  | 603 | VK_FORMAT_BC4_SNORM_BLOCK                               = 140, | 
|  | 604 | VK_FORMAT_BC5_UNORM_BLOCK                               = 141, | 
|  | 605 | VK_FORMAT_BC5_SNORM_BLOCK                               = 142, | 
|  | 606 | VK_FORMAT_BC6H_UFLOAT_BLOCK                             = 143, | 
|  | 607 | VK_FORMAT_BC6H_SFLOAT_BLOCK                             = 144, | 
|  | 608 | VK_FORMAT_BC7_UNORM_BLOCK                               = 145, | 
|  | 609 | VK_FORMAT_BC7_SRGB_BLOCK                                = 146, | 
|  | 610 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK                       = 147, | 
|  | 611 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK                        = 148, | 
|  | 612 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK                     = 149, | 
|  | 613 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK                      = 150, | 
|  | 614 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK                     = 151, | 
|  | 615 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK                      = 152, | 
|  | 616 | VK_FORMAT_EAC_R11_UNORM_BLOCK                           = 153, | 
|  | 617 | VK_FORMAT_EAC_R11_SNORM_BLOCK                           = 154, | 
|  | 618 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK                        = 155, | 
|  | 619 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK                        = 156, | 
|  | 620 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK                          = 157, | 
|  | 621 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK                           = 158, | 
|  | 622 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK                          = 159, | 
|  | 623 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK                           = 160, | 
|  | 624 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK                          = 161, | 
|  | 625 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK                           = 162, | 
|  | 626 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK                          = 163, | 
|  | 627 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK                           = 164, | 
|  | 628 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK                          = 165, | 
|  | 629 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK                           = 166, | 
|  | 630 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK                          = 167, | 
|  | 631 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK                           = 168, | 
|  | 632 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK                          = 169, | 
|  | 633 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK                           = 170, | 
|  | 634 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK                          = 171, | 
|  | 635 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK                           = 172, | 
|  | 636 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK                         = 173, | 
|  | 637 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK                          = 174, | 
|  | 638 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK                         = 175, | 
|  | 639 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK                          = 176, | 
|  | 640 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK                         = 177, | 
|  | 641 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK                          = 178, | 
|  | 642 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK                        = 179, | 
|  | 643 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK                         = 180, | 
|  | 644 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK                        = 181, | 
|  | 645 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK                         = 182, | 
|  | 646 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK                        = 183, | 
|  | 647 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK                         = 184, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 648 |  | 
|  | 649 | //@extension("VK_IMG_format_pvrtc") | 
|  | 650 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, | 
|  | 651 |  | 
|  | 652 | //@extension("VK_IMG_format_pvrtc") | 
|  | 653 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, | 
|  | 654 |  | 
|  | 655 | //@extension("VK_IMG_format_pvrtc") | 
|  | 656 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, | 
|  | 657 |  | 
|  | 658 | //@extension("VK_IMG_format_pvrtc") | 
|  | 659 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, | 
|  | 660 |  | 
|  | 661 | //@extension("VK_IMG_format_pvrtc") | 
|  | 662 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, | 
|  | 663 |  | 
|  | 664 | //@extension("VK_IMG_format_pvrtc") | 
|  | 665 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, | 
|  | 666 |  | 
|  | 667 | //@extension("VK_IMG_format_pvrtc") | 
|  | 668 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, | 
|  | 669 |  | 
|  | 670 | //@extension("VK_IMG_format_pvrtc") | 
|  | 671 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 672 | } | 
|  | 673 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 674 | /// Structure type enumerant | 
|  | 675 | enum VkStructureType { | 
|  | 676 | VK_STRUCTURE_TYPE_APPLICATION_INFO                          = 0, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 677 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO                      = 1, | 
|  | 678 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO                  = 2, | 
|  | 679 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO                        = 3, | 
|  | 680 | VK_STRUCTURE_TYPE_SUBMIT_INFO                               = 4, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 681 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO                      = 5, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 682 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE                       = 6, | 
|  | 683 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO                          = 7, | 
|  | 684 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO                         = 8, | 
|  | 685 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO                     = 9, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 686 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO                         = 10, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 687 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO                    = 11, | 
|  | 688 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO                        = 12, | 
|  | 689 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO                   = 13, | 
|  | 690 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO                         = 14, | 
|  | 691 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO                    = 15, | 
|  | 692 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO                 = 16, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 693 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO                = 17, | 
|  | 694 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO         = 18, | 
|  | 695 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO   = 19, | 
|  | 696 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, | 
|  | 697 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO   = 21, | 
|  | 698 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO       = 22, | 
|  | 699 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO  = 23, | 
|  | 700 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO    = 24, | 
|  | 701 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO  = 25, | 
|  | 702 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO    = 26, | 
|  | 703 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO        = 27, | 
|  | 704 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO             = 28, | 
|  | 705 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO              = 29, | 
|  | 706 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO               = 30, | 
|  | 707 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO                       = 31, | 
|  | 708 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO         = 32, | 
|  | 709 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO               = 33, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 710 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO              = 34, | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 711 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET                      = 35, | 
|  | 712 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET                       = 36, | 
|  | 713 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO                   = 37, | 
|  | 714 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO                   = 38, | 
|  | 715 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO                  = 39, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 716 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO              = 40, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 717 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO           = 41, | 
|  | 718 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO                 = 42, | 
|  | 719 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO                    = 43, | 
|  | 720 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER                     = 44, | 
|  | 721 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER                      = 45, | 
|  | 722 | VK_STRUCTURE_TYPE_MEMORY_BARRIER                            = 46, | 
|  | 723 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO               = 47, | 
|  | 724 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO                 = 48, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 725 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 726 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 727 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR                 = 1000001000, | 
|  | 728 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR                          = 1000001001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 729 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 730 | //@extension("VK_KHR_display") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 731 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR              = 1000002000, | 
|  | 732 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR           = 1000002001, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 733 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 734 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 735 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR          = 1000003000, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 736 |  | 
|  | 737 | //@extension("VK_KHR_xlib_surface") | 
|  | 738 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR              = 1000004000, | 
|  | 739 |  | 
|  | 740 | //@extension("VK_KHR_xcb_surface") | 
|  | 741 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR               = 1000005000, | 
|  | 742 |  | 
|  | 743 | //@extension("VK_KHR_wayland_surface") | 
|  | 744 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR           = 1000006000, | 
|  | 745 |  | 
|  | 746 | //@extension("VK_KHR_mir_surface") | 
|  | 747 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR               = 1000007000, | 
|  | 748 |  | 
|  | 749 | //@extension("VK_KHR_android_surface") | 
|  | 750 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR           = 1000008000, | 
|  | 751 |  | 
|  | 752 | //@extension("VK_KHR_win32_surface") | 
|  | 753 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR             = 1000009000, | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 754 |  | 
| Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame] | 755 | //@extension("VK_KHR_incremental_present") | 
|  | 756 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR                       = 1000084000, | 
|  | 757 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 758 | //@extension("VK_ANDROID_native_buffer") | 
|  | 759 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID                     = 1000010000, | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 760 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID       = 1000010001, | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 761 |  | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 762 | //@extension("VK_GOOGLE_display_timing") | 
| Ian Elliott | 14866bb | 2017-01-20 09:15:48 -0700 | [diff] [blame] | 763 | VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE                 = 1000092000, | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 764 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 765 | //@extension("VK_EXT_debug_report") | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 766 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT     = 1000011000, | 
|  | 767 |  | 
|  | 768 | //@extension("VK_AMD_rasterization_order") | 
|  | 769 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, | 
|  | 770 |  | 
|  | 771 | //@extension("VK_EXT_debug_marker") | 
|  | 772 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT         = 1000022000, | 
|  | 773 |  | 
|  | 774 | //@extension("VK_EXT_debug_marker") | 
|  | 775 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT          = 1000022001, | 
|  | 776 |  | 
|  | 777 | //@extension("VK_EXT_debug_marker") | 
|  | 778 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT              = 1000022002, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 779 |  | 
|  | 780 | //@extension("VK_NV_dedicated_allocation") | 
|  | 781 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, | 
|  | 782 |  | 
|  | 783 | //@extension("VK_NV_dedicated_allocation") | 
|  | 784 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, | 
|  | 785 |  | 
|  | 786 | //@extension("VK_NV_dedicated_allocation") | 
|  | 787 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 788 |  | 
|  | 789 | //@extension("VK_NV_external_memory") | 
|  | 790 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, | 
|  | 791 |  | 
|  | 792 | //@extension("VK_NV_external_memory") | 
|  | 793 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, | 
|  | 794 |  | 
|  | 795 | //@extension("VK_NV_external_memory_win32") | 
|  | 796 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, | 
|  | 797 |  | 
|  | 798 | //@extension("VK_NV_external_memory_win32") | 
|  | 799 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, | 
|  | 800 |  | 
|  | 801 | //@extension("VK_NV_win32_keyed_mutex") | 
|  | 802 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, | 
|  | 803 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 804 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 805 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, | 
|  | 806 |  | 
|  | 807 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 808 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, | 
|  | 809 |  | 
|  | 810 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 811 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, | 
|  | 812 |  | 
|  | 813 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 814 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, | 
|  | 815 |  | 
|  | 816 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 817 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, | 
|  | 818 |  | 
|  | 819 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 820 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, | 
|  | 821 |  | 
|  | 822 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 823 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, | 
|  | 824 |  | 
|  | 825 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 826 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, | 
|  | 827 |  | 
|  | 828 | //@extension("VK_KHR_get_physical_device_properties2") | 
|  | 829 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, | 
|  | 830 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 831 | //@extension("VK_EXT_validation_flags") | 
|  | 832 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, | 
|  | 833 |  | 
|  | 834 | //@extension("VK_KHR_incremental_present") | 
|  | 835 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, | 
|  | 836 |  | 
|  | 837 | //@extension("VK_NVX_device_generated_commands") | 
|  | 838 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, | 
|  | 839 |  | 
|  | 840 | //@extension("VK_NVX_device_generated_commands") | 
|  | 841 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, | 
|  | 842 |  | 
|  | 843 | //@extension("VK_NVX_device_generated_commands") | 
|  | 844 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, | 
|  | 845 |  | 
|  | 846 | //@extension("VK_NVX_device_generated_commands") | 
|  | 847 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, | 
|  | 848 |  | 
|  | 849 | //@extension("VK_NVX_device_generated_commands") | 
|  | 850 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, | 
|  | 851 |  | 
|  | 852 | //@extension("VK_NVX_device_generated_commands") | 
|  | 853 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 854 | } | 
|  | 855 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 856 | enum VkSubpassContents { | 
|  | 857 | VK_SUBPASS_CONTENTS_INLINE                              = 0x00000000, | 
|  | 858 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS           = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 859 | } | 
|  | 860 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 861 | enum VkPipelineCacheHeaderVersion { | 
|  | 862 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE                    = 1, | 
|  | 863 | } | 
|  | 864 |  | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 865 | @lastUnused(-11) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 866 | /// Error and return codes | 
|  | 867 | enum VkResult { | 
|  | 868 | // Return codes for successful operation execution (positive values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 869 | VK_SUCCESS                                              = 0, | 
|  | 870 | VK_NOT_READY                                            = 1, | 
|  | 871 | VK_TIMEOUT                                              = 2, | 
|  | 872 | VK_EVENT_SET                                            = 3, | 
|  | 873 | VK_EVENT_RESET                                          = 4, | 
|  | 874 | VK_INCOMPLETE                                           = 5, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 875 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 876 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 877 | VK_SUBOPTIMAL_KHR                                       = 1000001003, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 878 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 879 | // Error codes (negative values) | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 880 | VK_ERROR_OUT_OF_HOST_MEMORY                             = 0xFFFFFFFF, // -1 | 
|  | 881 | VK_ERROR_OUT_OF_DEVICE_MEMORY                           = 0xFFFFFFFE, // -2 | 
|  | 882 | VK_ERROR_INITIALIZATION_FAILED                          = 0xFFFFFFFD, // -3 | 
|  | 883 | VK_ERROR_DEVICE_LOST                                    = 0xFFFFFFFC, // -4 | 
|  | 884 | VK_ERROR_MEMORY_MAP_FAILED                              = 0xFFFFFFFB, // -5 | 
|  | 885 | VK_ERROR_LAYER_NOT_PRESENT                              = 0xFFFFFFFA, // -6 | 
|  | 886 | VK_ERROR_EXTENSION_NOT_PRESENT                          = 0xFFFFFFF9, // -7 | 
|  | 887 | VK_ERROR_FEATURE_NOT_PRESENT                            = 0xFFFFFFF8, // -8 | 
|  | 888 | VK_ERROR_INCOMPATIBLE_DRIVER                            = 0xFFFFFFF7, // -9 | 
|  | 889 | VK_ERROR_TOO_MANY_OBJECTS                               = 0xFFFFFFF6, // -10 | 
|  | 890 | VK_ERROR_FORMAT_NOT_SUPPORTED                           = 0xFFFFFFF5, // -11 | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 891 | VK_ERROR_FRAGMENTED_POOL                                = 0xFFFFFFF4, // -12 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 892 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 893 | //@extension("VK_KHR_surface") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 894 | VK_ERROR_SURFACE_LOST_KHR                               = 0xC4653600, // -1000000000 | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 895 |  | 
| Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 896 | //@extension("VK_KHR_surface") | 
|  | 897 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR                       = 0xC46535FF, // -1000008001 | 
|  | 898 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 899 | //@extension("VK_KHR_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 900 | VK_ERROR_OUT_OF_DATE_KHR                                = 0xC4653214, // -1000001004 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 901 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 902 | //@extension("VK_KHR_display_swapchain") | 
| Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 903 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR                       = 0xC4652A47, // -1000003001 | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 904 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 905 | //@extension("VK_EXT_debug_report") | 
|  | 906 | VK_ERROR_VALIDATION_FAILED_EXT                          = 0xC4650B07, // -1000011001 | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 907 |  | 
|  | 908 | //@extension("VK_NV_glsl_shader") | 
|  | 909 | VK_ERROR_INVALID_SHADER_NV                              = 0xC4650720, // -1000012000 | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 910 | } | 
|  | 911 |  | 
|  | 912 | enum VkDynamicState { | 
|  | 913 | VK_DYNAMIC_STATE_VIEWPORT                               = 0x00000000, | 
|  | 914 | VK_DYNAMIC_STATE_SCISSOR                                = 0x00000001, | 
|  | 915 | VK_DYNAMIC_STATE_LINE_WIDTH                             = 0x00000002, | 
|  | 916 | VK_DYNAMIC_STATE_DEPTH_BIAS                             = 0x00000003, | 
|  | 917 | VK_DYNAMIC_STATE_BLEND_CONSTANTS                        = 0x00000004, | 
|  | 918 | VK_DYNAMIC_STATE_DEPTH_BOUNDS                           = 0x00000005, | 
|  | 919 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK                   = 0x00000006, | 
|  | 920 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK                     = 0x00000007, | 
|  | 921 | VK_DYNAMIC_STATE_STENCIL_REFERENCE                      = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 922 | } | 
|  | 923 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 924 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 925 | enum VkPresentModeKHR { | 
|  | 926 | VK_PRESENT_MODE_IMMEDIATE_KHR                           = 0x00000000, | 
|  | 927 | VK_PRESENT_MODE_MAILBOX_KHR                             = 0x00000001, | 
|  | 928 | VK_PRESENT_MODE_FIFO_KHR                                = 0x00000002, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 929 | VK_PRESENT_MODE_FIFO_RELAXED_KHR                        = 0x00000003, | 
| Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 930 | //@extension("VK_KHR_swapchain_front_buffered") | 
|  | 931 | VK_PRESENT_MODE_FRONT_BUFFERED_DEMAND_REFRESH_KHR       = 1000111000, | 
|  | 932 | //@extension("VK_KHR_swapchain_front_buffered") | 
|  | 933 | VK_PRESENT_MODE_FRONT_BUFFERED_CONTINUOUS_REFRESH_KHR   = 1000111001, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 934 | } | 
|  | 935 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 936 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 937 | enum VkColorSpaceKHR { | 
|  | 938 | VK_COLORSPACE_SRGB_NONLINEAR_KHR                        = 0x00000000, | 
|  | 939 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 940 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 941 | @extension("VK_EXT_debug_report") | 
|  | 942 | enum VkDebugReportObjectTypeEXT { | 
|  | 943 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT                 = 0, | 
|  | 944 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT                = 1, | 
|  | 945 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT         = 2, | 
|  | 946 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT                  = 3, | 
|  | 947 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT                   = 4, | 
|  | 948 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT               = 5, | 
|  | 949 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT          = 6, | 
|  | 950 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT                   = 7, | 
|  | 951 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT           = 8, | 
|  | 952 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT                  = 9, | 
|  | 953 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT                   = 10, | 
|  | 954 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT                   = 11, | 
|  | 955 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT              = 12, | 
|  | 956 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT             = 13, | 
|  | 957 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT              = 14, | 
|  | 958 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT           = 15, | 
|  | 959 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT          = 16, | 
|  | 960 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT         = 17, | 
|  | 961 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT             = 18, | 
|  | 962 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT                = 19, | 
|  | 963 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT   = 20, | 
|  | 964 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT                 = 21, | 
|  | 965 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT         = 22, | 
|  | 966 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT          = 23, | 
|  | 967 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT             = 24, | 
|  | 968 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT            = 25, | 
|  | 969 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT             = 26, | 
|  | 970 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT           = 27, | 
|  | 971 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT            = 28, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 972 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT             = 29, | 
|  | 973 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT        = 30, | 
|  | 974 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT        = 31, | 
|  | 975 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 976 | } | 
|  | 977 |  | 
|  | 978 | @extension("VK_EXT_debug_report") | 
|  | 979 | enum VkDebugReportErrorEXT { | 
|  | 980 | VK_DEBUG_REPORT_ERROR_NONE_EXT                          = 0, | 
|  | 981 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT                  = 1, | 
|  | 982 | } | 
|  | 983 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 984 | @extension("VK_AMD_rasterization_order") | 
|  | 985 | enum VkRasterizationOrderAMD { | 
|  | 986 | VK_RASTERIZATION_ORDER_STRICT_AMD                       = 0, | 
|  | 987 | VK_RASTERIZATION_ORDER_RELAXED_AMD                      = 1, | 
|  | 988 | } | 
|  | 989 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 990 | @extension("VK_EXT_validation_flags") | 
|  | 991 | enum VkValidationCheckEXT { | 
|  | 992 | VK_VALIDATION_CHECK_ALL_EXT                             = 0, | 
|  | 993 | } | 
|  | 994 |  | 
|  | 995 | @extension("VK_NVX_device_generated_commands") | 
|  | 996 | enum VkIndirectCommandsTokenTypeNVX { | 
|  | 997 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, | 
|  | 998 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, | 
|  | 999 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, | 
|  | 1000 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, | 
|  | 1001 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, | 
|  | 1002 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, | 
|  | 1003 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, | 
|  | 1004 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, | 
|  | 1005 | } | 
|  | 1006 |  | 
|  | 1007 | @extension("VK_NVX_device_generated_commands") | 
|  | 1008 | enum VkObjectEntryTypeNVX { | 
|  | 1009 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, | 
|  | 1010 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, | 
|  | 1011 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, | 
|  | 1012 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, | 
|  | 1013 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, | 
|  | 1014 | } | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1015 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1016 | ///////////////// | 
|  | 1017 | //  Bitfields  // | 
|  | 1018 | ///////////////// | 
|  | 1019 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1020 | /// Queue capabilities | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1021 | type VkFlags VkQueueFlags | 
|  | 1022 | bitfield VkQueueFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1023 | VK_QUEUE_GRAPHICS_BIT                                   = 0x00000001,    /// Queue supports graphics operations | 
|  | 1024 | VK_QUEUE_COMPUTE_BIT                                    = 0x00000002,    /// Queue supports compute operations | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1025 | VK_QUEUE_TRANSFER_BIT                                   = 0x00000004,    /// Queue supports transfer operations | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1026 | 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] | 1027 | } | 
|  | 1028 |  | 
|  | 1029 | /// Memory properties passed into vkAllocMemory(). | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1030 | type VkFlags VkMemoryPropertyFlags | 
|  | 1031 | bitfield VkMemoryPropertyFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1032 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT                     = 0x00000001, | 
|  | 1033 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT                     = 0x00000002, | 
|  | 1034 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT                    = 0x00000004, | 
|  | 1035 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT                      = 0x00000008, | 
|  | 1036 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT                 = 0x00000010, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1037 | } | 
|  | 1038 |  | 
|  | 1039 | /// Memory heap flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1040 | type VkFlags VkMemoryHeapFlags | 
|  | 1041 | bitfield VkMemoryHeapFlagBits { | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1042 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT                         = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1043 | } | 
|  | 1044 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1045 | /// Access flags | 
|  | 1046 | type VkFlags VkAccessFlags | 
|  | 1047 | bitfield VkAccessFlagBits { | 
|  | 1048 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT                     = 0x00000001, | 
|  | 1049 | VK_ACCESS_INDEX_READ_BIT                                = 0x00000002, | 
|  | 1050 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT                     = 0x00000004, | 
|  | 1051 | VK_ACCESS_UNIFORM_READ_BIT                              = 0x00000008, | 
|  | 1052 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT                     = 0x00000010, | 
|  | 1053 | VK_ACCESS_SHADER_READ_BIT                               = 0x00000020, | 
|  | 1054 | VK_ACCESS_SHADER_WRITE_BIT                              = 0x00000040, | 
|  | 1055 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT                     = 0x00000080, | 
|  | 1056 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT                    = 0x00000100, | 
|  | 1057 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT             = 0x00000200, | 
|  | 1058 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT            = 0x00000400, | 
|  | 1059 | VK_ACCESS_TRANSFER_READ_BIT                             = 0x00000800, | 
|  | 1060 | VK_ACCESS_TRANSFER_WRITE_BIT                            = 0x00001000, | 
|  | 1061 | VK_ACCESS_HOST_READ_BIT                                 = 0x00002000, | 
|  | 1062 | VK_ACCESS_HOST_WRITE_BIT                                = 0x00004000, | 
|  | 1063 | VK_ACCESS_MEMORY_READ_BIT                               = 0x00008000, | 
|  | 1064 | VK_ACCESS_MEMORY_WRITE_BIT                              = 0x00010000, | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1065 |  | 
|  | 1066 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1067 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX                  = 0x00020000, | 
|  | 1068 |  | 
|  | 1069 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1070 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX                 = 0x00040000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1071 | } | 
|  | 1072 |  | 
|  | 1073 | /// Buffer usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1074 | type VkFlags VkBufferUsageFlags | 
|  | 1075 | bitfield VkBufferUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1076 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT                        = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1077 | VK_BUFFER_USAGE_TRANSFER_DST_BIT                        = 0x00000002,    /// Can be used as a destination of transfer operations | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1078 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT                = 0x00000004,    /// Can be used as TBO | 
|  | 1079 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT                = 0x00000008,    /// Can be used as IBO | 
|  | 1080 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT                      = 0x00000010,    /// Can be used as UBO | 
|  | 1081 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT                      = 0x00000020,    /// Can be used as SSBO | 
|  | 1082 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT                        = 0x00000040,    /// Can be used as source of fixed function index fetch (index buffer) | 
|  | 1083 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT                       = 0x00000080,    /// Can be used as source of fixed function vertex fetch (VBO) | 
|  | 1084 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT                     = 0x00000100,    /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) | 
|  | 1085 | } | 
|  | 1086 |  | 
|  | 1087 | /// Buffer creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1088 | type VkFlags VkBufferCreateFlags | 
|  | 1089 | bitfield VkBufferCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1090 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT                     = 0x00000001,    /// Buffer should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1091 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT                   = 0x00000002,    /// Buffer should support sparse backing with partial residency | 
|  | 1092 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT                     = 0x00000004,    /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers | 
|  | 1093 | } | 
|  | 1094 |  | 
|  | 1095 | /// Shader stage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1096 | type VkFlags VkShaderStageFlags | 
|  | 1097 | bitfield VkShaderStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1098 | VK_SHADER_STAGE_VERTEX_BIT                              = 0x00000001, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1099 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT                = 0x00000002, | 
|  | 1100 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT             = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1101 | VK_SHADER_STAGE_GEOMETRY_BIT                            = 0x00000008, | 
|  | 1102 | VK_SHADER_STAGE_FRAGMENT_BIT                            = 0x00000010, | 
|  | 1103 | VK_SHADER_STAGE_COMPUTE_BIT                             = 0x00000020, | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1104 | VK_SHADER_STAGE_ALL_GRAPHICS                            = 0x0000001F, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1105 |  | 
|  | 1106 | VK_SHADER_STAGE_ALL                                     = 0x7FFFFFFF, | 
|  | 1107 | } | 
|  | 1108 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1109 | /// Descriptor pool create flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1110 | type VkFlags VkDescriptorPoolCreateFlags | 
|  | 1111 | bitfield VkDescriptorPoolCreateFlagBits { | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1112 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT       = 0x00000001, | 
|  | 1113 | } | 
|  | 1114 |  | 
|  | 1115 | /// Descriptor pool reset flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1116 | type VkFlags VkDescriptorPoolResetFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1117 | //bitfield VkDescriptorPoolResetFlagBits { | 
|  | 1118 | //} | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1119 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1120 | /// Image usage flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1121 | type VkFlags VkImageUsageFlags | 
|  | 1122 | bitfield VkImageUsageFlagBits { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1123 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT                         = 0x00000001,    /// Can be used as a source of transfer operations | 
|  | 1124 | VK_IMAGE_USAGE_TRANSFER_DST_BIT                         = 0x00000002,    /// Can be used as a destination of transfer operations | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1125 | VK_IMAGE_USAGE_SAMPLED_BIT                              = 0x00000004,    /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1126 | VK_IMAGE_USAGE_STORAGE_BIT                              = 0x00000008,    /// Can be used as storage image (STORAGE_IMAGE descriptor type) | 
|  | 1127 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT                     = 0x00000010,    /// Can be used as framebuffer color attachment | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1128 | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT             = 0x00000020,    /// Can be used as framebuffer depth/stencil attachment | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1129 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT                 = 0x00000040,    /// Image data not needed outside of rendering | 
|  | 1130 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT                     = 0x00000080,    /// Can be used as framebuffer input attachment | 
|  | 1131 | } | 
|  | 1132 |  | 
|  | 1133 | /// Image creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1134 | type VkFlags VkImageCreateFlags | 
|  | 1135 | bitfield VkImageCreateFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1136 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT                      = 0x00000001,    /// Image should support sparse backing | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1137 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT                    = 0x00000002,    /// Image should support sparse backing with partial residency | 
|  | 1138 | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT                      = 0x00000004,    /// Image should support constent data access to physical memory blocks mapped into multiple locations of sparse images | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1139 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT                      = 0x00000008,    /// Allows image views to have different format than the base image | 
|  | 1140 | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT                     = 0x00000010,    /// Allows creating image views with cube type from the created image | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1141 | } | 
|  | 1142 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1143 | /// Image view creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1144 | type VkFlags VkImageViewCreateFlags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1145 | //bitfield VkImageViewCreateFlagBits { | 
|  | 1146 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1147 |  | 
|  | 1148 | /// Pipeline creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1149 | type VkFlags VkPipelineCreateFlags | 
|  | 1150 | bitfield VkPipelineCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1151 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT             = 0x00000001, | 
|  | 1152 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT                = 0x00000002, | 
|  | 1153 | VK_PIPELINE_CREATE_DERIVATIVE_BIT                       = 0x00000004, | 
|  | 1154 | } | 
|  | 1155 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1156 | /// Color component flags | 
|  | 1157 | type VkFlags VkColorComponentFlags | 
|  | 1158 | bitfield VkColorComponentFlagBits { | 
|  | 1159 | VK_COLOR_COMPONENT_R_BIT                                = 0x00000001, | 
|  | 1160 | VK_COLOR_COMPONENT_G_BIT                                = 0x00000002, | 
|  | 1161 | VK_COLOR_COMPONENT_B_BIT                                = 0x00000004, | 
|  | 1162 | VK_COLOR_COMPONENT_A_BIT                                = 0x00000008, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1163 | } | 
|  | 1164 |  | 
|  | 1165 | /// Fence creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1166 | type VkFlags VkFenceCreateFlags | 
|  | 1167 | bitfield VkFenceCreateFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1168 | VK_FENCE_CREATE_SIGNALED_BIT                            = 0x00000001, | 
|  | 1169 | } | 
|  | 1170 |  | 
|  | 1171 | /// Semaphore creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1172 | type VkFlags VkSemaphoreCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1173 | //bitfield VkSemaphoreCreateFlagBits { | 
|  | 1174 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1175 |  | 
|  | 1176 | /// Format capability flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1177 | type VkFlags VkFormatFeatureFlags | 
|  | 1178 | bitfield VkFormatFeatureFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1179 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT                     = 0x00000001,    /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) | 
|  | 1180 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT                     = 0x00000002,    /// Format can be used for storage images (STORAGE_IMAGE descriptor type) | 
|  | 1181 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT              = 0x00000004,    /// Format supports atomic operations in case it's used for storage images | 
|  | 1182 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT              = 0x00000008,    /// Format can be used for uniform texel buffers (TBOs) | 
|  | 1183 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT              = 0x00000010,    /// Format can be used for storage texel buffers (IBOs) | 
|  | 1184 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT       = 0x00000020,    /// Format supports atomic operations in case it's used for storage texel buffers | 
|  | 1185 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT                     = 0x00000040,    /// Format can be used for vertex buffers (VBOs) | 
|  | 1186 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT                  = 0x00000080,    /// Format can be used for color attachment images | 
|  | 1187 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT            = 0x00000100,    /// Format supports blending in case it's used for color attachment images | 
|  | 1188 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT          = 0x00000200,    /// Format can be used for depth/stencil attachment images | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1189 | VK_FORMAT_FEATURE_BLIT_SRC_BIT                          = 0x00000400,    /// Format can be used as the source image of blits with vkCommandBlitImage | 
|  | 1190 | VK_FORMAT_FEATURE_BLIT_DST_BIT                          = 0x00000800,    /// Format can be used as the destination image of blits with vkCommandBlitImage | 
| Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 1191 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT       = 0x00001000, | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1192 |  | 
|  | 1193 | //@extension("VK_IMG_filter_cubic") | 
|  | 1194 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG    = 0x00002000, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1195 | } | 
|  | 1196 |  | 
|  | 1197 | /// Query control flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1198 | type VkFlags VkQueryControlFlags | 
|  | 1199 | bitfield VkQueryControlFlagBits { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1200 | VK_QUERY_CONTROL_PRECISE_BIT                            = 0x00000001, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1201 | } | 
|  | 1202 |  | 
|  | 1203 | /// Query result flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1204 | type VkFlags VkQueryResultFlags | 
|  | 1205 | bitfield VkQueryResultFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1206 | VK_QUERY_RESULT_64_BIT                                  = 0x00000001,   /// Results of the queries are written to the destination buffer as 64-bit values | 
|  | 1207 | VK_QUERY_RESULT_WAIT_BIT                                = 0x00000002,   /// Results of the queries are waited on before proceeding with the result copy | 
|  | 1208 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT                   = 0x00000004,   /// Besides the results of the query, the availability of the results is also written | 
|  | 1209 | VK_QUERY_RESULT_PARTIAL_BIT                             = 0x00000008,   /// Copy the partial results of the query even if the final results aren't available | 
|  | 1210 | } | 
|  | 1211 |  | 
|  | 1212 | /// Shader module creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1213 | type VkFlags VkShaderModuleCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1214 | //bitfield VkShaderModuleCreateFlagBits { | 
|  | 1215 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1216 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1217 | /// Event creation flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1218 | type VkFlags VkEventCreateFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1219 | //bitfield VkEventCreateFlagBits { | 
|  | 1220 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1221 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1222 | /// Command buffer usage flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1223 | type VkFlags VkCommandBufferUsageFlags | 
|  | 1224 | bitfield VkCommandBufferUsageFlagBits { | 
|  | 1225 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT             = 0x00000001, | 
|  | 1226 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT        = 0x00000002, | 
|  | 1227 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT            = 0x00000004, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1228 | } | 
|  | 1229 |  | 
|  | 1230 | /// Pipeline statistics flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1231 | type VkFlags VkQueryPipelineStatisticFlags | 
|  | 1232 | bitfield VkQueryPipelineStatisticFlagBits { | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1233 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT                     = 0x00000001,  /// Optional | 
|  | 1234 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT                   = 0x00000002,  /// Optional | 
|  | 1235 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT                   = 0x00000004,  /// Optional | 
|  | 1236 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT                 = 0x00000008,  /// Optional | 
|  | 1237 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT                  = 0x00000010,  /// Optional | 
|  | 1238 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT                        = 0x00000020,  /// Optional | 
|  | 1239 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT                         = 0x00000040,  /// Optional | 
|  | 1240 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT                 = 0x00000080,  /// Optional | 
|  | 1241 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT         = 0x00000100,  /// Optional | 
|  | 1242 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT  = 0x00000200,  /// Optional | 
|  | 1243 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT                  = 0x00000400,  /// Optional | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1244 | } | 
|  | 1245 |  | 
|  | 1246 | /// Memory mapping flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1247 | type VkFlags VkMemoryMapFlags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1248 | //bitfield VkMemoryMapFlagBits { | 
|  | 1249 | //} | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1250 |  | 
|  | 1251 | /// Bitfield of image aspects | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1252 | type VkFlags VkImageAspectFlags | 
|  | 1253 | bitfield VkImageAspectFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1254 | VK_IMAGE_ASPECT_COLOR_BIT                               = 0x00000001, | 
|  | 1255 | VK_IMAGE_ASPECT_DEPTH_BIT                               = 0x00000002, | 
|  | 1256 | VK_IMAGE_ASPECT_STENCIL_BIT                             = 0x00000004, | 
|  | 1257 | VK_IMAGE_ASPECT_METADATA_BIT                            = 0x00000008, | 
|  | 1258 | } | 
|  | 1259 |  | 
|  | 1260 | /// Sparse memory bind flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1261 | type VkFlags VkSparseMemoryBindFlags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1262 | bitfield VkSparseMemoryBindFlagBits { | 
|  | 1263 | VK_SPARSE_MEMORY_BIND_METADATA_BIT                      = 0x00000001, | 
|  | 1264 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1265 |  | 
|  | 1266 | /// Sparse image memory requirements flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1267 | type VkFlags VkSparseImageFormatFlags | 
|  | 1268 | bitfield VkSparseImageFormatFlagBits { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1269 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT                  = 0x00000001,  /// Image uses a single miptail region for all array slices | 
|  | 1270 | VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT                = 0x00000002,  /// Image requires mip levels to be an exact multiple of the sparse iamge block size for non-mip-tail levels. | 
|  | 1271 | VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT          = 0x00000004,  /// Image uses a non-standard sparse block size | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1272 | } | 
|  | 1273 |  | 
|  | 1274 | /// Pipeline stages | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1275 | type VkFlags VkPipelineStageFlags | 
|  | 1276 | bitfield VkPipelineStageFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1277 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT                       = 0x00000001,  /// Before subsequent commands are processed | 
|  | 1278 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT                     = 0x00000002,  /// Draw/DispatchIndirect command fetch | 
|  | 1279 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT                      = 0x00000004,  /// Vertex/index fetch | 
|  | 1280 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT                     = 0x00000008,  /// Vertex shading | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1281 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT       = 0x00000010,  /// Tessellation control shading | 
|  | 1282 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT    = 0x00000020,  /// Tessellation evaluation shading | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1283 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT                   = 0x00000040,  /// Geometry shading | 
|  | 1284 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT                   = 0x00000080,  /// Fragment shading | 
|  | 1285 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT              = 0x00000100,  /// Early fragment (depth/stencil) tests | 
|  | 1286 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT               = 0x00000200,  /// Late fragment (depth/stencil) tests | 
|  | 1287 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT           = 0x00000400,  /// Color attachment writes | 
|  | 1288 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT                    = 0x00000800,  /// Compute shading | 
|  | 1289 | VK_PIPELINE_STAGE_TRANSFER_BIT                          = 0x00001000,  /// Transfer/copy operations | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1290 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT                    = 0x00002000, | 
|  | 1291 | VK_PIPELINE_STAGE_HOST_BIT                              = 0x00004000,  /// Indicates host (CPU) is a source/sink of the dependency | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1292 |  | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1293 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT                      = 0x00008000,  /// All stages of the graphics pipeline | 
|  | 1294 | VK_PIPELINE_STAGE_ALL_COMMANDS_BIT                      = 0x00010000,  /// All graphics, compute, copy, and transition commands | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1295 |  | 
|  | 1296 | //@extension("VK_NVX_device_generated_commands") | 
|  | 1297 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX               = 0x00020000, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1298 | } | 
|  | 1299 |  | 
|  | 1300 | /// Render pass attachment description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1301 | type VkFlags VkAttachmentDescriptionFlags | 
|  | 1302 | bitfield VkAttachmentDescriptionFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1303 | VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT                 = 0x00000001,  /// The attachment may alias physical memory of another attachment in the same renderpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1304 | } | 
|  | 1305 |  | 
|  | 1306 | /// Subpass description flags | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1307 | type VkFlags VkSubpassDescriptionFlags | 
|  | 1308 | bitfield VkSubpassDescriptionFlagBits { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1309 | } | 
|  | 1310 |  | 
|  | 1311 | /// Command pool creation flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1312 | type VkFlags VkCommandPoolCreateFlags | 
|  | 1313 | bitfield VkCommandPoolCreateFlagBits { | 
|  | 1314 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT                    = 0x00000001,  /// Command buffers have a short lifetime | 
|  | 1315 | VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT         = 0x00000002,  /// Command buffers may release their memory individually | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1316 | } | 
|  | 1317 |  | 
|  | 1318 | /// Command pool reset flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1319 | type VkFlags VkCommandPoolResetFlags | 
|  | 1320 | bitfield VkCommandPoolResetFlagBits { | 
|  | 1321 | VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT             = 0x00000001,  /// Release resources owned by the pool | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1322 | } | 
|  | 1323 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1324 | type VkFlags VkCommandBufferResetFlags | 
|  | 1325 | bitfield VkCommandBufferResetFlagBits { | 
|  | 1326 | VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT           = 0x00000001,  /// Release resources owned by the buffer | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1327 | } | 
|  | 1328 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1329 | type VkFlags VkSampleCountFlags | 
|  | 1330 | bitfield VkSampleCountFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1331 | VK_SAMPLE_COUNT_1_BIT                                   = 0x00000001, | 
|  | 1332 | VK_SAMPLE_COUNT_2_BIT                                   = 0x00000002, | 
|  | 1333 | VK_SAMPLE_COUNT_4_BIT                                   = 0x00000004, | 
|  | 1334 | VK_SAMPLE_COUNT_8_BIT                                   = 0x00000008, | 
|  | 1335 | VK_SAMPLE_COUNT_16_BIT                                  = 0x00000010, | 
|  | 1336 | VK_SAMPLE_COUNT_32_BIT                                  = 0x00000020, | 
|  | 1337 | VK_SAMPLE_COUNT_64_BIT                                  = 0x00000040, | 
|  | 1338 | } | 
|  | 1339 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1340 | type VkFlags VkStencilFaceFlags | 
|  | 1341 | bitfield VkStencilFaceFlagBits { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1342 | VK_STENCIL_FACE_FRONT_BIT                               = 0x00000001,   /// Front face | 
|  | 1343 | VK_STENCIL_FACE_BACK_BIT                                = 0x00000002,   /// Back face | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1344 | VK_STENCIL_FRONT_AND_BACK                               = 0x00000003, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1345 | } | 
|  | 1346 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1347 | /// Instance creation flags | 
|  | 1348 | type VkFlags VkInstanceCreateFlags | 
|  | 1349 | //bitfield VkInstanceCreateFlagBits { | 
|  | 1350 | //} | 
|  | 1351 |  | 
|  | 1352 | /// Device creation flags | 
|  | 1353 | type VkFlags VkDeviceCreateFlags | 
|  | 1354 | //bitfield VkDeviceCreateFlagBits { | 
|  | 1355 | //} | 
|  | 1356 |  | 
|  | 1357 | /// Device queue creation flags | 
|  | 1358 | type VkFlags VkDeviceQueueCreateFlags | 
|  | 1359 | //bitfield VkDeviceQueueCreateFlagBits { | 
|  | 1360 | //} | 
|  | 1361 |  | 
|  | 1362 | /// Query pool creation flags | 
|  | 1363 | type VkFlags VkQueryPoolCreateFlags | 
|  | 1364 | //bitfield VkQueryPoolCreateFlagBits { | 
|  | 1365 | //} | 
|  | 1366 |  | 
|  | 1367 | /// Buffer view creation flags | 
|  | 1368 | type VkFlags VkBufferViewCreateFlags | 
|  | 1369 | //bitfield VkBufferViewCreateFlagBits { | 
|  | 1370 | //} | 
|  | 1371 |  | 
|  | 1372 | /// Pipeline cache creation flags | 
|  | 1373 | type VkFlags VkPipelineCacheCreateFlags | 
|  | 1374 | //bitfield VkPipelineCacheCreateFlagBits { | 
|  | 1375 | //} | 
|  | 1376 |  | 
|  | 1377 | /// Pipeline shader stage creation flags | 
|  | 1378 | type VkFlags VkPipelineShaderStageCreateFlags | 
|  | 1379 | //bitfield VkPipelineShaderStageCreateFlagBits { | 
|  | 1380 | //} | 
|  | 1381 |  | 
|  | 1382 | /// Descriptor set layout creation flags | 
|  | 1383 | type VkFlags VkDescriptorSetLayoutCreateFlags | 
|  | 1384 | //bitfield VkDescriptorSetLayoutCreateFlagBits { | 
|  | 1385 | //} | 
|  | 1386 |  | 
|  | 1387 | /// Pipeline vertex input state creation flags | 
|  | 1388 | type VkFlags VkPipelineVertexInputStateCreateFlags | 
|  | 1389 | //bitfield VkPipelineVertexInputStateCreateFlagBits { | 
|  | 1390 | //} | 
|  | 1391 |  | 
|  | 1392 | /// Pipeline input assembly state creation flags | 
|  | 1393 | type VkFlags VkPipelineInputAssemblyStateCreateFlags | 
|  | 1394 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { | 
|  | 1395 | //} | 
|  | 1396 |  | 
|  | 1397 | /// Tessellation state creation flags | 
|  | 1398 | type VkFlags VkPipelineTessellationStateCreateFlags | 
|  | 1399 | //bitfield VkPipelineTessellationStateCreateFlagBits { | 
|  | 1400 | //} | 
|  | 1401 |  | 
|  | 1402 | /// Viewport state creation flags | 
|  | 1403 | type VkFlags VkPipelineViewportStateCreateFlags | 
|  | 1404 | //bitfield VkPipelineViewportStateCreateFlagBits { | 
|  | 1405 | //} | 
|  | 1406 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1407 | /// Rasterization state creation flags | 
|  | 1408 | type VkFlags VkPipelineRasterizationStateCreateFlags | 
|  | 1409 | //bitfield VkPipelineRasterizationStateCreateFlagBits { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1410 | //} | 
|  | 1411 |  | 
|  | 1412 | /// Multisample state creation flags | 
|  | 1413 | type VkFlags VkPipelineMultisampleStateCreateFlags | 
|  | 1414 | //bitfield VkPipelineMultisampleStateCreateFlagBits { | 
|  | 1415 | //} | 
|  | 1416 |  | 
|  | 1417 | /// Color blend state creation flags | 
|  | 1418 | type VkFlags VkPipelineColorBlendStateCreateFlags | 
|  | 1419 | //bitfield VkPipelineColorBlendStateCreateFlagBits { | 
|  | 1420 | //} | 
|  | 1421 |  | 
|  | 1422 | /// Depth/stencil state creation flags | 
|  | 1423 | type VkFlags VkPipelineDepthStencilStateCreateFlags | 
|  | 1424 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { | 
|  | 1425 | //} | 
|  | 1426 |  | 
|  | 1427 | /// Dynamic state creation flags | 
|  | 1428 | type VkFlags VkPipelineDynamicStateCreateFlags | 
|  | 1429 | //bitfield VkPipelineDynamicStateCreateFlagBits { | 
|  | 1430 | //} | 
|  | 1431 |  | 
|  | 1432 | /// Pipeline layout creation flags | 
|  | 1433 | type VkFlags VkPipelineLayoutCreateFlags | 
|  | 1434 | //bitfield VkPipelineLayoutCreateFlagBits { | 
|  | 1435 | //} | 
|  | 1436 |  | 
|  | 1437 | /// Sampler creation flags | 
|  | 1438 | type VkFlags VkSamplerCreateFlags | 
|  | 1439 | //bitfield VkSamplerCreateFlagBits { | 
|  | 1440 | //} | 
|  | 1441 |  | 
|  | 1442 | /// Render pass creation flags | 
|  | 1443 | type VkFlags VkRenderPassCreateFlags | 
|  | 1444 | //bitfield VkRenderPassCreateFlagBits { | 
|  | 1445 | //} | 
|  | 1446 |  | 
|  | 1447 | /// Framebuffer creation flags | 
|  | 1448 | type VkFlags VkFramebufferCreateFlags | 
|  | 1449 | //bitfield VkFramebufferCreateFlagBits { | 
|  | 1450 | //} | 
|  | 1451 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1452 | /// Dependency flags | 
|  | 1453 | type VkFlags VkDependencyFlags | 
|  | 1454 | bitfield VkDependencyFlagBits { | 
|  | 1455 | VK_DEPENDENCY_BY_REGION_BIT                             = 0x00000001, | 
|  | 1456 | } | 
|  | 1457 |  | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1458 | /// Cull mode flags | 
|  | 1459 | type VkFlags VkCullModeFlags | 
|  | 1460 | bitfield VkCullModeFlagBits { | 
|  | 1461 | VK_CULL_MODE_NONE                                       = 0x00000000, | 
|  | 1462 | VK_CULL_MODE_FRONT_BIT                                  = 0x00000001, | 
|  | 1463 | VK_CULL_MODE_BACK_BIT                                   = 0x00000002, | 
|  | 1464 | VK_CULL_MODE_FRONT_AND_BACK                             = 0x00000003, | 
|  | 1465 | } | 
|  | 1466 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1467 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1468 | type VkFlags VkSurfaceTransformFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1469 | @extension("VK_KHR_surface") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1470 | bitfield VkSurfaceTransformFlagBitsKHR { | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1471 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR                       = 0x00000001, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1472 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR                      = 0x00000002, | 
|  | 1473 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR                     = 0x00000004, | 
|  | 1474 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR                     = 0x00000008, | 
|  | 1475 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR              = 0x00000010, | 
|  | 1476 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR    = 0x00000020, | 
|  | 1477 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR   = 0x00000040, | 
|  | 1478 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR   = 0x00000080, | 
|  | 1479 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR                        = 0x00000100, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1480 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1481 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1482 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1483 | type VkFlags VkCompositeAlphaFlagsKHR | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1484 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1485 | bitfield VkCompositeAlphaFlagBitsKHR { | 
|  | 1486 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR                       = 0x00000001, | 
|  | 1487 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR               = 0x00000002, | 
|  | 1488 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR              = 0x00000004, | 
|  | 1489 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR                      = 0x00000008, | 
|  | 1490 | } | 
|  | 1491 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1492 | @extension("VK_KHR_swapchain") | 
|  | 1493 | type VkFlags VkSwapchainCreateFlagsKHR | 
|  | 1494 | //@extension("VK_KHR_swapchain") | 
|  | 1495 | //bitfield VkSwapchainCreateFlagBitsKHR { | 
|  | 1496 | //} | 
|  | 1497 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1498 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1499 | type VkFlags VkDisplayPlaneAlphaFlagsKHR | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1500 | @extension("VK_KHR_display") | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1501 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1502 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR                   = 0x00000001, | 
|  | 1503 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR                   = 0x00000002, | 
|  | 1504 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR                = 0x00000004, | 
|  | 1505 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR  = 0x00000008, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1506 | } | 
|  | 1507 |  | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1508 | @extension("VK_KHR_display") | 
|  | 1509 | type VkFlags VkDisplaySurfaceCreateFlagsKHR | 
|  | 1510 | //@extension("VK_KHR_display") | 
|  | 1511 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { | 
|  | 1512 | //} | 
|  | 1513 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1514 | @extension("VK_KHR_display") | 
|  | 1515 | type VkFlags VkDisplayModeCreateFlagsKHR | 
|  | 1516 | //@extension("VK_KHR_display") | 
|  | 1517 | //bitfield VkDisplayModeCreateFlagBitsKHR { | 
|  | 1518 | //} | 
|  | 1519 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1520 | @extension("VK_KHR_xlib_surface") | 
|  | 1521 | type VkFlags VkXlibSurfaceCreateFlagsKHR | 
|  | 1522 | //@extension("VK_KHR_xlib_surface") | 
|  | 1523 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { | 
|  | 1524 | //} | 
|  | 1525 |  | 
|  | 1526 | @extension("VK_KHR_xcb_surface") | 
|  | 1527 | type VkFlags VkXcbSurfaceCreateFlagsKHR | 
|  | 1528 | //@extension("VK_KHR_xcb_surface") | 
|  | 1529 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { | 
|  | 1530 | //} | 
|  | 1531 |  | 
|  | 1532 | @extension("VK_KHR_wayland_surface") | 
|  | 1533 | type VkFlags VkWaylandSurfaceCreateFlagsKHR | 
|  | 1534 | //@extension("VK_KHR_wayland_surface") | 
|  | 1535 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { | 
|  | 1536 | //} | 
|  | 1537 |  | 
|  | 1538 | @extension("VK_KHR_mir_surface") | 
|  | 1539 | type VkFlags VkMirSurfaceCreateFlagsKHR | 
|  | 1540 | //@extension("VK_KHR_mir_surface") | 
|  | 1541 | //bitfield VkMirSurfaceCreateFlagBitsKHR { | 
|  | 1542 | //} | 
|  | 1543 |  | 
|  | 1544 | @extension("VK_KHR_android_surface") | 
|  | 1545 | type VkFlags VkAndroidSurfaceCreateFlagsKHR | 
|  | 1546 | //@extension("VK_KHR_android_surface") | 
|  | 1547 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { | 
|  | 1548 | //} | 
|  | 1549 |  | 
|  | 1550 | @extension("VK_KHR_win32_surface") | 
|  | 1551 | type VkFlags VkWin32SurfaceCreateFlagsKHR | 
|  | 1552 | //@extension("VK_KHR_win32_surface") | 
|  | 1553 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { | 
|  | 1554 | //} | 
|  | 1555 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1556 | @extension("VK_EXT_debug_report") | 
|  | 1557 | type VkFlags VkDebugReportFlagsEXT | 
|  | 1558 | @extension("VK_EXT_debug_report") | 
|  | 1559 | bitfield VkDebugReportFlagBitsEXT { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1560 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT                     = 0x00000001, | 
|  | 1561 | VK_DEBUG_REPORT_WARNING_BIT_EXT                         = 0x00000002, | 
|  | 1562 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT             = 0x00000004, | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1563 | VK_DEBUG_REPORT_ERROR_BIT_EXT                           = 0x00000008, | 
|  | 1564 | VK_DEBUG_REPORT_DEBUG_BIT_EXT                           = 0x00000010, | 
|  | 1565 | } | 
|  | 1566 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 1567 | @extension("VK_ANDROID_native_buffer") | 
|  | 1568 | type VkFlags VkSwapchainImageUsageFlagsANDROID | 
|  | 1569 | @extension("VK_ANDROID_native_buffer") | 
|  | 1570 | bitfield VkSwapchainImageUsageFlagBitsANDROID { | 
|  | 1571 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_FRONT_BUFFER_BIT_ANDROID = 0x00000001, | 
|  | 1572 | } | 
|  | 1573 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1574 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1575 | type VkFlags VkExternalMemoryHandleTypeFlagsNV | 
|  | 1576 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1577 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { | 
|  | 1578 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, | 
|  | 1579 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, | 
|  | 1580 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, | 
|  | 1581 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, | 
|  | 1582 | } | 
|  | 1583 |  | 
|  | 1584 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1585 | type VkFlags VkExternalMemoryFeatureFlagsNV | 
|  | 1586 | @extension("VK_NV_external_memory_capabilities") | 
|  | 1587 | bitfield VkExternalMemoryFeatureFlagBitsNV { | 
|  | 1588 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, | 
|  | 1589 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, | 
|  | 1590 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, | 
|  | 1591 | } | 
|  | 1592 |  | 
|  | 1593 | @extension("VK_NVX_device_generated_commands") | 
|  | 1594 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX | 
|  | 1595 | @extension("VK_NVX_device_generated_commands") | 
|  | 1596 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { | 
|  | 1597 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, | 
|  | 1598 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, | 
|  | 1599 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, | 
|  | 1600 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, | 
|  | 1601 | } | 
|  | 1602 |  | 
|  | 1603 | @extension("VK_NVX_device_generated_commands") | 
|  | 1604 | type VkFlags VkObjectEntryUsageFlagsNVX | 
|  | 1605 | @extension("VK_NVX_device_generated_commands") | 
|  | 1606 | bitfield VkObjectEntryUsageFlagBitsNVX { | 
|  | 1607 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, | 
|  | 1608 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, | 
|  | 1609 | } | 
|  | 1610 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1611 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1612 | ////////////////// | 
|  | 1613 | //  Structures  // | 
|  | 1614 | ////////////////// | 
|  | 1615 |  | 
|  | 1616 | class VkOffset2D { | 
|  | 1617 | s32                                         x | 
|  | 1618 | s32                                         y | 
|  | 1619 | } | 
|  | 1620 |  | 
|  | 1621 | class VkOffset3D { | 
|  | 1622 | s32                                         x | 
|  | 1623 | s32                                         y | 
|  | 1624 | s32                                         z | 
|  | 1625 | } | 
|  | 1626 |  | 
|  | 1627 | class VkExtent2D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1628 | u32                                         width | 
|  | 1629 | u32                                         height | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1630 | } | 
|  | 1631 |  | 
|  | 1632 | class VkExtent3D { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1633 | u32                                         width | 
|  | 1634 | u32                                         height | 
|  | 1635 | u32                                         depth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1636 | } | 
|  | 1637 |  | 
|  | 1638 | class VkViewport { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1639 | f32                                         x | 
|  | 1640 | f32                                         y | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1641 | f32                                         width | 
|  | 1642 | f32                                         height | 
|  | 1643 | f32                                         minDepth | 
|  | 1644 | f32                                         maxDepth | 
|  | 1645 | } | 
|  | 1646 |  | 
|  | 1647 | class VkRect2D { | 
|  | 1648 | VkOffset2D                                  offset | 
|  | 1649 | VkExtent2D                                  extent | 
|  | 1650 | } | 
|  | 1651 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1652 | class VkClearRect { | 
|  | 1653 | VkRect2D                                    rect | 
|  | 1654 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1655 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1656 | } | 
|  | 1657 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1658 | class VkComponentMapping { | 
|  | 1659 | VkComponentSwizzle                          r | 
|  | 1660 | VkComponentSwizzle                          g | 
|  | 1661 | VkComponentSwizzle                          b | 
|  | 1662 | VkComponentSwizzle                          a | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1663 | } | 
|  | 1664 |  | 
|  | 1665 | class VkPhysicalDeviceProperties { | 
|  | 1666 | u32                                         apiVersion | 
|  | 1667 | u32                                         driverVersion | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1668 | u32                                         vendorID | 
|  | 1669 | u32                                         deviceID | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1670 | VkPhysicalDeviceType                        deviceType | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1671 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]      deviceName | 
|  | 1672 | u8[VK_UUID_SIZE]                            pipelineCacheUUID | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1673 | VkPhysicalDeviceLimits                      limits | 
|  | 1674 | VkPhysicalDeviceSparseProperties            sparseProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1675 | } | 
|  | 1676 |  | 
|  | 1677 | class VkExtensionProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1678 | char[VK_MAX_EXTENSION_NAME_SIZE]            extensionName      /// extension name | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1679 | u32                                         specVersion        /// version of the extension specification implemented | 
|  | 1680 | } | 
|  | 1681 |  | 
|  | 1682 | class VkLayerProperties { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1683 | char[VK_MAX_EXTENSION_NAME_SIZE]            layerName               /// layer name | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1684 | u32                                         specVersion             /// version of the layer specification implemented | 
|  | 1685 | u32                                         implementationVersion   /// build or release version of the layer's library | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1686 | char[VK_MAX_DESCRIPTION_SIZE]               description             /// Free-form description of the layer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1687 | } | 
|  | 1688 |  | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1689 | class VkSubmitInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1690 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO | 
|  | 1691 | const void*                                 pNext              /// Next structure in chain | 
|  | 1692 | u32                                         waitSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1693 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1694 | const VkPipelineStageFlags*                 pWaitDstStageMask | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1695 | u32                                         commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1696 | const VkCommandBuffer*                      pCommandBuffers | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1697 | u32                                         signalSemaphoreCount | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1698 | const VkSemaphore*                          pSignalSemaphores | 
|  | 1699 | } | 
|  | 1700 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1701 | class VkApplicationInfo { | 
|  | 1702 | VkStructureType                             sType              /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO | 
|  | 1703 | const void*                                 pNext              /// Next structure in chain | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1704 | const char*                                 pApplicationName | 
|  | 1705 | u32                                         applicationVersion | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1706 | const char*                                 pEngineName | 
|  | 1707 | u32                                         engineVersion | 
|  | 1708 | u32                                         apiVersion | 
|  | 1709 | } | 
|  | 1710 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1711 | class VkAllocationCallbacks { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1712 | void*                                       pUserData | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1713 | PFN_vkAllocationFunction                    pfnAllocation | 
|  | 1714 | PFN_vkReallocationFunction                  pfnReallocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1715 | PFN_vkFreeFunction                          pfnFree | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1716 | PFN_vkInternalAllocationNotification        pfnInternalAllocation | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1717 | PFN_vkInternalFreeNotification              pfnInternalFree | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1718 | } | 
|  | 1719 |  | 
|  | 1720 | class VkDeviceQueueCreateInfo { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1721 | VkStructureType                             sStype                    /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO | 
|  | 1722 | const void*                                 pNext                     /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1723 | VkDeviceQueueCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1724 | u32                                         queueFamilyIndex | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1725 | u32                                         queueCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1726 | const f32*                                  pQueuePriorities | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1727 | } | 
|  | 1728 |  | 
|  | 1729 | class VkDeviceCreateInfo { | 
|  | 1730 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO | 
|  | 1731 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1732 | VkDeviceCreateFlags                         flags | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1733 | u32                                         queueCreateInfoCount | 
|  | 1734 | const VkDeviceQueueCreateInfo*              pQueueCreateInfos | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1735 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1736 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1737 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1738 | const char* const*                          ppEnabledExtensionNames | 
|  | 1739 | const VkPhysicalDeviceFeatures*             pEnabledFeatures | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1740 | } | 
|  | 1741 |  | 
|  | 1742 | class VkInstanceCreateInfo { | 
|  | 1743 | VkStructureType                             sType                      /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO | 
|  | 1744 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1745 | VkInstanceCreateFlags                       flags | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1746 | const VkApplicationInfo*                    pApplicationInfo | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1747 | u32                                         enabledLayerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1748 | const char* const*                          ppEnabledLayerNames        /// Ordered list of layer names to be enabled | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1749 | u32                                         enabledExtensionCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1750 | const char* const*                          ppEnabledExtensionNames    /// Extension names to be enabled | 
|  | 1751 | } | 
|  | 1752 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1753 | class VkQueueFamilyProperties { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1754 | VkQueueFlags                                queueFlags                 /// Queue flags | 
|  | 1755 | u32                                         queueCount | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1756 | u32                                         timestampValidBits | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1757 | VkExtent3D                                  minImageTransferGranularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1758 | } | 
|  | 1759 |  | 
|  | 1760 | class VkPhysicalDeviceMemoryProperties { | 
|  | 1761 | u32                                         memoryTypeCount | 
|  | 1762 | VkMemoryType[VK_MAX_MEMORY_TYPES]           memoryTypes | 
|  | 1763 | u32                                         memoryHeapCount | 
|  | 1764 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS]           memoryHeaps | 
|  | 1765 | } | 
|  | 1766 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1767 | class VkMemoryAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1768 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1769 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1770 | VkDeviceSize                                allocationSize             /// Size of memory allocation | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1771 | u32                                         memoryTypeIndex            /// Index of the of the memory type to allocate from | 
|  | 1772 | } | 
|  | 1773 |  | 
|  | 1774 | class VkMemoryRequirements { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1775 | VkDeviceSize                                size                       /// Specified in bytes | 
|  | 1776 | VkDeviceSize                                alignment                  /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1777 | u32                                         memoryTypeBits             /// Bitfield of the allowed memory type indices into memoryTypes[] for this object | 
|  | 1778 | } | 
|  | 1779 |  | 
|  | 1780 | class VkSparseImageFormatProperties { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1781 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1782 | VkExtent3D                                  imageGranularity | 
|  | 1783 | VkSparseImageFormatFlags                    flags | 
|  | 1784 | } | 
|  | 1785 |  | 
|  | 1786 | class VkSparseImageMemoryRequirements { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1787 | VkSparseImageFormatProperties               formatProperties | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1788 | u32                                         imageMipTailFirstLod | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1789 | VkDeviceSize                                imageMipTailSize           /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1790 | VkDeviceSize                                imageMipTailOffset         /// Specified in bytes, must be a multiple of image block size / alignment | 
|  | 1791 | 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] | 1792 | } | 
|  | 1793 |  | 
|  | 1794 | class VkMemoryType { | 
|  | 1795 | VkMemoryPropertyFlags                       propertyFlags              /// Memory properties of this memory type | 
|  | 1796 | u32                                         heapIndex                  /// Index of the memory heap allocations of this memory type are taken from | 
|  | 1797 | } | 
|  | 1798 |  | 
|  | 1799 | class VkMemoryHeap { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1800 | VkDeviceSize                                size                       /// Available memory in the heap | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1801 | VkMemoryHeapFlags                           flags                      /// Flags for the heap | 
|  | 1802 | } | 
|  | 1803 |  | 
|  | 1804 | class VkMappedMemoryRange { | 
|  | 1805 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE | 
|  | 1806 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1807 | VkDeviceMemory                              memory                     /// Mapped memory object | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1808 | VkDeviceSize                                offset                     /// Offset within the mapped memory the range starts from | 
|  | 1809 | VkDeviceSize                                size                       /// Size of the range within the mapped memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1810 | } | 
|  | 1811 |  | 
|  | 1812 | class VkFormatProperties { | 
|  | 1813 | VkFormatFeatureFlags                        linearTilingFeatures       /// Format features in case of linear tiling | 
|  | 1814 | VkFormatFeatureFlags                        optimalTilingFeatures      /// Format features in case of optimal tiling | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1815 | VkFormatFeatureFlags                        bufferFeatures             /// Format features supported by buffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1816 | } | 
|  | 1817 |  | 
|  | 1818 | class VkImageFormatProperties { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1819 | VkExtent3D                                  maxExtent                  /// max image dimensions for this resource type | 
|  | 1820 | u32                                         maxMipLevels               /// max number of mipmap levels for this resource type | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1821 | u32                                         maxArrayLayers             /// max array layers for this resource type | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1822 | VkSampleCountFlags                          sampleCounts               /// supported sample counts for this resource type | 
|  | 1823 | VkDeviceSize                                maxResourceSize            /// max size (in bytes) of this resource type | 
|  | 1824 | } | 
|  | 1825 |  | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1826 | class VkDescriptorImageInfo { | 
|  | 1827 | VkSampler                                   sampler | 
|  | 1828 | VkImageView                                 imageView | 
|  | 1829 | VkImageLayout                               imageLayout | 
|  | 1830 | } | 
|  | 1831 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1832 | class VkDescriptorBufferInfo { | 
|  | 1833 | VkBuffer                                    buffer                     /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] | 
|  | 1834 | VkDeviceSize                                offset                     /// Base offset from buffer start in bytes to update in the descriptor set. | 
|  | 1835 | 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] | 1836 | } | 
|  | 1837 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1838 | class VkWriteDescriptorSet { | 
|  | 1839 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET | 
|  | 1840 | const void*                                 pNext                      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1841 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1842 | u32                                         dstBinding                 /// Binding within the destination descriptor set to write | 
|  | 1843 | u32                                         dstArrayElement            /// Array element within the destination binding to write | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1844 | 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] | 1845 | 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] | 1846 | const VkDescriptorImageInfo*                pImageInfo | 
|  | 1847 | const VkDescriptorBufferInfo*               pBufferInfo | 
|  | 1848 | const VkBufferView*                         pTexelBufferView | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1849 | } | 
|  | 1850 |  | 
|  | 1851 | class VkCopyDescriptorSet { | 
|  | 1852 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET | 
|  | 1853 | const void*                                 pNext                      /// Pointer to next structure | 
|  | 1854 | VkDescriptorSet                             srcSet                     /// Source descriptor set | 
|  | 1855 | u32                                         srcBinding                 /// Binding within the source descriptor set to copy from | 
|  | 1856 | u32                                         srcArrayElement            /// Array element within the source binding to copy from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1857 | VkDescriptorSet                             dstSet                     /// Destination descriptor set | 
|  | 1858 | u32                                         dstBinding                 /// Binding within the destination descriptor set to copy to | 
|  | 1859 | u32                                         dstArrayElement            /// Array element within the destination binding to copy to | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1860 | u32                                         descriptorCount            /// Number of descriptors to copy | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1861 | } | 
|  | 1862 |  | 
|  | 1863 | class VkBufferCreateInfo { | 
|  | 1864 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO | 
|  | 1865 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1866 | VkBufferCreateFlags                         flags                      /// Buffer creation flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1867 | VkDeviceSize                                size                       /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1868 | VkBufferUsageFlags                          usage                      /// Buffer usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1869 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1870 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1871 | const u32*                                  pQueueFamilyIndices | 
|  | 1872 | } | 
|  | 1873 |  | 
|  | 1874 | class VkBufferViewCreateInfo { | 
|  | 1875 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO | 
|  | 1876 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1877 | VkBufferViewCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1878 | VkBuffer                                    buffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1879 | VkFormat                                    format                     /// Optionally specifies format of elements | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1880 | VkDeviceSize                                offset                     /// Specified in bytes | 
|  | 1881 | VkDeviceSize                                range                      /// View size specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1882 | } | 
|  | 1883 |  | 
|  | 1884 | class VkImageSubresource { | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1885 | VkImageAspectFlagBits                       aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1886 | u32                                         mipLevel | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1887 | u32                                         arrayLayer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1888 | } | 
|  | 1889 |  | 
|  | 1890 | class VkImageSubresourceRange { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1891 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1892 | u32                                         baseMipLevel | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1893 | u32                                         levelCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1894 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1895 | u32                                         layerCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1896 | } | 
|  | 1897 |  | 
|  | 1898 | class VkMemoryBarrier { | 
|  | 1899 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_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 | } | 
|  | 1904 |  | 
|  | 1905 | class VkBufferMemoryBarrier { | 
|  | 1906 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER | 
|  | 1907 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1908 | VkAccessFlags                               srcAccessMask | 
|  | 1909 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1910 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1911 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1912 | VkBuffer                                    buffer                     /// Buffer to sync | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1913 | VkDeviceSize                                offset                     /// Offset within the buffer to sync | 
|  | 1914 | VkDeviceSize                                size                       /// Amount of bytes to sync | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1915 | } | 
|  | 1916 |  | 
|  | 1917 | class VkImageMemoryBarrier { | 
|  | 1918 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER | 
|  | 1919 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1920 | VkAccessFlags                               srcAccessMask | 
|  | 1921 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1922 | VkImageLayout                               oldLayout                  /// Current layout of the image | 
|  | 1923 | VkImageLayout                               newLayout                  /// New layout to transition the image to | 
|  | 1924 | u32                                         srcQueueFamilyIndex        /// Queue family to transition ownership from | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1925 | u32                                         dstQueueFamilyIndex        /// Queue family to transition ownership to | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1926 | VkImage                                     image                      /// Image to sync | 
|  | 1927 | VkImageSubresourceRange                     subresourceRange           /// Subresource range to sync | 
|  | 1928 | } | 
|  | 1929 |  | 
|  | 1930 | class VkImageCreateInfo { | 
|  | 1931 | VkStructureType                             sType                      /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO | 
|  | 1932 | const void*                                 pNext                      /// Pointer to next structure. | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1933 | VkImageCreateFlags                          flags                      /// Image creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1934 | VkImageType                                 imageType | 
|  | 1935 | VkFormat                                    format | 
|  | 1936 | VkExtent3D                                  extent | 
|  | 1937 | u32                                         mipLevels | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1938 | u32                                         arrayLayers | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1939 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1940 | VkImageTiling                               tiling | 
|  | 1941 | VkImageUsageFlags                           usage                      /// Image usage flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1942 | VkSharingMode                               sharingMode                /// Cross-queue-family sharing mode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1943 | u32                                         queueFamilyIndexCount      /// Number of queue families to share across | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1944 | const u32*                                  pQueueFamilyIndices        /// Array of queue family indices to share across | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1945 | VkImageLayout                               initialLayout              /// Initial image layout for all subresources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1946 | } | 
|  | 1947 |  | 
|  | 1948 | class VkSubresourceLayout { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1949 | VkDeviceSize                                offset                 /// Specified in bytes | 
|  | 1950 | VkDeviceSize                                size                   /// Specified in bytes | 
|  | 1951 | VkDeviceSize                                rowPitch               /// Specified in bytes | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1952 | VkDeviceSize                                arrayPitch             /// Specified in bytes | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1953 | VkDeviceSize                                depthPitch             /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1954 | } | 
|  | 1955 |  | 
|  | 1956 | class VkImageViewCreateInfo { | 
|  | 1957 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO | 
|  | 1958 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1959 | VkImageViewCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1960 | VkImage                                     image | 
|  | 1961 | VkImageViewType                             viewType | 
|  | 1962 | VkFormat                                    format | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1963 | VkComponentMapping                          components | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1964 | VkImageSubresourceRange                     subresourceRange | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1965 | } | 
|  | 1966 |  | 
|  | 1967 | class VkBufferCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1968 | VkDeviceSize                                srcOffset              /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1969 | VkDeviceSize                                dstOffset              /// Specified in bytes | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1970 | VkDeviceSize                                size                   /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1971 | } | 
|  | 1972 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1973 | class VkSparseMemoryBind { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1974 | VkDeviceSize                                resourceOffset        /// Specified in bytes | 
|  | 1975 | VkDeviceSize                                size                  /// Specified in bytes | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1976 | VkDeviceMemory                              memory | 
|  | 1977 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1978 | VkSparseMemoryBindFlags                     flags | 
|  | 1979 | } | 
|  | 1980 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1981 | class VkSparseImageMemoryBind { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1982 | VkImageSubresource                          subresource | 
|  | 1983 | VkOffset3D                                  offset | 
|  | 1984 | VkExtent3D                                  extent | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1985 | VkDeviceMemory                              memory | 
|  | 1986 | VkDeviceSize                                memoryOffset          /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1987 | VkSparseMemoryBindFlags                     flags | 
|  | 1988 | } | 
|  | 1989 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1990 | class VkSparseBufferMemoryBindInfo { | 
|  | 1991 | VkBuffer                                    buffer | 
|  | 1992 | u32                                         bindCount | 
|  | 1993 | const VkSparseMemoryBind*                   pBinds | 
|  | 1994 | } | 
|  | 1995 |  | 
|  | 1996 | class VkSparseImageOpaqueMemoryBindInfo { | 
|  | 1997 | VkImage                                     image | 
|  | 1998 | u32                                         bindCount | 
|  | 1999 | const VkSparseMemoryBind*                   pBinds | 
|  | 2000 | } | 
|  | 2001 |  | 
|  | 2002 | class VkSparseImageMemoryBindInfo { | 
|  | 2003 | VkImage                                     image | 
|  | 2004 | u32                                         bindCount | 
|  | 2005 | const VkSparseMemoryBind*                   pBinds | 
|  | 2006 | } | 
|  | 2007 |  | 
|  | 2008 | class VkBindSparseInfo { | 
|  | 2009 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO | 
|  | 2010 | const void*                                 pNext | 
|  | 2011 | u32                                         waitSemaphoreCount | 
|  | 2012 | const VkSemaphore*                          pWaitSemaphores | 
|  | 2013 | u32                                         numBufferBinds | 
|  | 2014 | const VkSparseBufferMemoryBindInfo*         pBufferBinds | 
|  | 2015 | u32                                         numImageOpaqueBinds | 
|  | 2016 | const VkSparseImageOpaqueMemoryBindInfo*    pImageOpaqueBinds | 
|  | 2017 | u32                                         numImageBinds | 
|  | 2018 | const VkSparseImageMemoryBindInfo*          pImageBinds | 
|  | 2019 | u32                                         signalSemaphoreCount | 
|  | 2020 | const VkSemaphore*                          pSignalSemaphores | 
|  | 2021 | } | 
|  | 2022 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2023 | class VkImageSubresourceLayers { | 
|  | 2024 | VkImageAspectFlags                          aspectMask | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2025 | u32                                         mipLevel | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2026 | u32                                         baseArrayLayer | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2027 | u32                                         layerCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2028 | } | 
|  | 2029 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2030 | class VkImageCopy { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2031 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2032 | VkOffset3D                                  srcOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2033 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2034 | VkOffset3D                                  dstOffset             /// Specified in pixels for both compressed and uncompressed images | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2035 | VkExtent3D                                  extent                /// Specified in pixels for both compressed and uncompressed images | 
|  | 2036 | } | 
|  | 2037 |  | 
|  | 2038 | class VkImageBlit { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2039 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2040 | VkOffset3D[2]                               srcOffsets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2041 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2042 | VkOffset3D[2]                               dstOffsets | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2043 | } | 
|  | 2044 |  | 
|  | 2045 | class VkBufferImageCopy { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2046 | VkDeviceSize                                bufferOffset           /// Specified in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2047 | u32                                         bufferRowLength        /// Specified in texels | 
|  | 2048 | u32                                         bufferImageHeight | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2049 | VkImageSubresourceLayers                    imageSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2050 | VkOffset3D                                  imageOffset            /// Specified in pixels for both compressed and uncompressed images | 
|  | 2051 | VkExtent3D                                  imageExtent            /// Specified in pixels for both compressed and uncompressed images | 
|  | 2052 | } | 
|  | 2053 |  | 
|  | 2054 | class VkImageResolve { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2055 | VkImageSubresourceLayers                    srcSubresource | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2056 | VkOffset3D                                  srcOffset | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2057 | VkImageSubresourceLayers                    dstSubresource | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2058 | VkOffset3D                                  dstOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2059 | VkExtent3D                                  extent | 
|  | 2060 | } | 
|  | 2061 |  | 
|  | 2062 | class VkShaderModuleCreateInfo { | 
|  | 2063 | VkStructureType                             sType                  /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO | 
|  | 2064 | const void*                                 pNext                  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2065 | VkShaderModuleCreateFlags                   flags                  /// Reserved | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2066 | platform.size_t                             codeSize               /// Specified in bytes | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2067 | const u32*                                  pCode                  /// Binary code of size codeSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2068 | } | 
|  | 2069 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2070 | class VkDescriptorSetLayoutBinding { | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2071 | u32                                         binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2072 | VkDescriptorType                            descriptorType     /// Type of the descriptors in this binding | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2073 | u32                                         descriptorCount    /// Number of descriptors in this binding | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2074 | VkShaderStageFlags                          stageFlags         /// Shader stages this binding is visible to | 
|  | 2075 | const VkSampler*                            pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) | 
|  | 2076 | } | 
|  | 2077 |  | 
|  | 2078 | class VkDescriptorSetLayoutCreateInfo { | 
|  | 2079 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO | 
|  | 2080 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2081 | VkDescriptorSetLayoutCreateFlags            flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2082 | u32                                         bindingCount       /// Number of bindings in the descriptor set layout | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2083 | const VkDescriptorSetLayoutBinding*         pBindings          /// Array of descriptor set layout bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2084 | } | 
|  | 2085 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2086 | class VkDescriptorPoolSize { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2087 | VkDescriptorType                            type | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2088 | u32                                         descriptorCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2089 | } | 
|  | 2090 |  | 
|  | 2091 | class VkDescriptorPoolCreateInfo { | 
|  | 2092 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO | 
|  | 2093 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2094 | VkDescriptorPoolCreateFlags                 flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2095 | u32                                         maxSets | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2096 | u32                                         poolSizeCount | 
|  | 2097 | const VkDescriptorPoolSize*                 pPoolSizes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2098 | } | 
|  | 2099 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2100 | class VkDescriptorSetAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2101 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2102 | const void*                                 pNext              /// Pointer to next structure | 
|  | 2103 | VkDescriptorPool                            descriptorPool | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2104 | u32                                         setCount | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2105 | const VkDescriptorSetLayout*                pSetLayouts | 
|  | 2106 | } | 
|  | 2107 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2108 | class VkSpecializationMapEntry { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2109 | u32                                         constantID         /// The SpecConstant ID specified in the BIL | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2110 | u32                                         offset             /// Offset of the value in the data block | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2111 | platform.size_t                             size               /// Size in bytes of the SpecConstant | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2112 | } | 
|  | 2113 |  | 
|  | 2114 | class VkSpecializationInfo { | 
|  | 2115 | u32                                         mapEntryCount      /// Number of entries in the map | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2116 | const VkSpecializationMapEntry*             pMapEntries        /// Array of map entries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2117 | platform.size_t                             dataSize           /// Size in bytes of pData | 
|  | 2118 | const void*                                 pData              /// Pointer to SpecConstant data | 
|  | 2119 | } | 
|  | 2120 |  | 
|  | 2121 | class VkPipelineShaderStageCreateInfo { | 
|  | 2122 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO | 
|  | 2123 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2124 | VkPipelineShaderStageCreateFlags            flags | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2125 | VkShaderStageFlagBits                       stage | 
|  | 2126 | VkShaderModule                              module | 
|  | 2127 | const char*                                 pName | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2128 | const VkSpecializationInfo*                 pSpecializationInfo | 
|  | 2129 | } | 
|  | 2130 |  | 
|  | 2131 | class VkComputePipelineCreateInfo { | 
|  | 2132 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO | 
|  | 2133 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2134 | VkPipelineCreateFlags                       flags              /// Pipeline creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2135 | VkPipelineShaderStageCreateInfo             stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2136 | VkPipelineLayout                            layout             /// Interface layout of the pipeline | 
|  | 2137 | 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 | 
|  | 2138 | 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 | 
|  | 2139 | } | 
|  | 2140 |  | 
|  | 2141 | class VkVertexInputBindingDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2142 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2143 | u32                                         stride                /// Distance between vertices in bytes (0 = no advancement) | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2144 | VkVertexInputRate                           inputRate             /// Rate at which binding is incremented | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2145 | } | 
|  | 2146 |  | 
|  | 2147 | class VkVertexInputAttributeDescription { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2148 | u32                                         location              /// location of the shader vertex attrib | 
|  | 2149 | u32                                         binding               /// Vertex buffer binding id | 
|  | 2150 | VkFormat                                    format                /// format of source data | 
|  | 2151 | u32                                         offset                /// Offset of first element in bytes from base of vertex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2152 | } | 
|  | 2153 |  | 
|  | 2154 | class VkPipelineVertexInputStateCreateInfo { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2155 | VkStructureType                             sType                           /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO | 
|  | 2156 | const void*                                 pNext                           /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2157 | VkPipelineVertexInputStateCreateFlags       flags | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2158 | u32                                         vertexBindingDescriptionCount   /// number of bindings | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2159 | const VkVertexInputBindingDescription*      pVertexBindingDescriptions | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2160 | u32                                         vertexAttributeDescriptionCount /// number of attributes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2161 | const VkVertexInputAttributeDescription*    pVertexAttributeDescriptions | 
|  | 2162 | } | 
|  | 2163 |  | 
|  | 2164 | class VkPipelineInputAssemblyStateCreateInfo { | 
|  | 2165 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO | 
|  | 2166 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2167 | VkPipelineInputAssemblyStateCreateFlags     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2168 | VkPrimitiveTopology                         topology | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2169 | VkBool32                                    primitiveRestartEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2170 | } | 
|  | 2171 |  | 
|  | 2172 | class VkPipelineTessellationStateCreateInfo { | 
|  | 2173 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO | 
|  | 2174 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2175 | VkPipelineTessellationStateCreateFlags      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2176 | u32                                         patchControlPoints | 
|  | 2177 | } | 
|  | 2178 |  | 
|  | 2179 | class VkPipelineViewportStateCreateInfo { | 
|  | 2180 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO | 
|  | 2181 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2182 | VkPipelineViewportStateCreateFlags          flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2183 | u32                                         viewportCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2184 | const VkViewport*                           pViewports | 
|  | 2185 | u32                                         scissorCount | 
|  | 2186 | const VkRect2D*                             pScissors | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2187 | } | 
|  | 2188 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2189 | class VkPipelineRasterizationStateCreateInfo { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2190 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2191 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2192 | VkPipelineRasterizationStateCreateFlags     flags | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2193 | VkBool32                                    depthClampEnable | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2194 | VkBool32                                    rasterizerDiscardEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2195 | VkPolygonMode                               polygonMode                   /// optional (GL45) | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2196 | VkCullModeFlags                             cullMode | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2197 | VkFrontFace                                 frontFace | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2198 | VkBool32                                    depthBiasEnable | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2199 | f32                                         depthBiasConstantFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2200 | f32                                         depthBiasClamp | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2201 | f32                                         depthBiasSlopeFactor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2202 | f32                                         lineWidth | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2203 | } | 
|  | 2204 |  | 
|  | 2205 | class VkPipelineMultisampleStateCreateInfo { | 
|  | 2206 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO | 
|  | 2207 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2208 | VkPipelineMultisampleStateCreateFlags       flags | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2209 | VkSampleCountFlagBits                       rasterizationSamples       /// Number of samples used for rasterization | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2210 | VkBool32                                    sampleShadingEnable        /// optional (GL45) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2211 | f32                                         minSampleShading           /// optional (GL45) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2212 | const VkSampleMask*                         pSampleMask | 
| Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2213 | VkBool32                                    alphaToCoverageEnable | 
|  | 2214 | VkBool32                                    alphaToOneEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2215 | } | 
|  | 2216 |  | 
|  | 2217 | class VkPipelineColorBlendAttachmentState { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2218 | VkBool32                                    blendEnable | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2219 | VkBlendFactor                               srcColorBlendFactor | 
|  | 2220 | VkBlendFactor                               dstColorBlendFactor | 
|  | 2221 | VkBlendOp                                   colorBlendOp | 
|  | 2222 | VkBlendFactor                               srcAlphaBlendFactor | 
|  | 2223 | VkBlendFactor                               dstAlphaBlendFactor | 
|  | 2224 | VkBlendOp                                   alphaBlendOp | 
|  | 2225 | VkColorComponentFlags                       colorWriteMask | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2226 | } | 
|  | 2227 |  | 
|  | 2228 | class VkPipelineColorBlendStateCreateInfo { | 
|  | 2229 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO | 
|  | 2230 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2231 | VkPipelineColorBlendStateCreateFlags        flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2232 | VkBool32                                    logicOpEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2233 | VkLogicOp                                   logicOp | 
|  | 2234 | u32                                         attachmentCount    /// # of pAttachments | 
|  | 2235 | const VkPipelineColorBlendAttachmentState*  pAttachments | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2236 | f32[4]                                      blendConstants | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2237 | } | 
|  | 2238 |  | 
|  | 2239 | class VkStencilOpState { | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2240 | VkStencilOp                                 failOp | 
|  | 2241 | VkStencilOp                                 passOp | 
|  | 2242 | VkStencilOp                                 depthFailOp | 
|  | 2243 | VkCompareOp                                 compareOp | 
|  | 2244 | u32                                         compareMask | 
|  | 2245 | u32                                         writeMask | 
|  | 2246 | u32                                         reference | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2247 | } | 
|  | 2248 |  | 
|  | 2249 | class VkPipelineDepthStencilStateCreateInfo { | 
|  | 2250 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO | 
|  | 2251 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2252 | VkPipelineDepthStencilStateCreateFlags      flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2253 | VkBool32                                    depthTestEnable | 
|  | 2254 | VkBool32                                    depthWriteEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2255 | VkCompareOp                                 depthCompareOp | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2256 | VkBool32                                    depthBoundsTestEnable  /// optional (depth_bounds_test) | 
|  | 2257 | VkBool32                                    stencilTestEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2258 | VkStencilOpState                            front | 
|  | 2259 | VkStencilOpState                            back | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2260 | f32                                         minDepthBounds | 
|  | 2261 | f32                                         maxDepthBounds | 
|  | 2262 | } | 
|  | 2263 |  | 
|  | 2264 | class VkPipelineDynamicStateCreateInfo { | 
|  | 2265 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO | 
|  | 2266 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2267 | VkPipelineDynamicStateCreateFlags           flags | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2268 | u32                                         dynamicStateCount | 
|  | 2269 | const VkDynamicState*                       pDynamicStates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2270 | } | 
|  | 2271 |  | 
|  | 2272 | class VkGraphicsPipelineCreateInfo { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2273 | VkStructureType                                 sType               /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO | 
|  | 2274 | const void*                                     pNext               /// Pointer to next structure | 
|  | 2275 | VkPipelineCreateFlags                           flags               /// Pipeline creation flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2276 | u32                                             stageCount | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2277 | const VkPipelineShaderStageCreateInfo*          pStages             /// One entry for each active shader stage | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2278 | const VkPipelineVertexInputStateCreateInfo*     pVertexInputState | 
|  | 2279 | const VkPipelineInputAssemblyStateCreateInfo*   pInputAssemblyState | 
|  | 2280 | const VkPipelineTessellationStateCreateInfo*    pTessellationState | 
|  | 2281 | const VkPipelineViewportStateCreateInfo*        pViewportState | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2282 | const VkPipelineRasterizationStateCreateInfo*   pRasterizationState | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2283 | const VkPipelineMultisampleStateCreateInfo*     pMultisampleState | 
|  | 2284 | const VkPipelineDepthStencilStateCreateInfo*    pDepthStencilState | 
|  | 2285 | const VkPipelineColorBlendStateCreateInfo*      pColorBlendState | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2286 | const VkPipelineDynamicStateCreateInfo*         pDynamicState | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2287 | VkPipelineLayout                                layout              /// Interface layout of the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2288 | VkRenderPass                                    renderPass | 
|  | 2289 | u32                                             subpass | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2290 | 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 | 
|  | 2291 | 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] | 2292 | } | 
|  | 2293 |  | 
|  | 2294 | class VkPipelineCacheCreateInfo { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2295 | VkStructureType                             sType                 /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO | 
|  | 2296 | const void*                                 pNext                 /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2297 | VkPipelineCacheCreateFlags                  flags | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2298 | platform.size_t                             initialDataSize       /// Size of initial data to populate cache, in bytes | 
|  | 2299 | const void*                                 pInitialData          /// Initial data to populate cache | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2300 | } | 
|  | 2301 |  | 
|  | 2302 | class VkPushConstantRange { | 
|  | 2303 | VkShaderStageFlags                          stageFlags   /// Which stages use the range | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2304 | u32                                         offset       /// Start of the range, in bytes | 
|  | 2305 | u32                                         size        /// Length of the range, in bytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2306 | } | 
|  | 2307 |  | 
|  | 2308 | class VkPipelineLayoutCreateInfo { | 
|  | 2309 | VkStructureType                             sType                   /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO | 
|  | 2310 | const void*                                 pNext                   /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2311 | VkPipelineLayoutCreateFlags                 flags | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2312 | u32                                         descriptorSetCount      /// Number of descriptor sets interfaced by the pipeline | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2313 | const VkDescriptorSetLayout*                pSetLayouts             /// Array of <setCount> number of descriptor set layout objects defining the layout of the | 
|  | 2314 | u32                                         pushConstantRangeCount  /// Number of push-constant ranges used by the pipeline | 
|  | 2315 | const VkPushConstantRange*                  pPushConstantRanges     /// Array of pushConstantRangeCount number of ranges used by various shader stages | 
|  | 2316 | } | 
|  | 2317 |  | 
|  | 2318 | class VkSamplerCreateInfo { | 
|  | 2319 | VkStructureType                             sType          /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO | 
|  | 2320 | const void*                                 pNext          /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2321 | VkSamplerCreateFlags                        flags | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2322 | VkFilter                                    magFilter      /// Filter mode for magnification | 
|  | 2323 | VkFilter                                    minFilter      /// Filter mode for minifiation | 
|  | 2324 | VkSamplerMipmapMode                         mipmapMode     /// Mipmap selection mode | 
|  | 2325 | VkSamplerAddressMode                        addressModeU | 
|  | 2326 | VkSamplerAddressMode                        addressModeV | 
|  | 2327 | VkSamplerAddressMode                        addressModeW | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2328 | f32                                         mipLodBias | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2329 | VkBool32                                    anisotropyEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2330 | f32                                         maxAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2331 | VkBool32                                    compareEnable | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2332 | VkCompareOp                                 compareOp | 
|  | 2333 | f32                                         minLod | 
|  | 2334 | f32                                         maxLod | 
|  | 2335 | VkBorderColor                               borderColor | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2336 | VkBool32                                    unnormalizedCoordinates | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2337 | } | 
|  | 2338 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2339 | class VkCommandPoolCreateInfo { | 
|  | 2340 | VkStructureType                             sType            /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2341 | const void*                                 pNext            /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2342 | VkCommandPoolCreateFlags                    flags            /// Command pool creation flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2343 | u32                                         queueFamilyIndex | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2344 | } | 
|  | 2345 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2346 | class VkCommandBufferAllocateInfo { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2347 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2348 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2349 | VkCommandPool                               commandPool | 
|  | 2350 | VkCommandBufferLevel                        level | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2351 | u32                                         commandBufferCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2352 | } | 
|  | 2353 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2354 | class VkCommandBufferInheritanceInfo { | 
|  | 2355 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2356 | const void*                                 pNext       /// Pointer to next structure | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2357 | VkRenderPass                                renderPass  /// Render pass for secondary command buffers | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2358 | u32                                         subpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2359 | VkFramebuffer                               framebuffer /// Framebuffer for secondary command buffers | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2360 | VkBool32                                    occlusionQueryEnable | 
|  | 2361 | VkQueryControlFlags                         queryFlags | 
|  | 2362 | VkQueryPipelineStatisticFlags               pipelineStatistics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2363 | } | 
|  | 2364 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2365 | class VkCommandBufferBeginInfo { | 
|  | 2366 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO | 
|  | 2367 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2368 | VkCommandBufferUsageFlags                   flags       /// Command buffer usage flags | 
|  | 2369 | const VkCommandBufferInheritanceInfo*       pInheritanceInfo | 
|  | 2370 | } | 
|  | 2371 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2372 | class VkRenderPassBeginInfo { | 
|  | 2373 | VkStructureType                             sType       /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO | 
|  | 2374 | const void*                                 pNext       /// Pointer to next structure | 
|  | 2375 | VkRenderPass                                renderPass | 
|  | 2376 | VkFramebuffer                               framebuffer | 
|  | 2377 | VkRect2D                                    renderArea | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2378 | u32                                         clearValueCount | 
|  | 2379 | const VkClearValue*                         pClearValues | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2380 | } | 
|  | 2381 |  | 
|  | 2382 | @union | 
|  | 2383 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. | 
|  | 2384 | class VkClearColorValue { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2385 | f32[4]                                      float32 | 
|  | 2386 | s32[4]                                      int32 | 
|  | 2387 | u32[4]                                      uint32 | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2388 | } | 
|  | 2389 |  | 
|  | 2390 | class VkClearDepthStencilValue { | 
|  | 2391 | f32                                         depth | 
|  | 2392 | u32                                         stencil | 
|  | 2393 | } | 
|  | 2394 |  | 
|  | 2395 | @union | 
|  | 2396 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. | 
|  | 2397 | class VkClearValue { | 
|  | 2398 | VkClearColorValue                           color | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2399 | VkClearDepthStencilValue                    depthStencil | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2400 | } | 
|  | 2401 |  | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2402 | class VkClearAttachment { | 
|  | 2403 | VkImageAspectFlags                          aspectMask | 
|  | 2404 | u32                                         colorAttachment | 
|  | 2405 | VkClearValue                                clearValue | 
|  | 2406 | } | 
|  | 2407 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2408 | class VkAttachmentDescription { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2409 | VkAttachmentDescriptionFlags                flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2410 | VkFormat                                    format | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2411 | VkSampleCountFlagBits                       samples | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2412 | VkAttachmentLoadOp                          loadOp          /// Load op for color or depth data | 
|  | 2413 | VkAttachmentStoreOp                         storeOp         /// Store op for color or depth data | 
|  | 2414 | VkAttachmentLoadOp                          stencilLoadOp   /// Load op for stencil data | 
|  | 2415 | VkAttachmentStoreOp                         stencilStoreOp  /// Store op for stencil data | 
|  | 2416 | VkImageLayout                               initialLayout | 
|  | 2417 | VkImageLayout                               finalLayout | 
|  | 2418 | } | 
|  | 2419 |  | 
|  | 2420 | class VkAttachmentReference { | 
|  | 2421 | u32                                         attachment | 
|  | 2422 | VkImageLayout                               layout | 
|  | 2423 | } | 
|  | 2424 |  | 
|  | 2425 | class VkSubpassDescription { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2426 | VkSubpassDescriptionFlags                   flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2427 | VkPipelineBindPoint                         pipelineBindPoint  /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2428 | u32                                         inputAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2429 | const VkAttachmentReference*                pInputAttachments | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2430 | u32                                         colorAttachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2431 | const VkAttachmentReference*                pColorAttachments | 
|  | 2432 | const VkAttachmentReference*                pResolveAttachments | 
| Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2433 | const VkAttachmentReference*                pDepthStencilAttachment | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2434 | u32                                         preserveAttachmentCount | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2435 | const u32*                                  pPreserveAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2436 | } | 
|  | 2437 |  | 
|  | 2438 | class VkSubpassDependency { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2439 | u32                                         srcSubpass | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2440 | u32                                         dstSubpass | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2441 | VkPipelineStageFlags                        srcStageMask | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2442 | VkPipelineStageFlags                        dstStageMask | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2443 | VkAccessFlags                               srcAccessMask | 
|  | 2444 | VkAccessFlags                               dstAccessMask | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2445 | VkDependencyFlags                           dependencyFlags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2446 | } | 
|  | 2447 |  | 
|  | 2448 | class VkRenderPassCreateInfo { | 
|  | 2449 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO | 
|  | 2450 | const void*                                 pNext      /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2451 | VkRenderPassCreateFlags                     flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2452 | u32                                         attachmentCount | 
|  | 2453 | const VkAttachmentDescription*              pAttachments | 
|  | 2454 | u32                                         subpassCount | 
|  | 2455 | const VkSubpassDescription*                 pSubpasses | 
|  | 2456 | u32                                         dependencyCount | 
|  | 2457 | const VkSubpassDependency*                  pDependencies | 
|  | 2458 | } | 
|  | 2459 |  | 
|  | 2460 | class VkEventCreateInfo { | 
|  | 2461 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO | 
|  | 2462 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2463 | VkEventCreateFlags                          flags      /// Event creation flags | 
|  | 2464 | } | 
|  | 2465 |  | 
|  | 2466 | class VkFenceCreateInfo { | 
|  | 2467 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO | 
|  | 2468 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2469 | VkFenceCreateFlags                          flags      /// Fence creation flags | 
|  | 2470 | } | 
|  | 2471 |  | 
|  | 2472 | class VkPhysicalDeviceFeatures { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2473 | VkBool32                                    robustBufferAccess                        /// out of bounds buffer accesses are well defined | 
|  | 2474 | VkBool32                                    fullDrawIndexUint32                       /// full 32-bit range of indices for indexed draw calls | 
|  | 2475 | VkBool32                                    imageCubeArray                            /// image views which are arrays of cube maps | 
|  | 2476 | VkBool32                                    independentBlend                          /// blending operations are controlled per-attachment | 
|  | 2477 | VkBool32                                    geometryShader                            /// geometry stage | 
|  | 2478 | VkBool32                                    tessellationShader                        /// tessellation control and evaluation stage | 
|  | 2479 | VkBool32                                    sampleRateShading                         /// per-sample shading and interpolation | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2480 | VkBool32                                    dualSrcBlend                              /// blend operations which take two sources | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2481 | VkBool32                                    logicOp                                   /// logic operations | 
|  | 2482 | VkBool32                                    multiDrawIndirect                         /// multi draw indirect | 
| Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2483 | VkBool32                                    drawIndirectFirstInstance | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2484 | VkBool32                                    depthClamp                                /// depth clamping | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2485 | VkBool32                                    depthBiasClamp                            /// depth bias clamping | 
|  | 2486 | VkBool32                                    fillModeNonSolid                          /// point and wireframe fill modes | 
|  | 2487 | VkBool32                                    depthBounds                               /// depth bounds test | 
|  | 2488 | VkBool32                                    wideLines                                 /// lines with width greater than 1 | 
|  | 2489 | VkBool32                                    largePoints                               /// points with size greater than 1 | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2490 | VkBool32                                    alphaToOne                                /// The fragment alpha channel can be forced to maximum representable alpha value | 
|  | 2491 | VkBool32                                    multiViewport | 
|  | 2492 | VkBool32                                    samplerAnisotropy | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2493 | VkBool32                                    textureCompressionETC2                    /// ETC texture compression formats | 
|  | 2494 | VkBool32                                    textureCompressionASTC_LDR                /// ASTC LDR texture compression formats | 
|  | 2495 | VkBool32                                    textureCompressionBC                      /// BC1-7 texture compressed formats | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2496 | VkBool32                                    occlusionQueryPrecise | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2497 | VkBool32                                    pipelineStatisticsQuery                   /// pipeline statistics query | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2498 | VkBool32                                    vertexPipelineStoresAndAtomics | 
|  | 2499 | VkBool32                                    fragmentStoresAndAtomics | 
|  | 2500 | VkBool32                                    shaderTessellationAndGeometryPointSize | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2501 | VkBool32                                    shaderImageGatherExtended                 /// texture gather with run-time values and independent offsets | 
|  | 2502 | VkBool32                                    shaderStorageImageExtendedFormats         /// the extended set of formats can be used for storage images | 
|  | 2503 | VkBool32                                    shaderStorageImageMultisample             /// multisample images can be used for storage images | 
| Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2504 | VkBool32                                    shaderStorageImageReadWithoutFormat | 
|  | 2505 | VkBool32                                    shaderStorageImageWriteWithoutFormat | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2506 | VkBool32                                    shaderUniformBufferArrayDynamicIndexing   /// arrays of uniform buffers can be accessed with dynamically uniform indices | 
|  | 2507 | VkBool32                                    shaderSampledImageArrayDynamicIndexing    /// arrays of sampled images can be accessed with dynamically uniform indices | 
|  | 2508 | VkBool32                                    shaderStorageBufferArrayDynamicIndexing   /// arrays of storage buffers can be accessed with dynamically uniform indices | 
|  | 2509 | VkBool32                                    shaderStorageImageArrayDynamicIndexing    /// arrays of storage images can be accessed with dynamically uniform indices | 
|  | 2510 | VkBool32                                    shaderClipDistance                        /// clip distance in shaders | 
|  | 2511 | VkBool32                                    shaderCullDistance                        /// cull distance in shaders | 
|  | 2512 | VkBool32                                    shaderFloat64                             /// 64-bit floats (doubles) in shaders | 
|  | 2513 | VkBool32                                    shaderInt64                               /// 64-bit integers in shaders | 
|  | 2514 | VkBool32                                    shaderInt16                               /// 16-bit integers in shaders | 
|  | 2515 | 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] | 2516 | VkBool32                                    shaderResourceMinLod                      /// shader can use texture operations that specify minimum resource LOD | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2517 | VkBool32                                    sparseBinding                             /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level | 
|  | 2518 | VkBool32                                    sparseResidencyBuffer                     /// Sparse resources support: GPU can access partially resident buffers | 
|  | 2519 | VkBool32                                    sparseResidencyImage2D                    /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images | 
|  | 2520 | VkBool32                                    sparseResidencyImage3D                    /// Sparse resources support: GPU can access partially resident 3D images | 
|  | 2521 | VkBool32                                    sparseResidency2Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples | 
|  | 2522 | VkBool32                                    sparseResidency4Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples | 
|  | 2523 | VkBool32                                    sparseResidency8Samples                   /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples | 
|  | 2524 | VkBool32                                    sparseResidency16Samples                  /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples | 
|  | 2525 | 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] | 2526 | VkBool32                                    variableMultisampleRate | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2527 | VkBool32                                    inheritedQueries | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2528 | } | 
|  | 2529 |  | 
|  | 2530 | class VkPhysicalDeviceLimits { | 
|  | 2531 | /// resource maximum sizes | 
|  | 2532 | u32                                         maxImageDimension1D                       /// max 1D image dimension | 
|  | 2533 | u32                                         maxImageDimension2D                       /// max 2D image dimension | 
|  | 2534 | u32                                         maxImageDimension3D                       /// max 3D image dimension | 
|  | 2535 | u32                                         maxImageDimensionCube                     /// max cubemap image dimension | 
|  | 2536 | u32                                         maxImageArrayLayers                       /// max layers for image arrays | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2537 | u32                                         maxTexelBufferElements | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2538 | u32                                         maxUniformBufferRange                     /// max uniform buffer size (bytes) | 
|  | 2539 | u32                                         maxStorageBufferRange                     /// max storage buffer size (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2540 | u32                                         maxPushConstantsSize                      /// max size of the push constants pool (bytes) | 
|  | 2541 | /// memory limits | 
|  | 2542 | u32                                         maxMemoryAllocationCount                  /// max number of device memory allocations supported | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2543 | u32                                         maxSamplerAllocationCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2544 | VkDeviceSize                                bufferImageGranularity                    /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage | 
|  | 2545 | VkDeviceSize                                sparseAddressSpaceSize                    /// Total address space available for sparse allocations (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2546 | /// descriptor set limits | 
|  | 2547 | 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] | 2548 | u32                                         maxPerStageDescriptorSamplers             /// max num of samplers allowed per-stage in a descriptor set | 
|  | 2549 | u32                                         maxPerStageDescriptorUniformBuffers       /// max num of uniform buffers allowed per-stage in a descriptor set | 
|  | 2550 | u32                                         maxPerStageDescriptorStorageBuffers       /// max num of storage buffers allowed per-stage in a descriptor set | 
|  | 2551 | u32                                         maxPerStageDescriptorSampledImages        /// max num of sampled images allowed per-stage in a descriptor set | 
|  | 2552 | 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] | 2553 | u32                                         maxPerStageDescriptorInputAttachments | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2554 | u32                                         maxPerStageResources | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2555 | u32                                         maxDescriptorSetSamplers                  /// max num of samplers allowed in all stages in a descriptor set | 
|  | 2556 | 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] | 2557 | 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] | 2558 | 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] | 2559 | 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] | 2560 | u32                                         maxDescriptorSetSampledImages             /// max num of sampled images allowed in all stages in a descriptor set | 
|  | 2561 | 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] | 2562 | u32                                         maxDescriptorSetInputAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2563 | /// vertex stage limits | 
|  | 2564 | u32                                         maxVertexInputAttributes                  /// max num of vertex input attribute slots | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2565 | u32                                         maxVertexInputBindings                    /// max num of vertex input binding slots | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2566 | u32                                         maxVertexInputAttributeOffset             /// max vertex input attribute offset added to vertex buffer offset | 
|  | 2567 | u32                                         maxVertexInputBindingStride               /// max vertex input binding stride | 
|  | 2568 | u32                                         maxVertexOutputComponents                 /// max num of output components written by vertex shader | 
|  | 2569 | /// tessellation control stage limits | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2570 | u32                                         maxTessellationGenerationLevel                  /// max level supported by tess primitive generator | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2571 | u32                                         maxTessellationPatchSize                        /// max patch size (vertices) | 
|  | 2572 | u32                                         maxTessellationControlPerVertexInputComponents  /// max num of input components per-vertex in TCS | 
|  | 2573 | u32                                         maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS | 
|  | 2574 | u32                                         maxTessellationControlPerPatchOutputComponents  /// max num of output components per-patch in TCS | 
|  | 2575 | u32                                         maxTessellationControlTotalOutputComponents     /// max total num of per-vertex and per-patch output components in TCS | 
|  | 2576 | u32                                         maxTessellationEvaluationInputComponents        /// max num of input components per vertex in TES | 
|  | 2577 | u32                                         maxTessellationEvaluationOutputComponents       /// max num of output components per vertex in TES | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2578 | /// geometry stage limits | 
|  | 2579 | u32                                         maxGeometryShaderInvocations              /// max invocation count supported in geometry shader | 
|  | 2580 | u32                                         maxGeometryInputComponents                /// max num of input components read in geometry stage | 
|  | 2581 | u32                                         maxGeometryOutputComponents               /// max num of output components written in geometry stage | 
|  | 2582 | u32                                         maxGeometryOutputVertices                 /// max num of vertices that can be emitted in geometry stage | 
|  | 2583 | u32                                         maxGeometryTotalOutputComponents          /// max total num of components (all vertices) written in geometry stage | 
|  | 2584 | /// fragment stage limits | 
|  | 2585 | u32                                         maxFragmentInputComponents                /// max num of input compontents read in fragment stage | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2586 | u32                                         maxFragmentOutputAttachments              /// max num of output attachments written in fragment stage | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2587 | 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] | 2588 | u32                                         maxFragmentCombinedOutputResources        /// max total num of storage buffers, storage images and output buffers | 
|  | 2589 | /// compute stage limits | 
|  | 2590 | u32                                         maxComputeSharedMemorySize                /// max total storage size of work group local storage (bytes) | 
|  | 2591 | u32[3]                                      maxComputeWorkGroupCount                  /// max num of compute work groups that may be dispatched by a single command (x,y,z) | 
|  | 2592 | u32                                         maxComputeWorkGroupInvocations            /// max total compute invocations in a single local work group | 
|  | 2593 | u32[3]                                      maxComputeWorkGroupSize                   /// max local size of a compute work group (x,y,z) | 
|  | 2594 |  | 
|  | 2595 | u32                                         subPixelPrecisionBits                     /// num bits of subpixel precision in screen x and y | 
|  | 2596 | u32                                         subTexelPrecisionBits                     /// num bits of subtexel precision | 
|  | 2597 | u32                                         mipmapPrecisionBits                       /// num bits of mipmap precision | 
|  | 2598 |  | 
|  | 2599 | 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] | 2600 | u32                                         maxDrawIndirectCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2601 |  | 
|  | 2602 | f32                                         maxSamplerLodBias                         /// max absolute sampler level of detail bias | 
|  | 2603 | f32                                         maxSamplerAnisotropy                      /// max degree of sampler anisotropy | 
|  | 2604 |  | 
|  | 2605 | u32                                         maxViewports                              /// max number of active viewports | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2606 | u32[2]                                      maxViewportDimensions                     /// max viewport dimensions (x,y) | 
|  | 2607 | f32[2]                                      viewportBoundsRange                       /// viewport bounds range (min,max) | 
|  | 2608 | u32                                         viewportSubPixelBits                      /// num bits of subpixel precision for viewport | 
|  | 2609 |  | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2610 | platform.size_t                             minMemoryMapAlignment                     /// min required alignment of pointers returned by MapMemory (bytes) | 
|  | 2611 | VkDeviceSize                                minTexelBufferOffsetAlignment             /// min required alignment for texel buffer offsets (bytes) | 
|  | 2612 | VkDeviceSize                                minUniformBufferOffsetAlignment           /// min required alignment for uniform buffer sizes and offsets (bytes) | 
|  | 2613 | VkDeviceSize                                minStorageBufferOffsetAlignment           /// min required alignment for storage buffer offsets (bytes) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2614 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2615 | s32                                         minTexelOffset                            /// min texel offset for OpTextureSampleOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2616 | u32                                         maxTexelOffset                            /// max texel offset for OpTextureSampleOffset | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2617 | s32                                         minTexelGatherOffset                      /// min texel offset for OpTextureGatherOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2618 | u32                                         maxTexelGatherOffset                      /// max texel offset for OpTextureGatherOffset | 
|  | 2619 | f32                                         minInterpolationOffset                    /// furthest negative offset for interpolateAtOffset | 
|  | 2620 | f32                                         maxInterpolationOffset                    /// furthest positive offset for interpolateAtOffset | 
|  | 2621 | u32                                         subPixelInterpolationOffsetBits           /// num of subpixel bits for interpolateAtOffset | 
|  | 2622 |  | 
|  | 2623 | u32                                         maxFramebufferWidth                       /// max width for a framebuffer | 
|  | 2624 | u32                                         maxFramebufferHeight                      /// max height for a framebuffer | 
|  | 2625 | u32                                         maxFramebufferLayers                      /// max layer count for a layered framebuffer | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2626 | VkSampleCountFlags                          framebufferColorSampleCounts | 
|  | 2627 | VkSampleCountFlags                          framebufferDepthSampleCounts | 
|  | 2628 | VkSampleCountFlags                          framebufferStencilSampleCounts | 
|  | 2629 | VkSampleCountFlags                          framebufferNoAttachmentSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2630 | u32                                         maxColorAttachments                       /// max num of framebuffer color attachments | 
|  | 2631 |  | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2632 | VkSampleCountFlags                          sampledImageColorSampleCounts | 
|  | 2633 | VkSampleCountFlags                          sampledImageIntegerSampleCounts | 
|  | 2634 | VkSampleCountFlags                          sampledImageDepthSampleCounts | 
|  | 2635 | VkSampleCountFlags                          sampledImageStencilSampleCounts | 
|  | 2636 | VkSampleCountFlags                          storageImageSampleCounts | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2637 | u32                                         maxSampleMaskWords                        /// max num of sample mask words | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2638 | VkBool32                                    timestampComputeAndGraphics | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2639 |  | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2640 | f32                                         timestampPeriod | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2641 |  | 
|  | 2642 | u32                                         maxClipDistances                          /// max number of clip distances | 
|  | 2643 | u32                                         maxCullDistances                          /// max number of cull distances | 
|  | 2644 | u32                                         maxCombinedClipAndCullDistances           /// max combined number of user clipping | 
|  | 2645 |  | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2646 | u32                                         discreteQueuePriorities | 
|  | 2647 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2648 | f32[2]                                      pointSizeRange                            /// range (min,max) of supported point sizes | 
|  | 2649 | f32[2]                                      lineWidthRange                            /// range (min,max) of supported line widths | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2650 | f32                                         pointSizeGranularity                      /// granularity of supported point sizes | 
|  | 2651 | f32                                         lineWidthGranularity                      /// granularity of supported line widths | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2652 | VkBool32                                    strictLines | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2653 | VkBool32                                    standardSampleLocations | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2654 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2655 | VkDeviceSize                                optimalBufferCopyOffsetAlignment | 
|  | 2656 | VkDeviceSize                                optimalBufferCopyRowPitchAlignment | 
| Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2657 | VkDeviceSize                                nonCoherentAtomSize | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2658 | } | 
|  | 2659 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2660 | class VkPhysicalDeviceSparseProperties { | 
|  | 2661 | 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] | 2662 | 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] | 2663 | VkBool32                                    residencyStandard3DBlockShape             /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) | 
|  | 2664 | 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] | 2665 | 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 | 
|  | 2666 | } | 
|  | 2667 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2668 | class VkSemaphoreCreateInfo { | 
|  | 2669 | VkStructureType                             sType      /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO | 
|  | 2670 | const void*                                 pNext      /// Pointer to next structure | 
|  | 2671 | VkSemaphoreCreateFlags                      flags      /// Semaphore creation flags | 
|  | 2672 | } | 
|  | 2673 |  | 
|  | 2674 | class VkQueryPoolCreateInfo { | 
|  | 2675 | VkStructureType                             sType              /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO | 
|  | 2676 | const void*                                 pNext              /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2677 | VkQueryPoolCreateFlags                      flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2678 | VkQueryType                                 queryType | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2679 | u32                                         queryCount | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2680 | VkQueryPipelineStatisticFlags               pipelineStatistics /// Optional | 
|  | 2681 | } | 
|  | 2682 |  | 
|  | 2683 | class VkFramebufferCreateInfo { | 
|  | 2684 | VkStructureType                             sType  /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO | 
|  | 2685 | const void*                                 pNext  /// Pointer to next structure | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2686 | VkFramebufferCreateFlags                    flags | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2687 | VkRenderPass                                renderPass | 
|  | 2688 | u32                                         attachmentCount | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2689 | const VkImageView*                          pAttachments | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2690 | u32                                         width | 
|  | 2691 | u32                                         height | 
|  | 2692 | u32                                         layers | 
|  | 2693 | } | 
|  | 2694 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2695 | class VkDrawIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2696 | u32                                         vertexCount | 
|  | 2697 | u32                                         instanceCount | 
|  | 2698 | u32                                         firstVertex | 
|  | 2699 | u32                                         firstInstance | 
|  | 2700 | } | 
|  | 2701 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2702 | class VkDrawIndexedIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2703 | u32                                         indexCount | 
|  | 2704 | u32                                         instanceCount | 
|  | 2705 | u32                                         firstIndex | 
|  | 2706 | s32                                         vertexOffset | 
|  | 2707 | u32                                         firstInstance | 
|  | 2708 | } | 
|  | 2709 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2710 | class VkDispatchIndirectCommand { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2711 | u32                                         x | 
|  | 2712 | u32                                         y | 
|  | 2713 | u32                                         z | 
|  | 2714 | } | 
|  | 2715 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2716 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2717 | class VkSurfaceCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2718 | u32                                         minImageCount | 
|  | 2719 | u32                                         maxImageCount | 
|  | 2720 | VkExtent2D                                  currentExtent | 
|  | 2721 | VkExtent2D                                  minImageExtent | 
|  | 2722 | VkExtent2D                                  maxImageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2723 | u32                                         maxImageArrayLayers | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2724 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2725 | VkSurfaceTransformFlagBitsKHR               currentTransform | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2726 | VkCompositeAlphaFlagsKHR                    supportedCompositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2727 | VkImageUsageFlags                           supportedUsageFlags | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2728 | } | 
|  | 2729 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2730 | @extension("VK_KHR_surface") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2731 | class VkSurfaceFormatKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2732 | VkFormat                                    format | 
|  | 2733 | VkColorSpaceKHR                             colorSpace | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2734 | } | 
|  | 2735 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2736 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2737 | class VkSwapchainCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2738 | VkStructureType                             sType | 
|  | 2739 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2740 | VkSwapchainCreateFlagsKHR                   flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2741 | VkSurfaceKHR                                surface | 
|  | 2742 | u32                                         minImageCount | 
|  | 2743 | VkFormat                                    imageFormat | 
|  | 2744 | VkColorSpaceKHR                             imageColorSpace | 
|  | 2745 | VkExtent2D                                  imageExtent | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2746 | u32                                         imageArrayLayers | 
|  | 2747 | VkImageUsageFlags                           imageUsage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2748 | VkSharingMode                               sharingMode | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2749 | u32                                         queueFamilyIndexCount | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2750 | const u32*                                  pQueueFamilyIndices | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2751 | VkSurfaceTransformFlagBitsKHR               preTransform | 
|  | 2752 | VkCompositeAlphaFlagBitsKHR                 compositeAlpha | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2753 | VkPresentModeKHR                            presentMode | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2754 | VkBool32                                    clipped | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2755 | VkSwapchainKHR                              oldSwapchain | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2756 | } | 
|  | 2757 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2758 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2759 | class VkPresentInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2760 | VkStructureType                             sType | 
|  | 2761 | const void*                                 pNext | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2762 | u32                                         waitSemaphoreCount | 
|  | 2763 | const VkSemaphore*                          pWaitSemaphores | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2764 | u32                                         swapchainCount | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2765 | const VkSwapchainKHR*                       pSwapchains | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2766 | const u32*                                  pImageIndices | 
| Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2767 | VkResult*                                   pResults | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2768 | } | 
|  | 2769 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2770 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2771 | class VkDisplayPropertiesKHR { | 
|  | 2772 | VkDisplayKHR                                display | 
|  | 2773 | const char*                                 displayName | 
|  | 2774 | VkExtent2D                                  physicalDimensions | 
|  | 2775 | VkExtent2D                                  physicalResolution | 
|  | 2776 | VkSurfaceTransformFlagsKHR                  supportedTransforms | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2777 | VkBool32                                    planeReorderPossible | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2778 | VkBool32                                    persistentContent | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2779 | } | 
|  | 2780 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2781 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2782 | class VkDisplayModeParametersKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2783 | VkExtent2D                                  visibleRegion | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2784 | u32                                         refreshRate | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2785 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2786 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2787 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2788 | class VkDisplayModePropertiesKHR { | 
|  | 2789 | VkDisplayModeKHR                            displayMode | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2790 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2791 | } | 
|  | 2792 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2793 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2794 | class VkDisplayModeCreateInfoKHR { | 
|  | 2795 | VkStructureType                             sType | 
|  | 2796 | const void*                                 pNext | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2797 | VkDisplayModeCreateFlagsKHR                 flags | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2798 | VkDisplayModeParametersKHR                  parameters | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2799 | } | 
|  | 2800 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2801 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2802 | class VkDisplayPlanePropertiesKHR { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2803 | VkDisplayKHR                                currentDisplay | 
|  | 2804 | u32                                         currentStackIndex | 
|  | 2805 | } | 
|  | 2806 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2807 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2808 | class VkDisplayPlaneCapabilitiesKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2809 | VkDisplayPlaneAlphaFlagsKHR                 supportedAlpha | 
|  | 2810 | VkOffset2D                                  minSrcPosition | 
|  | 2811 | VkOffset2D                                  maxSrcPosition | 
|  | 2812 | VkExtent2D                                  minSrcExtent | 
|  | 2813 | VkExtent2D                                  maxSrcExtent | 
|  | 2814 | VkOffset2D                                  minDstPosition | 
|  | 2815 | VkOffset2D                                  maxDstPosition | 
|  | 2816 | VkExtent2D                                  minDstExtent | 
|  | 2817 | VkExtent2D                                  maxDstExtent | 
|  | 2818 | } | 
|  | 2819 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2820 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2821 | class VkDisplaySurfaceCreateInfoKHR { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2822 | VkStructureType                             sType | 
|  | 2823 | const void*                                 pNext | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2824 | VkDisplaySurfaceCreateFlagsKHR              flags | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2825 | VkDisplayModeKHR                            displayMode | 
|  | 2826 | u32                                         planeIndex | 
|  | 2827 | u32                                         planeStackIndex | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2828 | VkSurfaceTransformFlagBitsKHR               transform | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2829 | f32                                         globalAlpha | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2830 | VkDisplayPlaneAlphaFlagBitsKHR              alphaMode | 
|  | 2831 | VkExtent2D                                  imageExtent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2832 | } | 
|  | 2833 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2834 | @extension("VK_KHR_display_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2835 | class VkDisplayPresentInfoKHR { | 
|  | 2836 | VkStructureType                             sType | 
|  | 2837 | const void*                                 pNext | 
|  | 2838 | VkRect2D                                    srcRect | 
|  | 2839 | VkRect2D                                    dstRect | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2840 | VkBool32                                    persistent | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2841 | } | 
|  | 2842 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2843 | @extension("VK_KHR_xlib_surface") | 
|  | 2844 | class VkXlibSurfaceCreateInfoKHR { | 
|  | 2845 | VkStructureType                             sType | 
|  | 2846 | const void*                                 pNext | 
|  | 2847 | VkXlibSurfaceCreateFlagsKHR                 flags | 
|  | 2848 | platform.Display*                           dpy | 
|  | 2849 | platform.Window                             window | 
|  | 2850 | } | 
|  | 2851 |  | 
|  | 2852 | @extension("VK_KHR_xcb_surface") | 
|  | 2853 | class VkXcbSurfaceCreateInfoKHR { | 
|  | 2854 | VkStructureType                             sType | 
|  | 2855 | const void*                                 pNext | 
|  | 2856 | VkXcbSurfaceCreateFlagsKHR                  flags | 
|  | 2857 | platform.xcb_connection_t*                  connection | 
|  | 2858 | platform.xcb_window_t                       window | 
|  | 2859 | } | 
|  | 2860 |  | 
|  | 2861 | @extension("VK_KHR_wayland_surface") | 
|  | 2862 | class VkWaylandSurfaceCreateInfoKHR { | 
|  | 2863 | VkStructureType                             sType | 
|  | 2864 | const void*                                 pNext | 
|  | 2865 | VkWaylandSurfaceCreateFlagsKHR              flags | 
|  | 2866 | platform.wl_display*                        display | 
|  | 2867 | platform.wl_surface*                        surface | 
|  | 2868 | } | 
|  | 2869 |  | 
|  | 2870 | @extension("VK_KHR_mir_surface") | 
|  | 2871 | class VkMirSurfaceCreateInfoKHR { | 
|  | 2872 | VkStructureType                             sType | 
|  | 2873 | const void*                                 pNext | 
|  | 2874 | VkMirSurfaceCreateFlagsKHR                  flags | 
|  | 2875 | platform.MirConnection*                     connection | 
|  | 2876 | platform.MirSurface*                        mirSurface | 
|  | 2877 | } | 
|  | 2878 |  | 
|  | 2879 | @extension("VK_KHR_android_surface") | 
|  | 2880 | class VkAndroidSurfaceCreateInfoKHR { | 
|  | 2881 | VkStructureType                             sType | 
|  | 2882 | const void*                                 pNext | 
|  | 2883 | VkAndroidSurfaceCreateFlagsKHR              flags | 
|  | 2884 | platform.ANativeWindow*                     window | 
|  | 2885 | } | 
|  | 2886 |  | 
|  | 2887 | @extension("VK_KHR_win32_surface") | 
|  | 2888 | class VkWin32SurfaceCreateInfoKHR { | 
|  | 2889 | VkStructureType                             sType | 
|  | 2890 | const void*                                 pNext | 
|  | 2891 | VkWin32SurfaceCreateFlagsKHR                flags | 
|  | 2892 | platform.HINSTANCE                          hinstance | 
|  | 2893 | platform.HWND                               hwnd | 
|  | 2894 | } | 
|  | 2895 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2896 | @extension("VK_ANDROID_native_buffer") | 
|  | 2897 | class VkNativeBufferANDROID { | 
|  | 2898 | VkStructureType                             sType | 
|  | 2899 | const void*                                 pNext | 
|  | 2900 | platform.buffer_handle_t                    handle | 
|  | 2901 | int                                         stride | 
|  | 2902 | int                                         format | 
|  | 2903 | int                                         usage | 
|  | 2904 | } | 
|  | 2905 |  | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2906 | @extension("VK_ANDROID_native_buffer") | 
|  | 2907 | class VkSwapchainImageCreateInfoANDROID { | 
|  | 2908 | VkStructureType                             sType | 
|  | 2909 | const void*                                 pNext | 
| Chris Forbes | 134d958 | 2017-01-12 14:26:37 +1300 | [diff] [blame] | 2910 | VkSwapchainImageUsageFlagsANDROID           flags | 
| Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2911 | } | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2912 |  | 
|  | 2913 | @extension("VK_GOOGLE_display_timing") | 
|  | 2914 | class VkRefreshCycleDurationGOOGLE { | 
| Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2915 | u64                                         minRefreshDuration | 
|  | 2916 | u64                                         maxRefreshDuration | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2917 | } | 
|  | 2918 |  | 
|  | 2919 | @extension("VK_GOOGLE_display_timing") | 
|  | 2920 | class VkPastPresentationTimingGOOGLE { | 
| Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2921 | u32                                         presentID | 
|  | 2922 | u64                                         desiredPresentTime | 
|  | 2923 | u64                                         actualPresentTime | 
|  | 2924 | u64                                         earliestPresentTime | 
|  | 2925 | u64                                         presentMargin | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2926 | } | 
|  | 2927 |  | 
|  | 2928 | @extension("VK_GOOGLE_display_timing") | 
|  | 2929 | class VkPresentTimeGOOGLE { | 
| Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2930 | u32                                         presentID | 
|  | 2931 | u64                                         desiredPresentTime | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2932 | } | 
|  | 2933 |  | 
|  | 2934 | @extension("VK_GOOGLE_display_timing") | 
|  | 2935 | class VkPresentTimesInfoGOOGLE { | 
|  | 2936 | VkStructureType                             sType | 
|  | 2937 | const void*                                 pNext | 
| Chris Forbes | 4885371 | 2017-01-12 14:09:33 +1300 | [diff] [blame] | 2938 | u32                                         swapchainCount | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 2939 | const VkPresentTimeGOOGLE*                  pTimes | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2940 | } | 
|  | 2941 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2942 | @extension("VK_EXT_debug_report") | 
|  | 2943 | class VkDebugReportCallbackCreateInfoEXT { | 
|  | 2944 | VkStructureType                             sType | 
|  | 2945 | const void*                                 pNext | 
|  | 2946 | VkDebugReportFlagsEXT                       flags | 
|  | 2947 | PFN_vkDebugReportCallbackEXT                pfnCallback | 
|  | 2948 | void*                                       pUserData | 
|  | 2949 | } | 
|  | 2950 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2951 | @extension("VK_AMD_rasterization_order") | 
|  | 2952 | class VkPipelineRasterizationStateRasterizationOrderAMD { | 
|  | 2953 | VkStructureType                             sType | 
|  | 2954 | const void*                                 pNext | 
|  | 2955 | VkRasterizationOrderAMD                     rasterizationOrder | 
|  | 2956 | } | 
|  | 2957 |  | 
|  | 2958 | @extension("VK_EXT_debug_marker") | 
|  | 2959 | class VkDebugMarkerObjectNameInfoEXT { | 
|  | 2960 | VkStructureType                             sType | 
|  | 2961 | const void*                                 pNext | 
|  | 2962 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2963 | u64                                         object | 
|  | 2964 | const char*                                 pObjectName | 
|  | 2965 | } | 
|  | 2966 |  | 
|  | 2967 | @extension("VK_EXT_debug_marker") | 
|  | 2968 | class VkDebugMarkerObjectTagInfoEXT { | 
|  | 2969 | VkStructureType                             sType | 
|  | 2970 | const void*                                 pNext | 
|  | 2971 | VkDebugReportObjectTypeEXT                  objectType | 
|  | 2972 | u64                                         object | 
|  | 2973 | u64                                         tagName | 
|  | 2974 | platform.size_t                             tagSize | 
|  | 2975 | const void*                                 pTag | 
|  | 2976 | } | 
|  | 2977 |  | 
|  | 2978 | @extension("VK_EXT_debug_marker") | 
|  | 2979 | class VkDebugMarkerMarkerInfoEXT { | 
|  | 2980 | VkStructureType                             sType | 
|  | 2981 | const void*                                 pNext | 
|  | 2982 | const char*                                 pMarkerName | 
|  | 2983 | f32[4]                                      color | 
|  | 2984 | } | 
|  | 2985 |  | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2986 | @extension("VK_NV_dedicated_allocation") | 
|  | 2987 | class VkDedicatedAllocationImageCreateInfoNV { | 
|  | 2988 | VkStructureType                             sType | 
|  | 2989 | const void*                                 pNext | 
|  | 2990 | VkBool32                                    dedicatedAllocation | 
|  | 2991 | } | 
|  | 2992 |  | 
|  | 2993 | @extension("VK_NV_dedicated_allocation") | 
|  | 2994 | class VkDedicatedAllocationBufferCreateInfoNV { | 
|  | 2995 | VkStructureType                             sType | 
|  | 2996 | const void*                                 pNext | 
|  | 2997 | VkBool32                                    dedicatedAllocation | 
|  | 2998 | } | 
|  | 2999 |  | 
|  | 3000 | @extension("VK_NV_dedicated_allocation") | 
|  | 3001 | class VkDedicatedAllocationMemoryAllocateInfoNV { | 
|  | 3002 | VkStructureType                             sType | 
|  | 3003 | const void*                                 pNext | 
|  | 3004 | VkImage                                     image | 
|  | 3005 | VkBuffer                                    buffer | 
|  | 3006 | } | 
|  | 3007 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 3008 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3009 | class VkPhysicalDeviceFeatures2KHR { | 
|  | 3010 | VkStructureType                             sType | 
|  | 3011 | void*                                       pNext | 
|  | 3012 | VkPhysicalDeviceFeatures                    features | 
|  | 3013 | } | 
|  | 3014 |  | 
|  | 3015 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3016 | class VkPhysicalDeviceProperties2KHR { | 
|  | 3017 | VkStructureType                             sType | 
|  | 3018 | void*                                       pNext | 
|  | 3019 | VkPhysicalDeviceProperties                  properties | 
|  | 3020 | } | 
|  | 3021 |  | 
|  | 3022 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3023 | class VkFormatProperties2KHR { | 
|  | 3024 | VkStructureType                             sType | 
|  | 3025 | void*                                       pNext | 
|  | 3026 | VkFormatProperties                          formatProperties | 
|  | 3027 | } | 
|  | 3028 |  | 
|  | 3029 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3030 | class VkImageFormatProperties2KHR { | 
|  | 3031 | VkStructureType                             sType | 
|  | 3032 | void*                                       pNext | 
|  | 3033 | VkImageFormatProperties                     imageFormatProperties | 
|  | 3034 | } | 
|  | 3035 |  | 
|  | 3036 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3037 | class VkPhysicalDeviceImageFormatInfo2KHR { | 
|  | 3038 | VkStructureType                             sType | 
|  | 3039 | const void*                                 pNext | 
|  | 3040 | VkFormat                                    format | 
|  | 3041 | VkImageType                                 type | 
|  | 3042 | VkImageTiling                               tiling | 
|  | 3043 | VkImageUsageFlags                           usage | 
|  | 3044 | VkImageCreateFlags                          flags | 
|  | 3045 | } | 
|  | 3046 |  | 
|  | 3047 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3048 | class VkQueueFamilyProperties2KHR { | 
|  | 3049 | VkStructureType                             sType | 
|  | 3050 | void*                                       pNext | 
|  | 3051 | VkQueueFamilyProperties                     queueFamilyProperties | 
|  | 3052 | } | 
|  | 3053 |  | 
|  | 3054 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3055 | class VkPhysicalDeviceMemoryProperties2KHR { | 
|  | 3056 | VkStructureType                             sType | 
|  | 3057 | void*                                       pNext | 
|  | 3058 | VkPhysicalDeviceMemoryProperties            memoryProperties | 
|  | 3059 | } | 
|  | 3060 |  | 
|  | 3061 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3062 | class VkSparseImageFormatProperties2KHR { | 
|  | 3063 | VkStructureType                             sType | 
|  | 3064 | void*                                       pNext | 
|  | 3065 | VkSparseImageFormatProperties               properties | 
|  | 3066 | } | 
|  | 3067 |  | 
|  | 3068 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 3069 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { | 
|  | 3070 | VkStructureType                             sType | 
|  | 3071 | const void*                                 pNext | 
|  | 3072 | VkFormat                                    format | 
|  | 3073 | VkImageType                                 type | 
|  | 3074 | VkSampleCountFlagBits                       samples | 
|  | 3075 | VkImageUsageFlags                           usage | 
|  | 3076 | VkImageTiling                               tiling | 
|  | 3077 | } | 
|  | 3078 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3079 | @extension("VK_KHR_incremental_present") | 
|  | 3080 | class VkRectLayerKHR { | 
|  | 3081 | VkOffset2D                                  offset | 
|  | 3082 | VkExtent2D                                  extent | 
|  | 3083 | u32                                         layer | 
|  | 3084 | } | 
|  | 3085 |  | 
|  | 3086 | @extension("VK_KHR_incremental_present") | 
|  | 3087 | class VkPresentRegionKHR { | 
|  | 3088 | u32                                         rectangleCount | 
|  | 3089 | const VkRectLayerKHR*                       pRectangles | 
|  | 3090 | } | 
|  | 3091 |  | 
|  | 3092 | @extension("VK_KHR_incremental_present") | 
|  | 3093 | class VkPresentRegionsKHR { | 
|  | 3094 | VkStructureType                             sType | 
|  | 3095 | const void*                                 pNext | 
|  | 3096 | u32                                         swapchainCount | 
|  | 3097 | const VkPresentRegionKHR*                   pRegions | 
|  | 3098 | } | 
|  | 3099 |  | 
|  | 3100 | @extension("VK_NV_external_memory_capabilities") | 
|  | 3101 | class VkExternalImageFormatPropertiesNV { | 
|  | 3102 | VkImageFormatProperties                     imageFormatProperties | 
|  | 3103 | VkExternalMemoryFeatureFlagsNV              externalMemoryFeatures | 
|  | 3104 | VkExternalMemoryHandleTypeFlagsNV           exportFromImportedHandleTypes | 
|  | 3105 | VkExternalMemoryHandleTypeFlagsNV           compatibleHandleTypes | 
|  | 3106 | } | 
|  | 3107 |  | 
|  | 3108 | @extension("VK_NV_external_memory") | 
|  | 3109 | class VkExternalMemoryImageCreateInfoNV { | 
|  | 3110 | VkStructureType                             sType | 
|  | 3111 | const void*                                 pNext | 
|  | 3112 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 3113 | } | 
|  | 3114 |  | 
|  | 3115 | @extension("VK_NV_external_memory") | 
|  | 3116 | class VkExportMemoryAllocateInfoNV { | 
|  | 3117 | VkStructureType                             sType | 
|  | 3118 | const void*                                 pNext | 
|  | 3119 | VkExternalMemoryHandleTypeFlagsNV           handleTypes | 
|  | 3120 | } | 
|  | 3121 |  | 
|  | 3122 | @extension("VK_NV_external_memory_win32") | 
|  | 3123 | class VkImportMemoryWin32HandleInfoNV { | 
|  | 3124 | VkStructureType                             sType | 
|  | 3125 | const void*                                 pNext | 
|  | 3126 | VkExternalMemoryHandleTypeFlagsNV           handleType | 
|  | 3127 | platform.HANDLE                             handle | 
|  | 3128 | } | 
|  | 3129 |  | 
|  | 3130 | @extension("VK_NV_external_memory_win32") | 
|  | 3131 | class VkExportMemoryWin32HandleInfoNV { | 
|  | 3132 | VkStructureType                             sType | 
|  | 3133 | const void*                                 pNext | 
|  | 3134 | const platform.SECURITY_ATTRIBUTES*         pAttributes | 
|  | 3135 | u32                                         dwAccess | 
|  | 3136 | } | 
|  | 3137 |  | 
|  | 3138 | @extension("VK_NV_win32_keyed_mutex") | 
|  | 3139 | class VkWin32KeyedMutexAcquireReleaseInfoNV { | 
|  | 3140 | VkStructureType                             sType | 
|  | 3141 | const void*                                 pNext | 
|  | 3142 | u32                                         acquireCount | 
|  | 3143 | const VkDeviceMemory*                       pAcquireSyncs | 
|  | 3144 | const u64*                                  pAcquireKeys | 
|  | 3145 | const u32*                                  pAcquireTimeoutMilliseconds | 
|  | 3146 | u32                                         releaseCount | 
|  | 3147 | const VkDeviceMemory*                       pReleaseSyncs | 
|  | 3148 | const u64*                                  pReleaseKeys | 
|  | 3149 | } | 
|  | 3150 |  | 
|  | 3151 | @extension("VK_EXT_validation_flags") | 
|  | 3152 | class VkValidationFlagsEXT { | 
|  | 3153 | VkStructureType                             sType | 
|  | 3154 | const void*                                 pNext | 
|  | 3155 | u32                                         disabledValidationCheckCount | 
|  | 3156 | VkValidationCheckEXT*                       pDisabledValidationChecks | 
|  | 3157 | } | 
|  | 3158 |  | 
|  | 3159 | @extension("VK_NVX_device_generated_commands") | 
|  | 3160 | class VkDeviceGeneratedCommandsFeaturesNVX { | 
|  | 3161 | VkStructureType                             sType | 
|  | 3162 | const void*                                 pNext | 
|  | 3163 | VkBool32                                    computeBindingPointSupport | 
|  | 3164 | } | 
|  | 3165 |  | 
|  | 3166 | @extension("VK_NVX_device_generated_commands") | 
|  | 3167 | class VkDeviceGeneratedCommandsLimitsNVX { | 
|  | 3168 | VkStructureType                             sType | 
|  | 3169 | const void*                                 pNext | 
|  | 3170 | u32                                         maxIndirectCommandsLayoutTokenCount | 
|  | 3171 | u32                                         maxObjectEntryCounts | 
|  | 3172 | u32                                         minSequenceCountBufferOffsetAlignment | 
|  | 3173 | u32                                         minSequenceIndexBufferOffsetAlignment | 
|  | 3174 | u32                                         minCommandsTokenBufferOffsetAlignment | 
|  | 3175 | } | 
|  | 3176 |  | 
|  | 3177 | @extension("VK_NVX_device_generated_commands") | 
|  | 3178 | class VkIndirectCommandsTokenNVX { | 
|  | 3179 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 3180 | VkBuffer                                    buffer | 
|  | 3181 | VkDeviceSize                                offset | 
|  | 3182 | } | 
|  | 3183 |  | 
|  | 3184 | @extension("VK_NVX_device_generated_commands") | 
|  | 3185 | class VkIndirectCommandsLayoutTokenNVX { | 
|  | 3186 | VkIndirectCommandsTokenTypeNVX              tokenType | 
|  | 3187 | u32                                         bindingUnit | 
|  | 3188 | u32                                         dynamicCount | 
|  | 3189 | u32                                         divisor | 
|  | 3190 | } | 
|  | 3191 |  | 
|  | 3192 | @extension("VK_NVX_device_generated_commands") | 
|  | 3193 | class VkIndirectCommandsLayoutCreateInfoNVX { | 
|  | 3194 | VkStructureType                             sType | 
|  | 3195 | const void*                                 pNext | 
|  | 3196 | VkPipelineBindPoint                         pipelineBindPoint | 
|  | 3197 | VkIndirectCommandsLayoutUsageFlagsNVX       flags | 
|  | 3198 | u32                                         tokenCount | 
|  | 3199 | const VkIndirectCommandsLayoutTokenNVX*     pTokens | 
|  | 3200 | } | 
|  | 3201 |  | 
|  | 3202 | @extension("VK_NVX_device_generated_commands") | 
|  | 3203 | class VkCmdProcessCommandsInfoNVX { | 
|  | 3204 | VkStructureType                             sType | 
|  | 3205 | const void*                                 pNext | 
|  | 3206 | VkObjectTableNVX                            objectTable | 
|  | 3207 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3208 | u32                                         indirectCommandsTokenCount | 
|  | 3209 | const VkIndirectCommandsTokenNVX*           pIndirectCommandsTokens | 
|  | 3210 | u32                                         maxSequencesCount | 
|  | 3211 | VkCommandBuffer                             targetCommandBuffer | 
|  | 3212 | VkBuffer                                    sequencesCountBuffer | 
|  | 3213 | VkDeviceSize                                sequencesCountOffset | 
|  | 3214 | VkBuffer                                    sequencesIndexBuffer | 
|  | 3215 | VkDeviceSize                                sequencesIndexOffset | 
|  | 3216 | } | 
|  | 3217 |  | 
|  | 3218 | @extension("VK_NVX_device_generated_commands") | 
|  | 3219 | class VkCmdReserveSpaceForCommandsInfoNVX { | 
|  | 3220 | VkStructureType                             sType | 
|  | 3221 | const void*                                 pNext | 
|  | 3222 | VkObjectTableNVX                            objectTable | 
|  | 3223 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout | 
|  | 3224 | u32                                         maxSequencesCount | 
|  | 3225 | } | 
|  | 3226 |  | 
|  | 3227 | @extension("VK_NVX_device_generated_commands") | 
|  | 3228 | class VkObjectTableCreateInfoNVX { | 
|  | 3229 | VkStructureType                             sType | 
|  | 3230 | const void*                                 pNext | 
|  | 3231 | u32                                         objectCount | 
|  | 3232 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes | 
|  | 3233 | const u32*                                  pObjectEntryCounts | 
|  | 3234 | const VkObjectEntryUsageFlagsNVX*           pObjectEntryUsageFlags | 
|  | 3235 | u32                                         maxUniformBuffersPerDescriptor | 
|  | 3236 | u32                                         maxStorageBuffersPerDescriptor | 
|  | 3237 | u32                                         maxStorageImagesPerDescriptor | 
|  | 3238 | u32                                         maxSampledImagesPerDescriptor | 
|  | 3239 | u32                                         maxPipelineLayouts | 
|  | 3240 | } | 
|  | 3241 |  | 
|  | 3242 | @extension("VK_NVX_device_generated_commands") | 
|  | 3243 | class VkObjectTableEntryNVX { | 
|  | 3244 | VkObjectEntryTypeNVX                        type | 
|  | 3245 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3246 | } | 
|  | 3247 |  | 
|  | 3248 | @extension("VK_NVX_device_generated_commands") | 
|  | 3249 | class VkObjectTablePipelineEntryNVX { | 
|  | 3250 | VkObjectEntryTypeNVX                        type | 
|  | 3251 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3252 | VkPipeline                                  pipeline | 
|  | 3253 | } | 
|  | 3254 |  | 
|  | 3255 | @extension("VK_NVX_device_generated_commands") | 
|  | 3256 | class VkObjectTableDescriptorSetEntryNVX { | 
|  | 3257 | VkObjectEntryTypeNVX                        type | 
|  | 3258 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3259 | VkPipelineLayout                            pipelineLayout | 
|  | 3260 | VkDescriptorSet                             descriptorSet | 
|  | 3261 | } | 
|  | 3262 |  | 
|  | 3263 | @extension("VK_NVX_device_generated_commands") | 
|  | 3264 | class VkObjectTableVertexBufferEntryNVX { | 
|  | 3265 | VkObjectEntryTypeNVX                        type | 
|  | 3266 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3267 | VkBuffer                                    buffer | 
|  | 3268 | } | 
|  | 3269 |  | 
|  | 3270 | @extension("VK_NVX_device_generated_commands") | 
|  | 3271 | class VkObjectTableIndexBufferEntryNVX { | 
|  | 3272 | VkObjectEntryTypeNVX                        type | 
|  | 3273 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3274 | VkBuffer                                    buffer | 
|  | 3275 | } | 
|  | 3276 |  | 
|  | 3277 | @extension("VK_NVX_device_generated_commands") | 
|  | 3278 | class VkObjectTablePushConstantEntryNVX { | 
|  | 3279 | VkObjectEntryTypeNVX                        type | 
|  | 3280 | VkObjectEntryUsageFlagsNVX                  flags | 
|  | 3281 | VkPipelineLayout                            pipelineLayout | 
|  | 3282 | VkShaderStageFlags                          stageFlags | 
|  | 3283 | } | 
|  | 3284 |  | 
|  | 3285 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3286 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3287 | //////////////// | 
|  | 3288 | //  Commands  // | 
|  | 3289 | //////////////// | 
|  | 3290 |  | 
|  | 3291 | // Function pointers. TODO: add support for function pointers. | 
|  | 3292 |  | 
|  | 3293 | @external type void* PFN_vkVoidFunction | 
|  | 3294 | @pfn cmd void vkVoidFunction() { | 
|  | 3295 | } | 
|  | 3296 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3297 | @external type void* PFN_vkAllocationFunction | 
|  | 3298 | @pfn cmd void* vkAllocationFunction( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3299 | void*                                       pUserData, | 
|  | 3300 | platform.size_t                             size, | 
|  | 3301 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3302 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3303 | return ? | 
|  | 3304 | } | 
|  | 3305 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3306 | @external type void* PFN_vkReallocationFunction | 
|  | 3307 | @pfn cmd void* vkReallocationFunction( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3308 | void*                                       pUserData, | 
|  | 3309 | void*                                       pOriginal, | 
|  | 3310 | platform.size_t                             size, | 
|  | 3311 | platform.size_t                             alignment, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3312 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3313 | return ? | 
|  | 3314 | } | 
|  | 3315 |  | 
|  | 3316 | @external type void* PFN_vkFreeFunction | 
|  | 3317 | @pfn cmd void vkFreeFunction( | 
|  | 3318 | void*                                       pUserData, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3319 | void*                                       pMemory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3320 | } | 
|  | 3321 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3322 | @external type void* PFN_vkInternalAllocationNotification | 
|  | 3323 | @pfn cmd void vkInternalAllocationNotification( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3324 | void*                                       pUserData, | 
|  | 3325 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3326 | VkInternalAllocationType                    allocationType, | 
|  | 3327 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3328 | } | 
|  | 3329 |  | 
|  | 3330 | @external type void* PFN_vkInternalFreeNotification | 
|  | 3331 | @pfn cmd void vkInternalFreeNotification( | 
|  | 3332 | void*                                       pUserData, | 
|  | 3333 | platform.size_t                             size, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3334 | VkInternalAllocationType                    allocationType, | 
|  | 3335 | VkSystemAllocationScope                     allocationScope) { | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3336 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3337 |  | 
|  | 3338 | // Global functions | 
|  | 3339 |  | 
|  | 3340 | @threadSafety("system") | 
|  | 3341 | cmd VkResult vkCreateInstance( | 
|  | 3342 | const VkInstanceCreateInfo*                 pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3343 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3344 | VkInstance*                                 pInstance) { | 
|  | 3345 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) | 
|  | 3346 |  | 
|  | 3347 | instance := ? | 
|  | 3348 | pInstance[0] = instance | 
|  | 3349 | State.Instances[instance] = new!InstanceObject() | 
|  | 3350 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3351 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] | 
|  | 3352 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3353 |  | 
|  | 3354 | return ? | 
|  | 3355 | } | 
|  | 3356 |  | 
|  | 3357 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3358 | cmd void vkDestroyInstance( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3359 | VkInstance                                  instance, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3360 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3361 | instanceObject := GetInstance(instance) | 
|  | 3362 |  | 
|  | 3363 | State.Instances[instance] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3364 | } | 
|  | 3365 |  | 
|  | 3366 | @threadSafety("system") | 
|  | 3367 | cmd VkResult vkEnumeratePhysicalDevices( | 
|  | 3368 | VkInstance                                  instance, | 
|  | 3369 | u32*                                        pPhysicalDeviceCount, | 
|  | 3370 | VkPhysicalDevice*                           pPhysicalDevices) { | 
|  | 3371 | instanceObject := GetInstance(instance) | 
|  | 3372 |  | 
|  | 3373 | physicalDeviceCount := as!u32(?) | 
|  | 3374 | pPhysicalDeviceCount[0] = physicalDeviceCount | 
|  | 3375 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] | 
|  | 3376 |  | 
|  | 3377 | for i in (0 .. physicalDeviceCount) { | 
|  | 3378 | physicalDevice := ? | 
|  | 3379 | physicalDevices[i] = physicalDevice | 
|  | 3380 | if !(physicalDevice in State.PhysicalDevices) { | 
|  | 3381 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) | 
|  | 3382 | } | 
|  | 3383 | } | 
|  | 3384 |  | 
|  | 3385 | return ? | 
|  | 3386 | } | 
|  | 3387 |  | 
|  | 3388 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( | 
|  | 3389 | VkDevice                                    device, | 
|  | 3390 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3391 | if device != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3392 | device := GetDevice(device) | 
|  | 3393 | } | 
|  | 3394 |  | 
|  | 3395 | return ? | 
|  | 3396 | } | 
|  | 3397 |  | 
|  | 3398 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( | 
|  | 3399 | VkInstance                                  instance, | 
|  | 3400 | const char*                                 pName) { | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3401 | if instance != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3402 | instanceObject := GetInstance(instance) | 
|  | 3403 | } | 
|  | 3404 |  | 
|  | 3405 | return ? | 
|  | 3406 | } | 
|  | 3407 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3408 | cmd void vkGetPhysicalDeviceProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3409 | VkPhysicalDevice                            physicalDevice, | 
|  | 3410 | VkPhysicalDeviceProperties*                 pProperties) { | 
|  | 3411 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3412 |  | 
|  | 3413 | properties := ? | 
|  | 3414 | pProperties[0] = properties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3415 | } | 
|  | 3416 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3417 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3418 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3419 | u32*                                        pQueueFamilyPropertyCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3420 | VkQueueFamilyProperties*                    pQueueFamilyProperties) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3421 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3422 | // TODO: Figure out how to express fetch-count-or-properties | 
|  | 3423 | // This version fails 'apic validate' with 'fence not allowed in | 
|  | 3424 | // *semantic.Branch'. Other attempts have failed with the same or other | 
|  | 3425 | // errors. | 
|  | 3426 | // if pQueueFamilyProperties != null { | 
|  | 3427 | //     queuesProperties := pQueueFamilyProperties[0:pCount[0]] | 
|  | 3428 | //     for i in (0 .. pCount[0]) { | 
|  | 3429 | //         queueProperties := as!VkQueueFamilyProperties(?) | 
|  | 3430 | //         queuesProperties[i] = queueProperties | 
|  | 3431 | //    } | 
|  | 3432 | // } else { | 
|  | 3433 | //     count := ? | 
|  | 3434 | //     pCount[0] = count | 
|  | 3435 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3436 | } | 
|  | 3437 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3438 | cmd void vkGetPhysicalDeviceMemoryProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3439 | VkPhysicalDevice                            physicalDevice, | 
|  | 3440 | VkPhysicalDeviceMemoryProperties*           pMemoryProperties) { | 
|  | 3441 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3442 |  | 
|  | 3443 | memoryProperties := ? | 
|  | 3444 | pMemoryProperties[0] = memoryProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3445 | } | 
|  | 3446 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3447 | cmd void vkGetPhysicalDeviceFeatures( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3448 | VkPhysicalDevice                            physicalDevice, | 
|  | 3449 | VkPhysicalDeviceFeatures*                   pFeatures) { | 
|  | 3450 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3451 |  | 
|  | 3452 | features := ? | 
|  | 3453 | pFeatures[0] = features | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3454 | } | 
|  | 3455 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3456 | cmd void vkGetPhysicalDeviceFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3457 | VkPhysicalDevice                            physicalDevice, | 
|  | 3458 | VkFormat                                    format, | 
|  | 3459 | VkFormatProperties*                         pFormatProperties) { | 
|  | 3460 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3461 |  | 
|  | 3462 | formatProperties := ? | 
|  | 3463 | pFormatProperties[0] = formatProperties | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3464 | } | 
|  | 3465 |  | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3466 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3467 | VkPhysicalDevice                            physicalDevice, | 
|  | 3468 | VkFormat                                    format, | 
|  | 3469 | VkImageType                                 type, | 
|  | 3470 | VkImageTiling                               tiling, | 
|  | 3471 | VkImageUsageFlags                           usage, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3472 | VkImageCreateFlags                          flags, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3473 | VkImageFormatProperties*                    pImageFormatProperties) { | 
|  | 3474 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3475 |  | 
|  | 3476 | imageFormatProperties := ? | 
|  | 3477 | pImageFormatProperties[0] = imageFormatProperties | 
| Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3478 |  | 
|  | 3479 | return ? | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3480 | } | 
|  | 3481 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3482 |  | 
|  | 3483 | // Device functions | 
|  | 3484 |  | 
|  | 3485 | @threadSafety("system") | 
|  | 3486 | cmd VkResult vkCreateDevice( | 
|  | 3487 | VkPhysicalDevice                            physicalDevice, | 
|  | 3488 | const VkDeviceCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3489 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3490 | VkDevice*                                   pDevice) { | 
|  | 3491 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) | 
|  | 3492 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3493 |  | 
|  | 3494 | device := ? | 
|  | 3495 | pDevice[0] = device | 
|  | 3496 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) | 
|  | 3497 |  | 
|  | 3498 | return ? | 
|  | 3499 | } | 
|  | 3500 |  | 
|  | 3501 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3502 | cmd void vkDestroyDevice( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3503 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3504 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3505 | deviceObject := GetDevice(device) | 
|  | 3506 |  | 
|  | 3507 | State.Devices[device] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3508 | } | 
|  | 3509 |  | 
|  | 3510 |  | 
|  | 3511 | // Extension discovery functions | 
|  | 3512 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3513 | cmd VkResult vkEnumerateInstanceLayerProperties( | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3514 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3515 | VkLayerProperties*                          pProperties) { | 
|  | 3516 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3517 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3518 |  | 
|  | 3519 | properties := pProperties[0:count] | 
|  | 3520 | for i in (0 .. count) { | 
|  | 3521 | property := ? | 
|  | 3522 | properties[i] = property | 
|  | 3523 | } | 
|  | 3524 |  | 
|  | 3525 | return ? | 
|  | 3526 | } | 
|  | 3527 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3528 | cmd VkResult vkEnumerateInstanceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3529 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3530 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3531 | VkExtensionProperties*                      pProperties) { | 
|  | 3532 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3533 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3534 |  | 
|  | 3535 | properties := pProperties[0:count] | 
|  | 3536 | for i in (0 .. count) { | 
|  | 3537 | property := ? | 
|  | 3538 | properties[i] = property | 
|  | 3539 | } | 
|  | 3540 |  | 
|  | 3541 | return ? | 
|  | 3542 | } | 
|  | 3543 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3544 | cmd VkResult vkEnumerateDeviceLayerProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3545 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3546 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3547 | VkLayerProperties*                          pProperties) { | 
|  | 3548 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3549 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3550 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3551 |  | 
|  | 3552 | properties := pProperties[0:count] | 
|  | 3553 | for i in (0 .. count) { | 
|  | 3554 | property := ? | 
|  | 3555 | properties[i] = property | 
|  | 3556 | } | 
|  | 3557 |  | 
|  | 3558 | return ? | 
|  | 3559 | } | 
|  | 3560 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3561 | cmd VkResult vkEnumerateDeviceExtensionProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3562 | VkPhysicalDevice                            physicalDevice, | 
|  | 3563 | const char*                                 pLayerName, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3564 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3565 | VkExtensionProperties*                      pProperties) { | 
|  | 3566 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 3567 |  | 
|  | 3568 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3569 | pPropertyCount[0] = count | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3570 |  | 
|  | 3571 | properties := pProperties[0:count] | 
|  | 3572 | for i in (0 .. count) { | 
|  | 3573 | property := ? | 
|  | 3574 | properties[i] = property | 
|  | 3575 | } | 
|  | 3576 |  | 
|  | 3577 | return ? | 
|  | 3578 | } | 
|  | 3579 |  | 
|  | 3580 |  | 
|  | 3581 | // Queue functions | 
|  | 3582 |  | 
|  | 3583 | @threadSafety("system") | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3584 | cmd void vkGetDeviceQueue( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3585 | VkDevice                                    device, | 
|  | 3586 | u32                                         queueFamilyIndex, | 
|  | 3587 | u32                                         queueIndex, | 
|  | 3588 | VkQueue*                                    pQueue) { | 
|  | 3589 | deviceObject := GetDevice(device) | 
|  | 3590 |  | 
|  | 3591 | queue := ? | 
|  | 3592 | pQueue[0] = queue | 
|  | 3593 |  | 
|  | 3594 | if !(queue in State.Queues) { | 
|  | 3595 | State.Queues[queue] = new!QueueObject(device: device) | 
|  | 3596 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3597 | } | 
|  | 3598 |  | 
|  | 3599 | @threadSafety("app") | 
|  | 3600 | cmd VkResult vkQueueSubmit( | 
|  | 3601 | VkQueue                                     queue, | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3602 | u32                                         submitCount, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3603 | const VkSubmitInfo*                         pSubmits, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3604 | VkFence                                     fence) { | 
|  | 3605 | queueObject := GetQueue(queue) | 
|  | 3606 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3607 | if fence != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3608 | fenceObject := GetFence(fence) | 
|  | 3609 | assert(fenceObject.device == queueObject.device) | 
|  | 3610 | } | 
|  | 3611 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3612 | // commandBuffers := pcommandBuffers[0:commandBufferCount] | 
|  | 3613 | // for i in (0 .. commandBufferCount) { | 
|  | 3614 | //    commandBuffer := commandBuffers[i] | 
|  | 3615 | //    commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 3616 | //    assert(commandBufferObject.device == queueObject.device) | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3617 | // | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3618 | //    validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, | 
|  | 3619 | //        "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") | 
| Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3620 | // } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3621 |  | 
|  | 3622 | return ? | 
|  | 3623 | } | 
|  | 3624 |  | 
|  | 3625 | @threadSafety("system") | 
|  | 3626 | cmd VkResult vkQueueWaitIdle( | 
|  | 3627 | VkQueue                                     queue) { | 
|  | 3628 | queueObject := GetQueue(queue) | 
|  | 3629 |  | 
|  | 3630 | return ? | 
|  | 3631 | } | 
|  | 3632 |  | 
|  | 3633 | @threadSafety("system") | 
|  | 3634 | cmd VkResult vkDeviceWaitIdle( | 
|  | 3635 | VkDevice                                    device) { | 
|  | 3636 | deviceObject := GetDevice(device) | 
|  | 3637 |  | 
|  | 3638 | return ? | 
|  | 3639 | } | 
|  | 3640 |  | 
|  | 3641 |  | 
|  | 3642 | // Memory functions | 
|  | 3643 |  | 
|  | 3644 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3645 | cmd VkResult vkAllocateMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3646 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3647 | const VkMemoryAllocateInfo*                 pAllocateInfo, | 
|  | 3648 | const VkAllocationCallbacks*                pAllocator, | 
|  | 3649 | VkDeviceMemory*                             pMemory) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3650 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3651 | deviceObject := GetDevice(device) | 
|  | 3652 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3653 | memory := ? | 
|  | 3654 | pMemory[0] = memory | 
|  | 3655 | State.DeviceMemories[memory] = new!DeviceMemoryObject( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3656 | device: device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3657 | allocationSize: pAllocateInfo[0].allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3658 |  | 
|  | 3659 | return ? | 
|  | 3660 | } | 
|  | 3661 |  | 
|  | 3662 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3663 | cmd void vkFreeMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3664 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3665 | VkDeviceMemory                              memory, | 
|  | 3666 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3667 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3668 | memoryObject := GetDeviceMemory(memory) | 
|  | 3669 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3670 |  | 
|  | 3671 | // Check that no objects are still bound before freeing. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3672 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3673 | "vkFreeMemory: objects still bound") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3674 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, | 
|  | 3675 | "vkFreeMemory: commandBuffers still bound") | 
|  | 3676 | State.DeviceMemories[memory] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3677 | } | 
|  | 3678 |  | 
|  | 3679 | @threadSafety("app") | 
|  | 3680 | cmd VkResult vkMapMemory( | 
|  | 3681 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3682 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3683 | VkDeviceSize                                offset, | 
|  | 3684 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3685 | VkMemoryMapFlags                            flags, | 
|  | 3686 | void**                                      ppData) { | 
|  | 3687 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3688 | memoryObject := GetDeviceMemory(memory) | 
|  | 3689 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3690 |  | 
|  | 3691 | assert(flags == as!VkMemoryMapFlags(0)) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3692 | assert((offset + size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3693 |  | 
|  | 3694 | return ? | 
|  | 3695 | } | 
|  | 3696 |  | 
|  | 3697 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3698 | cmd void vkUnmapMemory( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3699 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3700 | VkDeviceMemory                              memory) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3701 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3702 | memoryObject := GetDeviceMemory(memory) | 
|  | 3703 | assert(memoryObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3704 | } | 
|  | 3705 |  | 
|  | 3706 | cmd VkResult vkFlushMappedMemoryRanges( | 
|  | 3707 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3708 | u32                                         memoryRangeCount | 
|  | 3709 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3710 | deviceObject := GetDevice(device) | 
|  | 3711 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3712 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3713 | for i in (0 .. memoryRangeCount) { | 
|  | 3714 | memoryRange := memoryRanges[i] | 
|  | 3715 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3716 | assert(memoryObject.device == device) | 
|  | 3717 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3718 | } | 
|  | 3719 |  | 
|  | 3720 | return ? | 
|  | 3721 | } | 
|  | 3722 |  | 
|  | 3723 | cmd VkResult vkInvalidateMappedMemoryRanges( | 
|  | 3724 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3725 | u32                                         memoryRangeCount, | 
|  | 3726 | const VkMappedMemoryRange*                  pMemoryRanges) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3727 | deviceObject := GetDevice(device) | 
|  | 3728 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3729 | memoryRanges := pMemoryRanges[0:memoryRangeCount] | 
|  | 3730 | for i in (0 .. memoryRangeCount) { | 
|  | 3731 | memoryRange := memoryRanges[i] | 
|  | 3732 | memoryObject := GetDeviceMemory(memoryRange.memory) | 
|  | 3733 | assert(memoryObject.device == device) | 
|  | 3734 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3735 | } | 
|  | 3736 |  | 
|  | 3737 | return ? | 
|  | 3738 | } | 
|  | 3739 |  | 
|  | 3740 |  | 
|  | 3741 | // Memory management API functions | 
|  | 3742 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3743 | cmd void vkGetDeviceMemoryCommitment( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3744 | VkDevice                                    device, | 
|  | 3745 | VkDeviceMemory                              memory, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3746 | VkDeviceSize*                               pCommittedMemoryInBytes) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3747 | deviceObject := GetDevice(device) | 
|  | 3748 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3749 | if memory != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3750 | memoryObject := GetDeviceMemory(memory) | 
|  | 3751 | assert(memoryObject.device == device) | 
|  | 3752 | } | 
|  | 3753 |  | 
|  | 3754 | committedMemoryInBytes := ? | 
|  | 3755 | pCommittedMemoryInBytes[0] = committedMemoryInBytes | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3756 | } | 
|  | 3757 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3758 | cmd void vkGetBufferMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3759 | VkDevice                                    device, | 
|  | 3760 | VkBuffer                                    buffer, | 
|  | 3761 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3762 | deviceObject := GetDevice(device) | 
|  | 3763 | bufferObject := GetBuffer(buffer) | 
|  | 3764 | assert(bufferObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3765 | } | 
|  | 3766 |  | 
|  | 3767 | cmd VkResult vkBindBufferMemory( | 
|  | 3768 | VkDevice                                    device, | 
|  | 3769 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3770 | VkDeviceMemory                              memory, | 
|  | 3771 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3772 | deviceObject := GetDevice(device) | 
|  | 3773 | bufferObject := GetBuffer(buffer) | 
|  | 3774 | assert(bufferObject.device == device) | 
|  | 3775 |  | 
|  | 3776 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3777 | if bufferObject.memory != NULL_HANDLE { | 
|  | 3778 | memoryObject := GetDeviceMemory(bufferObject.memory) | 
|  | 3779 | memoryObject.boundObjects[as!u64(buffer)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3780 | } | 
|  | 3781 |  | 
|  | 3782 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3783 | if memory != NULL_HANDLE { | 
|  | 3784 | memoryObject := GetDeviceMemory(memory) | 
|  | 3785 | assert(memoryObject.device == device) | 
|  | 3786 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3787 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3788 | bufferObject.memory = memory | 
|  | 3789 | bufferObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3790 |  | 
|  | 3791 | return ? | 
|  | 3792 | } | 
|  | 3793 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3794 | cmd void vkGetImageMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3795 | VkDevice                                    device, | 
|  | 3796 | VkImage                                     image, | 
|  | 3797 | VkMemoryRequirements*                       pMemoryRequirements) { | 
|  | 3798 | deviceObject := GetDevice(device) | 
|  | 3799 | imageObject := GetImage(image) | 
|  | 3800 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3801 | } | 
|  | 3802 |  | 
|  | 3803 | cmd VkResult vkBindImageMemory( | 
|  | 3804 | VkDevice                                    device, | 
|  | 3805 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3806 | VkDeviceMemory                              memory, | 
|  | 3807 | VkDeviceSize                                memoryOffset) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3808 | deviceObject := GetDevice(device) | 
|  | 3809 | imageObject := GetImage(image) | 
|  | 3810 | assert(imageObject.device == device) | 
|  | 3811 |  | 
|  | 3812 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3813 | if imageObject.memory != NULL_HANDLE { | 
|  | 3814 | memoryObject := GetDeviceMemory(imageObject.memory) | 
|  | 3815 | memoryObject.boundObjects[as!u64(image)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3816 | } | 
|  | 3817 |  | 
|  | 3818 | // Bind image to given memory object, if not VK_NULL_HANDLE. | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3819 | if memory != NULL_HANDLE { | 
|  | 3820 | memoryObject := GetDeviceMemory(memory) | 
|  | 3821 | assert(memoryObject.device == device) | 
|  | 3822 | memoryObject.boundObjects[as!u64(image)] = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3823 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3824 | imageObject.memory = memory | 
|  | 3825 | imageObject.memoryOffset = memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3826 |  | 
|  | 3827 | return ? | 
|  | 3828 | } | 
|  | 3829 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3830 | cmd void vkGetImageSparseMemoryRequirements( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3831 | VkDevice                                    device, | 
|  | 3832 | VkImage                                     image, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3833 | u32*                                        pSparseMemoryRequirementCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3834 | VkSparseImageMemoryRequirements*            pSparseMemoryRequirements) { | 
|  | 3835 | deviceObject := GetDevice(device) | 
|  | 3836 | imageObject := GetImage(image) | 
|  | 3837 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3838 | } | 
|  | 3839 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3840 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3841 | VkPhysicalDevice                            physicalDevice, | 
|  | 3842 | VkFormat                                    format, | 
|  | 3843 | VkImageType                                 type, | 
| Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3844 | VkSampleCountFlagBits                       samples, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3845 | VkImageUsageFlags                           usage, | 
|  | 3846 | VkImageTiling                               tiling, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3847 | u32*                                        pPropertyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3848 | VkSparseImageFormatProperties*              pProperties) { | 
|  | 3849 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3850 | } | 
|  | 3851 |  | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3852 | cmd VkResult vkQueueBindSparse( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3853 | VkQueue                                     queue, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3854 | u32                                         bindInfoCount, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3855 | const VkBindSparseInfo*                     pBindInfo, | 
|  | 3856 | VkFence                                     fence) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3857 | queueObject := GetQueue(queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3858 |  | 
|  | 3859 | return ? | 
|  | 3860 | } | 
|  | 3861 |  | 
|  | 3862 |  | 
|  | 3863 | // Fence functions | 
|  | 3864 |  | 
|  | 3865 | @threadSafety("system") | 
|  | 3866 | cmd VkResult vkCreateFence( | 
|  | 3867 | VkDevice                                    device, | 
|  | 3868 | const VkFenceCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3869 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3870 | VkFence*                                    pFence) { | 
|  | 3871 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) | 
|  | 3872 | deviceObject := GetDevice(device) | 
|  | 3873 |  | 
|  | 3874 | fence := ? | 
|  | 3875 | pFence[0] = fence | 
|  | 3876 | State.Fences[fence] = new!FenceObject( | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3877 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3878 |  | 
|  | 3879 | return ? | 
|  | 3880 | } | 
|  | 3881 |  | 
|  | 3882 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3883 | cmd void vkDestroyFence( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3884 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3885 | VkFence                                     fence, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3886 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3887 | deviceObject := GetDevice(device) | 
|  | 3888 | fenceObject := GetFence(fence) | 
|  | 3889 | assert(fenceObject.device == device) | 
|  | 3890 |  | 
|  | 3891 | State.Fences[fence] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3892 | } | 
|  | 3893 |  | 
|  | 3894 | @threadSafety("system") | 
|  | 3895 | cmd VkResult vkResetFences( | 
|  | 3896 | VkDevice                                    device, | 
|  | 3897 | u32                                         fenceCount, | 
|  | 3898 | const VkFence*                              pFences) { | 
|  | 3899 | deviceObject := GetDevice(device) | 
|  | 3900 |  | 
|  | 3901 | fences := pFences[0:fenceCount] | 
|  | 3902 | for i in (0 .. fenceCount) { | 
|  | 3903 | fence := fences[i] | 
|  | 3904 | fenceObject := GetFence(fence) | 
|  | 3905 | assert(fenceObject.device == device) | 
|  | 3906 | fenceObject.signaled = false | 
|  | 3907 | } | 
|  | 3908 |  | 
|  | 3909 | return ? | 
|  | 3910 | } | 
|  | 3911 |  | 
|  | 3912 | @threadSafety("system") | 
|  | 3913 | cmd VkResult vkGetFenceStatus( | 
|  | 3914 | VkDevice                                    device, | 
|  | 3915 | VkFence                                     fence) { | 
|  | 3916 | deviceObject := GetDevice(device) | 
|  | 3917 | fenceObject := GetFence(fence) | 
|  | 3918 | assert(fenceObject.device == device) | 
|  | 3919 |  | 
|  | 3920 | return ? | 
|  | 3921 | } | 
|  | 3922 |  | 
|  | 3923 | @threadSafety("system") | 
|  | 3924 | cmd VkResult vkWaitForFences( | 
|  | 3925 | VkDevice                                    device, | 
|  | 3926 | u32                                         fenceCount, | 
|  | 3927 | const VkFence*                              pFences, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3928 | VkBool32                                    waitAll, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3929 | u64                                         timeout) {  /// timeout in nanoseconds | 
|  | 3930 | deviceObject := GetDevice(device) | 
|  | 3931 |  | 
|  | 3932 | fences := pFences[0:fenceCount] | 
|  | 3933 | for i in (0 .. fenceCount) { | 
|  | 3934 | fence := fences[i] | 
|  | 3935 | fenceObject := GetFence(fence) | 
|  | 3936 | assert(fenceObject.device == device) | 
|  | 3937 | } | 
|  | 3938 |  | 
|  | 3939 | return ? | 
|  | 3940 | } | 
|  | 3941 |  | 
|  | 3942 |  | 
|  | 3943 | // Queue semaphore functions | 
|  | 3944 |  | 
|  | 3945 | @threadSafety("system") | 
|  | 3946 | cmd VkResult vkCreateSemaphore( | 
|  | 3947 | VkDevice                                    device, | 
|  | 3948 | const VkSemaphoreCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3949 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3950 | VkSemaphore*                                pSemaphore) { | 
|  | 3951 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) | 
|  | 3952 | deviceObject := GetDevice(device) | 
|  | 3953 |  | 
|  | 3954 | semaphore := ? | 
|  | 3955 | pSemaphore[0] = semaphore | 
|  | 3956 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) | 
|  | 3957 |  | 
|  | 3958 | return ? | 
|  | 3959 | } | 
|  | 3960 |  | 
|  | 3961 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3962 | cmd void vkDestroySemaphore( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3963 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3964 | VkSemaphore                                 semaphore, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3965 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3966 | deviceObject := GetDevice(device) | 
|  | 3967 | semaphoreObject := GetSemaphore(semaphore) | 
|  | 3968 | assert(semaphoreObject.device == device) | 
|  | 3969 |  | 
|  | 3970 | State.Semaphores[semaphore] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3971 | } | 
|  | 3972 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3973 |  | 
|  | 3974 | // Event functions | 
|  | 3975 |  | 
|  | 3976 | @threadSafety("system") | 
|  | 3977 | cmd VkResult vkCreateEvent( | 
|  | 3978 | VkDevice                                    device, | 
|  | 3979 | const VkEventCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3980 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3981 | VkEvent*                                    pEvent) { | 
|  | 3982 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) | 
|  | 3983 | deviceObject := GetDevice(device) | 
|  | 3984 |  | 
|  | 3985 | event := ? | 
|  | 3986 | pEvent[0] = event | 
|  | 3987 | State.Events[event] = new!EventObject(device: device) | 
|  | 3988 |  | 
|  | 3989 | return ? | 
|  | 3990 | } | 
|  | 3991 |  | 
|  | 3992 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3993 | cmd void vkDestroyEvent( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3994 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3995 | VkEvent                                     event, | 
| 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 | deviceObject := GetDevice(device) | 
|  | 3998 | eventObject := GetEvent(event) | 
|  | 3999 | assert(eventObject.device == device) | 
|  | 4000 |  | 
|  | 4001 | State.Events[event] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4002 | } | 
|  | 4003 |  | 
|  | 4004 | @threadSafety("system") | 
|  | 4005 | cmd VkResult vkGetEventStatus( | 
|  | 4006 | VkDevice                                    device, | 
|  | 4007 | VkEvent                                     event) { | 
|  | 4008 | deviceObject := GetDevice(device) | 
|  | 4009 | eventObject := GetEvent(event) | 
|  | 4010 | assert(eventObject.device == device) | 
|  | 4011 |  | 
|  | 4012 | return ? | 
|  | 4013 | } | 
|  | 4014 |  | 
|  | 4015 | @threadSafety("system") | 
|  | 4016 | cmd VkResult vkSetEvent( | 
|  | 4017 | VkDevice                                    device, | 
|  | 4018 | VkEvent                                     event) { | 
|  | 4019 | deviceObject := GetDevice(device) | 
|  | 4020 | eventObject := GetEvent(event) | 
|  | 4021 | assert(eventObject.device == device) | 
|  | 4022 |  | 
|  | 4023 | return ? | 
|  | 4024 | } | 
|  | 4025 |  | 
|  | 4026 | @threadSafety("system") | 
|  | 4027 | cmd VkResult vkResetEvent( | 
|  | 4028 | VkDevice                                    device, | 
|  | 4029 | VkEvent                                     event) { | 
|  | 4030 | deviceObject := GetDevice(device) | 
|  | 4031 | eventObject := GetEvent(event) | 
|  | 4032 | assert(eventObject.device == device) | 
|  | 4033 |  | 
|  | 4034 | return ? | 
|  | 4035 | } | 
|  | 4036 |  | 
|  | 4037 |  | 
|  | 4038 | // Query functions | 
|  | 4039 |  | 
|  | 4040 | @threadSafety("system") | 
|  | 4041 | cmd VkResult vkCreateQueryPool( | 
|  | 4042 | VkDevice                                    device, | 
|  | 4043 | const VkQueryPoolCreateInfo*                pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4044 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4045 | VkQueryPool*                                pQueryPool) { | 
|  | 4046 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) | 
|  | 4047 | deviceObject := GetDevice(device) | 
|  | 4048 |  | 
|  | 4049 | queryPool := ? | 
|  | 4050 | pQueryPool[0] = queryPool | 
|  | 4051 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) | 
|  | 4052 |  | 
|  | 4053 | return ? | 
|  | 4054 | } | 
|  | 4055 |  | 
|  | 4056 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4057 | cmd void vkDestroyQueryPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4058 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4059 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4060 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4061 | deviceObject := GetDevice(device) | 
|  | 4062 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 4063 | assert(queryPoolObject.device == device) | 
|  | 4064 |  | 
|  | 4065 | State.QueryPools[queryPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4066 | } | 
|  | 4067 |  | 
|  | 4068 | @threadSafety("system") | 
|  | 4069 | cmd VkResult vkGetQueryPoolResults( | 
|  | 4070 | VkDevice                                    device, | 
|  | 4071 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4072 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4073 | u32                                         queryCount, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4074 | platform.size_t                             dataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4075 | void*                                       pData, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4076 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4077 | VkQueryResultFlags                          flags) { | 
|  | 4078 | deviceObject := GetDevice(device) | 
|  | 4079 | queryPoolObject := GetQueryPool(queryPool) | 
|  | 4080 | assert(queryPoolObject.device == device) | 
|  | 4081 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4082 | data := pData[0:dataSize] | 
|  | 4083 |  | 
|  | 4084 | return ? | 
|  | 4085 | } | 
|  | 4086 |  | 
|  | 4087 | // Buffer functions | 
|  | 4088 |  | 
|  | 4089 | @threadSafety("system") | 
|  | 4090 | cmd VkResult vkCreateBuffer( | 
|  | 4091 | VkDevice                                    device, | 
|  | 4092 | const VkBufferCreateInfo*                   pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4093 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4094 | VkBuffer*                                   pBuffer) { | 
|  | 4095 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) | 
|  | 4096 | deviceObject := GetDevice(device) | 
|  | 4097 |  | 
|  | 4098 | buffer := ? | 
|  | 4099 | pBuffer[0] = buffer | 
|  | 4100 | State.Buffers[buffer] = new!BufferObject(device: device) | 
|  | 4101 |  | 
|  | 4102 | return ? | 
|  | 4103 | } | 
|  | 4104 |  | 
|  | 4105 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4106 | cmd void vkDestroyBuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4107 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4108 | VkBuffer                                    buffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4109 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4110 | deviceObject := GetDevice(device) | 
|  | 4111 | bufferObject := GetBuffer(buffer) | 
|  | 4112 | assert(bufferObject.device == device) | 
|  | 4113 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4114 | assert(bufferObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4115 | State.Buffers[buffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4116 | } | 
|  | 4117 |  | 
|  | 4118 |  | 
|  | 4119 | // Buffer view functions | 
|  | 4120 |  | 
|  | 4121 | @threadSafety("system") | 
|  | 4122 | cmd VkResult vkCreateBufferView( | 
|  | 4123 | VkDevice                                    device, | 
|  | 4124 | const VkBufferViewCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4125 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4126 | VkBufferView*                               pView) { | 
|  | 4127 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) | 
|  | 4128 | deviceObject := GetDevice(device) | 
|  | 4129 |  | 
|  | 4130 | bufferObject := GetBuffer(pCreateInfo.buffer) | 
|  | 4131 | assert(bufferObject.device == device) | 
|  | 4132 |  | 
|  | 4133 | view := ? | 
|  | 4134 | pView[0] = view | 
|  | 4135 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) | 
|  | 4136 |  | 
|  | 4137 | return ? | 
|  | 4138 | } | 
|  | 4139 |  | 
|  | 4140 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4141 | cmd void vkDestroyBufferView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4142 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4143 | VkBufferView                                bufferView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4144 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4145 | deviceObject := GetDevice(device) | 
|  | 4146 | bufferViewObject := GetBufferView(bufferView) | 
|  | 4147 | assert(bufferViewObject.device == device) | 
|  | 4148 |  | 
|  | 4149 | State.BufferViews[bufferView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4150 | } | 
|  | 4151 |  | 
|  | 4152 |  | 
|  | 4153 | // Image functions | 
|  | 4154 |  | 
|  | 4155 | @threadSafety("system") | 
|  | 4156 | cmd VkResult vkCreateImage( | 
|  | 4157 | VkDevice                                    device, | 
|  | 4158 | const VkImageCreateInfo*                    pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4159 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4160 | VkImage*                                    pImage) { | 
|  | 4161 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) | 
|  | 4162 | deviceObject := GetDevice(device) | 
|  | 4163 |  | 
|  | 4164 | image := ? | 
|  | 4165 | pImage[0] = image | 
|  | 4166 | State.Images[image] = new!ImageObject(device: device) | 
|  | 4167 |  | 
|  | 4168 | return ? | 
|  | 4169 | } | 
|  | 4170 |  | 
|  | 4171 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4172 | cmd void vkDestroyImage( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4173 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4174 | VkImage                                     image, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4175 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4176 | deviceObject := GetDevice(device) | 
|  | 4177 | imageObject := GetImage(image) | 
|  | 4178 | assert(imageObject.device == device) | 
|  | 4179 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4180 | assert(imageObject.memory == 0) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4181 | State.Images[image] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4182 | } | 
|  | 4183 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4184 | cmd void vkGetImageSubresourceLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4185 | VkDevice                                    device, | 
|  | 4186 | VkImage                                     image, | 
|  | 4187 | const VkImageSubresource*                   pSubresource, | 
|  | 4188 | VkSubresourceLayout*                        pLayout) { | 
|  | 4189 | deviceObject := GetDevice(device) | 
|  | 4190 | imageObject := GetImage(image) | 
|  | 4191 | assert(imageObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4192 | } | 
|  | 4193 |  | 
|  | 4194 |  | 
|  | 4195 | // Image view functions | 
|  | 4196 |  | 
|  | 4197 | @threadSafety("system") | 
|  | 4198 | cmd VkResult vkCreateImageView( | 
|  | 4199 | VkDevice                                    device, | 
|  | 4200 | const VkImageViewCreateInfo*                pCreateInfo, | 
| 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 | VkImageView*                                pView) { | 
|  | 4203 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) | 
|  | 4204 | deviceObject := GetDevice(device) | 
|  | 4205 |  | 
|  | 4206 | imageObject := GetImage(pCreateInfo.image) | 
|  | 4207 | assert(imageObject.device == device) | 
|  | 4208 |  | 
|  | 4209 | view := ? | 
|  | 4210 | pView[0] = view | 
|  | 4211 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) | 
|  | 4212 |  | 
|  | 4213 | return ? | 
|  | 4214 | } | 
|  | 4215 |  | 
|  | 4216 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4217 | cmd void vkDestroyImageView( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4218 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4219 | VkImageView                                 imageView, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4220 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4221 | deviceObject := GetDevice(device) | 
|  | 4222 | imageViewObject := GetImageView(imageView) | 
|  | 4223 | assert(imageViewObject.device == device) | 
|  | 4224 |  | 
|  | 4225 | State.ImageViews[imageView] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4226 | } | 
|  | 4227 |  | 
|  | 4228 |  | 
|  | 4229 | // Shader functions | 
|  | 4230 |  | 
|  | 4231 | cmd VkResult vkCreateShaderModule( | 
|  | 4232 | VkDevice                                    device, | 
|  | 4233 | const VkShaderModuleCreateInfo*             pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4234 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4235 | VkShaderModule*                             pShaderModule) { | 
|  | 4236 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) | 
|  | 4237 | deviceObject := GetDevice(device) | 
|  | 4238 |  | 
|  | 4239 | shaderModule := ? | 
|  | 4240 | pShaderModule[0] = shaderModule | 
|  | 4241 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) | 
|  | 4242 |  | 
|  | 4243 | return ? | 
|  | 4244 | } | 
|  | 4245 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4246 | cmd void vkDestroyShaderModule( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4247 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4248 | VkShaderModule                              shaderModule, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4249 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4250 | deviceObject := GetDevice(device) | 
|  | 4251 | shaderModuleObject := GetShaderModule(shaderModule) | 
|  | 4252 | assert(shaderModuleObject.device == device) | 
|  | 4253 |  | 
|  | 4254 | State.ShaderModules[shaderModule] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4255 | } | 
|  | 4256 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4257 |  | 
|  | 4258 | // Pipeline functions | 
|  | 4259 |  | 
|  | 4260 | cmd VkResult vkCreatePipelineCache( | 
|  | 4261 | VkDevice                                    device, | 
|  | 4262 | const VkPipelineCacheCreateInfo*            pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4263 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4264 | VkPipelineCache*                            pPipelineCache) { | 
|  | 4265 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) | 
|  | 4266 | deviceObject := GetDevice(device) | 
|  | 4267 |  | 
|  | 4268 | pipelineCache := ? | 
|  | 4269 | pPipelineCache[0] = pipelineCache | 
|  | 4270 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) | 
|  | 4271 |  | 
|  | 4272 | return ? | 
|  | 4273 | } | 
|  | 4274 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4275 | cmd void vkDestroyPipelineCache( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4276 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4277 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4278 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4279 | deviceObject := GetDevice(device) | 
|  | 4280 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4281 | assert(pipelineCacheObject.device == device) | 
|  | 4282 |  | 
|  | 4283 | State.PipelineCaches[pipelineCache] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4284 | } | 
|  | 4285 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4286 | cmd VkResult vkGetPipelineCacheData( | 
|  | 4287 | VkDevice                                    device, | 
|  | 4288 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4289 | platform.size_t*                            pDataSize, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4290 | void*                                       pData) { | 
|  | 4291 | deviceObject := GetDevice(device) | 
|  | 4292 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4293 | assert(pipelineCacheObject.device == device) | 
|  | 4294 |  | 
|  | 4295 | return ? | 
|  | 4296 | } | 
|  | 4297 |  | 
|  | 4298 | cmd VkResult vkMergePipelineCaches( | 
|  | 4299 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4300 | VkPipelineCache                             dstCache, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4301 | u32                                         srcCacheCount, | 
|  | 4302 | const VkPipelineCache*                      pSrcCaches) { | 
|  | 4303 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4304 | dstCacheObject := GetPipelineCache(dstCache) | 
|  | 4305 | assert(dstCacheObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4306 |  | 
|  | 4307 | srcCaches := pSrcCaches[0:srcCacheCount] | 
|  | 4308 | for i in (0 .. srcCacheCount) { | 
|  | 4309 | srcCache := srcCaches[i] | 
|  | 4310 | srcCacheObject := GetPipelineCache(srcCache) | 
|  | 4311 | assert(srcCacheObject.device == device) | 
|  | 4312 | } | 
|  | 4313 |  | 
|  | 4314 | return ? | 
|  | 4315 | } | 
|  | 4316 |  | 
|  | 4317 | cmd VkResult vkCreateGraphicsPipelines( | 
|  | 4318 | VkDevice                                    device, | 
|  | 4319 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4320 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4321 | const VkGraphicsPipelineCreateInfo*         pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4322 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4323 | VkPipeline*                                 pPipelines) { | 
|  | 4324 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4325 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4326 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4327 | assert(pipelineCacheObject.device == device) | 
|  | 4328 | } | 
|  | 4329 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4330 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4331 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4332 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4333 | pipeline := ? | 
|  | 4334 | pipelines[i] = pipeline | 
|  | 4335 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4336 | } | 
|  | 4337 |  | 
|  | 4338 | return ? | 
|  | 4339 | } | 
|  | 4340 |  | 
|  | 4341 | cmd VkResult vkCreateComputePipelines( | 
|  | 4342 | VkDevice                                    device, | 
|  | 4343 | VkPipelineCache                             pipelineCache, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4344 | u32                                         createInfoCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4345 | const VkComputePipelineCreateInfo*          pCreateInfos, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4346 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4347 | VkPipeline*                                 pPipelines) { | 
|  | 4348 | deviceObject := GetDevice(device) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4349 | if pipelineCache != NULL_HANDLE { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4350 | pipelineCacheObject := GetPipelineCache(pipelineCache) | 
|  | 4351 | assert(pipelineCacheObject.device == device) | 
|  | 4352 | } | 
|  | 4353 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4354 | createInfos := pCreateInfos[0:createInfoCount] | 
|  | 4355 | pipelines := pPipelines[0:createInfoCount] | 
|  | 4356 | for i in (0 .. createInfoCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4357 | pipeline := ? | 
|  | 4358 | pipelines[i] = pipeline | 
|  | 4359 | State.Pipelines[pipeline] = new!PipelineObject(device: device) | 
|  | 4360 | } | 
|  | 4361 |  | 
|  | 4362 | return ? | 
|  | 4363 | } | 
|  | 4364 |  | 
|  | 4365 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4366 | cmd void vkDestroyPipeline( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4367 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4368 | VkPipeline                                  pipeline, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4369 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4370 | deviceObject := GetDevice(device) | 
|  | 4371 | pipelineObjects := GetPipeline(pipeline) | 
|  | 4372 | assert(pipelineObjects.device == device) | 
|  | 4373 |  | 
|  | 4374 | State.Pipelines[pipeline] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4375 | } | 
|  | 4376 |  | 
|  | 4377 |  | 
|  | 4378 | // Pipeline layout functions | 
|  | 4379 |  | 
|  | 4380 | @threadSafety("system") | 
|  | 4381 | cmd VkResult vkCreatePipelineLayout( | 
|  | 4382 | VkDevice                                    device, | 
|  | 4383 | const VkPipelineLayoutCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4384 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4385 | VkPipelineLayout*                           pPipelineLayout) { | 
|  | 4386 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) | 
|  | 4387 | deviceObject := GetDevice(device) | 
|  | 4388 |  | 
|  | 4389 | pipelineLayout := ? | 
|  | 4390 | pPipelineLayout[0] = pipelineLayout | 
|  | 4391 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) | 
|  | 4392 |  | 
|  | 4393 | return ? | 
|  | 4394 | } | 
|  | 4395 |  | 
|  | 4396 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4397 | cmd void vkDestroyPipelineLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4398 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4399 | VkPipelineLayout                            pipelineLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4400 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4401 | deviceObject := GetDevice(device) | 
|  | 4402 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) | 
|  | 4403 | assert(pipelineLayoutObjects.device == device) | 
|  | 4404 |  | 
|  | 4405 | State.PipelineLayouts[pipelineLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4406 | } | 
|  | 4407 |  | 
|  | 4408 |  | 
|  | 4409 | // Sampler functions | 
|  | 4410 |  | 
|  | 4411 | @threadSafety("system") | 
|  | 4412 | cmd VkResult vkCreateSampler( | 
|  | 4413 | VkDevice                                    device, | 
|  | 4414 | const VkSamplerCreateInfo*                  pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4415 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4416 | VkSampler*                                  pSampler) { | 
|  | 4417 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) | 
|  | 4418 | deviceObject := GetDevice(device) | 
|  | 4419 |  | 
|  | 4420 | sampler := ? | 
|  | 4421 | pSampler[0] = sampler | 
|  | 4422 | State.Samplers[sampler] = new!SamplerObject(device: device) | 
|  | 4423 |  | 
|  | 4424 | return ? | 
|  | 4425 | } | 
|  | 4426 |  | 
|  | 4427 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4428 | cmd void vkDestroySampler( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4429 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4430 | VkSampler                                   sampler, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4431 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4432 | deviceObject := GetDevice(device) | 
|  | 4433 | samplerObject := GetSampler(sampler) | 
|  | 4434 | assert(samplerObject.device == device) | 
|  | 4435 |  | 
|  | 4436 | State.Samplers[sampler] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4437 | } | 
|  | 4438 |  | 
|  | 4439 |  | 
|  | 4440 | // Descriptor set functions | 
|  | 4441 |  | 
|  | 4442 | @threadSafety("system") | 
|  | 4443 | cmd VkResult vkCreateDescriptorSetLayout( | 
|  | 4444 | VkDevice                                    device, | 
|  | 4445 | const VkDescriptorSetLayoutCreateInfo*      pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4446 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4447 | VkDescriptorSetLayout*                      pSetLayout) { | 
|  | 4448 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) | 
|  | 4449 | deviceObject := GetDevice(device) | 
|  | 4450 |  | 
|  | 4451 | setLayout := ? | 
|  | 4452 | pSetLayout[0] = setLayout | 
|  | 4453 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) | 
|  | 4454 |  | 
|  | 4455 | return ? | 
|  | 4456 | } | 
|  | 4457 |  | 
|  | 4458 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4459 | cmd void vkDestroyDescriptorSetLayout( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4460 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4461 | VkDescriptorSetLayout                       descriptorSetLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4462 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4463 | deviceObject := GetDevice(device) | 
|  | 4464 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) | 
|  | 4465 | assert(descriptorSetLayoutObject.device == device) | 
|  | 4466 |  | 
|  | 4467 | State.DescriptorSetLayouts[descriptorSetLayout] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4468 | } | 
|  | 4469 |  | 
|  | 4470 | @threadSafety("system") | 
|  | 4471 | cmd VkResult vkCreateDescriptorPool( | 
|  | 4472 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4473 | const VkDescriptorPoolCreateInfo*           pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4474 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4475 | VkDescriptorPool*                           pDescriptorPool) { | 
|  | 4476 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) | 
|  | 4477 | deviceObject := GetDevice(device) | 
|  | 4478 |  | 
|  | 4479 | descriptorPool := ? | 
|  | 4480 | pDescriptorPool[0] = descriptorPool | 
|  | 4481 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) | 
|  | 4482 |  | 
|  | 4483 | return ? | 
|  | 4484 | } | 
|  | 4485 |  | 
|  | 4486 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4487 | cmd void vkDestroyDescriptorPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4488 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4489 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4490 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4491 | deviceObject := GetDevice(device) | 
|  | 4492 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4493 | assert(descriptorPoolObject.device == device) | 
|  | 4494 |  | 
|  | 4495 | State.DescriptorPools[descriptorPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4496 | } | 
|  | 4497 |  | 
|  | 4498 | @threadSafety("app") | 
|  | 4499 | cmd VkResult vkResetDescriptorPool( | 
|  | 4500 | VkDevice                                    device, | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4501 | VkDescriptorPool                            descriptorPool, | 
|  | 4502 | VkDescriptorPoolResetFlags                  flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4503 | deviceObject := GetDevice(device) | 
|  | 4504 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4505 | assert(descriptorPoolObject.device == device) | 
|  | 4506 |  | 
|  | 4507 | return ? | 
|  | 4508 | } | 
|  | 4509 |  | 
|  | 4510 | @threadSafety("app") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4511 | cmd VkResult vkAllocateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4512 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4513 | const VkDescriptorSetAllocateInfo*          pAllocateInfo, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4514 | VkDescriptorSet*                            pDescriptorSets) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4515 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4516 | allocInfo := pAllocateInfo[0] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4517 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4518 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4519 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] | 
|  | 4520 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4521 | setLayout := setLayouts[i] | 
|  | 4522 | setLayoutObject := GetDescriptorSetLayout(setLayout) | 
|  | 4523 | assert(setLayoutObject.device == device) | 
|  | 4524 | } | 
|  | 4525 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4526 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] | 
|  | 4527 | for i in (0 .. allocInfo.setCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4528 | descriptorSet := ? | 
|  | 4529 | descriptorSets[i] = descriptorSet | 
|  | 4530 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) | 
|  | 4531 | } | 
|  | 4532 |  | 
|  | 4533 | return ? | 
|  | 4534 | } | 
|  | 4535 |  | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4536 | cmd VkResult vkFreeDescriptorSets( | 
|  | 4537 | VkDevice                                    device, | 
|  | 4538 | VkDescriptorPool                            descriptorPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4539 | u32                                         descriptorSetCount, | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4540 | const VkDescriptorSet*                      pDescriptorSets) { | 
|  | 4541 | deviceObject := GetDevice(device) | 
|  | 4542 | descriptorPoolObject := GetDescriptorPool(descriptorPool) | 
|  | 4543 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4544 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4545 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4546 | descriptorSet := descriptorSets[i] | 
|  | 4547 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
|  | 4548 | assert(descriptorSetObject.device == device) | 
|  | 4549 | State.DescriptorSets[descriptorSet] = null | 
|  | 4550 | } | 
|  | 4551 |  | 
|  | 4552 | return ? | 
|  | 4553 | } | 
|  | 4554 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4555 | cmd void vkUpdateDescriptorSets( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4556 | VkDevice                                    device, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4557 | u32                                         descriptorWriteCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4558 | const VkWriteDescriptorSet*                 pDescriptorWrites, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4559 | u32                                         descriptorCopyCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4560 | const VkCopyDescriptorSet*                  pDescriptorCopies) { | 
|  | 4561 | deviceObject := GetDevice(device) | 
|  | 4562 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4563 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] | 
|  | 4564 | for i in (0 .. descriptorWriteCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4565 | descriptorWrite := descriptorWrites[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4566 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4567 | assert(descriptorWriteObject.device == device) | 
|  | 4568 | } | 
|  | 4569 |  | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4570 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] | 
|  | 4571 | for i in (0 .. descriptorCopyCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4572 | descriptorCopy := descriptorCopies[i] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4573 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4574 | assert(descriptorCopyObject.device == device) | 
|  | 4575 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4576 | } | 
|  | 4577 |  | 
|  | 4578 |  | 
|  | 4579 | // Framebuffer functions | 
|  | 4580 |  | 
|  | 4581 | @threadSafety("system") | 
|  | 4582 | cmd VkResult vkCreateFramebuffer( | 
|  | 4583 | VkDevice                                    device, | 
|  | 4584 | const VkFramebufferCreateInfo*              pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4585 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4586 | VkFramebuffer*                              pFramebuffer) { | 
|  | 4587 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) | 
|  | 4588 | deviceObject := GetDevice(device) | 
|  | 4589 |  | 
|  | 4590 | framebuffer := ? | 
|  | 4591 | pFramebuffer[0] = framebuffer | 
|  | 4592 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) | 
|  | 4593 |  | 
|  | 4594 | return ? | 
|  | 4595 | } | 
|  | 4596 |  | 
|  | 4597 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4598 | cmd void vkDestroyFramebuffer( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4599 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4600 | VkFramebuffer                               framebuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4601 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4602 | deviceObject := GetDevice(device) | 
|  | 4603 | framebufferObject := GetFramebuffer(framebuffer) | 
|  | 4604 | assert(framebufferObject.device == device) | 
|  | 4605 |  | 
|  | 4606 | State.Framebuffers[framebuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4607 | } | 
|  | 4608 |  | 
|  | 4609 |  | 
|  | 4610 | // Renderpass functions | 
|  | 4611 |  | 
|  | 4612 | @threadSafety("system") | 
|  | 4613 | cmd VkResult vkCreateRenderPass( | 
|  | 4614 | VkDevice                                    device, | 
|  | 4615 | const VkRenderPassCreateInfo*               pCreateInfo, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4616 | const VkAllocationCallbacks*                pAllocator, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4617 | VkRenderPass*                               pRenderPass) { | 
|  | 4618 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) | 
|  | 4619 | deviceObject := GetDevice(device) | 
|  | 4620 |  | 
|  | 4621 | renderpass := ? | 
|  | 4622 | pRenderPass[0] = renderpass | 
|  | 4623 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) | 
|  | 4624 |  | 
|  | 4625 | return ? | 
|  | 4626 | } | 
|  | 4627 |  | 
|  | 4628 | @threadSafety("system") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4629 | cmd void vkDestroyRenderPass( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4630 | VkDevice                                    device, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4631 | VkRenderPass                                renderPass, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4632 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4633 | deviceObject := GetDevice(device) | 
|  | 4634 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4635 | assert(renderPassObject.device == device) | 
|  | 4636 |  | 
|  | 4637 | State.RenderPasses[renderPass] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4638 | } | 
|  | 4639 |  | 
| Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4640 | cmd void vkGetRenderAreaGranularity( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4641 | VkDevice                                    device, | 
|  | 4642 | VkRenderPass                                renderPass, | 
|  | 4643 | VkExtent2D*                                 pGranularity) { | 
|  | 4644 | deviceObject := GetDevice(device) | 
|  | 4645 | renderPassObject := GetRenderPass(renderPass) | 
|  | 4646 |  | 
|  | 4647 | granularity := ? | 
|  | 4648 | pGranularity[0] = granularity | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4649 | } | 
|  | 4650 |  | 
|  | 4651 | // Command pool functions | 
|  | 4652 |  | 
|  | 4653 | cmd VkResult vkCreateCommandPool( | 
|  | 4654 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4655 | const VkCommandPoolCreateInfo*              pCreateInfo, | 
|  | 4656 | const VkAllocationCallbacks*                pAllocator, | 
|  | 4657 | VkCommandPool*                              pCommandPool) { | 
|  | 4658 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4659 | deviceObject := GetDevice(device) | 
|  | 4660 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4661 | commandPool := ? | 
|  | 4662 | pCommandPool[0] = commandPool | 
|  | 4663 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4664 |  | 
|  | 4665 | return ? | 
|  | 4666 | } | 
|  | 4667 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4668 | cmd void vkDestroyCommandPool( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4669 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4670 | VkCommandPool                               commandPool, | 
|  | 4671 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4672 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4673 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4674 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4675 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4676 | State.CommandPools[commandPool] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4677 | } | 
|  | 4678 |  | 
|  | 4679 | cmd VkResult vkResetCommandPool( | 
|  | 4680 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4681 | VkCommandPool                               commandPool, | 
|  | 4682 | VkCommandPoolResetFlags                     flags) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4683 | deviceObject := GetDevice(device) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4684 | commandPoolObject := GetCommandPool(commandPool) | 
|  | 4685 | assert(commandPoolObject.device == device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4686 |  | 
|  | 4687 | return ? | 
|  | 4688 | } | 
|  | 4689 |  | 
|  | 4690 | // Command buffer functions | 
|  | 4691 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4692 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4693 | memoryObject := GetDeviceMemory(memory) | 
|  | 4694 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4695 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4696 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4697 | commandBufferObject.boundObjects[as!u64(obj)] = memory | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4698 | } | 
|  | 4699 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4700 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { | 
|  | 4701 | memoryObject := GetDeviceMemory(memory) | 
|  | 4702 | memoryObject.boundCommandBuffers[commandBuffer] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4703 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4704 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4705 | commandBufferObject.boundObjects[as!u64(obj)] = null | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4706 | } | 
|  | 4707 |  | 
|  | 4708 | @threadSafety("system") | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4709 | cmd VkResult vkAllocateCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4710 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4711 | const VkCommandBufferAllocateInfo*          pAllocateInfo, | 
|  | 4712 | VkCommandBuffer*                            pCommandBuffers) { | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4713 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4714 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4715 | count := pAllocateInfo[0].commandBufferCount | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4716 | commandBuffers := pCommandBuffers[0:count] | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4717 | for i in (0 .. count) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4718 | commandBuffer := ? | 
|  | 4719 | commandBuffers[i] = commandBuffer | 
|  | 4720 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4721 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4722 |  | 
|  | 4723 | return ? | 
|  | 4724 | } | 
|  | 4725 |  | 
|  | 4726 | @threadSafety("system") | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4727 | cmd void vkFreeCommandBuffers( | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4728 | VkDevice                                    device, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4729 | VkCommandPool                               commandPool, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4730 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4731 | const VkCommandBuffer*                      pCommandBuffers) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4732 | deviceObject := GetDevice(device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4733 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4734 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4735 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4736 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) | 
|  | 4737 | assert(commandBufferObject.device == device) | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4738 | // TODO: iterate over boundObjects and clear memory bindings | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4739 | State.CommandBuffers[commandBuffers[i]] = null | 
| Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4740 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4741 | } | 
|  | 4742 |  | 
|  | 4743 | @threadSafety("app") | 
|  | 4744 | cmd VkResult vkBeginCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4745 | VkCommandBuffer                             commandBuffer, | 
|  | 4746 | const VkCommandBufferBeginInfo*             pBeginInfo) { | 
|  | 4747 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) | 
|  | 4748 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4749 |  | 
|  | 4750 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4751 |  | 
|  | 4752 | return ? | 
|  | 4753 | } | 
|  | 4754 |  | 
|  | 4755 | @threadSafety("app") | 
|  | 4756 | cmd VkResult vkEndCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4757 | VkCommandBuffer                             commandBuffer) { | 
|  | 4758 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4759 |  | 
|  | 4760 | return ? | 
|  | 4761 | } | 
|  | 4762 |  | 
|  | 4763 | @threadSafety("app") | 
|  | 4764 | cmd VkResult vkResetCommandBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4765 | VkCommandBuffer                             commandBuffer, | 
|  | 4766 | VkCommandBufferResetFlags                   flags) { | 
|  | 4767 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4768 |  | 
|  | 4769 | // TODO: iterate over boundObjects and clear memory bindings | 
|  | 4770 |  | 
|  | 4771 | return ? | 
|  | 4772 | } | 
|  | 4773 |  | 
|  | 4774 |  | 
|  | 4775 | // Command buffer building functions | 
|  | 4776 |  | 
|  | 4777 | @threadSafety("app") | 
|  | 4778 | cmd void vkCmdBindPipeline( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4779 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4780 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4781 | VkPipeline                                  pipeline) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4782 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4783 | pipelineObject := GetPipeline(pipeline) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4784 | assert(commandBufferObject.device == pipelineObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4785 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4786 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4787 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4788 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4789 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4790 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4791 | } | 
|  | 4792 |  | 
|  | 4793 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4794 | cmd void vkCmdSetViewport( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4795 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4796 | u32                                         firstViewport, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4797 | u32                                         viewportCount, | 
|  | 4798 | const VkViewport*                           pViewports) { | 
| 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 | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4801 | } | 
|  | 4802 |  | 
|  | 4803 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4804 | cmd void vkCmdSetScissor( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4805 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4806 | u32                                         firstScissor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4807 | u32                                         scissorCount, | 
|  | 4808 | const VkRect2D*                             pScissors) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4809 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4810 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4811 | } | 
|  | 4812 |  | 
|  | 4813 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4814 | cmd void vkCmdSetLineWidth( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4815 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4816 | f32                                         lineWidth) { | 
| 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 | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4819 | } | 
|  | 4820 |  | 
|  | 4821 | @threadSafety("app") | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4822 | cmd void vkCmdSetDepthBias( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4823 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4824 | f32                                         depthBiasConstantFactor, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4825 | f32                                         depthBiasClamp, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4826 | f32                                         depthBiasSlopeFactor) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4827 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4828 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4829 | } | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4830 |  | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4831 | @threadSafety("app") | 
|  | 4832 | cmd void vkCmdSetBlendConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4833 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4834 | // TODO(jessehall): apic only supports 'const' on pointer types. Using | 
|  | 4835 | // an annotation as a quick hack to pass this to the template without | 
|  | 4836 | // having to modify the AST and semantic model. | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4837 | @readonly f32[4]                            blendConstants) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4838 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4839 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4840 | } | 
|  | 4841 |  | 
|  | 4842 | @threadSafety("app") | 
|  | 4843 | cmd void vkCmdSetDepthBounds( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4844 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4845 | f32                                         minDepthBounds, | 
|  | 4846 | f32                                         maxDepthBounds) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4847 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4848 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4849 | } | 
|  | 4850 |  | 
|  | 4851 | @threadSafety("app") | 
|  | 4852 | cmd void vkCmdSetStencilCompareMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4853 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4854 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4855 | u32                                         compareMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4856 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4857 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4858 | } | 
|  | 4859 |  | 
|  | 4860 | @threadSafety("app") | 
|  | 4861 | cmd void vkCmdSetStencilWriteMask( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4862 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4863 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4864 | u32                                         writeMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4865 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4866 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4867 | } | 
|  | 4868 |  | 
|  | 4869 | @threadSafety("app") | 
|  | 4870 | cmd void vkCmdSetStencilReference( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4871 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4872 | VkStencilFaceFlags                          faceMask, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4873 | u32                                         reference) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4874 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 4875 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4876 | } | 
|  | 4877 |  | 
|  | 4878 | @threadSafety("app") | 
|  | 4879 | cmd void vkCmdBindDescriptorSets( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4880 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4881 | VkPipelineBindPoint                         pipelineBindPoint, | 
|  | 4882 | VkPipelineLayout                            layout, | 
|  | 4883 | u32                                         firstSet, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4884 | u32                                         descriptorSetCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4885 | const VkDescriptorSet*                      pDescriptorSets, | 
|  | 4886 | u32                                         dynamicOffsetCount, | 
|  | 4887 | const u32*                                  pDynamicOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4888 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4889 |  | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4890 | descriptorSets := pDescriptorSets[0:descriptorSetCount] | 
|  | 4891 | for i in (0 .. descriptorSetCount) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4892 | descriptorSet := descriptorSets[i] | 
|  | 4893 | descriptorSetObject := GetDescriptorSet(descriptorSet) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4894 | assert(commandBufferObject.device == descriptorSetObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4895 | } | 
|  | 4896 |  | 
|  | 4897 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] | 
|  | 4898 | for i in (0 .. dynamicOffsetCount) { | 
|  | 4899 | dynamicOffset := dynamicOffsets[i] | 
|  | 4900 | } | 
|  | 4901 |  | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4902 | queue := switch (pipelineBindPoint) { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4903 | case VK_PIPELINE_BIND_POINT_COMPUTE:  VK_QUEUE_COMPUTE_BIT | 
|  | 4904 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT | 
|  | 4905 | } | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4906 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4907 | } | 
|  | 4908 |  | 
|  | 4909 | @threadSafety("app") | 
|  | 4910 | cmd void vkCmdBindIndexBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4911 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4912 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4913 | VkDeviceSize                                offset, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4914 | VkIndexType                                 indexType) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4915 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4916 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4917 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4918 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4919 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4921 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4922 | } | 
|  | 4923 |  | 
|  | 4924 | @threadSafety("app") | 
|  | 4925 | cmd void vkCmdBindVertexBuffers( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4926 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4927 | u32                                         firstBinding, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4928 | u32                                         bindingCount, | 
|  | 4929 | const VkBuffer*                             pBuffers, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4930 | const VkDeviceSize*                         pOffsets) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4931 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4932 |  | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4933 | // TODO: check if not [firstBinding:firstBinding+bindingCount] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4934 | buffers := pBuffers[0:bindingCount] | 
|  | 4935 | offsets := pOffsets[0:bindingCount] | 
|  | 4936 | for i in (0 .. bindingCount) { | 
|  | 4937 | buffer := buffers[i] | 
|  | 4938 | offset := offsets[i] | 
|  | 4939 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4940 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4941 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4942 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4943 | } | 
|  | 4944 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4945 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4946 | } | 
|  | 4947 |  | 
|  | 4948 | @threadSafety("app") | 
|  | 4949 | cmd void vkCmdDraw( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4950 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4951 | u32                                         vertexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4952 | u32                                         instanceCount, | 
|  | 4953 | u32                                         firstVertex, | 
|  | 4954 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4955 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4956 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4957 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4958 | } | 
|  | 4959 |  | 
|  | 4960 | @threadSafety("app") | 
|  | 4961 | cmd void vkCmdDrawIndexed( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4962 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4963 | u32                                         indexCount, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4964 | u32                                         instanceCount, | 
|  | 4965 | u32                                         firstIndex, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4966 | s32                                         vertexOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4967 | u32                                         firstInstance) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4968 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4969 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | } | 
|  | 4972 |  | 
|  | 4973 | @threadSafety("app") | 
|  | 4974 | cmd void vkCmdDrawIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4975 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4976 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4977 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4978 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4979 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4980 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4981 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4982 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4983 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4984 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4985 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4986 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4987 | } | 
|  | 4988 |  | 
|  | 4989 | @threadSafety("app") | 
|  | 4990 | cmd void vkCmdDrawIndexedIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4991 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4992 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4993 | VkDeviceSize                                offset, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4994 | u32                                         drawCount, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4995 | u32                                         stride) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4996 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4997 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4998 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4999 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5000 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5001 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5002 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5003 | } | 
|  | 5004 |  | 
|  | 5005 | @threadSafety("app") | 
|  | 5006 | cmd void vkCmdDispatch( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5007 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5008 | u32                                         x, | 
|  | 5009 | u32                                         y, | 
|  | 5010 | u32                                         z) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5011 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5012 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5013 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5014 | } | 
|  | 5015 |  | 
|  | 5016 | @threadSafety("app") | 
|  | 5017 | cmd void vkCmdDispatchIndirect( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5018 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5019 | VkBuffer                                    buffer, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5020 | VkDeviceSize                                offset) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5021 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5022 | bufferObject := GetBuffer(buffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5023 | assert(commandBufferObject.device == bufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5024 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5025 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5026 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5027 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5028 | } | 
|  | 5029 |  | 
|  | 5030 | @threadSafety("app") | 
|  | 5031 | cmd void vkCmdCopyBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5032 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5033 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5034 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5035 | u32                                         regionCount, | 
|  | 5036 | const VkBufferCopy*                         pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5037 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5038 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5039 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5040 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 5041 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5042 |  | 
|  | 5043 | regions := pRegions[0:regionCount] | 
|  | 5044 | for i in (0 .. regionCount) { | 
|  | 5045 | region := regions[i] | 
|  | 5046 | } | 
|  | 5047 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5048 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 5049 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5050 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5051 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5052 | } | 
|  | 5053 |  | 
|  | 5054 | @threadSafety("app") | 
|  | 5055 | cmd void vkCmdCopyImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5056 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5057 | VkImage                                     srcImage, | 
|  | 5058 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5059 | VkImage                                     dstImage, | 
|  | 5060 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5061 | u32                                         regionCount, | 
|  | 5062 | const VkImageCopy*                          pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5063 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5064 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5065 | dstImageObject := GetImage(dstImage) | 
|  | 5066 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5067 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5068 |  | 
|  | 5069 | regions := pRegions[0:regionCount] | 
|  | 5070 | for i in (0 .. regionCount) { | 
|  | 5071 | region := regions[i] | 
|  | 5072 | } | 
|  | 5073 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5074 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5075 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5076 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5077 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5078 | } | 
|  | 5079 |  | 
|  | 5080 | @threadSafety("app") | 
|  | 5081 | cmd void vkCmdBlitImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5082 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5083 | VkImage                                     srcImage, | 
|  | 5084 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5085 | VkImage                                     dstImage, | 
|  | 5086 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5087 | u32                                         regionCount, | 
|  | 5088 | const VkImageBlit*                          pRegions, | 
| Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 5089 | VkFilter                                    filter) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5090 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5091 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5092 | dstImageObject := GetImage(dstImage) | 
|  | 5093 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5094 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5095 |  | 
|  | 5096 | regions := pRegions[0:regionCount] | 
|  | 5097 | for i in (0 .. regionCount) { | 
|  | 5098 | region := regions[i] | 
|  | 5099 | } | 
|  | 5100 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5101 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5102 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5103 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5104 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5105 | } | 
|  | 5106 |  | 
|  | 5107 | @threadSafety("app") | 
|  | 5108 | cmd void vkCmdCopyBufferToImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5109 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5110 | VkBuffer                                    srcBuffer, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5111 | VkImage                                     dstImage, | 
|  | 5112 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5113 | u32                                         regionCount, | 
|  | 5114 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5115 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5116 | srcBufferObject := GetBuffer(srcBuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5117 | dstImageObject := GetImage(dstImage) | 
|  | 5118 | assert(commandBufferObject.device == srcBufferObject.device) | 
|  | 5119 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5120 |  | 
|  | 5121 | regions := pRegions[0:regionCount] | 
|  | 5122 | for i in (0 .. regionCount) { | 
|  | 5123 | region := regions[i] | 
|  | 5124 | } | 
|  | 5125 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5126 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) | 
|  | 5127 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5128 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5129 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5130 | } | 
|  | 5131 |  | 
|  | 5132 | @threadSafety("app") | 
|  | 5133 | cmd void vkCmdCopyImageToBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5134 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5135 | VkImage                                     srcImage, | 
|  | 5136 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5137 | VkBuffer                                    dstBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5138 | u32                                         regionCount, | 
|  | 5139 | const VkBufferImageCopy*                    pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5140 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5141 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5142 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5143 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5144 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5145 |  | 
|  | 5146 | regions := pRegions[0:regionCount] | 
|  | 5147 | for i in (0 .. regionCount) { | 
|  | 5148 | region := regions[i] | 
|  | 5149 | } | 
|  | 5150 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5151 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5152 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5153 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5154 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5155 | } | 
|  | 5156 |  | 
|  | 5157 | @threadSafety("app") | 
|  | 5158 | cmd void vkCmdUpdateBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5159 | VkCommandBuffer                             commandBuffer, | 
|  | 5160 | VkBuffer                                    dstBuffer, | 
|  | 5161 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5162 | VkDeviceSize                                dataSize, | 
| Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 5163 | const void*                                 pData) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5164 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 5165 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5166 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5167 |  | 
|  | 5168 | data := pData[0:dataSize] | 
|  | 5169 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5170 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5171 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5172 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5173 | } | 
|  | 5174 |  | 
|  | 5175 | @threadSafety("app") | 
|  | 5176 | cmd void vkCmdFillBuffer( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5177 | VkCommandBuffer                             commandBuffer, | 
|  | 5178 | VkBuffer                                    dstBuffer, | 
|  | 5179 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5180 | VkDeviceSize                                size, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5181 | u32                                         data) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5182 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
|  | 5183 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5184 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5185 |  | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5186 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5187 | } | 
|  | 5188 |  | 
|  | 5189 | @threadSafety("app") | 
|  | 5190 | cmd void vkCmdClearColorImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5191 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5192 | VkImage                                     image, | 
|  | 5193 | VkImageLayout                               imageLayout, | 
|  | 5194 | const VkClearColorValue*                    pColor, | 
|  | 5195 | u32                                         rangeCount, | 
|  | 5196 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5197 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5198 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5199 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5200 |  | 
|  | 5201 | ranges := pRanges[0:rangeCount] | 
|  | 5202 | for i in (0 .. rangeCount) { | 
|  | 5203 | range := ranges[i] | 
|  | 5204 | } | 
|  | 5205 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5206 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5207 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5208 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5209 | } | 
|  | 5210 |  | 
|  | 5211 | @threadSafety("app") | 
|  | 5212 | cmd void vkCmdClearDepthStencilImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5213 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5214 | VkImage                                     image, | 
|  | 5215 | VkImageLayout                               imageLayout, | 
| Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5216 | const VkClearDepthStencilValue*             pDepthStencil, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5217 | u32                                         rangeCount, | 
|  | 5218 | const VkImageSubresourceRange*              pRanges) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5219 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5220 | imageObject := GetImage(image) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5221 | assert(commandBufferObject.device == imageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5222 |  | 
|  | 5223 | ranges := pRanges[0:rangeCount] | 
|  | 5224 | for i in (0 .. rangeCount) { | 
|  | 5225 | range := ranges[i] | 
|  | 5226 | } | 
|  | 5227 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5228 | bindCommandBuffer(commandBuffer, image, imageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5229 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5230 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5231 | } | 
|  | 5232 |  | 
|  | 5233 | @threadSafety("app") | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5234 | cmd void vkCmdClearAttachments( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5235 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5236 | u32                                         attachmentCount, | 
|  | 5237 | const VkClearAttachment*                    pAttachments, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5238 | u32                                         rectCount, | 
| Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5239 | const VkClearRect*                          pRects) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5240 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5241 |  | 
|  | 5242 | rects := pRects[0:rectCount] | 
|  | 5243 | for i in (0 .. rectCount) { | 
|  | 5244 | rect := rects[i] | 
|  | 5245 | } | 
|  | 5246 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5247 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5248 | } | 
|  | 5249 |  | 
|  | 5250 | @threadSafety("app") | 
|  | 5251 | cmd void vkCmdResolveImage( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5252 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5253 | VkImage                                     srcImage, | 
|  | 5254 | VkImageLayout                               srcImageLayout, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5255 | VkImage                                     dstImage, | 
|  | 5256 | VkImageLayout                               dstImageLayout, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5257 | u32                                         regionCount, | 
|  | 5258 | const VkImageResolve*                       pRegions) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5259 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5260 | srcImageObject := GetImage(srcImage) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5261 | dstImageObject := GetImage(dstImage) | 
|  | 5262 | assert(commandBufferObject.device == srcImageObject.device) | 
|  | 5263 | assert(commandBufferObject.device == dstImageObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5264 |  | 
|  | 5265 | regions := pRegions[0:regionCount] | 
|  | 5266 | for i in (0 .. regionCount) { | 
|  | 5267 | region := regions[i] | 
|  | 5268 | } | 
|  | 5269 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5270 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) | 
|  | 5271 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5272 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5273 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5274 | } | 
|  | 5275 |  | 
|  | 5276 | @threadSafety("app") | 
|  | 5277 | cmd void vkCmdSetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5278 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5279 | VkEvent                                     event, | 
|  | 5280 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5281 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5282 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5283 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5284 | } | 
|  | 5285 |  | 
|  | 5286 | @threadSafety("app") | 
|  | 5287 | cmd void vkCmdResetEvent( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5288 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5289 | VkEvent                                     event, | 
|  | 5290 | VkPipelineStageFlags                        stageMask) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5291 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5292 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5293 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5294 | } | 
|  | 5295 |  | 
|  | 5296 | @threadSafety("app") | 
|  | 5297 | cmd void vkCmdWaitEvents( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5298 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5299 | u32                                         eventCount, | 
|  | 5300 | const VkEvent*                              pEvents, | 
|  | 5301 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5302 | VkPipelineStageFlags                        dstStageMask, | 
|  | 5303 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5304 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5305 | u32                                         bufferMemoryBarrierCount, | 
|  | 5306 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5307 | u32                                         imageMemoryBarrierCount, | 
|  | 5308 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5309 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5310 |  | 
|  | 5311 | events := pEvents[0:eventCount] | 
|  | 5312 | for i in (0 .. eventCount) { | 
|  | 5313 | event := events[i] | 
|  | 5314 | eventObject := GetEvent(event) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5315 | assert(commandBufferObject.device == eventObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5316 | } | 
|  | 5317 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5318 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5319 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5320 | memoryBarrier := memoryBarriers[i] | 
|  | 5321 | } | 
|  | 5322 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5323 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5324 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5325 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5326 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5327 | } | 
|  | 5328 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5329 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5330 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5331 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5332 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5333 | } | 
|  | 5334 | } | 
|  | 5335 |  | 
|  | 5336 | @threadSafety("app") | 
|  | 5337 | cmd void vkCmdPipelineBarrier( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5338 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5339 | VkPipelineStageFlags                        srcStageMask, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5340 | VkPipelineStageFlags                        dstStageMask, | 
| Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5341 | VkDependencyFlags                           dependencyFlags, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5342 | u32                                         memoryBarrierCount, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5343 | const VkMemoryBarrier*                      pMemoryBarriers, | 
|  | 5344 | u32                                         bufferMemoryBarrierCount, | 
|  | 5345 | const VkBufferMemoryBarrier*                pBufferMemoryBarriers, | 
|  | 5346 | u32                                         imageMemoryBarrierCount, | 
|  | 5347 | const VkImageMemoryBarrier*                 pImageMemoryBarriers) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5348 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5349 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5350 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5351 | for i in (0 .. memoryBarrierCount) { | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5352 | memoryBarrier := memoryBarriers[i] | 
|  | 5353 | } | 
|  | 5354 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] | 
|  | 5355 | for i in (0 .. bufferMemoryBarrierCount) { | 
|  | 5356 | bufferMemoryBarrier := bufferMemoryBarriers[i] | 
|  | 5357 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) | 
|  | 5358 | assert(bufferObject.device == commandBufferObject.device) | 
|  | 5359 | } | 
|  | 5360 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] | 
|  | 5361 | for i in (0 .. imageMemoryBarrierCount) { | 
|  | 5362 | imageMemoryBarrier := imageMemoryBarriers[i] | 
|  | 5363 | imageObject := GetImage(imageMemoryBarrier.image) | 
|  | 5364 | assert(imageObject.device == commandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5365 | } | 
|  | 5366 | } | 
|  | 5367 |  | 
|  | 5368 | @threadSafety("app") | 
|  | 5369 | cmd void vkCmdBeginQuery( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5370 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5371 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5372 | u32                                         query, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5373 | VkQueryControlFlags                         flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5374 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5375 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5376 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5377 | } | 
|  | 5378 |  | 
|  | 5379 | @threadSafety("app") | 
|  | 5380 | cmd void vkCmdEndQuery( | 
| 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 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5383 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5384 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5385 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5386 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5387 | } | 
|  | 5388 |  | 
|  | 5389 | @threadSafety("app") | 
|  | 5390 | cmd void vkCmdResetQueryPool( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5391 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5392 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5393 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5394 | u32                                         queryCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5395 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5396 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5397 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5398 | } | 
|  | 5399 |  | 
|  | 5400 | @threadSafety("app") | 
|  | 5401 | cmd void vkCmdWriteTimestamp( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5402 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5403 | VkPipelineStageFlagBits                     pipelineStage, | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5404 | VkQueryPool                                 queryPool, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5405 | u32                                         query) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5406 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5407 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5408 | assert(commandBufferObject.device == queryPoolObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5409 | } | 
|  | 5410 |  | 
|  | 5411 | @threadSafety("app") | 
|  | 5412 | cmd void vkCmdCopyQueryPoolResults( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5413 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5414 | VkQueryPool                                 queryPool, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5415 | u32                                         firstQuery, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5416 | u32                                         queryCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5417 | VkBuffer                                    dstBuffer, | 
|  | 5418 | VkDeviceSize                                dstOffset, | 
| Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5419 | VkDeviceSize                                stride, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5420 | VkQueryResultFlags                          flags) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5421 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5422 | queryPoolObject := GetQueryPool(queryPool) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5423 | dstBufferObject := GetBuffer(dstBuffer) | 
|  | 5424 | assert(commandBufferObject.device == queryPoolObject.device) | 
|  | 5425 | assert(commandBufferObject.device == dstBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5426 | } | 
|  | 5427 |  | 
|  | 5428 | cmd void vkCmdPushConstants( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5429 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5430 | VkPipelineLayout                            layout, | 
|  | 5431 | VkShaderStageFlags                          stageFlags, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5432 | u32                                         offset, | 
|  | 5433 | u32                                         size, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5434 | const void*                                 pValues) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5435 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5436 | layoutObject := GetPipelineLayout(layout) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5437 | assert(commandBufferObject.device == layoutObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5438 | } | 
|  | 5439 |  | 
|  | 5440 | @threadSafety("app") | 
|  | 5441 | cmd void vkCmdBeginRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5442 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5443 | const VkRenderPassBeginInfo*                pRenderPassBegin, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5444 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5445 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5446 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) | 
|  | 5447 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5448 | assert(commandBufferObject.device == renderPassObject.device) | 
|  | 5449 | assert(commandBufferObject.device == framebufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5450 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5451 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5452 | } | 
|  | 5453 |  | 
|  | 5454 | cmd void vkCmdNextSubpass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5455 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5456 | VkSubpassContents                           contents) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5457 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5458 | } | 
|  | 5459 |  | 
|  | 5460 | @threadSafety("app") | 
|  | 5461 | cmd void vkCmdEndRenderPass( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5462 | VkCommandBuffer                             commandBuffer) { | 
|  | 5463 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5464 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5465 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5466 | } | 
|  | 5467 |  | 
|  | 5468 | cmd void vkCmdExecuteCommands( | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5469 | VkCommandBuffer                             commandBuffer, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5470 | u32                                         commandBufferCount, | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5471 | const VkCommandBuffer*                      pCommandBuffers) { | 
|  | 5472 | commandBufferObject := GetCommandBuffer(commandBuffer) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5473 |  | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5474 | commandBuffers := pCommandBuffers[0:commandBufferCount] | 
|  | 5475 | for i in (0 .. commandBufferCount) { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5476 | secondaryCommandBuffer := commandBuffers[i] | 
|  | 5477 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) | 
|  | 5478 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5479 | } | 
|  | 5480 | } | 
|  | 5481 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5482 | @extension("VK_KHR_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5483 | cmd void vkDestroySurfaceKHR( | 
|  | 5484 | VkInstance                                  instance, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5485 | VkSurfaceKHR                                surface, | 
|  | 5486 | const VkAllocationCallbacks*                pAllocator) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5487 | instanceObject := GetInstance(instance) | 
|  | 5488 | surfaceObject := GetSurface(surface) | 
|  | 5489 | assert(surfaceObject.instance == instance) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5490 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5491 | State.Surfaces[surface] = null | 
| Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5492 | } | 
|  | 5493 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5494 | @extension("VK_KHR_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5495 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5496 | VkPhysicalDevice                            physicalDevice, | 
|  | 5497 | u32                                         queueFamilyIndex, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5498 | VkSurfaceKHR                                surface, | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5499 | VkBool32*                                   pSupported) { | 
|  | 5500 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5501 |  | 
|  | 5502 | return ? | 
|  | 5503 | } | 
|  | 5504 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5505 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5506 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( | 
|  | 5507 | VkPhysicalDevice                            physicalDevice, | 
|  | 5508 | VkSurfaceKHR                                surface, | 
|  | 5509 | VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities) { | 
|  | 5510 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5511 |  | 
|  | 5512 | surfaceCapabilities := ? | 
|  | 5513 | pSurfaceCapabilities[0] = surfaceCapabilities | 
|  | 5514 |  | 
|  | 5515 | return ? | 
|  | 5516 | } | 
|  | 5517 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5518 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5519 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( | 
|  | 5520 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5521 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5522 | u32*                                        pSurfaceFormatCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5523 | VkSurfaceFormatKHR*                         pSurfaceFormats) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5524 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5525 |  | 
|  | 5526 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5527 | pSurfaceFormatCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5528 | surfaceFormats := pSurfaceFormats[0:count] | 
|  | 5529 |  | 
|  | 5530 | for i in (0 .. count) { | 
|  | 5531 | surfaceFormat := ? | 
|  | 5532 | surfaceFormats[i] = surfaceFormat | 
|  | 5533 | } | 
|  | 5534 |  | 
|  | 5535 | return ? | 
|  | 5536 | } | 
|  | 5537 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5538 | @extension("VK_KHR_surface") | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5539 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( | 
|  | 5540 | VkPhysicalDevice                            physicalDevice, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5541 | VkSurfaceKHR                                surface, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5542 | u32*                                        pPresentModeCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5543 | VkPresentModeKHR*                           pPresentModes) { | 
| Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5544 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5545 |  | 
|  | 5546 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5547 | pPresentModeCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5548 | presentModes := pPresentModes[0:count] | 
|  | 5549 |  | 
|  | 5550 | for i in (0 .. count) { | 
|  | 5551 | presentMode := ? | 
|  | 5552 | presentModes[i] = presentMode | 
|  | 5553 | } | 
|  | 5554 |  | 
|  | 5555 | return ? | 
|  | 5556 | } | 
|  | 5557 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5558 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5559 | cmd VkResult vkCreateSwapchainKHR( | 
|  | 5560 | VkDevice                                 device, | 
|  | 5561 | const VkSwapchainCreateInfoKHR*          pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5562 | const VkAllocationCallbacks*             pAllocator, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5563 | VkSwapchainKHR*                          pSwapchain) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5564 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5565 | deviceObject := GetDevice(device) | 
|  | 5566 |  | 
|  | 5567 | swapchain := ? | 
|  | 5568 | pSwapchain[0] = swapchain | 
|  | 5569 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) | 
|  | 5570 |  | 
|  | 5571 | return ? | 
|  | 5572 | } | 
|  | 5573 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5574 | @extension("VK_KHR_swapchain") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5575 | cmd void vkDestroySwapchainKHR( | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5576 | VkDevice                                 device, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5577 | VkSwapchainKHR                           swapchain, | 
|  | 5578 | const VkAllocationCallbacks*             pAllocator) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5579 | deviceObject := GetDevice(device) | 
|  | 5580 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5581 | assert(swapchainObject.device == device) | 
|  | 5582 |  | 
|  | 5583 | State.Swapchains[swapchain] = null | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5584 | } | 
|  | 5585 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5586 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5587 | cmd VkResult vkGetSwapchainImagesKHR( | 
|  | 5588 | VkDevice                                 device, | 
|  | 5589 | VkSwapchainKHR                           swapchain, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5590 | u32*                                     pSwapchainImageCount, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5591 | VkImage*                                 pSwapchainImages) { | 
|  | 5592 | deviceObject := GetDevice(device) | 
|  | 5593 |  | 
|  | 5594 | count := as!u32(?) | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5595 | pSwapchainImageCount[0] = count | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5596 | swapchainImages := pSwapchainImages[0:count] | 
|  | 5597 |  | 
|  | 5598 | for i in (0 .. count) { | 
|  | 5599 | swapchainImage := ? | 
|  | 5600 | swapchainImages[i] = swapchainImage | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5601 | State.Images[swapchainImage] = new!ImageObject(device: device) | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5602 | } | 
|  | 5603 |  | 
|  | 5604 | return ? | 
|  | 5605 | } | 
|  | 5606 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5607 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5608 | cmd VkResult vkAcquireNextImageKHR( | 
|  | 5609 | VkDevice                                 device, | 
|  | 5610 | VkSwapchainKHR                           swapchain, | 
|  | 5611 | u64                                      timeout, | 
|  | 5612 | VkSemaphore                              semaphore, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5613 | VkFence                                  fence, | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5614 | u32*                                     pImageIndex) { | 
|  | 5615 | deviceObject := GetDevice(device) | 
|  | 5616 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5617 |  | 
|  | 5618 | imageIndex := ? | 
|  | 5619 | pImageIndex[0] = imageIndex | 
|  | 5620 |  | 
|  | 5621 | return ? | 
|  | 5622 | } | 
|  | 5623 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5624 | @extension("VK_KHR_swapchain") | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5625 | cmd VkResult vkQueuePresentKHR( | 
|  | 5626 | VkQueue                                  queue, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5627 | const VkPresentInfoKHR*                  pPresentInfo) { | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5628 | queueObject := GetQueue(queue) | 
|  | 5629 |  | 
|  | 5630 | presentInfo := ? | 
|  | 5631 | pPresentInfo[0] = presentInfo | 
|  | 5632 |  | 
|  | 5633 | return ? | 
|  | 5634 | } | 
|  | 5635 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5636 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5637 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( | 
|  | 5638 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5639 | u32*                                    pPropertyCount, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5640 | VkDisplayPropertiesKHR*                 pProperties) { | 
|  | 5641 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5642 | return ? | 
|  | 5643 | } | 
|  | 5644 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5645 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5646 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( | 
|  | 5647 | VkPhysicalDevice                        physicalDevice, | 
|  | 5648 | u32*                                    pPropertyCount, | 
|  | 5649 | VkDisplayPlanePropertiesKHR*            pProperties) { | 
|  | 5650 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5651 | return ? | 
|  | 5652 | } | 
|  | 5653 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5654 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5655 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( | 
|  | 5656 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5657 | u32                                     planeIndex, | 
| Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5658 | u32*                                    pDisplayCount, | 
|  | 5659 | VkDisplayKHR*                           pDisplays) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5660 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5661 | return ? | 
|  | 5662 | } | 
|  | 5663 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5664 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5665 | cmd VkResult vkGetDisplayModePropertiesKHR( | 
|  | 5666 | VkPhysicalDevice                        physicalDevice, | 
|  | 5667 | VkDisplayKHR                            display, | 
| Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5668 | u32*                                    pPropertyCount, | 
|  | 5669 | VkDisplayModePropertiesKHR*             pProperties) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5670 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5671 | return ? | 
|  | 5672 | } | 
|  | 5673 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5674 | @extension("VK_KHR_display") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5675 | cmd VkResult vkCreateDisplayModeKHR( | 
|  | 5676 | VkPhysicalDevice                        physicalDevice, | 
|  | 5677 | VkDisplayKHR                            display, | 
|  | 5678 | const VkDisplayModeCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5679 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5680 | VkDisplayModeKHR*                       pMode) { | 
|  | 5681 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5682 | return ? | 
|  | 5683 | } | 
|  | 5684 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5685 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5686 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5687 | VkPhysicalDevice                        physicalDevice, | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5688 | VkDisplayModeKHR                        mode, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5689 | u32                                     planeIndex, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5690 | VkDisplayPlaneCapabilitiesKHR*          pCapabilities) { | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5691 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5692 | return ? | 
|  | 5693 | } | 
|  | 5694 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5695 | @extension("VK_KHR_display") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5696 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( | 
|  | 5697 | VkInstance                              instance, | 
|  | 5698 | const VkDisplaySurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5699 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5700 | VkSurfaceKHR*                           pSurface) { | 
|  | 5701 | return ? | 
|  | 5702 | } | 
|  | 5703 |  | 
| Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5704 | @extension("VK_KHR_display_swapchain") | 
|  | 5705 | cmd VkResult vkCreateSharedSwapchainsKHR( | 
|  | 5706 | VkDevice                                device, | 
|  | 5707 | u32                                     swapchainCount, | 
|  | 5708 | const VkSwapchainCreateInfoKHR*         pCreateInfos, | 
|  | 5709 | const VkAllocationCallbacks*            pAllocator, | 
|  | 5710 | VkSwapchainKHR*                         pSwapchains) { | 
|  | 5711 | return ? | 
|  | 5712 | } | 
|  | 5713 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5714 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5715 | cmd VkResult vkCreateXlibSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5716 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5717 | const VkXlibSurfaceCreateInfoKHR*       pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5718 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5719 | VkSurfaceKHR*                           pSurface) { | 
|  | 5720 | instanceObject := GetInstance(instance) | 
|  | 5721 | return ? | 
|  | 5722 | } | 
|  | 5723 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5724 | @extension("VK_KHR_xlib_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5725 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( | 
|  | 5726 | VkPhysicalDevice                        physicalDevice, | 
|  | 5727 | u32                                     queueFamilyIndex, | 
|  | 5728 | platform.Display*                       dpy, | 
| Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5729 | platform.VisualID                       visualID) { | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5730 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5731 | return ? | 
|  | 5732 | } | 
|  | 5733 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5734 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5735 | cmd VkResult vkCreateXcbSurfaceKHR( | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5736 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5737 | const VkXcbSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5738 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5739 | VkSurfaceKHR*                           pSurface) { | 
|  | 5740 | instanceObject := GetInstance(instance) | 
|  | 5741 | return ? | 
|  | 5742 | } | 
|  | 5743 |  | 
| Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5744 | @extension("VK_KHR_xcb_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5745 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( | 
|  | 5746 | VkPhysicalDevice                        physicalDevice, | 
|  | 5747 | u32                                     queueFamilyIndex, | 
|  | 5748 | platform.xcb_connection_t*              connection, | 
|  | 5749 | platform.xcb_visualid_t                 visual_id) { | 
|  | 5750 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5751 | return ? | 
|  | 5752 | } | 
|  | 5753 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5754 | @extension("VK_KHR_wayland_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5755 | cmd VkResult vkCreateWaylandSurfaceKHR( | 
|  | 5756 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5757 | const VkWaylandSurfaceCreateInfoKHR*    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_wayland_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5765 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( | 
|  | 5766 | VkPhysicalDevice                        physicalDevice, | 
|  | 5767 | u32                                     queueFamilyIndex, | 
|  | 5768 | platform.wl_display*                    display) { | 
|  | 5769 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5770 | return ? | 
|  | 5771 | } | 
|  | 5772 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5773 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5774 | cmd VkResult vkCreateMirSurfaceKHR( | 
|  | 5775 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5776 | const VkMirSurfaceCreateInfoKHR*        pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5777 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5778 | VkSurfaceKHR*                           pSurface) { | 
|  | 5779 | instanceObject := GetInstance(instance) | 
|  | 5780 | return ? | 
|  | 5781 | } | 
|  | 5782 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5783 | @extension("VK_KHR_mir_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5784 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( | 
|  | 5785 | VkPhysicalDevice                        physicalDevice, | 
|  | 5786 | u32                                     queueFamilyIndex, | 
|  | 5787 | platform.MirConnection*                 connection) { | 
|  | 5788 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
|  | 5789 | return ? | 
|  | 5790 | } | 
|  | 5791 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5792 | @extension("VK_KHR_android_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5793 | cmd VkResult vkCreateAndroidSurfaceKHR( | 
|  | 5794 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5795 | const VkAndroidSurfaceCreateInfoKHR*    pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5796 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5797 | VkSurfaceKHR*                           pSurface) { | 
|  | 5798 | instanceObject := GetInstance(instance) | 
|  | 5799 | return ? | 
|  | 5800 | } | 
|  | 5801 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5802 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5803 | cmd VkResult vkCreateWin32SurfaceKHR( | 
|  | 5804 | VkInstance                              instance, | 
| Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5805 | const VkWin32SurfaceCreateInfoKHR*      pCreateInfo, | 
| Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5806 | const VkAllocationCallbacks*            pAllocator, | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5807 | VkSurfaceKHR*                           pSurface) { | 
|  | 5808 | instanceObject := GetInstance(instance) | 
|  | 5809 | return ? | 
|  | 5810 | } | 
|  | 5811 |  | 
| Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5812 | @extension("VK_KHR_win32_surface") | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5813 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( | 
|  | 5814 | VkPhysicalDevice                        physicalDevice, | 
|  | 5815 | u32                                     queueFamilyIndex) { | 
| Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5816 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) | 
| Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5817 | return ? | 
|  | 5818 | } | 
|  | 5819 |  | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5820 | @extension("VK_ANDROID_native_buffer") | 
|  | 5821 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( | 
|  | 5822 | VkDevice                                device, | 
|  | 5823 | VkFormat                                format, | 
|  | 5824 | VkImageUsageFlags                       imageUsage, | 
|  | 5825 | int*                                    grallocUsage) { | 
|  | 5826 | return ? | 
|  | 5827 | } | 
|  | 5828 |  | 
|  | 5829 | @extension("VK_ANDROID_native_buffer") | 
| Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 5830 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( | 
|  | 5831 | VkDevice                                device, | 
|  | 5832 | VkFormat                                format, | 
|  | 5833 | VkImageUsageFlags                       imageUsage, | 
|  | 5834 | VkSwapchainImageUsageFlagsANDROID       swapchainImageUsage, | 
|  | 5835 | int*                                    grallocUsage) { | 
|  | 5836 | return ? | 
|  | 5837 | } | 
|  | 5838 |  | 
|  | 5839 | @extension("VK_ANDROID_native_buffer") | 
| Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5840 | cmd VkResult vkAcquireImageANDROID( | 
|  | 5841 | VkDevice                                device, | 
|  | 5842 | VkImage                                 image, | 
|  | 5843 | int                                     nativeFenceFd, | 
|  | 5844 | VkSemaphore                             semaphore, | 
|  | 5845 | VkFence                                 fence) { | 
|  | 5846 | return ? | 
|  | 5847 | } | 
|  | 5848 |  | 
|  | 5849 | @extension("VK_ANDROID_native_buffer") | 
|  | 5850 | cmd VkResult vkQueueSignalReleaseImageANDROID( | 
|  | 5851 | VkQueue                                 queue, | 
|  | 5852 | u32                                     waitSemaphoreCount, | 
|  | 5853 | const VkSemaphore*                      pWaitSemaphores, | 
|  | 5854 | VkImage                                 image, | 
|  | 5855 | int*                                    pNativeFenceFd) { | 
|  | 5856 | return ? | 
|  | 5857 | } | 
|  | 5858 |  | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 5859 | @extension("VK_GOOGLE_display_timing") | 
|  | 5860 | cmd VkResult vkGetRefreshCycleDurationGOOGLE( | 
|  | 5861 | VkDevice                                 device, | 
|  | 5862 | VkSwapchainKHR                           swapchain, | 
|  | 5863 | VkRefreshCycleDurationGOOGLE*            pDisplayTimingProperties) { | 
|  | 5864 | deviceObject := GetDevice(device) | 
|  | 5865 | swapchainObject := GetSwapchain(swapchain) | 
|  | 5866 |  | 
|  | 5867 | displayTimingProperties := ? | 
|  | 5868 | pDisplayTimingProperties[0] = displayTimingProperties | 
|  | 5869 |  | 
|  | 5870 | return ? | 
|  | 5871 | } | 
|  | 5872 |  | 
|  | 5873 | @extension("VK_GOOGLE_display_timing") | 
|  | 5874 | cmd VkResult vkGetPastPresentationTimingGOOGLE( | 
|  | 5875 | VkDevice                                 device, | 
|  | 5876 | VkSwapchainKHR                           swapchain, | 
|  | 5877 | u32*                                     pPresentationTimingCount, | 
|  | 5878 | VkPastPresentationTimingGOOGLE*          pPresentationTimings) { | 
| Ian Elliott | 4c8bb2a | 2016-12-29 11:07:26 -0700 | [diff] [blame] | 5879 | return ? | 
|  | 5880 | } | 
|  | 5881 |  | 
| Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5882 | @extension("VK_EXT_debug_report") | 
|  | 5883 | @external type void* PFN_vkDebugReportCallbackEXT | 
|  | 5884 | @extension("VK_EXT_debug_report") | 
|  | 5885 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( | 
|  | 5886 | VkDebugReportFlagsEXT                   flags, | 
|  | 5887 | VkDebugReportObjectTypeEXT              objectType, | 
|  | 5888 | u64                                     object, | 
|  | 5889 | platform.size_t                         location, | 
|  | 5890 | s32                                     messageCode, | 
|  | 5891 | const char*                             pLayerPrefix, | 
|  | 5892 | const char*                             pMessage, | 
|  | 5893 | void*                                   pUserData) { | 
|  | 5894 | return ? | 
|  | 5895 | } | 
|  | 5896 |  | 
|  | 5897 | @extension("VK_EXT_debug_report") | 
|  | 5898 | cmd VkResult vkCreateDebugReportCallbackEXT( | 
|  | 5899 | VkInstance                                  instance, | 
|  | 5900 | const VkDebugReportCallbackCreateInfoEXT*   pCreateInfo, | 
|  | 5901 | const VkAllocationCallbacks*                pAllocator, | 
|  | 5902 | VkDebugReportCallbackEXT*                   pCallback) { | 
|  | 5903 | return ? | 
|  | 5904 | } | 
|  | 5905 |  | 
|  | 5906 | @extension("VK_EXT_debug_report") | 
|  | 5907 | cmd void vkDestroyDebugReportCallbackEXT( | 
|  | 5908 | VkInstance                                  instance, | 
|  | 5909 | VkDebugReportCallbackEXT                    callback, | 
|  | 5910 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 5911 | } | 
|  | 5912 |  | 
|  | 5913 | @extension("VK_EXT_debug_report") | 
|  | 5914 | cmd void vkDebugReportMessageEXT( | 
|  | 5915 | VkInstance                                  instance, | 
|  | 5916 | VkDebugReportFlagsEXT                       flags, | 
|  | 5917 | VkDebugReportObjectTypeEXT                  objectType, | 
|  | 5918 | u64                                         object, | 
|  | 5919 | platform.size_t                             location, | 
|  | 5920 | s32                                         messageCode, | 
|  | 5921 | const char*                                 pLayerPrefix, | 
|  | 5922 | const char*                                 pMessage) { | 
|  | 5923 | } | 
|  | 5924 |  | 
| Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5925 | @extension("VK_EXT_debug_marker") | 
|  | 5926 | cmd VkResult vkDebugMarkerSetObjectTagEXT( | 
|  | 5927 | VkDevice                                    device, | 
|  | 5928 | VkDebugMarkerObjectTagInfoEXT*              pTagInfo) { | 
|  | 5929 | return ? | 
|  | 5930 | } | 
|  | 5931 |  | 
|  | 5932 | @extension("VK_EXT_debug_marker") | 
|  | 5933 | cmd VkResult vkDebugMarkerSetObjectNameEXT( | 
|  | 5934 | VkDevice                                    device, | 
|  | 5935 | VkDebugMarkerObjectNameInfoEXT*             pNameInfo) { | 
|  | 5936 | return ? | 
|  | 5937 | } | 
|  | 5938 |  | 
|  | 5939 | @extension("VK_EXT_debug_marker") | 
|  | 5940 | cmd void vkCmdDebugMarkerBeginEXT( | 
|  | 5941 | VkCommandBuffer                             commandBuffer, | 
|  | 5942 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5943 | } | 
|  | 5944 |  | 
|  | 5945 | @extension("VK_EXT_debug_marker") | 
|  | 5946 | cmd void vkCmdDebugMarkerEndEXT( | 
|  | 5947 | VkCommandBuffer                             commandBuffer) { | 
|  | 5948 | } | 
|  | 5949 |  | 
|  | 5950 | @extension("VK_EXT_debug_marker") | 
|  | 5951 | cmd void vkCmdDebugMarkerInsertEXT( | 
|  | 5952 | VkCommandBuffer                             commandBuffer, | 
|  | 5953 | VkDebugMarkerMarkerInfoEXT*                 pMarkerInfo) { | 
|  | 5954 | } | 
|  | 5955 |  | 
| Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 5956 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5957 | cmd void vkGetPhysicalDeviceFeatures2KHR( | 
|  | 5958 | VkPhysicalDevice                            physicalDevice, | 
|  | 5959 | VkPhysicalDeviceFeatures2KHR*               pFeatures) { | 
|  | 5960 | } | 
|  | 5961 |  | 
|  | 5962 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5963 | cmd void vkGetPhysicalDeviceProperties2KHR( | 
|  | 5964 | VkPhysicalDevice                            physicalDevice, | 
|  | 5965 | VkPhysicalDeviceProperties2KHR*             pProperties) { | 
|  | 5966 | } | 
|  | 5967 |  | 
|  | 5968 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5969 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( | 
|  | 5970 | VkPhysicalDevice                            physicalDevice, | 
|  | 5971 | VkFormat                                    format, | 
|  | 5972 | VkFormatProperties2KHR*                     pFormatProperties) { | 
|  | 5973 | } | 
|  | 5974 |  | 
|  | 5975 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5976 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( | 
|  | 5977 | VkPhysicalDevice                            physicalDevice, | 
|  | 5978 | const VkPhysicalDeviceImageFormatInfo2KHR*  pImageFormatInfo, | 
|  | 5979 | VkImageFormatProperties2KHR*                pImageFormatProperties) { | 
|  | 5980 | return ? | 
|  | 5981 | } | 
|  | 5982 |  | 
|  | 5983 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5984 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( | 
|  | 5985 | VkPhysicalDevice                            physicalDevice, | 
|  | 5986 | u32*                                        pQueueFamilyPropertyCount, | 
|  | 5987 | VkQueueFamilyProperties2KHR*                pQueueFamilyProperties) { | 
|  | 5988 | } | 
|  | 5989 |  | 
|  | 5990 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5991 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( | 
|  | 5992 | VkPhysicalDevice                            physicalDevice, | 
|  | 5993 | VkPhysicalDeviceMemoryProperties2KHR*       pMemoryProperties) { | 
|  | 5994 | } | 
|  | 5995 |  | 
|  | 5996 | @extension("VK_KHR_get_physical_device_properties2") | 
|  | 5997 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( | 
|  | 5998 | VkPhysicalDevice                            physicalDevice, | 
|  | 5999 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, | 
|  | 6000 | u32*                                        pPropertyCount, | 
|  | 6001 | VkSparseImageFormatProperties2KHR*          pProperties) { | 
|  | 6002 | } | 
|  | 6003 |  | 
| Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 6004 | @extension("VK_AMD_draw_indirect_count") | 
|  | 6005 | cmd void vkCmdDrawIndirectCountAMD( | 
|  | 6006 | VkCommandBuffer                             commandBuffer, | 
|  | 6007 | VkBuffer                                    buffer, | 
|  | 6008 | VkDeviceSize                                offset, | 
|  | 6009 | VkBuffer                                    countBuffer, | 
|  | 6010 | VkDeviceSize                                countBufferOffset, | 
|  | 6011 | u32                                         maxDrawCount, | 
|  | 6012 | u32                                         stride) { | 
|  | 6013 | } | 
|  | 6014 |  | 
|  | 6015 | @extension("VK_AMD_draw_indirect_count") | 
|  | 6016 | cmd void vkCmdDrawIndexedIndirectCountAMD( | 
|  | 6017 | VkCommandBuffer                             commandBuffer, | 
|  | 6018 | VkBuffer                                    buffer, | 
|  | 6019 | VkDeviceSize                                offset, | 
|  | 6020 | VkBuffer                                    countBuffer, | 
|  | 6021 | VkDeviceSize                                countBufferOffset, | 
|  | 6022 | u32                                         maxDrawCount, | 
|  | 6023 | u32                                         stride) { | 
|  | 6024 | } | 
|  | 6025 |  | 
|  | 6026 | @extension("VK_NV_external_memory_capabilities") | 
|  | 6027 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( | 
|  | 6028 | VkPhysicalDevice                            physicalDevice, | 
|  | 6029 | VkFormat                                    format, | 
|  | 6030 | VkImageType                                 type, | 
|  | 6031 | VkImageTiling                               tiling, | 
|  | 6032 | VkImageUsageFlags                           usage, | 
|  | 6033 | VkImageCreateFlags                          flags, | 
|  | 6034 | VkExternalMemoryHandleTypeFlagsNV           externalHandleType, | 
|  | 6035 | VkExternalImageFormatPropertiesNV*          pExternalImageFormatProperties) { | 
|  | 6036 | return ? | 
|  | 6037 | } | 
|  | 6038 |  | 
|  | 6039 | @extension("VK_NV_external_memory_win32") | 
|  | 6040 | cmd VkResult vkGetMemoryWin32HandleNV( | 
|  | 6041 | VkDevice                                    device, | 
|  | 6042 | VkDeviceMemory                              memory, | 
|  | 6043 | VkExternalMemoryHandleTypeFlagsNV           handleType, | 
|  | 6044 | platform.HANDLE*                            pHandle) { | 
|  | 6045 | return ? | 
|  | 6046 | } | 
|  | 6047 |  | 
|  | 6048 | @extension("VK_NV_external_memory_win32") | 
|  | 6049 | cmd void  vkCmdProcessCommandsNVX( | 
|  | 6050 | VkCommandBuffer                             commandBuffer, | 
|  | 6051 | const VkCmdProcessCommandsInfoNVX*          pProcessCommandsInfo) { | 
|  | 6052 | } | 
|  | 6053 |  | 
|  | 6054 | @extension("VK_NV_external_memory_win32") | 
|  | 6055 | cmd void  vkCmdReserveSpaceForCommandsNVX( | 
|  | 6056 | VkCommandBuffer                             commandBuffer, | 
|  | 6057 | const VkCmdReserveSpaceForCommandsInfoNVX*  pReserveSpaceInfo) { | 
|  | 6058 | } | 
|  | 6059 |  | 
|  | 6060 | @extension("VK_NV_external_memory_win32") | 
|  | 6061 | cmd VkResult  vkCreateIndirectCommandsLayoutNVX( | 
|  | 6062 | VkDevice                                    device, | 
|  | 6063 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, | 
|  | 6064 | const VkAllocationCallbacks*                pAllocator, | 
|  | 6065 | VkIndirectCommandsLayoutNVX*                pIndirectCommandsLayout) { | 
|  | 6066 | return ? | 
|  | 6067 | } | 
|  | 6068 |  | 
|  | 6069 | @extension("VK_NV_external_memory_win32") | 
|  | 6070 | cmd void  vkDestroyIndirectCommandsLayoutNVX( | 
|  | 6071 | VkDevice                                    device, | 
|  | 6072 | VkIndirectCommandsLayoutNVX                 indirectCommandsLayout, | 
|  | 6073 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 6074 | } | 
|  | 6075 |  | 
|  | 6076 | @extension("VK_NV_external_memory_win32") | 
|  | 6077 | cmd VkResult  vkCreateObjectTableNVX( | 
|  | 6078 | VkDevice                                    device, | 
|  | 6079 | const VkObjectTableCreateInfoNVX*           pCreateInfo, | 
|  | 6080 | const VkAllocationCallbacks*                pAllocator, | 
|  | 6081 | VkObjectTableNVX*                           pObjectTable) { | 
|  | 6082 | return ? | 
|  | 6083 | } | 
|  | 6084 |  | 
|  | 6085 | @extension("VK_NV_external_memory_win32") | 
|  | 6086 | cmd void  vkDestroyObjectTableNVX( | 
|  | 6087 | VkDevice                                    device, | 
|  | 6088 | VkObjectTableNVX                            objectTable, | 
|  | 6089 | const VkAllocationCallbacks*                pAllocator) { | 
|  | 6090 | } | 
|  | 6091 |  | 
|  | 6092 | @extension("VK_NV_external_memory_win32") | 
|  | 6093 | cmd VkResult  vkRegisterObjectsNVX( | 
|  | 6094 | VkDevice                                    device, | 
|  | 6095 | VkObjectTableNVX                            objectTable, | 
|  | 6096 | u32                                         objectCount, | 
|  | 6097 | const VkObjectTableEntryNVX* const*         ppObjectTableEntries, | 
|  | 6098 | const u32*                                  pObjectIndices) { | 
|  | 6099 | return ? | 
|  | 6100 | } | 
|  | 6101 |  | 
|  | 6102 | @extension("VK_NV_external_memory_win32") | 
|  | 6103 | cmd VkResult  vkUnregisterObjectsNVX( | 
|  | 6104 | VkDevice                                    device, | 
|  | 6105 | VkObjectTableNVX                            objectTable, | 
|  | 6106 | u32                                         objectCount, | 
|  | 6107 | const VkObjectEntryTypeNVX*                 pObjectEntryTypes, | 
|  | 6108 | const u32*                                  pObjectIndices) { | 
|  | 6109 | return ? | 
|  | 6110 | } | 
|  | 6111 |  | 
|  | 6112 | @extension("VK_NV_external_memory_win32") | 
|  | 6113 | cmd void  vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( | 
|  | 6114 | VkPhysicalDevice                            physicalDevice, | 
|  | 6115 | VkDeviceGeneratedCommandsFeaturesNVX*       pFeatures, | 
|  | 6116 | VkDeviceGeneratedCommandsLimitsNVX*         pLimits) { | 
|  | 6117 | } | 
|  | 6118 |  | 
| Chris Forbes | 2e12cb8 | 2017-01-18 11:45:17 +1300 | [diff] [blame] | 6119 | @extension("VK_KHR_swapchain_front_buffered") | 
|  | 6120 | cmd VkResult vkGetSwapchainStatusKHR( | 
|  | 6121 | VkDevice                                    device, | 
|  | 6122 | VkSwapchainKHR                              swapchain) { | 
|  | 6123 | return ? | 
|  | 6124 | } | 
|  | 6125 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6126 |  | 
|  | 6127 | //////////////// | 
|  | 6128 | // Validation // | 
|  | 6129 | //////////////// | 
|  | 6130 |  | 
|  | 6131 | extern void validate(string layerName, bool condition, string message) | 
|  | 6132 |  | 
|  | 6133 |  | 
|  | 6134 | ///////////////////////////// | 
|  | 6135 | // Internal State Tracking // | 
|  | 6136 | ///////////////////////////// | 
|  | 6137 |  | 
|  | 6138 | StateObject State | 
|  | 6139 |  | 
|  | 6140 | @internal class StateObject { | 
|  | 6141 | // Dispatchable objects. | 
|  | 6142 | map!(VkInstance,       ref!InstanceObject)       Instances | 
|  | 6143 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices | 
|  | 6144 | map!(VkDevice,         ref!DeviceObject)         Devices | 
|  | 6145 | map!(VkQueue,          ref!QueueObject)          Queues | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6146 | map!(VkCommandBuffer,  ref!CommandBufferObject)  CommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6147 |  | 
|  | 6148 | // Non-dispatchable objects. | 
|  | 6149 | map!(VkDeviceMemory,             ref!DeviceMemoryObject)             DeviceMemories | 
|  | 6150 | map!(VkBuffer,                   ref!BufferObject)                   Buffers | 
|  | 6151 | map!(VkBufferView,               ref!BufferViewObject)               BufferViews | 
|  | 6152 | map!(VkImage,                    ref!ImageObject)                    Images | 
|  | 6153 | map!(VkImageView,                ref!ImageViewObject)                ImageViews | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6154 | map!(VkShaderModule,             ref!ShaderModuleObject)             ShaderModules | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6155 | map!(VkPipeline,                 ref!PipelineObject)                 Pipelines | 
|  | 6156 | map!(VkPipelineLayout,           ref!PipelineLayoutObject)           PipelineLayouts | 
|  | 6157 | map!(VkSampler,                  ref!SamplerObject)                  Samplers | 
|  | 6158 | map!(VkDescriptorSet,            ref!DescriptorSetObject)            DescriptorSets | 
|  | 6159 | map!(VkDescriptorSetLayout,      ref!DescriptorSetLayoutObject)      DescriptorSetLayouts | 
|  | 6160 | map!(VkDescriptorPool,           ref!DescriptorPoolObject)           DescriptorPools | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6161 | map!(VkFence,                    ref!FenceObject)                    Fences | 
|  | 6162 | map!(VkSemaphore,                ref!SemaphoreObject)                Semaphores | 
|  | 6163 | map!(VkEvent,                    ref!EventObject)                    Events | 
|  | 6164 | map!(VkQueryPool,                ref!QueryPoolObject)                QueryPools | 
|  | 6165 | map!(VkFramebuffer,              ref!FramebufferObject)              Framebuffers | 
|  | 6166 | map!(VkRenderPass,               ref!RenderPassObject)               RenderPasses | 
|  | 6167 | map!(VkPipelineCache,            ref!PipelineCacheObject)            PipelineCaches | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6168 | map!(VkCommandPool,              ref!CommandPoolObject)              CommandPools | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6169 | map!(VkSurfaceKHR,               ref!SurfaceObject)                  Surfaces | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6170 | map!(VkSwapchainKHR,             ref!SwapchainObject)                Swapchains | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6171 | } | 
|  | 6172 |  | 
|  | 6173 | @internal class InstanceObject { | 
|  | 6174 | } | 
|  | 6175 |  | 
|  | 6176 | @internal class PhysicalDeviceObject { | 
|  | 6177 | VkInstance instance | 
|  | 6178 | } | 
|  | 6179 |  | 
|  | 6180 | @internal class DeviceObject { | 
|  | 6181 | VkPhysicalDevice physicalDevice | 
|  | 6182 | } | 
|  | 6183 |  | 
|  | 6184 | @internal class QueueObject { | 
|  | 6185 | VkDevice      device | 
|  | 6186 | VkQueueFlags  flags | 
|  | 6187 | } | 
|  | 6188 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6189 | @internal class CommandBufferObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6190 | VkDevice                  device | 
|  | 6191 | map!(u64, VkDeviceMemory) boundObjects | 
|  | 6192 | VkQueueFlags              queueFlags | 
|  | 6193 | } | 
|  | 6194 |  | 
|  | 6195 | @internal class DeviceMemoryObject { | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6196 | VkDevice                                device | 
|  | 6197 | VkDeviceSize                            allocationSize | 
|  | 6198 | map!(u64, VkDeviceSize)                 boundObjects | 
|  | 6199 | map!(VkCommandBuffer, VkCommandBuffer)  boundCommandBuffers | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6200 | } | 
|  | 6201 |  | 
|  | 6202 | @internal class BufferObject { | 
|  | 6203 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6204 | VkDeviceMemory        memory | 
|  | 6205 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6206 | } | 
|  | 6207 |  | 
|  | 6208 | @internal class BufferViewObject { | 
|  | 6209 | VkDevice      device | 
|  | 6210 | VkBuffer      buffer | 
|  | 6211 | } | 
|  | 6212 |  | 
|  | 6213 | @internal class ImageObject { | 
|  | 6214 | VkDevice              device | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6215 | VkDeviceMemory        memory | 
|  | 6216 | VkDeviceSize          memoryOffset | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6217 | } | 
|  | 6218 |  | 
|  | 6219 | @internal class ImageViewObject { | 
|  | 6220 | VkDevice      device | 
|  | 6221 | VkImage       image | 
|  | 6222 | } | 
|  | 6223 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6224 | @internal class ShaderObject { | 
|  | 6225 | VkDevice      device | 
|  | 6226 | } | 
|  | 6227 |  | 
|  | 6228 | @internal class ShaderModuleObject { | 
|  | 6229 | VkDevice      device | 
|  | 6230 | } | 
|  | 6231 |  | 
|  | 6232 | @internal class PipelineObject { | 
|  | 6233 | VkDevice      device | 
|  | 6234 | } | 
|  | 6235 |  | 
|  | 6236 | @internal class PipelineLayoutObject { | 
|  | 6237 | VkDevice      device | 
|  | 6238 | } | 
|  | 6239 |  | 
|  | 6240 | @internal class SamplerObject { | 
|  | 6241 | VkDevice      device | 
|  | 6242 | } | 
|  | 6243 |  | 
|  | 6244 | @internal class DescriptorSetObject { | 
|  | 6245 | VkDevice      device | 
|  | 6246 | } | 
|  | 6247 |  | 
|  | 6248 | @internal class DescriptorSetLayoutObject { | 
|  | 6249 | VkDevice      device | 
|  | 6250 | } | 
|  | 6251 |  | 
|  | 6252 | @internal class DescriptorPoolObject { | 
|  | 6253 | VkDevice      device | 
|  | 6254 | } | 
|  | 6255 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6256 | @internal class FenceObject { | 
|  | 6257 | VkDevice      device | 
|  | 6258 | bool          signaled | 
|  | 6259 | } | 
|  | 6260 |  | 
|  | 6261 | @internal class SemaphoreObject { | 
|  | 6262 | VkDevice      device | 
|  | 6263 | } | 
|  | 6264 |  | 
|  | 6265 | @internal class EventObject { | 
|  | 6266 | VkDevice      device | 
|  | 6267 | } | 
|  | 6268 |  | 
|  | 6269 | @internal class QueryPoolObject { | 
|  | 6270 | VkDevice      device | 
|  | 6271 | } | 
|  | 6272 |  | 
|  | 6273 | @internal class FramebufferObject { | 
|  | 6274 | VkDevice      device | 
|  | 6275 | } | 
|  | 6276 |  | 
|  | 6277 | @internal class RenderPassObject { | 
|  | 6278 | VkDevice      device | 
|  | 6279 | } | 
|  | 6280 |  | 
|  | 6281 | @internal class PipelineCacheObject { | 
|  | 6282 | VkDevice      device | 
|  | 6283 | } | 
|  | 6284 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6285 | @internal class CommandPoolObject { | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6286 | VkDevice      device | 
|  | 6287 | } | 
|  | 6288 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6289 | @internal class SurfaceObject { | 
|  | 6290 | VkInstance    instance | 
|  | 6291 | } | 
|  | 6292 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6293 | @internal class SwapchainObject { | 
|  | 6294 | VkDevice      device | 
|  | 6295 | } | 
|  | 6296 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6297 | macro ref!InstanceObject GetInstance(VkInstance instance) { | 
|  | 6298 | assert(instance in State.Instances) | 
|  | 6299 | return State.Instances[instance] | 
|  | 6300 | } | 
|  | 6301 |  | 
|  | 6302 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { | 
|  | 6303 | assert(physicalDevice in State.PhysicalDevices) | 
|  | 6304 | return State.PhysicalDevices[physicalDevice] | 
|  | 6305 | } | 
|  | 6306 |  | 
|  | 6307 | macro ref!DeviceObject GetDevice(VkDevice device) { | 
|  | 6308 | assert(device in State.Devices) | 
|  | 6309 | return State.Devices[device] | 
|  | 6310 | } | 
|  | 6311 |  | 
|  | 6312 | macro ref!QueueObject GetQueue(VkQueue queue) { | 
|  | 6313 | assert(queue in State.Queues) | 
|  | 6314 | return State.Queues[queue] | 
|  | 6315 | } | 
|  | 6316 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6317 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { | 
|  | 6318 | assert(commandBuffer in State.CommandBuffers) | 
|  | 6319 | return State.CommandBuffers[commandBuffer] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6320 | } | 
|  | 6321 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6322 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { | 
|  | 6323 | assert(memory in State.DeviceMemories) | 
|  | 6324 | return State.DeviceMemories[memory] | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6325 | } | 
|  | 6326 |  | 
|  | 6327 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { | 
|  | 6328 | assert(buffer in State.Buffers) | 
|  | 6329 | return State.Buffers[buffer] | 
|  | 6330 | } | 
|  | 6331 |  | 
|  | 6332 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { | 
|  | 6333 | assert(bufferView in State.BufferViews) | 
|  | 6334 | return State.BufferViews[bufferView] | 
|  | 6335 | } | 
|  | 6336 |  | 
|  | 6337 | macro ref!ImageObject GetImage(VkImage image) { | 
|  | 6338 | assert(image in State.Images) | 
|  | 6339 | return State.Images[image] | 
|  | 6340 | } | 
|  | 6341 |  | 
|  | 6342 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { | 
|  | 6343 | assert(imageView in State.ImageViews) | 
|  | 6344 | return State.ImageViews[imageView] | 
|  | 6345 | } | 
|  | 6346 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6347 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { | 
|  | 6348 | assert(shaderModule in State.ShaderModules) | 
|  | 6349 | return State.ShaderModules[shaderModule] | 
|  | 6350 | } | 
|  | 6351 |  | 
|  | 6352 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { | 
|  | 6353 | assert(pipeline in State.Pipelines) | 
|  | 6354 | return State.Pipelines[pipeline] | 
|  | 6355 | } | 
|  | 6356 |  | 
|  | 6357 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { | 
|  | 6358 | assert(pipelineLayout in State.PipelineLayouts) | 
|  | 6359 | return State.PipelineLayouts[pipelineLayout] | 
|  | 6360 | } | 
|  | 6361 |  | 
|  | 6362 | macro ref!SamplerObject GetSampler(VkSampler sampler) { | 
|  | 6363 | assert(sampler in State.Samplers) | 
|  | 6364 | return State.Samplers[sampler] | 
|  | 6365 | } | 
|  | 6366 |  | 
|  | 6367 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { | 
|  | 6368 | assert(descriptorSet in State.DescriptorSets) | 
|  | 6369 | return State.DescriptorSets[descriptorSet] | 
|  | 6370 | } | 
|  | 6371 |  | 
|  | 6372 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { | 
|  | 6373 | assert(descriptorSetLayout in State.DescriptorSetLayouts) | 
|  | 6374 | return State.DescriptorSetLayouts[descriptorSetLayout] | 
|  | 6375 | } | 
|  | 6376 |  | 
|  | 6377 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { | 
|  | 6378 | assert(descriptorPool in State.DescriptorPools) | 
|  | 6379 | return State.DescriptorPools[descriptorPool] | 
|  | 6380 | } | 
|  | 6381 |  | 
| Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6382 | macro ref!FenceObject GetFence(VkFence fence) { | 
|  | 6383 | assert(fence in State.Fences) | 
|  | 6384 | return State.Fences[fence] | 
|  | 6385 | } | 
|  | 6386 |  | 
|  | 6387 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { | 
|  | 6388 | assert(semaphore in State.Semaphores) | 
|  | 6389 | return State.Semaphores[semaphore] | 
|  | 6390 | } | 
|  | 6391 |  | 
|  | 6392 | macro ref!EventObject GetEvent(VkEvent event) { | 
|  | 6393 | assert(event in State.Events) | 
|  | 6394 | return State.Events[event] | 
|  | 6395 | } | 
|  | 6396 |  | 
|  | 6397 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { | 
|  | 6398 | assert(queryPool in State.QueryPools) | 
|  | 6399 | return State.QueryPools[queryPool] | 
|  | 6400 | } | 
|  | 6401 |  | 
|  | 6402 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { | 
|  | 6403 | assert(framebuffer in State.Framebuffers) | 
|  | 6404 | return State.Framebuffers[framebuffer] | 
|  | 6405 | } | 
|  | 6406 |  | 
|  | 6407 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { | 
|  | 6408 | assert(renderPass in State.RenderPasses) | 
|  | 6409 | return State.RenderPasses[renderPass] | 
|  | 6410 | } | 
|  | 6411 |  | 
|  | 6412 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { | 
|  | 6413 | assert(pipelineCache in State.PipelineCaches) | 
|  | 6414 | return State.PipelineCaches[pipelineCache] | 
|  | 6415 | } | 
|  | 6416 |  | 
| Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6417 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { | 
|  | 6418 | assert(commandPool in State.CommandPools) | 
|  | 6419 | return State.CommandPools[commandPool] | 
| Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6420 | } | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6421 |  | 
| Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6422 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { | 
|  | 6423 | assert(surface in State.Surfaces) | 
|  | 6424 | return State.Surfaces[surface] | 
|  | 6425 | } | 
|  | 6426 |  | 
| Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6427 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { | 
|  | 6428 | assert(swapchain in State.Swapchains) | 
|  | 6429 | return State.Swapchains[swapchain] | 
|  | 6430 | } | 
| Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6431 |  | 
|  | 6432 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { | 
|  | 6433 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) | 
|  | 6434 | } |