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