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