Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1 | // Copyright (c) 2015 The Khronos Group Inc. |
| 2 | // |
| 3 | // Permission is hereby granted, free of charge, to any person obtaining a |
| 4 | // copy of this software and/or associated documentation files (the |
| 5 | // "Materials"), to deal in the Materials without restriction, including |
| 6 | // without limitation the rights to use, copy, modify, merge, publish, |
| 7 | // distribute, sublicense, and/or sell copies of the Materials, and to |
| 8 | // permit persons to whom the Materials are furnished to do so, subject to |
| 9 | // the following conditions: |
| 10 | // |
| 11 | // The above copyright notice and this permission notice shall be included |
| 12 | // in all copies or substantial portions of the Materials. |
| 13 | // |
| 14 | // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 15 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 17 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 18 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 19 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 20 | // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 21 | |
| 22 | import platform "platform.api" |
| 23 | |
| 24 | /////////////// |
| 25 | // Constants // |
| 26 | /////////////// |
| 27 | |
| 28 | // API version (major.minor.patch) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 29 | define VERSION_MAJOR 1 |
| 30 | define VERSION_MINOR 0 |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 31 | define VERSION_PATCH 38 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 32 | |
| 33 | // API limits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 34 | define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 |
| 35 | define VK_UUID_SIZE 16 |
| 36 | define VK_MAX_EXTENSION_NAME_SIZE 256 |
| 37 | define VK_MAX_DESCRIPTION_SIZE 256 |
| 38 | define VK_MAX_MEMORY_TYPES 32 |
| 39 | define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory heaps, each of which supporting 1 or more memory types. |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 40 | |
| 41 | // API keywords |
| 42 | define VK_TRUE 1 |
| 43 | define VK_FALSE 0 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 44 | |
| 45 | // API keyword, but needs special handling by some templates |
| 46 | define NULL_HANDLE 0 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 47 | |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 48 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_SPEC_VERSION 25 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 49 | @extension("VK_KHR_surface") define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 50 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 51 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_SPEC_VERSION 68 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 52 | @extension("VK_KHR_swapchain") define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 53 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 54 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_SPEC_VERSION 21 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 55 | @extension("VK_KHR_display") define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 56 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 57 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 58 | @extension("VK_KHR_display_swapchain") define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 59 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 60 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 61 | @extension("VK_KHR_xlib_surface") define VK_KHR_XLIB_SURFACE_NAME "VK_KHR_xlib_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 62 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 63 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 64 | @extension("VK_KHR_xcb_surface") define VK_KHR_XCB_SURFACE_NAME "VK_KHR_xcb_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 65 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 66 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 67 | @extension("VK_KHR_wayland_surface") define VK_KHR_WAYLAND_SURFACE_NAME "VK_KHR_wayland_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 68 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 69 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 70 | @extension("VK_KHR_mir_surface") define VK_KHR_MIR_SURFACE_NAME "VK_KHR_mir_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 71 | |
Jesse Hall | 33faaad | 2016-01-24 21:00:49 -0800 | [diff] [blame] | 72 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 73 | @extension("VK_KHR_android_surface") define VK_KHR_ANDROID_SURFACE_NAME "VK_KHR_android_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 74 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 75 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5 |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 76 | @extension("VK_KHR_win32_surface") define VK_KHR_WIN32_SURFACE_NAME "VK_KHR_win32_surface" |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 77 | |
Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame^] | 78 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 |
| 79 | @extension("VK_KHR_incremental_present") define VK_KHR_INCREMENTAL_PRESENT_NAME "VK_KHR_incremental_present" |
| 80 | |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 81 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 6 |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 82 | @extension("VK_ANDROID_native_buffer") define VK_ANDROID_NATIVE_BUFFER_NAME "VK_ANDROID_native_buffer" |
| 83 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 84 | @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] | 85 | @extension("VK_EXT_debug_report") define VK_EXT_DEBUG_REPORT_NAME "VK_EXT_debug_report" |
| 86 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 87 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_SPEC_VERSION 1 |
| 88 | @extension("VK_NV_glsl_shader") define VK_NV_GLSL_SHADER_NAME "VK_NV_glsl_shader" |
| 89 | |
| 90 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 |
| 91 | @extension("VK_KHR_sampler_mirror_clamp_to_edge") define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_NAME "VK_KHR_sampler_mirror_clamp_to_edge" |
| 92 | |
| 93 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 |
| 94 | @extension("VK_IMG_filter_cubic") define VK_IMG_FILTER_CUBIC_NAME "VK_IMG_filter_cubic" |
| 95 | |
| 96 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 |
| 97 | @extension("VK_AMD_rasterization_order") define VK_AMD_RASTERIZATION_ORDER_NAME "VK_AMD_rasterization_order" |
| 98 | |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 99 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 |
| 100 | @extension("VK_AMD_shader_trinary_minmax") define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" |
| 101 | |
| 102 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 |
| 103 | @extension("VK_AMD_shader_explicit_vertex_parameter") define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" |
| 104 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 105 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3 |
| 106 | @extension("VK_EXT_debug_marker") define VK_EXT_DEBUG_MARKER_NAME "VK_EXT_debug_marker" |
| 107 | |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 108 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_SPEC_VERSION 1 |
| 109 | @extension("VK_AMD_gcn_shader") define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" |
| 110 | |
| 111 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 |
| 112 | @extension("VK_NV_dedicated_allocation") define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" |
| 113 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 114 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 |
| 115 | @extension("VK_KHR_get_physical_device_properties2") define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" |
| 116 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 117 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 |
| 118 | @extension("VK_AMD_draw_indirect_count") define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" |
| 119 | |
| 120 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 |
| 121 | @extension("VK_AMD_negative_viewport_height") define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" |
| 122 | |
| 123 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 |
| 124 | @extension("VK_AMD_gpu_shader_half_float") define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" |
| 125 | |
| 126 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 |
| 127 | @extension("VK_AMD_shader_ballot") define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" |
| 128 | |
| 129 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 |
| 130 | @extension("VK_IMG_format_pvrtc") define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" |
| 131 | |
| 132 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 |
| 133 | @extension("VK_NV_external_memory_capabilities") define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" |
| 134 | |
| 135 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 136 | @extension("VK_NV_external_memory") define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" |
| 137 | |
| 138 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 |
| 139 | @extension("VK_NV_external_memory_win32") define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" |
| 140 | |
| 141 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 |
| 142 | @extension("VK_NV_win32_keyed_mutex") define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" |
| 143 | |
| 144 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 |
| 145 | @extension("VK_EXT_validation_flags") define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" |
| 146 | |
| 147 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 |
| 148 | @extension("VK_NVX_device_generated_commands") define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" |
| 149 | |
| 150 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 151 | |
| 152 | ///////////// |
| 153 | // Types // |
| 154 | ///////////// |
| 155 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 156 | type u32 VkBool32 |
| 157 | type u32 VkFlags |
| 158 | type u64 VkDeviceSize |
| 159 | type u32 VkSampleMask |
| 160 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 161 | /// Dispatchable handle types. |
| 162 | @dispatchHandle type u64 VkInstance |
| 163 | @dispatchHandle type u64 VkPhysicalDevice |
| 164 | @dispatchHandle type u64 VkDevice |
| 165 | @dispatchHandle type u64 VkQueue |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 166 | @dispatchHandle type u64 VkCommandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 167 | |
| 168 | /// Non dispatchable handle types. |
| 169 | @nonDispatchHandle type u64 VkDeviceMemory |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 170 | @nonDispatchHandle type u64 VkCommandPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 171 | @nonDispatchHandle type u64 VkBuffer |
| 172 | @nonDispatchHandle type u64 VkBufferView |
| 173 | @nonDispatchHandle type u64 VkImage |
| 174 | @nonDispatchHandle type u64 VkImageView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 175 | @nonDispatchHandle type u64 VkShaderModule |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 176 | @nonDispatchHandle type u64 VkPipeline |
| 177 | @nonDispatchHandle type u64 VkPipelineLayout |
| 178 | @nonDispatchHandle type u64 VkSampler |
| 179 | @nonDispatchHandle type u64 VkDescriptorSet |
| 180 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 181 | @nonDispatchHandle type u64 VkDescriptorPool |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 182 | @nonDispatchHandle type u64 VkFence |
| 183 | @nonDispatchHandle type u64 VkSemaphore |
| 184 | @nonDispatchHandle type u64 VkEvent |
| 185 | @nonDispatchHandle type u64 VkQueryPool |
| 186 | @nonDispatchHandle type u64 VkFramebuffer |
| 187 | @nonDispatchHandle type u64 VkRenderPass |
| 188 | @nonDispatchHandle type u64 VkPipelineCache |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 189 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 190 | @extension("VK_KHR_surface") @nonDispatchHandle type u64 VkSurfaceKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 191 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 192 | @extension("VK_KHR_swapchain") @nonDispatchHandle type u64 VkSwapchainKHR |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 193 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 194 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayKHR |
| 195 | @extension("VK_KHR_display") @nonDispatchHandle type u64 VkDisplayModeKHR |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 196 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 197 | @extension("VK_EXT_debug_report") @nonDispatchHandle type u64 VkDebugReportCallbackEXT |
| 198 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 199 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkObjectTableNVX |
| 200 | @extension("VK_NVX_device_generated_commands") @nonDispatchHandle type u64 VkIndirectCommandsLayoutNVX |
| 201 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 202 | |
| 203 | ///////////// |
| 204 | // Enums // |
| 205 | ///////////// |
| 206 | |
| 207 | enum VkImageLayout { |
| 208 | VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, /// Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) |
| 209 | VK_IMAGE_LAYOUT_GENERAL = 0x00000001, /// General layout when image can be used for any kind of access |
| 210 | VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, /// Optimal layout when image is only used for color attachment read/write |
| 211 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, /// Optimal layout when image is only used for depth/stencil attachment read/write |
| 212 | VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, /// Optimal layout when image is used for read only depth/stencil attachment and shader access |
| 213 | 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] | 214 | VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 215 | 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] | 216 | 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] | 217 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 218 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 219 | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | enum VkAttachmentLoadOp { |
| 223 | VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, |
| 224 | VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, |
| 225 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, |
| 226 | } |
| 227 | |
| 228 | enum VkAttachmentStoreOp { |
| 229 | VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, |
| 230 | VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000001, |
| 231 | } |
| 232 | |
| 233 | enum VkImageType { |
| 234 | VK_IMAGE_TYPE_1D = 0x00000000, |
| 235 | VK_IMAGE_TYPE_2D = 0x00000001, |
| 236 | VK_IMAGE_TYPE_3D = 0x00000002, |
| 237 | } |
| 238 | |
| 239 | enum VkImageTiling { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 240 | VK_IMAGE_TILING_OPTIMAL = 0x00000000, |
| 241 | VK_IMAGE_TILING_LINEAR = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | enum VkImageViewType { |
| 245 | VK_IMAGE_VIEW_TYPE_1D = 0x00000000, |
| 246 | VK_IMAGE_VIEW_TYPE_2D = 0x00000001, |
| 247 | VK_IMAGE_VIEW_TYPE_3D = 0x00000002, |
| 248 | VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, |
| 249 | VK_IMAGE_VIEW_TYPE_1D_ARRAY = 0x00000004, |
| 250 | VK_IMAGE_VIEW_TYPE_2D_ARRAY = 0x00000005, |
| 251 | VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 0x00000006, |
| 252 | } |
| 253 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 254 | enum VkCommandBufferLevel { |
| 255 | VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 256 | VK_COMMAND_BUFFER_LEVEL_SECONDARY = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 257 | } |
| 258 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 259 | enum VkComponentSwizzle { |
| 260 | VK_COMPONENT_SWIZZLE_IDENTITY = 0x00000000, |
| 261 | VK_COMPONENT_SWIZZLE_ZERO = 0x00000001, |
| 262 | VK_COMPONENT_SWIZZLE_ONE = 0x00000002, |
| 263 | VK_COMPONENT_SWIZZLE_R = 0x00000003, |
| 264 | VK_COMPONENT_SWIZZLE_G = 0x00000004, |
| 265 | VK_COMPONENT_SWIZZLE_B = 0x00000005, |
| 266 | VK_COMPONENT_SWIZZLE_A = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | enum VkDescriptorType { |
| 270 | VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, |
| 271 | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, |
| 272 | VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, |
| 273 | VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, |
| 274 | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, |
| 275 | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, |
| 276 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, |
| 277 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, |
| 278 | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, |
| 279 | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, |
| 280 | VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 0x0000000a, |
| 281 | } |
| 282 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 283 | enum VkQueryType { |
| 284 | VK_QUERY_TYPE_OCCLUSION = 0x00000000, |
| 285 | VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, /// Optional |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 286 | VK_QUERY_TYPE_TIMESTAMP = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 287 | } |
| 288 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 289 | enum VkBorderColor { |
| 290 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0x00000000, |
| 291 | VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 0x00000001, |
| 292 | VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 0x00000002, |
| 293 | VK_BORDER_COLOR_INT_OPAQUE_BLACK = 0x00000003, |
| 294 | VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 0x00000004, |
| 295 | VK_BORDER_COLOR_INT_OPAQUE_WHITE = 0x00000005, |
| 296 | } |
| 297 | |
| 298 | enum VkPipelineBindPoint { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 299 | VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000000, |
| 300 | VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 301 | } |
| 302 | |
| 303 | enum VkPrimitiveTopology { |
| 304 | VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0x00000000, |
| 305 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 0x00000001, |
| 306 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 0x00000002, |
| 307 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 0x00000003, |
| 308 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 0x00000004, |
| 309 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 310 | VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 0x00000006, |
| 311 | VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 0x00000007, |
| 312 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 0x00000008, |
| 313 | VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 0x00000009, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 314 | VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 0x0000000a, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 315 | } |
| 316 | |
| 317 | enum VkSharingMode { |
| 318 | VK_SHARING_MODE_EXCLUSIVE = 0x00000000, |
| 319 | VK_SHARING_MODE_CONCURRENT = 0x00000001, |
| 320 | } |
| 321 | |
| 322 | enum VkIndexType { |
| 323 | VK_INDEX_TYPE_UINT16 = 0x00000000, |
| 324 | VK_INDEX_TYPE_UINT32 = 0x00000001, |
| 325 | } |
| 326 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 327 | enum VkFilter { |
| 328 | VK_FILTER_NEAREST = 0x00000000, |
| 329 | VK_FILTER_LINEAR = 0x00000001, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 330 | |
| 331 | //@extension("VK_IMG_filter_cubic") |
| 332 | VK_FILTER_CUBIC_IMG = 1000015000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 333 | } |
| 334 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 335 | enum VkSamplerMipmapMode { |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 336 | VK_SAMPLER_MIPMAP_MODE_NEAREST = 0x00000001, /// Choose nearest mip level |
| 337 | VK_SAMPLER_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 338 | } |
| 339 | |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 340 | enum VkSamplerAddressMode { |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 341 | VK_SAMPLER_ADDRESS_MODE_REPEAT = 0x00000000, |
| 342 | VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 0x00000001, |
| 343 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 0x00000002, |
| 344 | VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 0x00000003, |
| 345 | VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 346 | } |
| 347 | |
| 348 | enum VkCompareOp { |
| 349 | VK_COMPARE_OP_NEVER = 0x00000000, |
| 350 | VK_COMPARE_OP_LESS = 0x00000001, |
| 351 | VK_COMPARE_OP_EQUAL = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 352 | VK_COMPARE_OP_LESS_OR_EQUAL = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 353 | VK_COMPARE_OP_GREATER = 0x00000004, |
| 354 | VK_COMPARE_OP_NOT_EQUAL = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 355 | VK_COMPARE_OP_GREATER_OR_EQUAL = 0x00000006, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 356 | VK_COMPARE_OP_ALWAYS = 0x00000007, |
| 357 | } |
| 358 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 359 | enum VkPolygonMode { |
| 360 | VK_POLYGON_MODE_FILL = 0x00000000, |
| 361 | VK_POLYGON_MODE_LINE = 0x00000001, |
| 362 | VK_POLYGON_MODE_POINT = 0x00000002, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 363 | } |
| 364 | |
| 365 | enum VkFrontFace { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 366 | VK_FRONT_FACE_COUNTER_CLOCKWISE = 0x00000000, |
| 367 | VK_FRONT_FACE_CLOCKWISE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 368 | } |
| 369 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 370 | enum VkBlendFactor { |
| 371 | VK_BLEND_FACTOR_ZERO = 0x00000000, |
| 372 | VK_BLEND_FACTOR_ONE = 0x00000001, |
| 373 | VK_BLEND_FACTOR_SRC_COLOR = 0x00000002, |
| 374 | VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 0x00000003, |
| 375 | VK_BLEND_FACTOR_DST_COLOR = 0x00000004, |
| 376 | VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 0x00000005, |
| 377 | VK_BLEND_FACTOR_SRC_ALPHA = 0x00000006, |
| 378 | VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 0x00000007, |
| 379 | VK_BLEND_FACTOR_DST_ALPHA = 0x00000008, |
| 380 | VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 0x00000009, |
| 381 | VK_BLEND_FACTOR_CONSTANT_COLOR = 0x0000000a, |
| 382 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 0x0000000b, |
| 383 | VK_BLEND_FACTOR_CONSTANT_ALPHA = 0x0000000c, |
| 384 | VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 0x0000000d, |
| 385 | VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 0x0000000e, |
| 386 | VK_BLEND_FACTOR_SRC1_COLOR = 0x0000000f, |
| 387 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 0x00000010, |
| 388 | VK_BLEND_FACTOR_SRC1_ALPHA = 0x00000011, |
| 389 | VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 0x00000012, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 390 | } |
| 391 | |
| 392 | enum VkBlendOp { |
| 393 | VK_BLEND_OP_ADD = 0x00000000, |
| 394 | VK_BLEND_OP_SUBTRACT = 0x00000001, |
| 395 | VK_BLEND_OP_REVERSE_SUBTRACT = 0x00000002, |
| 396 | VK_BLEND_OP_MIN = 0x00000003, |
| 397 | VK_BLEND_OP_MAX = 0x00000004, |
| 398 | } |
| 399 | |
| 400 | enum VkStencilOp { |
| 401 | VK_STENCIL_OP_KEEP = 0x00000000, |
| 402 | VK_STENCIL_OP_ZERO = 0x00000001, |
| 403 | VK_STENCIL_OP_REPLACE = 0x00000002, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 404 | VK_STENCIL_OP_INCREMENT_AND_CLAMP = 0x00000003, |
| 405 | VK_STENCIL_OP_DECREMENT_AND_CLAMP = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 406 | VK_STENCIL_OP_INVERT = 0x00000005, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 407 | VK_STENCIL_OP_INCREMENT_AND_WRAP = 0x00000006, |
| 408 | VK_STENCIL_OP_DECREMENT_AND_WRAP = 0x00000007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 409 | } |
| 410 | |
| 411 | enum VkLogicOp { |
| 412 | VK_LOGIC_OP_CLEAR = 0x00000000, |
| 413 | VK_LOGIC_OP_AND = 0x00000001, |
| 414 | VK_LOGIC_OP_AND_REVERSE = 0x00000002, |
| 415 | VK_LOGIC_OP_COPY = 0x00000003, |
| 416 | VK_LOGIC_OP_AND_INVERTED = 0x00000004, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 417 | VK_LOGIC_OP_NO_OP = 0x00000005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 418 | VK_LOGIC_OP_XOR = 0x00000006, |
| 419 | VK_LOGIC_OP_OR = 0x00000007, |
| 420 | VK_LOGIC_OP_NOR = 0x00000008, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 421 | VK_LOGIC_OP_EQUIVALENT = 0x00000009, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 422 | VK_LOGIC_OP_INVERT = 0x0000000a, |
| 423 | VK_LOGIC_OP_OR_REVERSE = 0x0000000b, |
| 424 | VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, |
| 425 | VK_LOGIC_OP_OR_INVERTED = 0x0000000d, |
| 426 | VK_LOGIC_OP_NAND = 0x0000000e, |
| 427 | VK_LOGIC_OP_SET = 0x0000000f, |
| 428 | } |
| 429 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 430 | enum VkSystemAllocationScope { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 431 | VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0x00000000, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 432 | VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 0x00000001, |
| 433 | VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 0x00000002, |
| 434 | VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 0x00000003, |
| 435 | VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 0x00000004, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 436 | } |
| 437 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 438 | enum VkInternalAllocationType { |
| 439 | VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0x00000000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | enum VkPhysicalDeviceType { |
| 443 | VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, |
| 444 | VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, |
| 445 | VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, |
| 446 | VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, |
| 447 | VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, |
| 448 | } |
| 449 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 450 | enum VkVertexInputRate { |
| 451 | VK_VERTEX_INPUT_RATE_VERTEX = 0x00000000, |
| 452 | VK_VERTEX_INPUT_RATE_INSTANCE = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 453 | } |
| 454 | |
| 455 | /// Vulkan format definitions |
| 456 | enum VkFormat { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 457 | VK_FORMAT_UNDEFINED = 0, |
| 458 | VK_FORMAT_R4G4_UNORM_PACK8 = 1, |
| 459 | VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, |
| 460 | VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, |
| 461 | VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, |
| 462 | VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, |
| 463 | VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, |
| 464 | VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, |
| 465 | VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, |
| 466 | VK_FORMAT_R8_UNORM = 9, |
| 467 | VK_FORMAT_R8_SNORM = 10, |
| 468 | VK_FORMAT_R8_USCALED = 11, |
| 469 | VK_FORMAT_R8_SSCALED = 12, |
| 470 | VK_FORMAT_R8_UINT = 13, |
| 471 | VK_FORMAT_R8_SINT = 14, |
| 472 | VK_FORMAT_R8_SRGB = 15, |
| 473 | VK_FORMAT_R8G8_UNORM = 16, |
| 474 | VK_FORMAT_R8G8_SNORM = 17, |
| 475 | VK_FORMAT_R8G8_USCALED = 18, |
| 476 | VK_FORMAT_R8G8_SSCALED = 19, |
| 477 | VK_FORMAT_R8G8_UINT = 20, |
| 478 | VK_FORMAT_R8G8_SINT = 21, |
| 479 | VK_FORMAT_R8G8_SRGB = 22, |
| 480 | VK_FORMAT_R8G8B8_UNORM = 23, |
| 481 | VK_FORMAT_R8G8B8_SNORM = 24, |
| 482 | VK_FORMAT_R8G8B8_USCALED = 25, |
| 483 | VK_FORMAT_R8G8B8_SSCALED = 26, |
| 484 | VK_FORMAT_R8G8B8_UINT = 27, |
| 485 | VK_FORMAT_R8G8B8_SINT = 28, |
| 486 | VK_FORMAT_R8G8B8_SRGB = 29, |
| 487 | VK_FORMAT_B8G8R8_UNORM = 30, |
| 488 | VK_FORMAT_B8G8R8_SNORM = 31, |
| 489 | VK_FORMAT_B8G8R8_USCALED = 32, |
| 490 | VK_FORMAT_B8G8R8_SSCALED = 33, |
| 491 | VK_FORMAT_B8G8R8_UINT = 34, |
| 492 | VK_FORMAT_B8G8R8_SINT = 35, |
| 493 | VK_FORMAT_B8G8R8_SRGB = 36, |
| 494 | VK_FORMAT_R8G8B8A8_UNORM = 37, |
| 495 | VK_FORMAT_R8G8B8A8_SNORM = 38, |
| 496 | VK_FORMAT_R8G8B8A8_USCALED = 39, |
| 497 | VK_FORMAT_R8G8B8A8_SSCALED = 40, |
| 498 | VK_FORMAT_R8G8B8A8_UINT = 41, |
| 499 | VK_FORMAT_R8G8B8A8_SINT = 42, |
| 500 | VK_FORMAT_R8G8B8A8_SRGB = 43, |
| 501 | VK_FORMAT_B8G8R8A8_UNORM = 44, |
| 502 | VK_FORMAT_B8G8R8A8_SNORM = 45, |
| 503 | VK_FORMAT_B8G8R8A8_USCALED = 46, |
| 504 | VK_FORMAT_B8G8R8A8_SSCALED = 47, |
| 505 | VK_FORMAT_B8G8R8A8_UINT = 48, |
| 506 | VK_FORMAT_B8G8R8A8_SINT = 49, |
| 507 | VK_FORMAT_B8G8R8A8_SRGB = 50, |
| 508 | VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, |
| 509 | VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, |
| 510 | VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, |
| 511 | VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, |
| 512 | VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, |
| 513 | VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, |
| 514 | VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, |
| 515 | VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, |
| 516 | VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, |
| 517 | VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, |
| 518 | VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, |
| 519 | VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, |
| 520 | VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, |
| 521 | VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, |
| 522 | VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, |
| 523 | VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, |
| 524 | VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, |
| 525 | VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, |
| 526 | VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, |
| 527 | VK_FORMAT_R16_UNORM = 70, |
| 528 | VK_FORMAT_R16_SNORM = 71, |
| 529 | VK_FORMAT_R16_USCALED = 72, |
| 530 | VK_FORMAT_R16_SSCALED = 73, |
| 531 | VK_FORMAT_R16_UINT = 74, |
| 532 | VK_FORMAT_R16_SINT = 75, |
| 533 | VK_FORMAT_R16_SFLOAT = 76, |
| 534 | VK_FORMAT_R16G16_UNORM = 77, |
| 535 | VK_FORMAT_R16G16_SNORM = 78, |
| 536 | VK_FORMAT_R16G16_USCALED = 79, |
| 537 | VK_FORMAT_R16G16_SSCALED = 80, |
| 538 | VK_FORMAT_R16G16_UINT = 81, |
| 539 | VK_FORMAT_R16G16_SINT = 82, |
| 540 | VK_FORMAT_R16G16_SFLOAT = 83, |
| 541 | VK_FORMAT_R16G16B16_UNORM = 84, |
| 542 | VK_FORMAT_R16G16B16_SNORM = 85, |
| 543 | VK_FORMAT_R16G16B16_USCALED = 86, |
| 544 | VK_FORMAT_R16G16B16_SSCALED = 87, |
| 545 | VK_FORMAT_R16G16B16_UINT = 88, |
| 546 | VK_FORMAT_R16G16B16_SINT = 89, |
| 547 | VK_FORMAT_R16G16B16_SFLOAT = 90, |
| 548 | VK_FORMAT_R16G16B16A16_UNORM = 91, |
| 549 | VK_FORMAT_R16G16B16A16_SNORM = 92, |
| 550 | VK_FORMAT_R16G16B16A16_USCALED = 93, |
| 551 | VK_FORMAT_R16G16B16A16_SSCALED = 94, |
| 552 | VK_FORMAT_R16G16B16A16_UINT = 95, |
| 553 | VK_FORMAT_R16G16B16A16_SINT = 96, |
| 554 | VK_FORMAT_R16G16B16A16_SFLOAT = 97, |
| 555 | VK_FORMAT_R32_UINT = 98, |
| 556 | VK_FORMAT_R32_SINT = 99, |
| 557 | VK_FORMAT_R32_SFLOAT = 100, |
| 558 | VK_FORMAT_R32G32_UINT = 101, |
| 559 | VK_FORMAT_R32G32_SINT = 102, |
| 560 | VK_FORMAT_R32G32_SFLOAT = 103, |
| 561 | VK_FORMAT_R32G32B32_UINT = 104, |
| 562 | VK_FORMAT_R32G32B32_SINT = 105, |
| 563 | VK_FORMAT_R32G32B32_SFLOAT = 106, |
| 564 | VK_FORMAT_R32G32B32A32_UINT = 107, |
| 565 | VK_FORMAT_R32G32B32A32_SINT = 108, |
| 566 | VK_FORMAT_R32G32B32A32_SFLOAT = 109, |
| 567 | VK_FORMAT_R64_UINT = 110, |
| 568 | VK_FORMAT_R64_SINT = 111, |
| 569 | VK_FORMAT_R64_SFLOAT = 112, |
| 570 | VK_FORMAT_R64G64_UINT = 113, |
| 571 | VK_FORMAT_R64G64_SINT = 114, |
| 572 | VK_FORMAT_R64G64_SFLOAT = 115, |
| 573 | VK_FORMAT_R64G64B64_UINT = 116, |
| 574 | VK_FORMAT_R64G64B64_SINT = 117, |
| 575 | VK_FORMAT_R64G64B64_SFLOAT = 118, |
| 576 | VK_FORMAT_R64G64B64A64_UINT = 119, |
| 577 | VK_FORMAT_R64G64B64A64_SINT = 120, |
| 578 | VK_FORMAT_R64G64B64A64_SFLOAT = 121, |
| 579 | VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, |
| 580 | VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, |
| 581 | VK_FORMAT_D16_UNORM = 124, |
| 582 | VK_FORMAT_X8_D24_UNORM_PACK32 = 125, |
| 583 | VK_FORMAT_D32_SFLOAT = 126, |
| 584 | VK_FORMAT_S8_UINT = 127, |
| 585 | VK_FORMAT_D16_UNORM_S8_UINT = 128, |
| 586 | VK_FORMAT_D24_UNORM_S8_UINT = 129, |
| 587 | VK_FORMAT_D32_SFLOAT_S8_UINT = 130, |
| 588 | VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, |
| 589 | VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, |
| 590 | VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, |
| 591 | VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, |
| 592 | VK_FORMAT_BC2_UNORM_BLOCK = 135, |
| 593 | VK_FORMAT_BC2_SRGB_BLOCK = 136, |
| 594 | VK_FORMAT_BC3_UNORM_BLOCK = 137, |
| 595 | VK_FORMAT_BC3_SRGB_BLOCK = 138, |
| 596 | VK_FORMAT_BC4_UNORM_BLOCK = 139, |
| 597 | VK_FORMAT_BC4_SNORM_BLOCK = 140, |
| 598 | VK_FORMAT_BC5_UNORM_BLOCK = 141, |
| 599 | VK_FORMAT_BC5_SNORM_BLOCK = 142, |
| 600 | VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, |
| 601 | VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, |
| 602 | VK_FORMAT_BC7_UNORM_BLOCK = 145, |
| 603 | VK_FORMAT_BC7_SRGB_BLOCK = 146, |
| 604 | VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, |
| 605 | VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, |
| 606 | VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, |
| 607 | VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, |
| 608 | VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, |
| 609 | VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, |
| 610 | VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, |
| 611 | VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, |
| 612 | VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, |
| 613 | VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, |
| 614 | VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, |
| 615 | VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, |
| 616 | VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, |
| 617 | VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, |
| 618 | VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, |
| 619 | VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, |
| 620 | VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, |
| 621 | VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, |
| 622 | VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, |
| 623 | VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, |
| 624 | VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, |
| 625 | VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, |
| 626 | VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, |
| 627 | VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, |
| 628 | VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, |
| 629 | VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, |
| 630 | VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, |
| 631 | VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, |
| 632 | VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, |
| 633 | VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, |
| 634 | VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, |
| 635 | VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, |
| 636 | VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, |
| 637 | VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, |
| 638 | VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, |
| 639 | VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, |
| 640 | VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, |
| 641 | VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 642 | |
| 643 | //@extension("VK_IMG_format_pvrtc") |
| 644 | VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, |
| 645 | |
| 646 | //@extension("VK_IMG_format_pvrtc") |
| 647 | VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, |
| 648 | |
| 649 | //@extension("VK_IMG_format_pvrtc") |
| 650 | VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, |
| 651 | |
| 652 | //@extension("VK_IMG_format_pvrtc") |
| 653 | VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, |
| 654 | |
| 655 | //@extension("VK_IMG_format_pvrtc") |
| 656 | VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, |
| 657 | |
| 658 | //@extension("VK_IMG_format_pvrtc") |
| 659 | VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, |
| 660 | |
| 661 | //@extension("VK_IMG_format_pvrtc") |
| 662 | VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, |
| 663 | |
| 664 | //@extension("VK_IMG_format_pvrtc") |
| 665 | VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 666 | } |
| 667 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 668 | /// Structure type enumerant |
| 669 | enum VkStructureType { |
| 670 | VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 671 | VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, |
| 672 | VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, |
| 673 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, |
| 674 | VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 675 | VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 676 | VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, |
| 677 | VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, |
| 678 | VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, |
| 679 | VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 680 | VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 681 | VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, |
| 682 | VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, |
| 683 | VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, |
| 684 | VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, |
| 685 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, |
| 686 | VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 687 | VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, |
| 688 | VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, |
| 689 | VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, |
| 690 | VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, |
| 691 | VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, |
| 692 | VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, |
| 693 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, |
| 694 | VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, |
| 695 | VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, |
| 696 | VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, |
| 697 | VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, |
| 698 | VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, |
| 699 | VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, |
| 700 | VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, |
| 701 | VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, |
| 702 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, |
| 703 | VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 704 | VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 705 | VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, |
| 706 | VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, |
| 707 | VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, |
| 708 | VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, |
| 709 | VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 710 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 711 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, |
| 712 | VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, |
| 713 | VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 714 | VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, |
| 715 | VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, |
| 716 | VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, |
| 717 | VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, |
| 718 | VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 719 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 720 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 721 | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, |
| 722 | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 723 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 724 | //@extension("VK_KHR_display") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 725 | VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, |
| 726 | VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 727 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 728 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 729 | VK_STRUCTURE_TYPE_DISPLAY_DISPLAY_PRESENT_INFO_KHR = 1000003000, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 730 | |
| 731 | //@extension("VK_KHR_xlib_surface") |
| 732 | VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, |
| 733 | |
| 734 | //@extension("VK_KHR_xcb_surface") |
| 735 | VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, |
| 736 | |
| 737 | //@extension("VK_KHR_wayland_surface") |
| 738 | VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, |
| 739 | |
| 740 | //@extension("VK_KHR_mir_surface") |
| 741 | VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, |
| 742 | |
| 743 | //@extension("VK_KHR_android_surface") |
| 744 | VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, |
| 745 | |
| 746 | //@extension("VK_KHR_win32_surface") |
| 747 | VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 748 | |
Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame^] | 749 | //@extension("VK_KHR_incremental_present") |
| 750 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
| 751 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 752 | //@extension("VK_ANDROID_native_buffer") |
| 753 | VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID = 1000010000, |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 754 | VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 755 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 756 | //@extension("VK_EXT_debug_report") |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 757 | VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, |
| 758 | |
| 759 | //@extension("VK_AMD_rasterization_order") |
| 760 | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, |
| 761 | |
| 762 | //@extension("VK_EXT_debug_marker") |
| 763 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, |
| 764 | |
| 765 | //@extension("VK_EXT_debug_marker") |
| 766 | VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, |
| 767 | |
| 768 | //@extension("VK_EXT_debug_marker") |
| 769 | VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 770 | |
| 771 | //@extension("VK_NV_dedicated_allocation") |
| 772 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, |
| 773 | |
| 774 | //@extension("VK_NV_dedicated_allocation") |
| 775 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, |
| 776 | |
| 777 | //@extension("VK_NV_dedicated_allocation") |
| 778 | VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 779 | |
| 780 | //@extension("VK_NV_external_memory") |
| 781 | VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, |
| 782 | |
| 783 | //@extension("VK_NV_external_memory") |
| 784 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, |
| 785 | |
| 786 | //@extension("VK_NV_external_memory_win32") |
| 787 | VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, |
| 788 | |
| 789 | //@extension("VK_NV_external_memory_win32") |
| 790 | VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, |
| 791 | |
| 792 | //@extension("VK_NV_win32_keyed_mutex") |
| 793 | VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, |
| 794 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 795 | //@extension("VK_KHR_get_physical_device_properties2") |
| 796 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, |
| 797 | |
| 798 | //@extension("VK_KHR_get_physical_device_properties2") |
| 799 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, |
| 800 | |
| 801 | //@extension("VK_KHR_get_physical_device_properties2") |
| 802 | VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, |
| 803 | |
| 804 | //@extension("VK_KHR_get_physical_device_properties2") |
| 805 | VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, |
| 806 | |
| 807 | //@extension("VK_KHR_get_physical_device_properties2") |
| 808 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, |
| 809 | |
| 810 | //@extension("VK_KHR_get_physical_device_properties2") |
| 811 | VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, |
| 812 | |
| 813 | //@extension("VK_KHR_get_physical_device_properties2") |
| 814 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, |
| 815 | |
| 816 | //@extension("VK_KHR_get_physical_device_properties2") |
| 817 | VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, |
| 818 | |
| 819 | //@extension("VK_KHR_get_physical_device_properties2") |
| 820 | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, |
| 821 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 822 | //@extension("VK_EXT_validation_flags") |
| 823 | VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, |
| 824 | |
| 825 | //@extension("VK_KHR_incremental_present") |
| 826 | VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, |
| 827 | |
| 828 | //@extension("VK_NVX_device_generated_commands") |
| 829 | VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, |
| 830 | |
| 831 | //@extension("VK_NVX_device_generated_commands") |
| 832 | VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, |
| 833 | |
| 834 | //@extension("VK_NVX_device_generated_commands") |
| 835 | VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, |
| 836 | |
| 837 | //@extension("VK_NVX_device_generated_commands") |
| 838 | VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, |
| 839 | |
| 840 | //@extension("VK_NVX_device_generated_commands") |
| 841 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, |
| 842 | |
| 843 | //@extension("VK_NVX_device_generated_commands") |
| 844 | VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 845 | } |
| 846 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 847 | enum VkSubpassContents { |
| 848 | VK_SUBPASS_CONTENTS_INLINE = 0x00000000, |
| 849 | VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 850 | } |
| 851 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 852 | enum VkPipelineCacheHeaderVersion { |
| 853 | VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, |
| 854 | } |
| 855 | |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 856 | @lastUnused(-11) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 857 | /// Error and return codes |
| 858 | enum VkResult { |
| 859 | // Return codes for successful operation execution (positive values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 860 | VK_SUCCESS = 0, |
| 861 | VK_NOT_READY = 1, |
| 862 | VK_TIMEOUT = 2, |
| 863 | VK_EVENT_SET = 3, |
| 864 | VK_EVENT_RESET = 4, |
| 865 | VK_INCOMPLETE = 5, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 866 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 867 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 868 | VK_SUBOPTIMAL_KHR = 1000001003, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 869 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 870 | // Error codes (negative values) |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 871 | VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, // -1 |
| 872 | VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, // -2 |
| 873 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, // -3 |
| 874 | VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, // -4 |
| 875 | VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, // -5 |
| 876 | VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, // -6 |
| 877 | VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, // -7 |
| 878 | VK_ERROR_FEATURE_NOT_PRESENT = 0xFFFFFFF8, // -8 |
| 879 | VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF7, // -9 |
| 880 | VK_ERROR_TOO_MANY_OBJECTS = 0xFFFFFFF6, // -10 |
| 881 | VK_ERROR_FORMAT_NOT_SUPPORTED = 0xFFFFFFF5, // -11 |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 882 | VK_ERROR_FRAGMENTED_POOL = 0xFFFFFFF4, // -12 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 883 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 884 | //@extension("VK_KHR_surface") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 885 | VK_ERROR_SURFACE_LOST_KHR = 0xC4653600, // -1000000000 |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 886 | |
Jesse Hall | 563380d | 2016-01-15 23:14:05 -0800 | [diff] [blame] | 887 | //@extension("VK_KHR_surface") |
| 888 | VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = 0xC46535FF, // -1000008001 |
| 889 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 890 | //@extension("VK_KHR_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 891 | VK_ERROR_OUT_OF_DATE_KHR = 0xC4653214, // -1000001004 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 892 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 893 | //@extension("VK_KHR_display_swapchain") |
Jesse Hall | bd88884 | 2015-11-30 21:44:14 -0800 | [diff] [blame] | 894 | VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = 0xC4652A47, // -1000003001 |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 895 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 896 | //@extension("VK_EXT_debug_report") |
| 897 | VK_ERROR_VALIDATION_FAILED_EXT = 0xC4650B07, // -1000011001 |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 898 | |
| 899 | //@extension("VK_NV_glsl_shader") |
| 900 | VK_ERROR_INVALID_SHADER_NV = 0xC4650720, // -1000012000 |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 901 | } |
| 902 | |
| 903 | enum VkDynamicState { |
| 904 | VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 905 | VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 906 | VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 907 | VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 908 | VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 909 | VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 910 | VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 911 | VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 912 | VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 913 | } |
| 914 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 915 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 916 | enum VkPresentModeKHR { |
| 917 | VK_PRESENT_MODE_IMMEDIATE_KHR = 0x00000000, |
| 918 | VK_PRESENT_MODE_MAILBOX_KHR = 0x00000001, |
| 919 | VK_PRESENT_MODE_FIFO_KHR = 0x00000002, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 920 | VK_PRESENT_MODE_FIFO_RELAXED_KHR = 0x00000003, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 921 | } |
| 922 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 923 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 924 | enum VkColorSpaceKHR { |
| 925 | VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0x00000000, |
| 926 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 927 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 928 | @extension("VK_EXT_debug_report") |
| 929 | enum VkDebugReportObjectTypeEXT { |
| 930 | VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, |
| 931 | VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, |
| 932 | VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, |
| 933 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, |
| 934 | VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, |
| 935 | VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, |
| 936 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, |
| 937 | VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, |
| 938 | VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, |
| 939 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, |
| 940 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, |
| 941 | VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, |
| 942 | VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, |
| 943 | VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, |
| 944 | VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, |
| 945 | VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, |
| 946 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, |
| 947 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, |
| 948 | VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, |
| 949 | VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, |
| 950 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, |
| 951 | VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, |
| 952 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, |
| 953 | VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, |
| 954 | VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, |
| 955 | VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, |
| 956 | VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, |
| 957 | VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, |
| 958 | VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 959 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, |
| 960 | VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, |
| 961 | VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, |
| 962 | VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 963 | } |
| 964 | |
| 965 | @extension("VK_EXT_debug_report") |
| 966 | enum VkDebugReportErrorEXT { |
| 967 | VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, |
| 968 | VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, |
| 969 | } |
| 970 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 971 | @extension("VK_AMD_rasterization_order") |
| 972 | enum VkRasterizationOrderAMD { |
| 973 | VK_RASTERIZATION_ORDER_STRICT_AMD = 0, |
| 974 | VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, |
| 975 | } |
| 976 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 977 | @extension("VK_EXT_validation_flags") |
| 978 | enum VkValidationCheckEXT { |
| 979 | VK_VALIDATION_CHECK_ALL_EXT = 0, |
| 980 | } |
| 981 | |
| 982 | @extension("VK_NVX_device_generated_commands") |
| 983 | enum VkIndirectCommandsTokenTypeNVX { |
| 984 | VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, |
| 985 | VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, |
| 986 | VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, |
| 987 | VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, |
| 988 | VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, |
| 989 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, |
| 990 | VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, |
| 991 | VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, |
| 992 | } |
| 993 | |
| 994 | @extension("VK_NVX_device_generated_commands") |
| 995 | enum VkObjectEntryTypeNVX { |
| 996 | VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, |
| 997 | VK_OBJECT_ENTRY_PIPELINE_NVX = 1, |
| 998 | VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, |
| 999 | VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, |
| 1000 | VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, |
| 1001 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1002 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1003 | ///////////////// |
| 1004 | // Bitfields // |
| 1005 | ///////////////// |
| 1006 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1007 | /// Queue capabilities |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1008 | type VkFlags VkQueueFlags |
| 1009 | bitfield VkQueueFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1010 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 1011 | VK_QUEUE_COMPUTE_BIT = 0x00000002, /// Queue supports compute operations |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1012 | VK_QUEUE_TRANSFER_BIT = 0x00000004, /// Queue supports transfer operations |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1013 | 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] | 1014 | } |
| 1015 | |
| 1016 | /// Memory properties passed into vkAllocMemory(). |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1017 | type VkFlags VkMemoryPropertyFlags |
| 1018 | bitfield VkMemoryPropertyFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1019 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, |
| 1020 | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, |
| 1021 | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, |
| 1022 | VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, |
| 1023 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1024 | } |
| 1025 | |
| 1026 | /// Memory heap flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1027 | type VkFlags VkMemoryHeapFlags |
| 1028 | bitfield VkMemoryHeapFlagBits { |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 1029 | VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1030 | } |
| 1031 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1032 | /// Access flags |
| 1033 | type VkFlags VkAccessFlags |
| 1034 | bitfield VkAccessFlagBits { |
| 1035 | VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, |
| 1036 | VK_ACCESS_INDEX_READ_BIT = 0x00000002, |
| 1037 | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, |
| 1038 | VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, |
| 1039 | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, |
| 1040 | VK_ACCESS_SHADER_READ_BIT = 0x00000020, |
| 1041 | VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, |
| 1042 | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, |
| 1043 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, |
| 1044 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, |
| 1045 | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, |
| 1046 | VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, |
| 1047 | VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, |
| 1048 | VK_ACCESS_HOST_READ_BIT = 0x00002000, |
| 1049 | VK_ACCESS_HOST_WRITE_BIT = 0x00004000, |
| 1050 | VK_ACCESS_MEMORY_READ_BIT = 0x00008000, |
| 1051 | VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1052 | |
| 1053 | //@extension("VK_NVX_device_generated_commands") |
| 1054 | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, |
| 1055 | |
| 1056 | //@extension("VK_NVX_device_generated_commands") |
| 1057 | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1058 | } |
| 1059 | |
| 1060 | /// Buffer usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1061 | type VkFlags VkBufferUsageFlags |
| 1062 | bitfield VkBufferUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1063 | VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1064 | 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] | 1065 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 1066 | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, /// Can be used as IBO |
| 1067 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, /// Can be used as UBO |
| 1068 | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, /// Can be used as SSBO |
| 1069 | VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, /// Can be used as source of fixed function index fetch (index buffer) |
| 1070 | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, /// Can be used as source of fixed function vertex fetch (VBO) |
| 1071 | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, /// Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) |
| 1072 | } |
| 1073 | |
| 1074 | /// Buffer creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1075 | type VkFlags VkBufferCreateFlags |
| 1076 | bitfield VkBufferCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1077 | VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1078 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 1079 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 1080 | } |
| 1081 | |
| 1082 | /// Shader stage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1083 | type VkFlags VkShaderStageFlags |
| 1084 | bitfield VkShaderStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1085 | VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1086 | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, |
| 1087 | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1088 | VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, |
| 1089 | VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, |
| 1090 | VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1091 | VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1092 | |
| 1093 | VK_SHADER_STAGE_ALL = 0x7FFFFFFF, |
| 1094 | } |
| 1095 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1096 | /// Descriptor pool create flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1097 | type VkFlags VkDescriptorPoolCreateFlags |
| 1098 | bitfield VkDescriptorPoolCreateFlagBits { |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1099 | VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, |
| 1100 | } |
| 1101 | |
| 1102 | /// Descriptor pool reset flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1103 | type VkFlags VkDescriptorPoolResetFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1104 | //bitfield VkDescriptorPoolResetFlagBits { |
| 1105 | //} |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1106 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1107 | /// Image usage flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1108 | type VkFlags VkImageUsageFlags |
| 1109 | bitfield VkImageUsageFlagBits { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1110 | VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 1111 | 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] | 1112 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1113 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 1114 | 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] | 1115 | 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] | 1116 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 1117 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 1118 | } |
| 1119 | |
| 1120 | /// Image creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1121 | type VkFlags VkImageCreateFlags |
| 1122 | bitfield VkImageCreateFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1123 | VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1124 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 1125 | 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] | 1126 | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 1127 | 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] | 1128 | } |
| 1129 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1130 | /// Image view creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1131 | type VkFlags VkImageViewCreateFlags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1132 | //bitfield VkImageViewCreateFlagBits { |
| 1133 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1134 | |
| 1135 | /// Pipeline creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1136 | type VkFlags VkPipelineCreateFlags |
| 1137 | bitfield VkPipelineCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1138 | VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, |
| 1139 | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, |
| 1140 | VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, |
| 1141 | } |
| 1142 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1143 | /// Color component flags |
| 1144 | type VkFlags VkColorComponentFlags |
| 1145 | bitfield VkColorComponentFlagBits { |
| 1146 | VK_COLOR_COMPONENT_R_BIT = 0x00000001, |
| 1147 | VK_COLOR_COMPONENT_G_BIT = 0x00000002, |
| 1148 | VK_COLOR_COMPONENT_B_BIT = 0x00000004, |
| 1149 | VK_COLOR_COMPONENT_A_BIT = 0x00000008, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1150 | } |
| 1151 | |
| 1152 | /// Fence creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1153 | type VkFlags VkFenceCreateFlags |
| 1154 | bitfield VkFenceCreateFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1155 | VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, |
| 1156 | } |
| 1157 | |
| 1158 | /// Semaphore creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1159 | type VkFlags VkSemaphoreCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1160 | //bitfield VkSemaphoreCreateFlagBits { |
| 1161 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1162 | |
| 1163 | /// Format capability flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1164 | type VkFlags VkFormatFeatureFlags |
| 1165 | bitfield VkFormatFeatureFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1166 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, /// Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 1167 | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, /// Format can be used for storage images (STORAGE_IMAGE descriptor type) |
| 1168 | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, /// Format supports atomic operations in case it's used for storage images |
| 1169 | VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, /// Format can be used for uniform texel buffers (TBOs) |
| 1170 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, /// Format can be used for storage texel buffers (IBOs) |
| 1171 | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, /// Format supports atomic operations in case it's used for storage texel buffers |
| 1172 | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, /// Format can be used for vertex buffers (VBOs) |
| 1173 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 1174 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 1175 | 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] | 1176 | VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCommandBlitImage |
| 1177 | 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] | 1178 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 1179 | |
| 1180 | //@extension("VK_IMG_filter_cubic") |
| 1181 | VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1182 | } |
| 1183 | |
| 1184 | /// Query control flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1185 | type VkFlags VkQueryControlFlags |
| 1186 | bitfield VkQueryControlFlagBits { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1187 | VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1188 | } |
| 1189 | |
| 1190 | /// Query result flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1191 | type VkFlags VkQueryResultFlags |
| 1192 | bitfield VkQueryResultFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1193 | VK_QUERY_RESULT_64_BIT = 0x00000001, /// Results of the queries are written to the destination buffer as 64-bit values |
| 1194 | VK_QUERY_RESULT_WAIT_BIT = 0x00000002, /// Results of the queries are waited on before proceeding with the result copy |
| 1195 | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, /// Besides the results of the query, the availability of the results is also written |
| 1196 | VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, /// Copy the partial results of the query even if the final results aren't available |
| 1197 | } |
| 1198 | |
| 1199 | /// Shader module creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1200 | type VkFlags VkShaderModuleCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1201 | //bitfield VkShaderModuleCreateFlagBits { |
| 1202 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1203 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1204 | /// Event creation flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1205 | type VkFlags VkEventCreateFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1206 | //bitfield VkEventCreateFlagBits { |
| 1207 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1208 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1209 | /// Command buffer usage flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1210 | type VkFlags VkCommandBufferUsageFlags |
| 1211 | bitfield VkCommandBufferUsageFlagBits { |
| 1212 | VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, |
| 1213 | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, |
| 1214 | VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1215 | } |
| 1216 | |
| 1217 | /// Pipeline statistics flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1218 | type VkFlags VkQueryPipelineStatisticFlags |
| 1219 | bitfield VkQueryPipelineStatisticFlagBits { |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1220 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, /// Optional |
| 1221 | VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, /// Optional |
| 1222 | VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, /// Optional |
| 1223 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, /// Optional |
| 1224 | VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, /// Optional |
| 1225 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, /// Optional |
| 1226 | VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, /// Optional |
| 1227 | VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, /// Optional |
| 1228 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, /// Optional |
| 1229 | VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, /// Optional |
| 1230 | VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, /// Optional |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1231 | } |
| 1232 | |
| 1233 | /// Memory mapping flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1234 | type VkFlags VkMemoryMapFlags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1235 | //bitfield VkMemoryMapFlagBits { |
| 1236 | //} |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1237 | |
| 1238 | /// Bitfield of image aspects |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1239 | type VkFlags VkImageAspectFlags |
| 1240 | bitfield VkImageAspectFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1241 | VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 1242 | VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 1243 | VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 1244 | VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 1245 | } |
| 1246 | |
| 1247 | /// Sparse memory bind flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1248 | type VkFlags VkSparseMemoryBindFlags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1249 | bitfield VkSparseMemoryBindFlagBits { |
| 1250 | VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, |
| 1251 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1252 | |
| 1253 | /// Sparse image memory requirements flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1254 | type VkFlags VkSparseImageFormatFlags |
| 1255 | bitfield VkSparseImageFormatFlagBits { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1256 | VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, /// Image uses a single miptail region for all array slices |
| 1257 | 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. |
| 1258 | 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] | 1259 | } |
| 1260 | |
| 1261 | /// Pipeline stages |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1262 | type VkFlags VkPipelineStageFlags |
| 1263 | bitfield VkPipelineStageFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1264 | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, /// Before subsequent commands are processed |
| 1265 | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, /// Draw/DispatchIndirect command fetch |
| 1266 | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, /// Vertex/index fetch |
| 1267 | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, /// Vertex shading |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 1268 | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, /// Tessellation control shading |
| 1269 | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, /// Tessellation evaluation shading |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1270 | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, /// Geometry shading |
| 1271 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, /// Fragment shading |
| 1272 | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, /// Early fragment (depth/stencil) tests |
| 1273 | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, /// Late fragment (depth/stencil) tests |
| 1274 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 1275 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 1276 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1277 | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, |
| 1278 | 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] | 1279 | |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1280 | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, /// All stages of the graphics pipeline |
| 1281 | 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] | 1282 | |
| 1283 | //@extension("VK_NVX_device_generated_commands") |
| 1284 | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1285 | } |
| 1286 | |
| 1287 | /// Render pass attachment description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1288 | type VkFlags VkAttachmentDescriptionFlags |
| 1289 | bitfield VkAttachmentDescriptionFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1290 | 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] | 1291 | } |
| 1292 | |
| 1293 | /// Subpass description flags |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1294 | type VkFlags VkSubpassDescriptionFlags |
| 1295 | bitfield VkSubpassDescriptionFlagBits { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1296 | } |
| 1297 | |
| 1298 | /// Command pool creation flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1299 | type VkFlags VkCommandPoolCreateFlags |
| 1300 | bitfield VkCommandPoolCreateFlagBits { |
| 1301 | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, /// Command buffers have a short lifetime |
| 1302 | 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] | 1303 | } |
| 1304 | |
| 1305 | /// Command pool reset flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1306 | type VkFlags VkCommandPoolResetFlags |
| 1307 | bitfield VkCommandPoolResetFlagBits { |
| 1308 | 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] | 1309 | } |
| 1310 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1311 | type VkFlags VkCommandBufferResetFlags |
| 1312 | bitfield VkCommandBufferResetFlagBits { |
| 1313 | 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] | 1314 | } |
| 1315 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1316 | type VkFlags VkSampleCountFlags |
| 1317 | bitfield VkSampleCountFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1318 | VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 1319 | VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 1320 | VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 1321 | VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 1322 | VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 1323 | VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 1324 | VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 1325 | } |
| 1326 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1327 | type VkFlags VkStencilFaceFlags |
| 1328 | bitfield VkStencilFaceFlagBits { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1329 | VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 1330 | VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1331 | VK_STENCIL_FRONT_AND_BACK = 0x00000003, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1332 | } |
| 1333 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1334 | /// Instance creation flags |
| 1335 | type VkFlags VkInstanceCreateFlags |
| 1336 | //bitfield VkInstanceCreateFlagBits { |
| 1337 | //} |
| 1338 | |
| 1339 | /// Device creation flags |
| 1340 | type VkFlags VkDeviceCreateFlags |
| 1341 | //bitfield VkDeviceCreateFlagBits { |
| 1342 | //} |
| 1343 | |
| 1344 | /// Device queue creation flags |
| 1345 | type VkFlags VkDeviceQueueCreateFlags |
| 1346 | //bitfield VkDeviceQueueCreateFlagBits { |
| 1347 | //} |
| 1348 | |
| 1349 | /// Query pool creation flags |
| 1350 | type VkFlags VkQueryPoolCreateFlags |
| 1351 | //bitfield VkQueryPoolCreateFlagBits { |
| 1352 | //} |
| 1353 | |
| 1354 | /// Buffer view creation flags |
| 1355 | type VkFlags VkBufferViewCreateFlags |
| 1356 | //bitfield VkBufferViewCreateFlagBits { |
| 1357 | //} |
| 1358 | |
| 1359 | /// Pipeline cache creation flags |
| 1360 | type VkFlags VkPipelineCacheCreateFlags |
| 1361 | //bitfield VkPipelineCacheCreateFlagBits { |
| 1362 | //} |
| 1363 | |
| 1364 | /// Pipeline shader stage creation flags |
| 1365 | type VkFlags VkPipelineShaderStageCreateFlags |
| 1366 | //bitfield VkPipelineShaderStageCreateFlagBits { |
| 1367 | //} |
| 1368 | |
| 1369 | /// Descriptor set layout creation flags |
| 1370 | type VkFlags VkDescriptorSetLayoutCreateFlags |
| 1371 | //bitfield VkDescriptorSetLayoutCreateFlagBits { |
| 1372 | //} |
| 1373 | |
| 1374 | /// Pipeline vertex input state creation flags |
| 1375 | type VkFlags VkPipelineVertexInputStateCreateFlags |
| 1376 | //bitfield VkPipelineVertexInputStateCreateFlagBits { |
| 1377 | //} |
| 1378 | |
| 1379 | /// Pipeline input assembly state creation flags |
| 1380 | type VkFlags VkPipelineInputAssemblyStateCreateFlags |
| 1381 | //bitfield VkPipelineInputAssemblyStateCreateFlagBits { |
| 1382 | //} |
| 1383 | |
| 1384 | /// Tessellation state creation flags |
| 1385 | type VkFlags VkPipelineTessellationStateCreateFlags |
| 1386 | //bitfield VkPipelineTessellationStateCreateFlagBits { |
| 1387 | //} |
| 1388 | |
| 1389 | /// Viewport state creation flags |
| 1390 | type VkFlags VkPipelineViewportStateCreateFlags |
| 1391 | //bitfield VkPipelineViewportStateCreateFlagBits { |
| 1392 | //} |
| 1393 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1394 | /// Rasterization state creation flags |
| 1395 | type VkFlags VkPipelineRasterizationStateCreateFlags |
| 1396 | //bitfield VkPipelineRasterizationStateCreateFlagBits { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1397 | //} |
| 1398 | |
| 1399 | /// Multisample state creation flags |
| 1400 | type VkFlags VkPipelineMultisampleStateCreateFlags |
| 1401 | //bitfield VkPipelineMultisampleStateCreateFlagBits { |
| 1402 | //} |
| 1403 | |
| 1404 | /// Color blend state creation flags |
| 1405 | type VkFlags VkPipelineColorBlendStateCreateFlags |
| 1406 | //bitfield VkPipelineColorBlendStateCreateFlagBits { |
| 1407 | //} |
| 1408 | |
| 1409 | /// Depth/stencil state creation flags |
| 1410 | type VkFlags VkPipelineDepthStencilStateCreateFlags |
| 1411 | //bitfield VkPipelineDepthStencilStateCreateFlagBits { |
| 1412 | //} |
| 1413 | |
| 1414 | /// Dynamic state creation flags |
| 1415 | type VkFlags VkPipelineDynamicStateCreateFlags |
| 1416 | //bitfield VkPipelineDynamicStateCreateFlagBits { |
| 1417 | //} |
| 1418 | |
| 1419 | /// Pipeline layout creation flags |
| 1420 | type VkFlags VkPipelineLayoutCreateFlags |
| 1421 | //bitfield VkPipelineLayoutCreateFlagBits { |
| 1422 | //} |
| 1423 | |
| 1424 | /// Sampler creation flags |
| 1425 | type VkFlags VkSamplerCreateFlags |
| 1426 | //bitfield VkSamplerCreateFlagBits { |
| 1427 | //} |
| 1428 | |
| 1429 | /// Render pass creation flags |
| 1430 | type VkFlags VkRenderPassCreateFlags |
| 1431 | //bitfield VkRenderPassCreateFlagBits { |
| 1432 | //} |
| 1433 | |
| 1434 | /// Framebuffer creation flags |
| 1435 | type VkFlags VkFramebufferCreateFlags |
| 1436 | //bitfield VkFramebufferCreateFlagBits { |
| 1437 | //} |
| 1438 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 1439 | /// Dependency flags |
| 1440 | type VkFlags VkDependencyFlags |
| 1441 | bitfield VkDependencyFlagBits { |
| 1442 | VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, |
| 1443 | } |
| 1444 | |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 1445 | /// Cull mode flags |
| 1446 | type VkFlags VkCullModeFlags |
| 1447 | bitfield VkCullModeFlagBits { |
| 1448 | VK_CULL_MODE_NONE = 0x00000000, |
| 1449 | VK_CULL_MODE_FRONT_BIT = 0x00000001, |
| 1450 | VK_CULL_MODE_BACK_BIT = 0x00000002, |
| 1451 | VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, |
| 1452 | } |
| 1453 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1454 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1455 | type VkFlags VkSurfaceTransformFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1456 | @extension("VK_KHR_surface") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1457 | bitfield VkSurfaceTransformFlagBitsKHR { |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1458 | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1459 | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, |
| 1460 | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, |
| 1461 | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, |
| 1462 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, |
| 1463 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, |
| 1464 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, |
| 1465 | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, |
| 1466 | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 1467 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1468 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1469 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1470 | type VkFlags VkCompositeAlphaFlagsKHR |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 1471 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1472 | bitfield VkCompositeAlphaFlagBitsKHR { |
| 1473 | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1474 | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, |
| 1475 | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, |
| 1476 | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, |
| 1477 | } |
| 1478 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1479 | @extension("VK_KHR_swapchain") |
| 1480 | type VkFlags VkSwapchainCreateFlagsKHR |
| 1481 | //@extension("VK_KHR_swapchain") |
| 1482 | //bitfield VkSwapchainCreateFlagBitsKHR { |
| 1483 | //} |
| 1484 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1485 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1486 | type VkFlags VkDisplayPlaneAlphaFlagsKHR |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1487 | @extension("VK_KHR_display") |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 1488 | bitfield VkDisplayPlaneAlphaFlagBitsKHR { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1489 | VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, |
| 1490 | VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, |
| 1491 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, |
| 1492 | VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1493 | } |
| 1494 | |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1495 | @extension("VK_KHR_display") |
| 1496 | type VkFlags VkDisplaySurfaceCreateFlagsKHR |
| 1497 | //@extension("VK_KHR_display") |
| 1498 | //bitfield VkDisplaySurfaceCreateFlagBitsKHR { |
| 1499 | //} |
| 1500 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 1501 | @extension("VK_KHR_display") |
| 1502 | type VkFlags VkDisplayModeCreateFlagsKHR |
| 1503 | //@extension("VK_KHR_display") |
| 1504 | //bitfield VkDisplayModeCreateFlagBitsKHR { |
| 1505 | //} |
| 1506 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1507 | @extension("VK_KHR_xlib_surface") |
| 1508 | type VkFlags VkXlibSurfaceCreateFlagsKHR |
| 1509 | //@extension("VK_KHR_xlib_surface") |
| 1510 | //bitfield VkXlibSurfaceCreateFlagBitsKHR { |
| 1511 | //} |
| 1512 | |
| 1513 | @extension("VK_KHR_xcb_surface") |
| 1514 | type VkFlags VkXcbSurfaceCreateFlagsKHR |
| 1515 | //@extension("VK_KHR_xcb_surface") |
| 1516 | //bitfield VkXcbSurfaceCreateFlagBitsKHR { |
| 1517 | //} |
| 1518 | |
| 1519 | @extension("VK_KHR_wayland_surface") |
| 1520 | type VkFlags VkWaylandSurfaceCreateFlagsKHR |
| 1521 | //@extension("VK_KHR_wayland_surface") |
| 1522 | //bitfield VkWaylandSurfaceCreateFlagBitsKHR { |
| 1523 | //} |
| 1524 | |
| 1525 | @extension("VK_KHR_mir_surface") |
| 1526 | type VkFlags VkMirSurfaceCreateFlagsKHR |
| 1527 | //@extension("VK_KHR_mir_surface") |
| 1528 | //bitfield VkMirSurfaceCreateFlagBitsKHR { |
| 1529 | //} |
| 1530 | |
| 1531 | @extension("VK_KHR_android_surface") |
| 1532 | type VkFlags VkAndroidSurfaceCreateFlagsKHR |
| 1533 | //@extension("VK_KHR_android_surface") |
| 1534 | //bitfield VkAndroidSurfaceCreateFlagBitsKHR { |
| 1535 | //} |
| 1536 | |
| 1537 | @extension("VK_KHR_win32_surface") |
| 1538 | type VkFlags VkWin32SurfaceCreateFlagsKHR |
| 1539 | //@extension("VK_KHR_win32_surface") |
| 1540 | //bitfield VkWin32SurfaceCreateFlagBitsKHR { |
| 1541 | //} |
| 1542 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1543 | @extension("VK_EXT_debug_report") |
| 1544 | type VkFlags VkDebugReportFlagsEXT |
| 1545 | @extension("VK_EXT_debug_report") |
| 1546 | bitfield VkDebugReportFlagBitsEXT { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 1547 | VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, |
| 1548 | VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, |
| 1549 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1550 | VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, |
| 1551 | VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, |
| 1552 | } |
| 1553 | |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 1554 | @extension("VK_ANDROID_native_buffer") |
| 1555 | type VkFlags VkSwapchainImageUsageFlagsANDROID |
| 1556 | @extension("VK_ANDROID_native_buffer") |
| 1557 | bitfield VkSwapchainImageUsageFlagBitsANDROID { |
| 1558 | VK_SWAPCHAIN_IMAGE_USAGE_FLAGS_FRONT_BUFFER_BIT_ANDROID = 0x00000001, |
| 1559 | } |
| 1560 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 1561 | @extension("VK_NV_external_memory_capabilities") |
| 1562 | type VkFlags VkExternalMemoryHandleTypeFlagsNV |
| 1563 | @extension("VK_NV_external_memory_capabilities") |
| 1564 | bitfield VkExternalMemoryHandleTypeFlagBitsNV { |
| 1565 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, |
| 1566 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, |
| 1567 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, |
| 1568 | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, |
| 1569 | } |
| 1570 | |
| 1571 | @extension("VK_NV_external_memory_capabilities") |
| 1572 | type VkFlags VkExternalMemoryFeatureFlagsNV |
| 1573 | @extension("VK_NV_external_memory_capabilities") |
| 1574 | bitfield VkExternalMemoryFeatureFlagBitsNV { |
| 1575 | VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, |
| 1576 | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, |
| 1577 | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, |
| 1578 | } |
| 1579 | |
| 1580 | @extension("VK_NVX_device_generated_commands") |
| 1581 | type VkFlags VkIndirectCommandsLayoutUsageFlagsNVX |
| 1582 | @extension("VK_NVX_device_generated_commands") |
| 1583 | bitfield VkIndirectCommandsLayoutUsageFlagBitsNVX { |
| 1584 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, |
| 1585 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, |
| 1586 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, |
| 1587 | VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, |
| 1588 | } |
| 1589 | |
| 1590 | @extension("VK_NVX_device_generated_commands") |
| 1591 | type VkFlags VkObjectEntryUsageFlagsNVX |
| 1592 | @extension("VK_NVX_device_generated_commands") |
| 1593 | bitfield VkObjectEntryUsageFlagBitsNVX { |
| 1594 | VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, |
| 1595 | VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, |
| 1596 | } |
| 1597 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 1598 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1599 | ////////////////// |
| 1600 | // Structures // |
| 1601 | ////////////////// |
| 1602 | |
| 1603 | class VkOffset2D { |
| 1604 | s32 x |
| 1605 | s32 y |
| 1606 | } |
| 1607 | |
| 1608 | class VkOffset3D { |
| 1609 | s32 x |
| 1610 | s32 y |
| 1611 | s32 z |
| 1612 | } |
| 1613 | |
| 1614 | class VkExtent2D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1615 | u32 width |
| 1616 | u32 height |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1617 | } |
| 1618 | |
| 1619 | class VkExtent3D { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1620 | u32 width |
| 1621 | u32 height |
| 1622 | u32 depth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1623 | } |
| 1624 | |
| 1625 | class VkViewport { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1626 | f32 x |
| 1627 | f32 y |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1628 | f32 width |
| 1629 | f32 height |
| 1630 | f32 minDepth |
| 1631 | f32 maxDepth |
| 1632 | } |
| 1633 | |
| 1634 | class VkRect2D { |
| 1635 | VkOffset2D offset |
| 1636 | VkExtent2D extent |
| 1637 | } |
| 1638 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1639 | class VkClearRect { |
| 1640 | VkRect2D rect |
| 1641 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1642 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1643 | } |
| 1644 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1645 | class VkComponentMapping { |
| 1646 | VkComponentSwizzle r |
| 1647 | VkComponentSwizzle g |
| 1648 | VkComponentSwizzle b |
| 1649 | VkComponentSwizzle a |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1650 | } |
| 1651 | |
| 1652 | class VkPhysicalDeviceProperties { |
| 1653 | u32 apiVersion |
| 1654 | u32 driverVersion |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1655 | u32 vendorID |
| 1656 | u32 deviceID |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1657 | VkPhysicalDeviceType deviceType |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1658 | char[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] deviceName |
| 1659 | u8[VK_UUID_SIZE] pipelineCacheUUID |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1660 | VkPhysicalDeviceLimits limits |
| 1661 | VkPhysicalDeviceSparseProperties sparseProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1662 | } |
| 1663 | |
| 1664 | class VkExtensionProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1665 | char[VK_MAX_EXTENSION_NAME_SIZE] extensionName /// extension name |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1666 | u32 specVersion /// version of the extension specification implemented |
| 1667 | } |
| 1668 | |
| 1669 | class VkLayerProperties { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1670 | char[VK_MAX_EXTENSION_NAME_SIZE] layerName /// layer name |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1671 | u32 specVersion /// version of the layer specification implemented |
| 1672 | u32 implementationVersion /// build or release version of the layer's library |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1673 | char[VK_MAX_DESCRIPTION_SIZE] description /// Free-form description of the layer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1674 | } |
| 1675 | |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1676 | class VkSubmitInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1677 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO |
| 1678 | const void* pNext /// Next structure in chain |
| 1679 | u32 waitSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1680 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1681 | const VkPipelineStageFlags* pWaitDstStageMask |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1682 | u32 commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1683 | const VkCommandBuffer* pCommandBuffers |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1684 | u32 signalSemaphoreCount |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 1685 | const VkSemaphore* pSignalSemaphores |
| 1686 | } |
| 1687 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1688 | class VkApplicationInfo { |
| 1689 | VkStructureType sType /// Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO |
| 1690 | const void* pNext /// Next structure in chain |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1691 | const char* pApplicationName |
| 1692 | u32 applicationVersion |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1693 | const char* pEngineName |
| 1694 | u32 engineVersion |
| 1695 | u32 apiVersion |
| 1696 | } |
| 1697 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1698 | class VkAllocationCallbacks { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1699 | void* pUserData |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1700 | PFN_vkAllocationFunction pfnAllocation |
| 1701 | PFN_vkReallocationFunction pfnReallocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1702 | PFN_vkFreeFunction pfnFree |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1703 | PFN_vkInternalAllocationNotification pfnInternalAllocation |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1704 | PFN_vkInternalFreeNotification pfnInternalFree |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1705 | } |
| 1706 | |
| 1707 | class VkDeviceQueueCreateInfo { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1708 | VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 1709 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1710 | VkDeviceQueueCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1711 | u32 queueFamilyIndex |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1712 | u32 queueCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 1713 | const f32* pQueuePriorities |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1714 | } |
| 1715 | |
| 1716 | class VkDeviceCreateInfo { |
| 1717 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO |
| 1718 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1719 | VkDeviceCreateFlags flags |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 1720 | u32 queueCreateInfoCount |
| 1721 | const VkDeviceQueueCreateInfo* pQueueCreateInfos |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1722 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1723 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1724 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1725 | const char* const* ppEnabledExtensionNames |
| 1726 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1727 | } |
| 1728 | |
| 1729 | class VkInstanceCreateInfo { |
| 1730 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO |
| 1731 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1732 | VkInstanceCreateFlags flags |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1733 | const VkApplicationInfo* pApplicationInfo |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1734 | u32 enabledLayerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1735 | const char* const* ppEnabledLayerNames /// Ordered list of layer names to be enabled |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1736 | u32 enabledExtensionCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1737 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 1738 | } |
| 1739 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1740 | class VkQueueFamilyProperties { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1741 | VkQueueFlags queueFlags /// Queue flags |
| 1742 | u32 queueCount |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 1743 | u32 timestampValidBits |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1744 | VkExtent3D minImageTransferGranularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1745 | } |
| 1746 | |
| 1747 | class VkPhysicalDeviceMemoryProperties { |
| 1748 | u32 memoryTypeCount |
| 1749 | VkMemoryType[VK_MAX_MEMORY_TYPES] memoryTypes |
| 1750 | u32 memoryHeapCount |
| 1751 | VkMemoryHeap[VK_MAX_MEMORY_HEAPS] memoryHeaps |
| 1752 | } |
| 1753 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1754 | class VkMemoryAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 1755 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1756 | const void* pNext /// Pointer to next structure |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1757 | VkDeviceSize allocationSize /// Size of memory allocation |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1758 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 1759 | } |
| 1760 | |
| 1761 | class VkMemoryRequirements { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1762 | VkDeviceSize size /// Specified in bytes |
| 1763 | VkDeviceSize alignment /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1764 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 1765 | } |
| 1766 | |
| 1767 | class VkSparseImageFormatProperties { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1768 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1769 | VkExtent3D imageGranularity |
| 1770 | VkSparseImageFormatFlags flags |
| 1771 | } |
| 1772 | |
| 1773 | class VkSparseImageMemoryRequirements { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1774 | VkSparseImageFormatProperties formatProperties |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1775 | u32 imageMipTailFirstLod |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1776 | VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 1777 | VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 1778 | 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] | 1779 | } |
| 1780 | |
| 1781 | class VkMemoryType { |
| 1782 | VkMemoryPropertyFlags propertyFlags /// Memory properties of this memory type |
| 1783 | u32 heapIndex /// Index of the memory heap allocations of this memory type are taken from |
| 1784 | } |
| 1785 | |
| 1786 | class VkMemoryHeap { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1787 | VkDeviceSize size /// Available memory in the heap |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1788 | VkMemoryHeapFlags flags /// Flags for the heap |
| 1789 | } |
| 1790 | |
| 1791 | class VkMappedMemoryRange { |
| 1792 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 1793 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1794 | VkDeviceMemory memory /// Mapped memory object |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1795 | VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 1796 | VkDeviceSize size /// Size of the range within the mapped memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1797 | } |
| 1798 | |
| 1799 | class VkFormatProperties { |
| 1800 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 1801 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1802 | VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1803 | } |
| 1804 | |
| 1805 | class VkImageFormatProperties { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1806 | VkExtent3D maxExtent /// max image dimensions for this resource type |
| 1807 | u32 maxMipLevels /// max number of mipmap levels for this resource type |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1808 | u32 maxArrayLayers /// max array layers for this resource type |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1809 | VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 1810 | VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 1811 | } |
| 1812 | |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1813 | class VkDescriptorImageInfo { |
| 1814 | VkSampler sampler |
| 1815 | VkImageView imageView |
| 1816 | VkImageLayout imageLayout |
| 1817 | } |
| 1818 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1819 | class VkDescriptorBufferInfo { |
| 1820 | VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 1821 | VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 1822 | 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] | 1823 | } |
| 1824 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1825 | class VkWriteDescriptorSet { |
| 1826 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET |
| 1827 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1828 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1829 | u32 dstBinding /// Binding within the destination descriptor set to write |
| 1830 | u32 dstArrayElement /// Array element within the destination binding to write |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1831 | 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] | 1832 | 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] | 1833 | const VkDescriptorImageInfo* pImageInfo |
| 1834 | const VkDescriptorBufferInfo* pBufferInfo |
| 1835 | const VkBufferView* pTexelBufferView |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1836 | } |
| 1837 | |
| 1838 | class VkCopyDescriptorSet { |
| 1839 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET |
| 1840 | const void* pNext /// Pointer to next structure |
| 1841 | VkDescriptorSet srcSet /// Source descriptor set |
| 1842 | u32 srcBinding /// Binding within the source descriptor set to copy from |
| 1843 | u32 srcArrayElement /// Array element within the source binding to copy from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1844 | VkDescriptorSet dstSet /// Destination descriptor set |
| 1845 | u32 dstBinding /// Binding within the destination descriptor set to copy to |
| 1846 | u32 dstArrayElement /// Array element within the destination binding to copy to |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1847 | u32 descriptorCount /// Number of descriptors to copy |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1848 | } |
| 1849 | |
| 1850 | class VkBufferCreateInfo { |
| 1851 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 1852 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1853 | VkBufferCreateFlags flags /// Buffer creation flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1854 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1855 | VkBufferUsageFlags usage /// Buffer usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1856 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1857 | u32 queueFamilyIndexCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1858 | const u32* pQueueFamilyIndices |
| 1859 | } |
| 1860 | |
| 1861 | class VkBufferViewCreateInfo { |
| 1862 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 1863 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1864 | VkBufferViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1865 | VkBuffer buffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1866 | VkFormat format /// Optionally specifies format of elements |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1867 | VkDeviceSize offset /// Specified in bytes |
| 1868 | VkDeviceSize range /// View size specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1869 | } |
| 1870 | |
| 1871 | class VkImageSubresource { |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1872 | VkImageAspectFlagBits aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1873 | u32 mipLevel |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1874 | u32 arrayLayer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1875 | } |
| 1876 | |
| 1877 | class VkImageSubresourceRange { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1878 | VkImageAspectFlags aspectMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1879 | u32 baseMipLevel |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1880 | u32 levelCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1881 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1882 | u32 layerCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1883 | } |
| 1884 | |
| 1885 | class VkMemoryBarrier { |
| 1886 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER |
| 1887 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1888 | VkAccessFlags srcAccessMask |
| 1889 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1890 | } |
| 1891 | |
| 1892 | class VkBufferMemoryBarrier { |
| 1893 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER |
| 1894 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1895 | VkAccessFlags srcAccessMask |
| 1896 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1897 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1898 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1899 | VkBuffer buffer /// Buffer to sync |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1900 | VkDeviceSize offset /// Offset within the buffer to sync |
| 1901 | VkDeviceSize size /// Amount of bytes to sync |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1902 | } |
| 1903 | |
| 1904 | class VkImageMemoryBarrier { |
| 1905 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER |
| 1906 | const void* pNext /// Pointer to next structure. |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 1907 | VkAccessFlags srcAccessMask |
| 1908 | VkAccessFlags dstAccessMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1909 | VkImageLayout oldLayout /// Current layout of the image |
| 1910 | VkImageLayout newLayout /// New layout to transition the image to |
| 1911 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1912 | u32 dstQueueFamilyIndex /// Queue family to transition ownership to |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1913 | VkImage image /// Image to sync |
| 1914 | VkImageSubresourceRange subresourceRange /// Subresource range to sync |
| 1915 | } |
| 1916 | |
| 1917 | class VkImageCreateInfo { |
| 1918 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO |
| 1919 | const void* pNext /// Pointer to next structure. |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1920 | VkImageCreateFlags flags /// Image creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1921 | VkImageType imageType |
| 1922 | VkFormat format |
| 1923 | VkExtent3D extent |
| 1924 | u32 mipLevels |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 1925 | u32 arrayLayers |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 1926 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1927 | VkImageTiling tiling |
| 1928 | VkImageUsageFlags usage /// Image usage flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1929 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 1930 | u32 queueFamilyIndexCount /// Number of queue families to share across |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1931 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1932 | VkImageLayout initialLayout /// Initial image layout for all subresources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1933 | } |
| 1934 | |
| 1935 | class VkSubresourceLayout { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1936 | VkDeviceSize offset /// Specified in bytes |
| 1937 | VkDeviceSize size /// Specified in bytes |
| 1938 | VkDeviceSize rowPitch /// Specified in bytes |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 1939 | VkDeviceSize arrayPitch /// Specified in bytes |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1940 | VkDeviceSize depthPitch /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1941 | } |
| 1942 | |
| 1943 | class VkImageViewCreateInfo { |
| 1944 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO |
| 1945 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1946 | VkImageViewCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1947 | VkImage image |
| 1948 | VkImageViewType viewType |
| 1949 | VkFormat format |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 1950 | VkComponentMapping components |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1951 | VkImageSubresourceRange subresourceRange |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1952 | } |
| 1953 | |
| 1954 | class VkBufferCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 1955 | VkDeviceSize srcOffset /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1956 | VkDeviceSize dstOffset /// Specified in bytes |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1957 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1958 | } |
| 1959 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1960 | class VkSparseMemoryBind { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 1961 | VkDeviceSize resourceOffset /// Specified in bytes |
| 1962 | VkDeviceSize size /// Specified in bytes |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1963 | VkDeviceMemory memory |
| 1964 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1965 | VkSparseMemoryBindFlags flags |
| 1966 | } |
| 1967 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1968 | class VkSparseImageMemoryBind { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1969 | VkImageSubresource subresource |
| 1970 | VkOffset3D offset |
| 1971 | VkExtent3D extent |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 1972 | VkDeviceMemory memory |
| 1973 | VkDeviceSize memoryOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 1974 | VkSparseMemoryBindFlags flags |
| 1975 | } |
| 1976 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 1977 | class VkSparseBufferMemoryBindInfo { |
| 1978 | VkBuffer buffer |
| 1979 | u32 bindCount |
| 1980 | const VkSparseMemoryBind* pBinds |
| 1981 | } |
| 1982 | |
| 1983 | class VkSparseImageOpaqueMemoryBindInfo { |
| 1984 | VkImage image |
| 1985 | u32 bindCount |
| 1986 | const VkSparseMemoryBind* pBinds |
| 1987 | } |
| 1988 | |
| 1989 | class VkSparseImageMemoryBindInfo { |
| 1990 | VkImage image |
| 1991 | u32 bindCount |
| 1992 | const VkSparseMemoryBind* pBinds |
| 1993 | } |
| 1994 | |
| 1995 | class VkBindSparseInfo { |
| 1996 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO |
| 1997 | const void* pNext |
| 1998 | u32 waitSemaphoreCount |
| 1999 | const VkSemaphore* pWaitSemaphores |
| 2000 | u32 numBufferBinds |
| 2001 | const VkSparseBufferMemoryBindInfo* pBufferBinds |
| 2002 | u32 numImageOpaqueBinds |
| 2003 | const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds |
| 2004 | u32 numImageBinds |
| 2005 | const VkSparseImageMemoryBindInfo* pImageBinds |
| 2006 | u32 signalSemaphoreCount |
| 2007 | const VkSemaphore* pSignalSemaphores |
| 2008 | } |
| 2009 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2010 | class VkImageSubresourceLayers { |
| 2011 | VkImageAspectFlags aspectMask |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2012 | u32 mipLevel |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 2013 | u32 baseArrayLayer |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2014 | u32 layerCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2015 | } |
| 2016 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2017 | class VkImageCopy { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2018 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2019 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2020 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2021 | VkOffset3D dstOffset /// Specified in pixels for both compressed and uncompressed images |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2022 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 2023 | } |
| 2024 | |
| 2025 | class VkImageBlit { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2026 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2027 | VkOffset3D[2] srcOffsets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2028 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2029 | VkOffset3D[2] dstOffsets |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2030 | } |
| 2031 | |
| 2032 | class VkBufferImageCopy { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2033 | VkDeviceSize bufferOffset /// Specified in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2034 | u32 bufferRowLength /// Specified in texels |
| 2035 | u32 bufferImageHeight |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2036 | VkImageSubresourceLayers imageSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2037 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 2038 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 2039 | } |
| 2040 | |
| 2041 | class VkImageResolve { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2042 | VkImageSubresourceLayers srcSubresource |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2043 | VkOffset3D srcOffset |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2044 | VkImageSubresourceLayers dstSubresource |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2045 | VkOffset3D dstOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2046 | VkExtent3D extent |
| 2047 | } |
| 2048 | |
| 2049 | class VkShaderModuleCreateInfo { |
| 2050 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO |
| 2051 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2052 | VkShaderModuleCreateFlags flags /// Reserved |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2053 | platform.size_t codeSize /// Specified in bytes |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2054 | const u32* pCode /// Binary code of size codeSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2055 | } |
| 2056 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2057 | class VkDescriptorSetLayoutBinding { |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2058 | u32 binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2059 | VkDescriptorType descriptorType /// Type of the descriptors in this binding |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2060 | u32 descriptorCount /// Number of descriptors in this binding |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2061 | VkShaderStageFlags stageFlags /// Shader stages this binding is visible to |
| 2062 | const VkSampler* pImmutableSamplers /// Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains <count> number of elements) |
| 2063 | } |
| 2064 | |
| 2065 | class VkDescriptorSetLayoutCreateInfo { |
| 2066 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO |
| 2067 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2068 | VkDescriptorSetLayoutCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2069 | u32 bindingCount /// Number of bindings in the descriptor set layout |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2070 | const VkDescriptorSetLayoutBinding* pBindings /// Array of descriptor set layout bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2071 | } |
| 2072 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2073 | class VkDescriptorPoolSize { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2074 | VkDescriptorType type |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2075 | u32 descriptorCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2076 | } |
| 2077 | |
| 2078 | class VkDescriptorPoolCreateInfo { |
| 2079 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 2080 | const void* pNext /// Pointer to next structure |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2081 | VkDescriptorPoolCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2082 | u32 maxSets |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2083 | u32 poolSizeCount |
| 2084 | const VkDescriptorPoolSize* pPoolSizes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2085 | } |
| 2086 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2087 | class VkDescriptorSetAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2088 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2089 | const void* pNext /// Pointer to next structure |
| 2090 | VkDescriptorPool descriptorPool |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2091 | u32 setCount |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2092 | const VkDescriptorSetLayout* pSetLayouts |
| 2093 | } |
| 2094 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2095 | class VkSpecializationMapEntry { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2096 | u32 constantID /// The SpecConstant ID specified in the BIL |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2097 | u32 offset /// Offset of the value in the data block |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2098 | platform.size_t size /// Size in bytes of the SpecConstant |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2099 | } |
| 2100 | |
| 2101 | class VkSpecializationInfo { |
| 2102 | u32 mapEntryCount /// Number of entries in the map |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2103 | const VkSpecializationMapEntry* pMapEntries /// Array of map entries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2104 | platform.size_t dataSize /// Size in bytes of pData |
| 2105 | const void* pData /// Pointer to SpecConstant data |
| 2106 | } |
| 2107 | |
| 2108 | class VkPipelineShaderStageCreateInfo { |
| 2109 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO |
| 2110 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2111 | VkPipelineShaderStageCreateFlags flags |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2112 | VkShaderStageFlagBits stage |
| 2113 | VkShaderModule module |
| 2114 | const char* pName |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2115 | const VkSpecializationInfo* pSpecializationInfo |
| 2116 | } |
| 2117 | |
| 2118 | class VkComputePipelineCreateInfo { |
| 2119 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 2120 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2121 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2122 | VkPipelineShaderStageCreateInfo stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2123 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 2124 | 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 |
| 2125 | 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 |
| 2126 | } |
| 2127 | |
| 2128 | class VkVertexInputBindingDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2129 | u32 binding /// Vertex buffer binding id |
| 2130 | u32 stride /// Distance between vertices in bytes (0 = no advancement) |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2131 | VkVertexInputRate inputRate /// Rate at which binding is incremented |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2132 | } |
| 2133 | |
| 2134 | class VkVertexInputAttributeDescription { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2135 | u32 location /// location of the shader vertex attrib |
| 2136 | u32 binding /// Vertex buffer binding id |
| 2137 | VkFormat format /// format of source data |
| 2138 | u32 offset /// Offset of first element in bytes from base of vertex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2139 | } |
| 2140 | |
| 2141 | class VkPipelineVertexInputStateCreateInfo { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2142 | VkStructureType sType /// Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO |
| 2143 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2144 | VkPipelineVertexInputStateCreateFlags flags |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2145 | u32 vertexBindingDescriptionCount /// number of bindings |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2146 | const VkVertexInputBindingDescription* pVertexBindingDescriptions |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2147 | u32 vertexAttributeDescriptionCount /// number of attributes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2148 | const VkVertexInputAttributeDescription* pVertexAttributeDescriptions |
| 2149 | } |
| 2150 | |
| 2151 | class VkPipelineInputAssemblyStateCreateInfo { |
| 2152 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 2153 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2154 | VkPipelineInputAssemblyStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2155 | VkPrimitiveTopology topology |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2156 | VkBool32 primitiveRestartEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2157 | } |
| 2158 | |
| 2159 | class VkPipelineTessellationStateCreateInfo { |
| 2160 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO |
| 2161 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2162 | VkPipelineTessellationStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2163 | u32 patchControlPoints |
| 2164 | } |
| 2165 | |
| 2166 | class VkPipelineViewportStateCreateInfo { |
| 2167 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 2168 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2169 | VkPipelineViewportStateCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2170 | u32 viewportCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2171 | const VkViewport* pViewports |
| 2172 | u32 scissorCount |
| 2173 | const VkRect2D* pScissors |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2174 | } |
| 2175 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2176 | class VkPipelineRasterizationStateCreateInfo { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2177 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2178 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2179 | VkPipelineRasterizationStateCreateFlags flags |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2180 | VkBool32 depthClampEnable |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2181 | VkBool32 rasterizerDiscardEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2182 | VkPolygonMode polygonMode /// optional (GL45) |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2183 | VkCullModeFlags cullMode |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2184 | VkFrontFace frontFace |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2185 | VkBool32 depthBiasEnable |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2186 | f32 depthBiasConstantFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2187 | f32 depthBiasClamp |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2188 | f32 depthBiasSlopeFactor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2189 | f32 lineWidth |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2190 | } |
| 2191 | |
| 2192 | class VkPipelineMultisampleStateCreateInfo { |
| 2193 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 2194 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2195 | VkPipelineMultisampleStateCreateFlags flags |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2196 | VkSampleCountFlagBits rasterizationSamples /// Number of samples used for rasterization |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2197 | VkBool32 sampleShadingEnable /// optional (GL45) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2198 | f32 minSampleShading /// optional (GL45) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2199 | const VkSampleMask* pSampleMask |
Jesse Hall | acfa534 | 2015-11-19 21:51:33 -0800 | [diff] [blame] | 2200 | VkBool32 alphaToCoverageEnable |
| 2201 | VkBool32 alphaToOneEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2202 | } |
| 2203 | |
| 2204 | class VkPipelineColorBlendAttachmentState { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2205 | VkBool32 blendEnable |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2206 | VkBlendFactor srcColorBlendFactor |
| 2207 | VkBlendFactor dstColorBlendFactor |
| 2208 | VkBlendOp colorBlendOp |
| 2209 | VkBlendFactor srcAlphaBlendFactor |
| 2210 | VkBlendFactor dstAlphaBlendFactor |
| 2211 | VkBlendOp alphaBlendOp |
| 2212 | VkColorComponentFlags colorWriteMask |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2213 | } |
| 2214 | |
| 2215 | class VkPipelineColorBlendStateCreateInfo { |
| 2216 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 2217 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2218 | VkPipelineColorBlendStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2219 | VkBool32 logicOpEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2220 | VkLogicOp logicOp |
| 2221 | u32 attachmentCount /// # of pAttachments |
| 2222 | const VkPipelineColorBlendAttachmentState* pAttachments |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2223 | f32[4] blendConstants |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2224 | } |
| 2225 | |
| 2226 | class VkStencilOpState { |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2227 | VkStencilOp failOp |
| 2228 | VkStencilOp passOp |
| 2229 | VkStencilOp depthFailOp |
| 2230 | VkCompareOp compareOp |
| 2231 | u32 compareMask |
| 2232 | u32 writeMask |
| 2233 | u32 reference |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2234 | } |
| 2235 | |
| 2236 | class VkPipelineDepthStencilStateCreateInfo { |
| 2237 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 2238 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2239 | VkPipelineDepthStencilStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2240 | VkBool32 depthTestEnable |
| 2241 | VkBool32 depthWriteEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2242 | VkCompareOp depthCompareOp |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2243 | VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 2244 | VkBool32 stencilTestEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2245 | VkStencilOpState front |
| 2246 | VkStencilOpState back |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2247 | f32 minDepthBounds |
| 2248 | f32 maxDepthBounds |
| 2249 | } |
| 2250 | |
| 2251 | class VkPipelineDynamicStateCreateInfo { |
| 2252 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 2253 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2254 | VkPipelineDynamicStateCreateFlags flags |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2255 | u32 dynamicStateCount |
| 2256 | const VkDynamicState* pDynamicStates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2257 | } |
| 2258 | |
| 2259 | class VkGraphicsPipelineCreateInfo { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2260 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO |
| 2261 | const void* pNext /// Pointer to next structure |
| 2262 | VkPipelineCreateFlags flags /// Pipeline creation flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2263 | u32 stageCount |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2264 | const VkPipelineShaderStageCreateInfo* pStages /// One entry for each active shader stage |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2265 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState |
| 2266 | const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState |
| 2267 | const VkPipelineTessellationStateCreateInfo* pTessellationState |
| 2268 | const VkPipelineViewportStateCreateInfo* pViewportState |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2269 | const VkPipelineRasterizationStateCreateInfo* pRasterizationState |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2270 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 2271 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 2272 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2273 | const VkPipelineDynamicStateCreateInfo* pDynamicState |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2274 | VkPipelineLayout layout /// Interface layout of the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2275 | VkRenderPass renderPass |
| 2276 | u32 subpass |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2277 | 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 |
| 2278 | 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] | 2279 | } |
| 2280 | |
| 2281 | class VkPipelineCacheCreateInfo { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2282 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO |
| 2283 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2284 | VkPipelineCacheCreateFlags flags |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2285 | platform.size_t initialDataSize /// Size of initial data to populate cache, in bytes |
| 2286 | const void* pInitialData /// Initial data to populate cache |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2287 | } |
| 2288 | |
| 2289 | class VkPushConstantRange { |
| 2290 | VkShaderStageFlags stageFlags /// Which stages use the range |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2291 | u32 offset /// Start of the range, in bytes |
| 2292 | u32 size /// Length of the range, in bytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2293 | } |
| 2294 | |
| 2295 | class VkPipelineLayoutCreateInfo { |
| 2296 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO |
| 2297 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2298 | VkPipelineLayoutCreateFlags flags |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2299 | u32 descriptorSetCount /// Number of descriptor sets interfaced by the pipeline |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2300 | const VkDescriptorSetLayout* pSetLayouts /// Array of <setCount> number of descriptor set layout objects defining the layout of the |
| 2301 | u32 pushConstantRangeCount /// Number of push-constant ranges used by the pipeline |
| 2302 | const VkPushConstantRange* pPushConstantRanges /// Array of pushConstantRangeCount number of ranges used by various shader stages |
| 2303 | } |
| 2304 | |
| 2305 | class VkSamplerCreateInfo { |
| 2306 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO |
| 2307 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2308 | VkSamplerCreateFlags flags |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 2309 | VkFilter magFilter /// Filter mode for magnification |
| 2310 | VkFilter minFilter /// Filter mode for minifiation |
| 2311 | VkSamplerMipmapMode mipmapMode /// Mipmap selection mode |
| 2312 | VkSamplerAddressMode addressModeU |
| 2313 | VkSamplerAddressMode addressModeV |
| 2314 | VkSamplerAddressMode addressModeW |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2315 | f32 mipLodBias |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2316 | VkBool32 anisotropyEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2317 | f32 maxAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2318 | VkBool32 compareEnable |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2319 | VkCompareOp compareOp |
| 2320 | f32 minLod |
| 2321 | f32 maxLod |
| 2322 | VkBorderColor borderColor |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2323 | VkBool32 unnormalizedCoordinates |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2324 | } |
| 2325 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2326 | class VkCommandPoolCreateInfo { |
| 2327 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2328 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2329 | VkCommandPoolCreateFlags flags /// Command pool creation flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2330 | u32 queueFamilyIndex |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2331 | } |
| 2332 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2333 | class VkCommandBufferAllocateInfo { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2334 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2335 | const void* pNext /// Pointer to next structure |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2336 | VkCommandPool commandPool |
| 2337 | VkCommandBufferLevel level |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2338 | u32 commandBufferCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2339 | } |
| 2340 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2341 | class VkCommandBufferInheritanceInfo { |
| 2342 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2343 | const void* pNext /// Pointer to next structure |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2344 | VkRenderPass renderPass /// Render pass for secondary command buffers |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2345 | u32 subpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2346 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2347 | VkBool32 occlusionQueryEnable |
| 2348 | VkQueryControlFlags queryFlags |
| 2349 | VkQueryPipelineStatisticFlags pipelineStatistics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2350 | } |
| 2351 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2352 | class VkCommandBufferBeginInfo { |
| 2353 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO |
| 2354 | const void* pNext /// Pointer to next structure |
| 2355 | VkCommandBufferUsageFlags flags /// Command buffer usage flags |
| 2356 | const VkCommandBufferInheritanceInfo* pInheritanceInfo |
| 2357 | } |
| 2358 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2359 | class VkRenderPassBeginInfo { |
| 2360 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO |
| 2361 | const void* pNext /// Pointer to next structure |
| 2362 | VkRenderPass renderPass |
| 2363 | VkFramebuffer framebuffer |
| 2364 | VkRect2D renderArea |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2365 | u32 clearValueCount |
| 2366 | const VkClearValue* pClearValues |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2367 | } |
| 2368 | |
| 2369 | @union |
| 2370 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 2371 | class VkClearColorValue { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2372 | f32[4] float32 |
| 2373 | s32[4] int32 |
| 2374 | u32[4] uint32 |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2375 | } |
| 2376 | |
| 2377 | class VkClearDepthStencilValue { |
| 2378 | f32 depth |
| 2379 | u32 stencil |
| 2380 | } |
| 2381 | |
| 2382 | @union |
| 2383 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 2384 | class VkClearValue { |
| 2385 | VkClearColorValue color |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2386 | VkClearDepthStencilValue depthStencil |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2387 | } |
| 2388 | |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2389 | class VkClearAttachment { |
| 2390 | VkImageAspectFlags aspectMask |
| 2391 | u32 colorAttachment |
| 2392 | VkClearValue clearValue |
| 2393 | } |
| 2394 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2395 | class VkAttachmentDescription { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2396 | VkAttachmentDescriptionFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2397 | VkFormat format |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2398 | VkSampleCountFlagBits samples |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2399 | VkAttachmentLoadOp loadOp /// Load op for color or depth data |
| 2400 | VkAttachmentStoreOp storeOp /// Store op for color or depth data |
| 2401 | VkAttachmentLoadOp stencilLoadOp /// Load op for stencil data |
| 2402 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 2403 | VkImageLayout initialLayout |
| 2404 | VkImageLayout finalLayout |
| 2405 | } |
| 2406 | |
| 2407 | class VkAttachmentReference { |
| 2408 | u32 attachment |
| 2409 | VkImageLayout layout |
| 2410 | } |
| 2411 | |
| 2412 | class VkSubpassDescription { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2413 | VkSubpassDescriptionFlags flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2414 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2415 | u32 inputAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2416 | const VkAttachmentReference* pInputAttachments |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2417 | u32 colorAttachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2418 | const VkAttachmentReference* pColorAttachments |
| 2419 | const VkAttachmentReference* pResolveAttachments |
Jesse Hall | c7467b7 | 2015-11-29 21:05:26 -0800 | [diff] [blame] | 2420 | const VkAttachmentReference* pDepthStencilAttachment |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2421 | u32 preserveAttachmentCount |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2422 | const u32* pPreserveAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2423 | } |
| 2424 | |
| 2425 | class VkSubpassDependency { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2426 | u32 srcSubpass |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2427 | u32 dstSubpass |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2428 | VkPipelineStageFlags srcStageMask |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2429 | VkPipelineStageFlags dstStageMask |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2430 | VkAccessFlags srcAccessMask |
| 2431 | VkAccessFlags dstAccessMask |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2432 | VkDependencyFlags dependencyFlags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2433 | } |
| 2434 | |
| 2435 | class VkRenderPassCreateInfo { |
| 2436 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO |
| 2437 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2438 | VkRenderPassCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2439 | u32 attachmentCount |
| 2440 | const VkAttachmentDescription* pAttachments |
| 2441 | u32 subpassCount |
| 2442 | const VkSubpassDescription* pSubpasses |
| 2443 | u32 dependencyCount |
| 2444 | const VkSubpassDependency* pDependencies |
| 2445 | } |
| 2446 | |
| 2447 | class VkEventCreateInfo { |
| 2448 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO |
| 2449 | const void* pNext /// Pointer to next structure |
| 2450 | VkEventCreateFlags flags /// Event creation flags |
| 2451 | } |
| 2452 | |
| 2453 | class VkFenceCreateInfo { |
| 2454 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO |
| 2455 | const void* pNext /// Pointer to next structure |
| 2456 | VkFenceCreateFlags flags /// Fence creation flags |
| 2457 | } |
| 2458 | |
| 2459 | class VkPhysicalDeviceFeatures { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2460 | VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 2461 | VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 2462 | VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 2463 | VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 2464 | VkBool32 geometryShader /// geometry stage |
| 2465 | VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 2466 | VkBool32 sampleRateShading /// per-sample shading and interpolation |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2467 | VkBool32 dualSrcBlend /// blend operations which take two sources |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2468 | VkBool32 logicOp /// logic operations |
| 2469 | VkBool32 multiDrawIndirect /// multi draw indirect |
Jesse Hall | 543a7ff | 2016-01-08 16:38:30 -0800 | [diff] [blame] | 2470 | VkBool32 drawIndirectFirstInstance |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2471 | VkBool32 depthClamp /// depth clamping |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2472 | VkBool32 depthBiasClamp /// depth bias clamping |
| 2473 | VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 2474 | VkBool32 depthBounds /// depth bounds test |
| 2475 | VkBool32 wideLines /// lines with width greater than 1 |
| 2476 | VkBool32 largePoints /// points with size greater than 1 |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2477 | VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 2478 | VkBool32 multiViewport |
| 2479 | VkBool32 samplerAnisotropy |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2480 | VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 2481 | VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 2482 | VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2483 | VkBool32 occlusionQueryPrecise |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2484 | VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2485 | VkBool32 vertexPipelineStoresAndAtomics |
| 2486 | VkBool32 fragmentStoresAndAtomics |
| 2487 | VkBool32 shaderTessellationAndGeometryPointSize |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2488 | VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 2489 | VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 2490 | VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
Jesse Hall | d1af812 | 2015-11-29 23:50:38 -0800 | [diff] [blame] | 2491 | VkBool32 shaderStorageImageReadWithoutFormat |
| 2492 | VkBool32 shaderStorageImageWriteWithoutFormat |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2493 | VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 2494 | VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 2495 | VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 2496 | VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 2497 | VkBool32 shaderClipDistance /// clip distance in shaders |
| 2498 | VkBool32 shaderCullDistance /// cull distance in shaders |
| 2499 | VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 2500 | VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 2501 | VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 2502 | 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] | 2503 | VkBool32 shaderResourceMinLod /// shader can use texture operations that specify minimum resource LOD |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2504 | VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 2505 | VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 2506 | VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 2507 | VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 2508 | VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 2509 | VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 2510 | VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 2511 | VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 2512 | 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] | 2513 | VkBool32 variableMultisampleRate |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2514 | VkBool32 inheritedQueries |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2515 | } |
| 2516 | |
| 2517 | class VkPhysicalDeviceLimits { |
| 2518 | /// resource maximum sizes |
| 2519 | u32 maxImageDimension1D /// max 1D image dimension |
| 2520 | u32 maxImageDimension2D /// max 2D image dimension |
| 2521 | u32 maxImageDimension3D /// max 3D image dimension |
| 2522 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 2523 | u32 maxImageArrayLayers /// max layers for image arrays |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2524 | u32 maxTexelBufferElements |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2525 | u32 maxUniformBufferRange /// max uniform buffer size (bytes) |
| 2526 | u32 maxStorageBufferRange /// max storage buffer size (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2527 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 2528 | /// memory limits |
| 2529 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2530 | u32 maxSamplerAllocationCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2531 | VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 2532 | VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2533 | /// descriptor set limits |
| 2534 | 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] | 2535 | u32 maxPerStageDescriptorSamplers /// max num of samplers allowed per-stage in a descriptor set |
| 2536 | u32 maxPerStageDescriptorUniformBuffers /// max num of uniform buffers allowed per-stage in a descriptor set |
| 2537 | u32 maxPerStageDescriptorStorageBuffers /// max num of storage buffers allowed per-stage in a descriptor set |
| 2538 | u32 maxPerStageDescriptorSampledImages /// max num of sampled images allowed per-stage in a descriptor set |
| 2539 | 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] | 2540 | u32 maxPerStageDescriptorInputAttachments |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2541 | u32 maxPerStageResources |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2542 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 2543 | 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] | 2544 | 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] | 2545 | 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] | 2546 | 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] | 2547 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 2548 | 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] | 2549 | u32 maxDescriptorSetInputAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2550 | /// vertex stage limits |
| 2551 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2552 | u32 maxVertexInputBindings /// max num of vertex input binding slots |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2553 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 2554 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 2555 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 2556 | /// tessellation control stage limits |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2557 | u32 maxTessellationGenerationLevel /// max level supported by tess primitive generator |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 2558 | u32 maxTessellationPatchSize /// max patch size (vertices) |
| 2559 | u32 maxTessellationControlPerVertexInputComponents /// max num of input components per-vertex in TCS |
| 2560 | u32 maxTessellationControlPerVertexOutputComponents /// max num of output components per-vertex in TCS |
| 2561 | u32 maxTessellationControlPerPatchOutputComponents /// max num of output components per-patch in TCS |
| 2562 | u32 maxTessellationControlTotalOutputComponents /// max total num of per-vertex and per-patch output components in TCS |
| 2563 | u32 maxTessellationEvaluationInputComponents /// max num of input components per vertex in TES |
| 2564 | u32 maxTessellationEvaluationOutputComponents /// max num of output components per vertex in TES |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2565 | /// geometry stage limits |
| 2566 | u32 maxGeometryShaderInvocations /// max invocation count supported in geometry shader |
| 2567 | u32 maxGeometryInputComponents /// max num of input components read in geometry stage |
| 2568 | u32 maxGeometryOutputComponents /// max num of output components written in geometry stage |
| 2569 | u32 maxGeometryOutputVertices /// max num of vertices that can be emitted in geometry stage |
| 2570 | u32 maxGeometryTotalOutputComponents /// max total num of components (all vertices) written in geometry stage |
| 2571 | /// fragment stage limits |
| 2572 | u32 maxFragmentInputComponents /// max num of input compontents read in fragment stage |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2573 | u32 maxFragmentOutputAttachments /// max num of output attachments written in fragment stage |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2574 | 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] | 2575 | u32 maxFragmentCombinedOutputResources /// max total num of storage buffers, storage images and output buffers |
| 2576 | /// compute stage limits |
| 2577 | u32 maxComputeSharedMemorySize /// max total storage size of work group local storage (bytes) |
| 2578 | u32[3] maxComputeWorkGroupCount /// max num of compute work groups that may be dispatched by a single command (x,y,z) |
| 2579 | u32 maxComputeWorkGroupInvocations /// max total compute invocations in a single local work group |
| 2580 | u32[3] maxComputeWorkGroupSize /// max local size of a compute work group (x,y,z) |
| 2581 | |
| 2582 | u32 subPixelPrecisionBits /// num bits of subpixel precision in screen x and y |
| 2583 | u32 subTexelPrecisionBits /// num bits of subtexel precision |
| 2584 | u32 mipmapPrecisionBits /// num bits of mipmap precision |
| 2585 | |
| 2586 | 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] | 2587 | u32 maxDrawIndirectCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2588 | |
| 2589 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 2590 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 2591 | |
| 2592 | u32 maxViewports /// max number of active viewports |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2593 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 2594 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 2595 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 2596 | |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 2597 | platform.size_t minMemoryMapAlignment /// min required alignment of pointers returned by MapMemory (bytes) |
| 2598 | VkDeviceSize minTexelBufferOffsetAlignment /// min required alignment for texel buffer offsets (bytes) |
| 2599 | VkDeviceSize minUniformBufferOffsetAlignment /// min required alignment for uniform buffer sizes and offsets (bytes) |
| 2600 | VkDeviceSize minStorageBufferOffsetAlignment /// min required alignment for storage buffer offsets (bytes) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2601 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2602 | s32 minTexelOffset /// min texel offset for OpTextureSampleOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2603 | u32 maxTexelOffset /// max texel offset for OpTextureSampleOffset |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2604 | s32 minTexelGatherOffset /// min texel offset for OpTextureGatherOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2605 | u32 maxTexelGatherOffset /// max texel offset for OpTextureGatherOffset |
| 2606 | f32 minInterpolationOffset /// furthest negative offset for interpolateAtOffset |
| 2607 | f32 maxInterpolationOffset /// furthest positive offset for interpolateAtOffset |
| 2608 | u32 subPixelInterpolationOffsetBits /// num of subpixel bits for interpolateAtOffset |
| 2609 | |
| 2610 | u32 maxFramebufferWidth /// max width for a framebuffer |
| 2611 | u32 maxFramebufferHeight /// max height for a framebuffer |
| 2612 | u32 maxFramebufferLayers /// max layer count for a layered framebuffer |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2613 | VkSampleCountFlags framebufferColorSampleCounts |
| 2614 | VkSampleCountFlags framebufferDepthSampleCounts |
| 2615 | VkSampleCountFlags framebufferStencilSampleCounts |
| 2616 | VkSampleCountFlags framebufferNoAttachmentSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2617 | u32 maxColorAttachments /// max num of framebuffer color attachments |
| 2618 | |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2619 | VkSampleCountFlags sampledImageColorSampleCounts |
| 2620 | VkSampleCountFlags sampledImageIntegerSampleCounts |
| 2621 | VkSampleCountFlags sampledImageDepthSampleCounts |
| 2622 | VkSampleCountFlags sampledImageStencilSampleCounts |
| 2623 | VkSampleCountFlags storageImageSampleCounts |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2624 | u32 maxSampleMaskWords /// max num of sample mask words |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2625 | VkBool32 timestampComputeAndGraphics |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2626 | |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2627 | f32 timestampPeriod |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2628 | |
| 2629 | u32 maxClipDistances /// max number of clip distances |
| 2630 | u32 maxCullDistances /// max number of cull distances |
| 2631 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 2632 | |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 2633 | u32 discreteQueuePriorities |
| 2634 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2635 | f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 2636 | f32[2] lineWidthRange /// range (min,max) of supported line widths |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2637 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 2638 | f32 lineWidthGranularity /// granularity of supported line widths |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2639 | VkBool32 strictLines |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 2640 | VkBool32 standardSampleLocations |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 2641 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 2642 | VkDeviceSize optimalBufferCopyOffsetAlignment |
| 2643 | VkDeviceSize optimalBufferCopyRowPitchAlignment |
Jesse Hall | dba27f7 | 2015-11-30 14:25:46 -0800 | [diff] [blame] | 2644 | VkDeviceSize nonCoherentAtomSize |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2645 | } |
| 2646 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2647 | class VkPhysicalDeviceSparseProperties { |
| 2648 | 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] | 2649 | 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] | 2650 | VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 2651 | 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] | 2652 | 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 |
| 2653 | } |
| 2654 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2655 | class VkSemaphoreCreateInfo { |
| 2656 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 2657 | const void* pNext /// Pointer to next structure |
| 2658 | VkSemaphoreCreateFlags flags /// Semaphore creation flags |
| 2659 | } |
| 2660 | |
| 2661 | class VkQueryPoolCreateInfo { |
| 2662 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO |
| 2663 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2664 | VkQueryPoolCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2665 | VkQueryType queryType |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2666 | u32 queryCount |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2667 | VkQueryPipelineStatisticFlags pipelineStatistics /// Optional |
| 2668 | } |
| 2669 | |
| 2670 | class VkFramebufferCreateInfo { |
| 2671 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO |
| 2672 | const void* pNext /// Pointer to next structure |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2673 | VkFramebufferCreateFlags flags |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2674 | VkRenderPass renderPass |
| 2675 | u32 attachmentCount |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 2676 | const VkImageView* pAttachments |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2677 | u32 width |
| 2678 | u32 height |
| 2679 | u32 layers |
| 2680 | } |
| 2681 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2682 | class VkDrawIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2683 | u32 vertexCount |
| 2684 | u32 instanceCount |
| 2685 | u32 firstVertex |
| 2686 | u32 firstInstance |
| 2687 | } |
| 2688 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2689 | class VkDrawIndexedIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2690 | u32 indexCount |
| 2691 | u32 instanceCount |
| 2692 | u32 firstIndex |
| 2693 | s32 vertexOffset |
| 2694 | u32 firstInstance |
| 2695 | } |
| 2696 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 2697 | class VkDispatchIndirectCommand { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2698 | u32 x |
| 2699 | u32 y |
| 2700 | u32 z |
| 2701 | } |
| 2702 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2703 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2704 | class VkSurfaceCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2705 | u32 minImageCount |
| 2706 | u32 maxImageCount |
| 2707 | VkExtent2D currentExtent |
| 2708 | VkExtent2D minImageExtent |
| 2709 | VkExtent2D maxImageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2710 | u32 maxImageArrayLayers |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2711 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2712 | VkSurfaceTransformFlagBitsKHR currentTransform |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2713 | VkCompositeAlphaFlagsKHR supportedCompositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2714 | VkImageUsageFlags supportedUsageFlags |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2715 | } |
| 2716 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2717 | @extension("VK_KHR_surface") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2718 | class VkSurfaceFormatKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2719 | VkFormat format |
| 2720 | VkColorSpaceKHR colorSpace |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2721 | } |
| 2722 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2723 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2724 | class VkSwapchainCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2725 | VkStructureType sType |
| 2726 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2727 | VkSwapchainCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2728 | VkSurfaceKHR surface |
| 2729 | u32 minImageCount |
| 2730 | VkFormat imageFormat |
| 2731 | VkColorSpaceKHR imageColorSpace |
| 2732 | VkExtent2D imageExtent |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2733 | u32 imageArrayLayers |
| 2734 | VkImageUsageFlags imageUsage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2735 | VkSharingMode sharingMode |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2736 | u32 queueFamilyIndexCount |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2737 | const u32* pQueueFamilyIndices |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2738 | VkSurfaceTransformFlagBitsKHR preTransform |
| 2739 | VkCompositeAlphaFlagBitsKHR compositeAlpha |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2740 | VkPresentModeKHR presentMode |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2741 | VkBool32 clipped |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2742 | VkSwapchainKHR oldSwapchain |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2743 | } |
| 2744 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2745 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2746 | class VkPresentInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2747 | VkStructureType sType |
| 2748 | const void* pNext |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 2749 | u32 waitSemaphoreCount |
| 2750 | const VkSemaphore* pWaitSemaphores |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2751 | u32 swapchainCount |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 2752 | const VkSwapchainKHR* pSwapchains |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2753 | const u32* pImageIndices |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame] | 2754 | VkResult* pResults |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2755 | } |
| 2756 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2757 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2758 | class VkDisplayPropertiesKHR { |
| 2759 | VkDisplayKHR display |
| 2760 | const char* displayName |
| 2761 | VkExtent2D physicalDimensions |
| 2762 | VkExtent2D physicalResolution |
| 2763 | VkSurfaceTransformFlagsKHR supportedTransforms |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2764 | VkBool32 planeReorderPossible |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2765 | VkBool32 persistentContent |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2766 | } |
| 2767 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2768 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2769 | class VkDisplayModeParametersKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2770 | VkExtent2D visibleRegion |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2771 | u32 refreshRate |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 2772 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 2773 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2774 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2775 | class VkDisplayModePropertiesKHR { |
| 2776 | VkDisplayModeKHR displayMode |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2777 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2778 | } |
| 2779 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2780 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2781 | class VkDisplayModeCreateInfoKHR { |
| 2782 | VkStructureType sType |
| 2783 | const void* pNext |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 2784 | VkDisplayModeCreateFlagsKHR flags |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2785 | VkDisplayModeParametersKHR parameters |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2786 | } |
| 2787 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2788 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2789 | class VkDisplayPlanePropertiesKHR { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2790 | VkDisplayKHR currentDisplay |
| 2791 | u32 currentStackIndex |
| 2792 | } |
| 2793 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2794 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2795 | class VkDisplayPlaneCapabilitiesKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2796 | VkDisplayPlaneAlphaFlagsKHR supportedAlpha |
| 2797 | VkOffset2D minSrcPosition |
| 2798 | VkOffset2D maxSrcPosition |
| 2799 | VkExtent2D minSrcExtent |
| 2800 | VkExtent2D maxSrcExtent |
| 2801 | VkOffset2D minDstPosition |
| 2802 | VkOffset2D maxDstPosition |
| 2803 | VkExtent2D minDstExtent |
| 2804 | VkExtent2D maxDstExtent |
| 2805 | } |
| 2806 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2807 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2808 | class VkDisplaySurfaceCreateInfoKHR { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2809 | VkStructureType sType |
| 2810 | const void* pNext |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2811 | VkDisplaySurfaceCreateFlagsKHR flags |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2812 | VkDisplayModeKHR displayMode |
| 2813 | u32 planeIndex |
| 2814 | u32 planeStackIndex |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2815 | VkSurfaceTransformFlagBitsKHR transform |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2816 | f32 globalAlpha |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 2817 | VkDisplayPlaneAlphaFlagBitsKHR alphaMode |
| 2818 | VkExtent2D imageExtent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2819 | } |
| 2820 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 2821 | @extension("VK_KHR_display_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2822 | class VkDisplayPresentInfoKHR { |
| 2823 | VkStructureType sType |
| 2824 | const void* pNext |
| 2825 | VkRect2D srcRect |
| 2826 | VkRect2D dstRect |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 2827 | VkBool32 persistent |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 2828 | } |
| 2829 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2830 | @extension("VK_KHR_xlib_surface") |
| 2831 | class VkXlibSurfaceCreateInfoKHR { |
| 2832 | VkStructureType sType |
| 2833 | const void* pNext |
| 2834 | VkXlibSurfaceCreateFlagsKHR flags |
| 2835 | platform.Display* dpy |
| 2836 | platform.Window window |
| 2837 | } |
| 2838 | |
| 2839 | @extension("VK_KHR_xcb_surface") |
| 2840 | class VkXcbSurfaceCreateInfoKHR { |
| 2841 | VkStructureType sType |
| 2842 | const void* pNext |
| 2843 | VkXcbSurfaceCreateFlagsKHR flags |
| 2844 | platform.xcb_connection_t* connection |
| 2845 | platform.xcb_window_t window |
| 2846 | } |
| 2847 | |
| 2848 | @extension("VK_KHR_wayland_surface") |
| 2849 | class VkWaylandSurfaceCreateInfoKHR { |
| 2850 | VkStructureType sType |
| 2851 | const void* pNext |
| 2852 | VkWaylandSurfaceCreateFlagsKHR flags |
| 2853 | platform.wl_display* display |
| 2854 | platform.wl_surface* surface |
| 2855 | } |
| 2856 | |
| 2857 | @extension("VK_KHR_mir_surface") |
| 2858 | class VkMirSurfaceCreateInfoKHR { |
| 2859 | VkStructureType sType |
| 2860 | const void* pNext |
| 2861 | VkMirSurfaceCreateFlagsKHR flags |
| 2862 | platform.MirConnection* connection |
| 2863 | platform.MirSurface* mirSurface |
| 2864 | } |
| 2865 | |
| 2866 | @extension("VK_KHR_android_surface") |
| 2867 | class VkAndroidSurfaceCreateInfoKHR { |
| 2868 | VkStructureType sType |
| 2869 | const void* pNext |
| 2870 | VkAndroidSurfaceCreateFlagsKHR flags |
| 2871 | platform.ANativeWindow* window |
| 2872 | } |
| 2873 | |
| 2874 | @extension("VK_KHR_win32_surface") |
| 2875 | class VkWin32SurfaceCreateInfoKHR { |
| 2876 | VkStructureType sType |
| 2877 | const void* pNext |
| 2878 | VkWin32SurfaceCreateFlagsKHR flags |
| 2879 | platform.HINSTANCE hinstance |
| 2880 | platform.HWND hwnd |
| 2881 | } |
| 2882 | |
Ian Elliott | 948233a | 2017-01-06 12:13:23 -0700 | [diff] [blame^] | 2883 | @extension("VK_KHR_incremental_present") |
| 2884 | class VkRectLayerKHR { |
| 2885 | VkOffset2D offset |
| 2886 | VkExtent2D extent |
| 2887 | uint32_t layer |
| 2888 | } |
| 2889 | |
| 2890 | @extension("VK_KHR_incremental_present") |
| 2891 | class VkPresentRegionKHR { |
| 2892 | uint32_t rectangleCount |
| 2893 | const VkRectLayerKHR* pRectangles |
| 2894 | } |
| 2895 | |
| 2896 | @extension("VK_KHR_incremental_present") |
| 2897 | class VkPresentRegionsKHR { |
| 2898 | VkStructureType sType |
| 2899 | const void* pNext |
| 2900 | uint32_t swapchainCount |
| 2901 | const VkPresentRegionKHR* pRegions |
| 2902 | } |
| 2903 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 2904 | @extension("VK_ANDROID_native_buffer") |
| 2905 | class VkNativeBufferANDROID { |
| 2906 | VkStructureType sType |
| 2907 | const void* pNext |
| 2908 | platform.buffer_handle_t handle |
| 2909 | int stride |
| 2910 | int format |
| 2911 | int usage |
| 2912 | } |
| 2913 | |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 2914 | @extension("VK_ANDROID_native_buffer") |
| 2915 | class VkSwapchainImageCreateInfoANDROID { |
| 2916 | VkStructureType sType |
| 2917 | const void* pNext |
| 2918 | VkSwapchainImageUsageFlagBitsANDROID flags |
| 2919 | } |
| 2920 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 2921 | @extension("VK_EXT_debug_report") |
| 2922 | class VkDebugReportCallbackCreateInfoEXT { |
| 2923 | VkStructureType sType |
| 2924 | const void* pNext |
| 2925 | VkDebugReportFlagsEXT flags |
| 2926 | PFN_vkDebugReportCallbackEXT pfnCallback |
| 2927 | void* pUserData |
| 2928 | } |
| 2929 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 2930 | @extension("VK_AMD_rasterization_order") |
| 2931 | class VkPipelineRasterizationStateRasterizationOrderAMD { |
| 2932 | VkStructureType sType |
| 2933 | const void* pNext |
| 2934 | VkRasterizationOrderAMD rasterizationOrder |
| 2935 | } |
| 2936 | |
| 2937 | @extension("VK_EXT_debug_marker") |
| 2938 | class VkDebugMarkerObjectNameInfoEXT { |
| 2939 | VkStructureType sType |
| 2940 | const void* pNext |
| 2941 | VkDebugReportObjectTypeEXT objectType |
| 2942 | u64 object |
| 2943 | const char* pObjectName |
| 2944 | } |
| 2945 | |
| 2946 | @extension("VK_EXT_debug_marker") |
| 2947 | class VkDebugMarkerObjectTagInfoEXT { |
| 2948 | VkStructureType sType |
| 2949 | const void* pNext |
| 2950 | VkDebugReportObjectTypeEXT objectType |
| 2951 | u64 object |
| 2952 | u64 tagName |
| 2953 | platform.size_t tagSize |
| 2954 | const void* pTag |
| 2955 | } |
| 2956 | |
| 2957 | @extension("VK_EXT_debug_marker") |
| 2958 | class VkDebugMarkerMarkerInfoEXT { |
| 2959 | VkStructureType sType |
| 2960 | const void* pNext |
| 2961 | const char* pMarkerName |
| 2962 | f32[4] color |
| 2963 | } |
| 2964 | |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 2965 | @extension("VK_NV_dedicated_allocation") |
| 2966 | class VkDedicatedAllocationImageCreateInfoNV { |
| 2967 | VkStructureType sType |
| 2968 | const void* pNext |
| 2969 | VkBool32 dedicatedAllocation |
| 2970 | } |
| 2971 | |
| 2972 | @extension("VK_NV_dedicated_allocation") |
| 2973 | class VkDedicatedAllocationBufferCreateInfoNV { |
| 2974 | VkStructureType sType |
| 2975 | const void* pNext |
| 2976 | VkBool32 dedicatedAllocation |
| 2977 | } |
| 2978 | |
| 2979 | @extension("VK_NV_dedicated_allocation") |
| 2980 | class VkDedicatedAllocationMemoryAllocateInfoNV { |
| 2981 | VkStructureType sType |
| 2982 | const void* pNext |
| 2983 | VkImage image |
| 2984 | VkBuffer buffer |
| 2985 | } |
| 2986 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 2987 | @extension("VK_KHR_get_physical_device_properties2") |
| 2988 | class VkPhysicalDeviceFeatures2KHR { |
| 2989 | VkStructureType sType |
| 2990 | void* pNext |
| 2991 | VkPhysicalDeviceFeatures features |
| 2992 | } |
| 2993 | |
| 2994 | @extension("VK_KHR_get_physical_device_properties2") |
| 2995 | class VkPhysicalDeviceProperties2KHR { |
| 2996 | VkStructureType sType |
| 2997 | void* pNext |
| 2998 | VkPhysicalDeviceProperties properties |
| 2999 | } |
| 3000 | |
| 3001 | @extension("VK_KHR_get_physical_device_properties2") |
| 3002 | class VkFormatProperties2KHR { |
| 3003 | VkStructureType sType |
| 3004 | void* pNext |
| 3005 | VkFormatProperties formatProperties |
| 3006 | } |
| 3007 | |
| 3008 | @extension("VK_KHR_get_physical_device_properties2") |
| 3009 | class VkImageFormatProperties2KHR { |
| 3010 | VkStructureType sType |
| 3011 | void* pNext |
| 3012 | VkImageFormatProperties imageFormatProperties |
| 3013 | } |
| 3014 | |
| 3015 | @extension("VK_KHR_get_physical_device_properties2") |
| 3016 | class VkPhysicalDeviceImageFormatInfo2KHR { |
| 3017 | VkStructureType sType |
| 3018 | const void* pNext |
| 3019 | VkFormat format |
| 3020 | VkImageType type |
| 3021 | VkImageTiling tiling |
| 3022 | VkImageUsageFlags usage |
| 3023 | VkImageCreateFlags flags |
| 3024 | } |
| 3025 | |
| 3026 | @extension("VK_KHR_get_physical_device_properties2") |
| 3027 | class VkQueueFamilyProperties2KHR { |
| 3028 | VkStructureType sType |
| 3029 | void* pNext |
| 3030 | VkQueueFamilyProperties queueFamilyProperties |
| 3031 | } |
| 3032 | |
| 3033 | @extension("VK_KHR_get_physical_device_properties2") |
| 3034 | class VkPhysicalDeviceMemoryProperties2KHR { |
| 3035 | VkStructureType sType |
| 3036 | void* pNext |
| 3037 | VkPhysicalDeviceMemoryProperties memoryProperties |
| 3038 | } |
| 3039 | |
| 3040 | @extension("VK_KHR_get_physical_device_properties2") |
| 3041 | class VkSparseImageFormatProperties2KHR { |
| 3042 | VkStructureType sType |
| 3043 | void* pNext |
| 3044 | VkSparseImageFormatProperties properties |
| 3045 | } |
| 3046 | |
| 3047 | @extension("VK_KHR_get_physical_device_properties2") |
| 3048 | class VkPhysicalDeviceSparseImageFormatInfo2KHR { |
| 3049 | VkStructureType sType |
| 3050 | const void* pNext |
| 3051 | VkFormat format |
| 3052 | VkImageType type |
| 3053 | VkSampleCountFlagBits samples |
| 3054 | VkImageUsageFlags usage |
| 3055 | VkImageTiling tiling |
| 3056 | } |
| 3057 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 3058 | @extension("VK_KHR_incremental_present") |
| 3059 | class VkRectLayerKHR { |
| 3060 | VkOffset2D offset |
| 3061 | VkExtent2D extent |
| 3062 | u32 layer |
| 3063 | } |
| 3064 | |
| 3065 | @extension("VK_KHR_incremental_present") |
| 3066 | class VkPresentRegionKHR { |
| 3067 | u32 rectangleCount |
| 3068 | const VkRectLayerKHR* pRectangles |
| 3069 | } |
| 3070 | |
| 3071 | @extension("VK_KHR_incremental_present") |
| 3072 | class VkPresentRegionsKHR { |
| 3073 | VkStructureType sType |
| 3074 | const void* pNext |
| 3075 | u32 swapchainCount |
| 3076 | const VkPresentRegionKHR* pRegions |
| 3077 | } |
| 3078 | |
| 3079 | @extension("VK_NV_external_memory_capabilities") |
| 3080 | class VkExternalImageFormatPropertiesNV { |
| 3081 | VkImageFormatProperties imageFormatProperties |
| 3082 | VkExternalMemoryFeatureFlagsNV externalMemoryFeatures |
| 3083 | VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes |
| 3084 | VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes |
| 3085 | } |
| 3086 | |
| 3087 | @extension("VK_NV_external_memory") |
| 3088 | class VkExternalMemoryImageCreateInfoNV { |
| 3089 | VkStructureType sType |
| 3090 | const void* pNext |
| 3091 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3092 | } |
| 3093 | |
| 3094 | @extension("VK_NV_external_memory") |
| 3095 | class VkExportMemoryAllocateInfoNV { |
| 3096 | VkStructureType sType |
| 3097 | const void* pNext |
| 3098 | VkExternalMemoryHandleTypeFlagsNV handleTypes |
| 3099 | } |
| 3100 | |
| 3101 | @extension("VK_NV_external_memory_win32") |
| 3102 | class VkImportMemoryWin32HandleInfoNV { |
| 3103 | VkStructureType sType |
| 3104 | const void* pNext |
| 3105 | VkExternalMemoryHandleTypeFlagsNV handleType |
| 3106 | platform.HANDLE handle |
| 3107 | } |
| 3108 | |
| 3109 | @extension("VK_NV_external_memory_win32") |
| 3110 | class VkExportMemoryWin32HandleInfoNV { |
| 3111 | VkStructureType sType |
| 3112 | const void* pNext |
| 3113 | const platform.SECURITY_ATTRIBUTES* pAttributes |
| 3114 | u32 dwAccess |
| 3115 | } |
| 3116 | |
| 3117 | @extension("VK_NV_win32_keyed_mutex") |
| 3118 | class VkWin32KeyedMutexAcquireReleaseInfoNV { |
| 3119 | VkStructureType sType |
| 3120 | const void* pNext |
| 3121 | u32 acquireCount |
| 3122 | const VkDeviceMemory* pAcquireSyncs |
| 3123 | const u64* pAcquireKeys |
| 3124 | const u32* pAcquireTimeoutMilliseconds |
| 3125 | u32 releaseCount |
| 3126 | const VkDeviceMemory* pReleaseSyncs |
| 3127 | const u64* pReleaseKeys |
| 3128 | } |
| 3129 | |
| 3130 | @extension("VK_EXT_validation_flags") |
| 3131 | class VkValidationFlagsEXT { |
| 3132 | VkStructureType sType |
| 3133 | const void* pNext |
| 3134 | u32 disabledValidationCheckCount |
| 3135 | VkValidationCheckEXT* pDisabledValidationChecks |
| 3136 | } |
| 3137 | |
| 3138 | @extension("VK_NVX_device_generated_commands") |
| 3139 | class VkDeviceGeneratedCommandsFeaturesNVX { |
| 3140 | VkStructureType sType |
| 3141 | const void* pNext |
| 3142 | VkBool32 computeBindingPointSupport |
| 3143 | } |
| 3144 | |
| 3145 | @extension("VK_NVX_device_generated_commands") |
| 3146 | class VkDeviceGeneratedCommandsLimitsNVX { |
| 3147 | VkStructureType sType |
| 3148 | const void* pNext |
| 3149 | u32 maxIndirectCommandsLayoutTokenCount |
| 3150 | u32 maxObjectEntryCounts |
| 3151 | u32 minSequenceCountBufferOffsetAlignment |
| 3152 | u32 minSequenceIndexBufferOffsetAlignment |
| 3153 | u32 minCommandsTokenBufferOffsetAlignment |
| 3154 | } |
| 3155 | |
| 3156 | @extension("VK_NVX_device_generated_commands") |
| 3157 | class VkIndirectCommandsTokenNVX { |
| 3158 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3159 | VkBuffer buffer |
| 3160 | VkDeviceSize offset |
| 3161 | } |
| 3162 | |
| 3163 | @extension("VK_NVX_device_generated_commands") |
| 3164 | class VkIndirectCommandsLayoutTokenNVX { |
| 3165 | VkIndirectCommandsTokenTypeNVX tokenType |
| 3166 | u32 bindingUnit |
| 3167 | u32 dynamicCount |
| 3168 | u32 divisor |
| 3169 | } |
| 3170 | |
| 3171 | @extension("VK_NVX_device_generated_commands") |
| 3172 | class VkIndirectCommandsLayoutCreateInfoNVX { |
| 3173 | VkStructureType sType |
| 3174 | const void* pNext |
| 3175 | VkPipelineBindPoint pipelineBindPoint |
| 3176 | VkIndirectCommandsLayoutUsageFlagsNVX flags |
| 3177 | u32 tokenCount |
| 3178 | const VkIndirectCommandsLayoutTokenNVX* pTokens |
| 3179 | } |
| 3180 | |
| 3181 | @extension("VK_NVX_device_generated_commands") |
| 3182 | class VkCmdProcessCommandsInfoNVX { |
| 3183 | VkStructureType sType |
| 3184 | const void* pNext |
| 3185 | VkObjectTableNVX objectTable |
| 3186 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3187 | u32 indirectCommandsTokenCount |
| 3188 | const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens |
| 3189 | u32 maxSequencesCount |
| 3190 | VkCommandBuffer targetCommandBuffer |
| 3191 | VkBuffer sequencesCountBuffer |
| 3192 | VkDeviceSize sequencesCountOffset |
| 3193 | VkBuffer sequencesIndexBuffer |
| 3194 | VkDeviceSize sequencesIndexOffset |
| 3195 | } |
| 3196 | |
| 3197 | @extension("VK_NVX_device_generated_commands") |
| 3198 | class VkCmdReserveSpaceForCommandsInfoNVX { |
| 3199 | VkStructureType sType |
| 3200 | const void* pNext |
| 3201 | VkObjectTableNVX objectTable |
| 3202 | VkIndirectCommandsLayoutNVX indirectCommandsLayout |
| 3203 | u32 maxSequencesCount |
| 3204 | } |
| 3205 | |
| 3206 | @extension("VK_NVX_device_generated_commands") |
| 3207 | class VkObjectTableCreateInfoNVX { |
| 3208 | VkStructureType sType |
| 3209 | const void* pNext |
| 3210 | u32 objectCount |
| 3211 | const VkObjectEntryTypeNVX* pObjectEntryTypes |
| 3212 | const u32* pObjectEntryCounts |
| 3213 | const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags |
| 3214 | u32 maxUniformBuffersPerDescriptor |
| 3215 | u32 maxStorageBuffersPerDescriptor |
| 3216 | u32 maxStorageImagesPerDescriptor |
| 3217 | u32 maxSampledImagesPerDescriptor |
| 3218 | u32 maxPipelineLayouts |
| 3219 | } |
| 3220 | |
| 3221 | @extension("VK_NVX_device_generated_commands") |
| 3222 | class VkObjectTableEntryNVX { |
| 3223 | VkObjectEntryTypeNVX type |
| 3224 | VkObjectEntryUsageFlagsNVX flags |
| 3225 | } |
| 3226 | |
| 3227 | @extension("VK_NVX_device_generated_commands") |
| 3228 | class VkObjectTablePipelineEntryNVX { |
| 3229 | VkObjectEntryTypeNVX type |
| 3230 | VkObjectEntryUsageFlagsNVX flags |
| 3231 | VkPipeline pipeline |
| 3232 | } |
| 3233 | |
| 3234 | @extension("VK_NVX_device_generated_commands") |
| 3235 | class VkObjectTableDescriptorSetEntryNVX { |
| 3236 | VkObjectEntryTypeNVX type |
| 3237 | VkObjectEntryUsageFlagsNVX flags |
| 3238 | VkPipelineLayout pipelineLayout |
| 3239 | VkDescriptorSet descriptorSet |
| 3240 | } |
| 3241 | |
| 3242 | @extension("VK_NVX_device_generated_commands") |
| 3243 | class VkObjectTableVertexBufferEntryNVX { |
| 3244 | VkObjectEntryTypeNVX type |
| 3245 | VkObjectEntryUsageFlagsNVX flags |
| 3246 | VkBuffer buffer |
| 3247 | } |
| 3248 | |
| 3249 | @extension("VK_NVX_device_generated_commands") |
| 3250 | class VkObjectTableIndexBufferEntryNVX { |
| 3251 | VkObjectEntryTypeNVX type |
| 3252 | VkObjectEntryUsageFlagsNVX flags |
| 3253 | VkBuffer buffer |
| 3254 | } |
| 3255 | |
| 3256 | @extension("VK_NVX_device_generated_commands") |
| 3257 | class VkObjectTablePushConstantEntryNVX { |
| 3258 | VkObjectEntryTypeNVX type |
| 3259 | VkObjectEntryUsageFlagsNVX flags |
| 3260 | VkPipelineLayout pipelineLayout |
| 3261 | VkShaderStageFlags stageFlags |
| 3262 | } |
| 3263 | |
| 3264 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 3265 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3266 | //////////////// |
| 3267 | // Commands // |
| 3268 | //////////////// |
| 3269 | |
| 3270 | // Function pointers. TODO: add support for function pointers. |
| 3271 | |
| 3272 | @external type void* PFN_vkVoidFunction |
| 3273 | @pfn cmd void vkVoidFunction() { |
| 3274 | } |
| 3275 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3276 | @external type void* PFN_vkAllocationFunction |
| 3277 | @pfn cmd void* vkAllocationFunction( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3278 | void* pUserData, |
| 3279 | platform.size_t size, |
| 3280 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3281 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3282 | return ? |
| 3283 | } |
| 3284 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3285 | @external type void* PFN_vkReallocationFunction |
| 3286 | @pfn cmd void* vkReallocationFunction( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3287 | void* pUserData, |
| 3288 | void* pOriginal, |
| 3289 | platform.size_t size, |
| 3290 | platform.size_t alignment, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3291 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3292 | return ? |
| 3293 | } |
| 3294 | |
| 3295 | @external type void* PFN_vkFreeFunction |
| 3296 | @pfn cmd void vkFreeFunction( |
| 3297 | void* pUserData, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3298 | void* pMemory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3299 | } |
| 3300 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3301 | @external type void* PFN_vkInternalAllocationNotification |
| 3302 | @pfn cmd void vkInternalAllocationNotification( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3303 | void* pUserData, |
| 3304 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3305 | VkInternalAllocationType allocationType, |
| 3306 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3307 | } |
| 3308 | |
| 3309 | @external type void* PFN_vkInternalFreeNotification |
| 3310 | @pfn cmd void vkInternalFreeNotification( |
| 3311 | void* pUserData, |
| 3312 | platform.size_t size, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3313 | VkInternalAllocationType allocationType, |
| 3314 | VkSystemAllocationScope allocationScope) { |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3315 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3316 | |
| 3317 | // Global functions |
| 3318 | |
| 3319 | @threadSafety("system") |
| 3320 | cmd VkResult vkCreateInstance( |
| 3321 | const VkInstanceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3322 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3323 | VkInstance* pInstance) { |
| 3324 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) |
| 3325 | |
| 3326 | instance := ? |
| 3327 | pInstance[0] = instance |
| 3328 | State.Instances[instance] = new!InstanceObject() |
| 3329 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 3330 | layers := pCreateInfo.ppEnabledLayerNames[0:pCreateInfo.enabledLayerCount] |
| 3331 | extensions := pCreateInfo.ppEnabledExtensionNames[0:pCreateInfo.enabledExtensionCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3332 | |
| 3333 | return ? |
| 3334 | } |
| 3335 | |
| 3336 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3337 | cmd void vkDestroyInstance( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3338 | VkInstance instance, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3339 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3340 | instanceObject := GetInstance(instance) |
| 3341 | |
| 3342 | State.Instances[instance] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3343 | } |
| 3344 | |
| 3345 | @threadSafety("system") |
| 3346 | cmd VkResult vkEnumeratePhysicalDevices( |
| 3347 | VkInstance instance, |
| 3348 | u32* pPhysicalDeviceCount, |
| 3349 | VkPhysicalDevice* pPhysicalDevices) { |
| 3350 | instanceObject := GetInstance(instance) |
| 3351 | |
| 3352 | physicalDeviceCount := as!u32(?) |
| 3353 | pPhysicalDeviceCount[0] = physicalDeviceCount |
| 3354 | physicalDevices := pPhysicalDevices[0:physicalDeviceCount] |
| 3355 | |
| 3356 | for i in (0 .. physicalDeviceCount) { |
| 3357 | physicalDevice := ? |
| 3358 | physicalDevices[i] = physicalDevice |
| 3359 | if !(physicalDevice in State.PhysicalDevices) { |
| 3360 | State.PhysicalDevices[physicalDevice] = new!PhysicalDeviceObject(instance: instance) |
| 3361 | } |
| 3362 | } |
| 3363 | |
| 3364 | return ? |
| 3365 | } |
| 3366 | |
| 3367 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 3368 | VkDevice device, |
| 3369 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3370 | if device != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3371 | device := GetDevice(device) |
| 3372 | } |
| 3373 | |
| 3374 | return ? |
| 3375 | } |
| 3376 | |
| 3377 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 3378 | VkInstance instance, |
| 3379 | const char* pName) { |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3380 | if instance != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3381 | instanceObject := GetInstance(instance) |
| 3382 | } |
| 3383 | |
| 3384 | return ? |
| 3385 | } |
| 3386 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3387 | cmd void vkGetPhysicalDeviceProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3388 | VkPhysicalDevice physicalDevice, |
| 3389 | VkPhysicalDeviceProperties* pProperties) { |
| 3390 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3391 | |
| 3392 | properties := ? |
| 3393 | pProperties[0] = properties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3394 | } |
| 3395 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3396 | cmd void vkGetPhysicalDeviceQueueFamilyProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3397 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3398 | u32* pQueueFamilyPropertyCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3399 | VkQueueFamilyProperties* pQueueFamilyProperties) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3400 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3401 | // TODO: Figure out how to express fetch-count-or-properties |
| 3402 | // This version fails 'apic validate' with 'fence not allowed in |
| 3403 | // *semantic.Branch'. Other attempts have failed with the same or other |
| 3404 | // errors. |
| 3405 | // if pQueueFamilyProperties != null { |
| 3406 | // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 3407 | // for i in (0 .. pCount[0]) { |
| 3408 | // queueProperties := as!VkQueueFamilyProperties(?) |
| 3409 | // queuesProperties[i] = queueProperties |
| 3410 | // } |
| 3411 | // } else { |
| 3412 | // count := ? |
| 3413 | // pCount[0] = count |
| 3414 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3415 | } |
| 3416 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3417 | cmd void vkGetPhysicalDeviceMemoryProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3418 | VkPhysicalDevice physicalDevice, |
| 3419 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 3420 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3421 | |
| 3422 | memoryProperties := ? |
| 3423 | pMemoryProperties[0] = memoryProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3424 | } |
| 3425 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3426 | cmd void vkGetPhysicalDeviceFeatures( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3427 | VkPhysicalDevice physicalDevice, |
| 3428 | VkPhysicalDeviceFeatures* pFeatures) { |
| 3429 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3430 | |
| 3431 | features := ? |
| 3432 | pFeatures[0] = features |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3433 | } |
| 3434 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3435 | cmd void vkGetPhysicalDeviceFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3436 | VkPhysicalDevice physicalDevice, |
| 3437 | VkFormat format, |
| 3438 | VkFormatProperties* pFormatProperties) { |
| 3439 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3440 | |
| 3441 | formatProperties := ? |
| 3442 | pFormatProperties[0] = formatProperties |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3443 | } |
| 3444 | |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3445 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3446 | VkPhysicalDevice physicalDevice, |
| 3447 | VkFormat format, |
| 3448 | VkImageType type, |
| 3449 | VkImageTiling tiling, |
| 3450 | VkImageUsageFlags usage, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3451 | VkImageCreateFlags flags, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3452 | VkImageFormatProperties* pImageFormatProperties) { |
| 3453 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3454 | |
| 3455 | imageFormatProperties := ? |
| 3456 | pImageFormatProperties[0] = imageFormatProperties |
Jesse Hall | a9e5703 | 2015-11-30 01:03:10 -0800 | [diff] [blame] | 3457 | |
| 3458 | return ? |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3459 | } |
| 3460 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3461 | |
| 3462 | // Device functions |
| 3463 | |
| 3464 | @threadSafety("system") |
| 3465 | cmd VkResult vkCreateDevice( |
| 3466 | VkPhysicalDevice physicalDevice, |
| 3467 | const VkDeviceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3468 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3469 | VkDevice* pDevice) { |
| 3470 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO) |
| 3471 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3472 | |
| 3473 | device := ? |
| 3474 | pDevice[0] = device |
| 3475 | State.Devices[device] = new!DeviceObject(physicalDevice: physicalDevice) |
| 3476 | |
| 3477 | return ? |
| 3478 | } |
| 3479 | |
| 3480 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3481 | cmd void vkDestroyDevice( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3482 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3483 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3484 | deviceObject := GetDevice(device) |
| 3485 | |
| 3486 | State.Devices[device] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3487 | } |
| 3488 | |
| 3489 | |
| 3490 | // Extension discovery functions |
| 3491 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3492 | cmd VkResult vkEnumerateInstanceLayerProperties( |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3493 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3494 | VkLayerProperties* pProperties) { |
| 3495 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3496 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3497 | |
| 3498 | properties := pProperties[0:count] |
| 3499 | for i in (0 .. count) { |
| 3500 | property := ? |
| 3501 | properties[i] = property |
| 3502 | } |
| 3503 | |
| 3504 | return ? |
| 3505 | } |
| 3506 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3507 | cmd VkResult vkEnumerateInstanceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3508 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3509 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3510 | VkExtensionProperties* pProperties) { |
| 3511 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3512 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3513 | |
| 3514 | properties := pProperties[0:count] |
| 3515 | for i in (0 .. count) { |
| 3516 | property := ? |
| 3517 | properties[i] = property |
| 3518 | } |
| 3519 | |
| 3520 | return ? |
| 3521 | } |
| 3522 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3523 | cmd VkResult vkEnumerateDeviceLayerProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3524 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3525 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3526 | VkLayerProperties* pProperties) { |
| 3527 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3528 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3529 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3530 | |
| 3531 | properties := pProperties[0:count] |
| 3532 | for i in (0 .. count) { |
| 3533 | property := ? |
| 3534 | properties[i] = property |
| 3535 | } |
| 3536 | |
| 3537 | return ? |
| 3538 | } |
| 3539 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3540 | cmd VkResult vkEnumerateDeviceExtensionProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3541 | VkPhysicalDevice physicalDevice, |
| 3542 | const char* pLayerName, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3543 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3544 | VkExtensionProperties* pProperties) { |
| 3545 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 3546 | |
| 3547 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3548 | pPropertyCount[0] = count |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3549 | |
| 3550 | properties := pProperties[0:count] |
| 3551 | for i in (0 .. count) { |
| 3552 | property := ? |
| 3553 | properties[i] = property |
| 3554 | } |
| 3555 | |
| 3556 | return ? |
| 3557 | } |
| 3558 | |
| 3559 | |
| 3560 | // Queue functions |
| 3561 | |
| 3562 | @threadSafety("system") |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3563 | cmd void vkGetDeviceQueue( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3564 | VkDevice device, |
| 3565 | u32 queueFamilyIndex, |
| 3566 | u32 queueIndex, |
| 3567 | VkQueue* pQueue) { |
| 3568 | deviceObject := GetDevice(device) |
| 3569 | |
| 3570 | queue := ? |
| 3571 | pQueue[0] = queue |
| 3572 | |
| 3573 | if !(queue in State.Queues) { |
| 3574 | State.Queues[queue] = new!QueueObject(device: device) |
| 3575 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3576 | } |
| 3577 | |
| 3578 | @threadSafety("app") |
| 3579 | cmd VkResult vkQueueSubmit( |
| 3580 | VkQueue queue, |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3581 | u32 submitCount, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 3582 | const VkSubmitInfo* pSubmits, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3583 | VkFence fence) { |
| 3584 | queueObject := GetQueue(queue) |
| 3585 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3586 | if fence != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3587 | fenceObject := GetFence(fence) |
| 3588 | assert(fenceObject.device == queueObject.device) |
| 3589 | } |
| 3590 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3591 | // commandBuffers := pcommandBuffers[0:commandBufferCount] |
| 3592 | // for i in (0 .. commandBufferCount) { |
| 3593 | // commandBuffer := commandBuffers[i] |
| 3594 | // commandBufferObject := GetCommandBuffer(commandBuffer) |
| 3595 | // assert(commandBufferObject.device == queueObject.device) |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3596 | // |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3597 | // validate("QueueCheck", commandBufferObject.queueFlags in queueObject.flags, |
| 3598 | // "vkQueueSubmit: enqueued commandBuffer requires missing queue capabilities.") |
Jesse Hall | a366a51 | 2015-11-19 22:30:07 -0800 | [diff] [blame] | 3599 | // } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3600 | |
| 3601 | return ? |
| 3602 | } |
| 3603 | |
| 3604 | @threadSafety("system") |
| 3605 | cmd VkResult vkQueueWaitIdle( |
| 3606 | VkQueue queue) { |
| 3607 | queueObject := GetQueue(queue) |
| 3608 | |
| 3609 | return ? |
| 3610 | } |
| 3611 | |
| 3612 | @threadSafety("system") |
| 3613 | cmd VkResult vkDeviceWaitIdle( |
| 3614 | VkDevice device) { |
| 3615 | deviceObject := GetDevice(device) |
| 3616 | |
| 3617 | return ? |
| 3618 | } |
| 3619 | |
| 3620 | |
| 3621 | // Memory functions |
| 3622 | |
| 3623 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3624 | cmd VkResult vkAllocateMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3625 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3626 | const VkMemoryAllocateInfo* pAllocateInfo, |
| 3627 | const VkAllocationCallbacks* pAllocator, |
| 3628 | VkDeviceMemory* pMemory) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 3629 | assert(pAllocateInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3630 | deviceObject := GetDevice(device) |
| 3631 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3632 | memory := ? |
| 3633 | pMemory[0] = memory |
| 3634 | State.DeviceMemories[memory] = new!DeviceMemoryObject( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3635 | device: device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3636 | allocationSize: pAllocateInfo[0].allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3637 | |
| 3638 | return ? |
| 3639 | } |
| 3640 | |
| 3641 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3642 | cmd void vkFreeMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3643 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3644 | VkDeviceMemory memory, |
| 3645 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3646 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3647 | memoryObject := GetDeviceMemory(memory) |
| 3648 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3649 | |
| 3650 | // Check that no objects are still bound before freeing. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3651 | validate("MemoryCheck", len(memoryObject.boundObjects) == 0, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3652 | "vkFreeMemory: objects still bound") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3653 | validate("MemoryCheck", len(memoryObject.boundCommandBuffers) == 0, |
| 3654 | "vkFreeMemory: commandBuffers still bound") |
| 3655 | State.DeviceMemories[memory] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3656 | } |
| 3657 | |
| 3658 | @threadSafety("app") |
| 3659 | cmd VkResult vkMapMemory( |
| 3660 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3661 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3662 | VkDeviceSize offset, |
| 3663 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3664 | VkMemoryMapFlags flags, |
| 3665 | void** ppData) { |
| 3666 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3667 | memoryObject := GetDeviceMemory(memory) |
| 3668 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3669 | |
| 3670 | assert(flags == as!VkMemoryMapFlags(0)) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3671 | assert((offset + size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3672 | |
| 3673 | return ? |
| 3674 | } |
| 3675 | |
| 3676 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3677 | cmd void vkUnmapMemory( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3678 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3679 | VkDeviceMemory memory) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3680 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3681 | memoryObject := GetDeviceMemory(memory) |
| 3682 | assert(memoryObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3683 | } |
| 3684 | |
| 3685 | cmd VkResult vkFlushMappedMemoryRanges( |
| 3686 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3687 | u32 memoryRangeCount |
| 3688 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3689 | deviceObject := GetDevice(device) |
| 3690 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3691 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3692 | for i in (0 .. memoryRangeCount) { |
| 3693 | memoryRange := memoryRanges[i] |
| 3694 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3695 | assert(memoryObject.device == device) |
| 3696 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3697 | } |
| 3698 | |
| 3699 | return ? |
| 3700 | } |
| 3701 | |
| 3702 | cmd VkResult vkInvalidateMappedMemoryRanges( |
| 3703 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3704 | u32 memoryRangeCount, |
| 3705 | const VkMappedMemoryRange* pMemoryRanges) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3706 | deviceObject := GetDevice(device) |
| 3707 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3708 | memoryRanges := pMemoryRanges[0:memoryRangeCount] |
| 3709 | for i in (0 .. memoryRangeCount) { |
| 3710 | memoryRange := memoryRanges[i] |
| 3711 | memoryObject := GetDeviceMemory(memoryRange.memory) |
| 3712 | assert(memoryObject.device == device) |
| 3713 | assert((memoryRange.offset + memoryRange.size) <= memoryObject.allocationSize) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3714 | } |
| 3715 | |
| 3716 | return ? |
| 3717 | } |
| 3718 | |
| 3719 | |
| 3720 | // Memory management API functions |
| 3721 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3722 | cmd void vkGetDeviceMemoryCommitment( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3723 | VkDevice device, |
| 3724 | VkDeviceMemory memory, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3725 | VkDeviceSize* pCommittedMemoryInBytes) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3726 | deviceObject := GetDevice(device) |
| 3727 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3728 | if memory != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3729 | memoryObject := GetDeviceMemory(memory) |
| 3730 | assert(memoryObject.device == device) |
| 3731 | } |
| 3732 | |
| 3733 | committedMemoryInBytes := ? |
| 3734 | pCommittedMemoryInBytes[0] = committedMemoryInBytes |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3735 | } |
| 3736 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3737 | cmd void vkGetBufferMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3738 | VkDevice device, |
| 3739 | VkBuffer buffer, |
| 3740 | VkMemoryRequirements* pMemoryRequirements) { |
| 3741 | deviceObject := GetDevice(device) |
| 3742 | bufferObject := GetBuffer(buffer) |
| 3743 | assert(bufferObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3744 | } |
| 3745 | |
| 3746 | cmd VkResult vkBindBufferMemory( |
| 3747 | VkDevice device, |
| 3748 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3749 | VkDeviceMemory memory, |
| 3750 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3751 | deviceObject := GetDevice(device) |
| 3752 | bufferObject := GetBuffer(buffer) |
| 3753 | assert(bufferObject.device == device) |
| 3754 | |
| 3755 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3756 | if bufferObject.memory != NULL_HANDLE { |
| 3757 | memoryObject := GetDeviceMemory(bufferObject.memory) |
| 3758 | memoryObject.boundObjects[as!u64(buffer)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3759 | } |
| 3760 | |
| 3761 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3762 | if memory != NULL_HANDLE { |
| 3763 | memoryObject := GetDeviceMemory(memory) |
| 3764 | assert(memoryObject.device == device) |
| 3765 | memoryObject.boundObjects[as!u64(buffer)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3766 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3767 | bufferObject.memory = memory |
| 3768 | bufferObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3769 | |
| 3770 | return ? |
| 3771 | } |
| 3772 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3773 | cmd void vkGetImageMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3774 | VkDevice device, |
| 3775 | VkImage image, |
| 3776 | VkMemoryRequirements* pMemoryRequirements) { |
| 3777 | deviceObject := GetDevice(device) |
| 3778 | imageObject := GetImage(image) |
| 3779 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3780 | } |
| 3781 | |
| 3782 | cmd VkResult vkBindImageMemory( |
| 3783 | VkDevice device, |
| 3784 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3785 | VkDeviceMemory memory, |
| 3786 | VkDeviceSize memoryOffset) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3787 | deviceObject := GetDevice(device) |
| 3788 | imageObject := GetImage(image) |
| 3789 | assert(imageObject.device == device) |
| 3790 | |
| 3791 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3792 | if imageObject.memory != NULL_HANDLE { |
| 3793 | memoryObject := GetDeviceMemory(imageObject.memory) |
| 3794 | memoryObject.boundObjects[as!u64(image)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3795 | } |
| 3796 | |
| 3797 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3798 | if memory != NULL_HANDLE { |
| 3799 | memoryObject := GetDeviceMemory(memory) |
| 3800 | assert(memoryObject.device == device) |
| 3801 | memoryObject.boundObjects[as!u64(image)] = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3802 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3803 | imageObject.memory = memory |
| 3804 | imageObject.memoryOffset = memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3805 | |
| 3806 | return ? |
| 3807 | } |
| 3808 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3809 | cmd void vkGetImageSparseMemoryRequirements( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3810 | VkDevice device, |
| 3811 | VkImage image, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3812 | u32* pSparseMemoryRequirementCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3813 | VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 3814 | deviceObject := GetDevice(device) |
| 3815 | imageObject := GetImage(image) |
| 3816 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3817 | } |
| 3818 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 3819 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3820 | VkPhysicalDevice physicalDevice, |
| 3821 | VkFormat format, |
| 3822 | VkImageType type, |
Jesse Hall | 091ed9e | 2015-11-30 00:55:29 -0800 | [diff] [blame] | 3823 | VkSampleCountFlagBits samples, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3824 | VkImageUsageFlags usage, |
| 3825 | VkImageTiling tiling, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3826 | u32* pPropertyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3827 | VkSparseImageFormatProperties* pProperties) { |
| 3828 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3829 | } |
| 3830 | |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3831 | cmd VkResult vkQueueBindSparse( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3832 | VkQueue queue, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3833 | u32 bindInfoCount, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 3834 | const VkBindSparseInfo* pBindInfo, |
| 3835 | VkFence fence) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3836 | queueObject := GetQueue(queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3837 | |
| 3838 | return ? |
| 3839 | } |
| 3840 | |
| 3841 | |
| 3842 | // Fence functions |
| 3843 | |
| 3844 | @threadSafety("system") |
| 3845 | cmd VkResult vkCreateFence( |
| 3846 | VkDevice device, |
| 3847 | const VkFenceCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3848 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3849 | VkFence* pFence) { |
| 3850 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO) |
| 3851 | deviceObject := GetDevice(device) |
| 3852 | |
| 3853 | fence := ? |
| 3854 | pFence[0] = fence |
| 3855 | State.Fences[fence] = new!FenceObject( |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 3856 | device: device, signaled: (pCreateInfo.flags == as!VkFenceCreateFlags(VK_FENCE_CREATE_SIGNALED_BIT))) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3857 | |
| 3858 | return ? |
| 3859 | } |
| 3860 | |
| 3861 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3862 | cmd void vkDestroyFence( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3863 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3864 | VkFence fence, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3865 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3866 | deviceObject := GetDevice(device) |
| 3867 | fenceObject := GetFence(fence) |
| 3868 | assert(fenceObject.device == device) |
| 3869 | |
| 3870 | State.Fences[fence] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3871 | } |
| 3872 | |
| 3873 | @threadSafety("system") |
| 3874 | cmd VkResult vkResetFences( |
| 3875 | VkDevice device, |
| 3876 | u32 fenceCount, |
| 3877 | const VkFence* pFences) { |
| 3878 | deviceObject := GetDevice(device) |
| 3879 | |
| 3880 | fences := pFences[0:fenceCount] |
| 3881 | for i in (0 .. fenceCount) { |
| 3882 | fence := fences[i] |
| 3883 | fenceObject := GetFence(fence) |
| 3884 | assert(fenceObject.device == device) |
| 3885 | fenceObject.signaled = false |
| 3886 | } |
| 3887 | |
| 3888 | return ? |
| 3889 | } |
| 3890 | |
| 3891 | @threadSafety("system") |
| 3892 | cmd VkResult vkGetFenceStatus( |
| 3893 | VkDevice device, |
| 3894 | VkFence fence) { |
| 3895 | deviceObject := GetDevice(device) |
| 3896 | fenceObject := GetFence(fence) |
| 3897 | assert(fenceObject.device == device) |
| 3898 | |
| 3899 | return ? |
| 3900 | } |
| 3901 | |
| 3902 | @threadSafety("system") |
| 3903 | cmd VkResult vkWaitForFences( |
| 3904 | VkDevice device, |
| 3905 | u32 fenceCount, |
| 3906 | const VkFence* pFences, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3907 | VkBool32 waitAll, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3908 | u64 timeout) { /// timeout in nanoseconds |
| 3909 | deviceObject := GetDevice(device) |
| 3910 | |
| 3911 | fences := pFences[0:fenceCount] |
| 3912 | for i in (0 .. fenceCount) { |
| 3913 | fence := fences[i] |
| 3914 | fenceObject := GetFence(fence) |
| 3915 | assert(fenceObject.device == device) |
| 3916 | } |
| 3917 | |
| 3918 | return ? |
| 3919 | } |
| 3920 | |
| 3921 | |
| 3922 | // Queue semaphore functions |
| 3923 | |
| 3924 | @threadSafety("system") |
| 3925 | cmd VkResult vkCreateSemaphore( |
| 3926 | VkDevice device, |
| 3927 | const VkSemaphoreCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3928 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3929 | VkSemaphore* pSemaphore) { |
| 3930 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO) |
| 3931 | deviceObject := GetDevice(device) |
| 3932 | |
| 3933 | semaphore := ? |
| 3934 | pSemaphore[0] = semaphore |
| 3935 | State.Semaphores[semaphore] = new!SemaphoreObject(device: device) |
| 3936 | |
| 3937 | return ? |
| 3938 | } |
| 3939 | |
| 3940 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3941 | cmd void vkDestroySemaphore( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3942 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3943 | VkSemaphore semaphore, |
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 | deviceObject := GetDevice(device) |
| 3946 | semaphoreObject := GetSemaphore(semaphore) |
| 3947 | assert(semaphoreObject.device == device) |
| 3948 | |
| 3949 | State.Semaphores[semaphore] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3950 | } |
| 3951 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3952 | |
| 3953 | // Event functions |
| 3954 | |
| 3955 | @threadSafety("system") |
| 3956 | cmd VkResult vkCreateEvent( |
| 3957 | VkDevice device, |
| 3958 | const VkEventCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3959 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3960 | VkEvent* pEvent) { |
| 3961 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO) |
| 3962 | deviceObject := GetDevice(device) |
| 3963 | |
| 3964 | event := ? |
| 3965 | pEvent[0] = event |
| 3966 | State.Events[event] = new!EventObject(device: device) |
| 3967 | |
| 3968 | return ? |
| 3969 | } |
| 3970 | |
| 3971 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 3972 | cmd void vkDestroyEvent( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3973 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 3974 | VkEvent event, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 3975 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3976 | deviceObject := GetDevice(device) |
| 3977 | eventObject := GetEvent(event) |
| 3978 | assert(eventObject.device == device) |
| 3979 | |
| 3980 | State.Events[event] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 3981 | } |
| 3982 | |
| 3983 | @threadSafety("system") |
| 3984 | cmd VkResult vkGetEventStatus( |
| 3985 | VkDevice device, |
| 3986 | VkEvent event) { |
| 3987 | deviceObject := GetDevice(device) |
| 3988 | eventObject := GetEvent(event) |
| 3989 | assert(eventObject.device == device) |
| 3990 | |
| 3991 | return ? |
| 3992 | } |
| 3993 | |
| 3994 | @threadSafety("system") |
| 3995 | cmd VkResult vkSetEvent( |
| 3996 | VkDevice device, |
| 3997 | VkEvent event) { |
| 3998 | deviceObject := GetDevice(device) |
| 3999 | eventObject := GetEvent(event) |
| 4000 | assert(eventObject.device == device) |
| 4001 | |
| 4002 | return ? |
| 4003 | } |
| 4004 | |
| 4005 | @threadSafety("system") |
| 4006 | cmd VkResult vkResetEvent( |
| 4007 | VkDevice device, |
| 4008 | VkEvent event) { |
| 4009 | deviceObject := GetDevice(device) |
| 4010 | eventObject := GetEvent(event) |
| 4011 | assert(eventObject.device == device) |
| 4012 | |
| 4013 | return ? |
| 4014 | } |
| 4015 | |
| 4016 | |
| 4017 | // Query functions |
| 4018 | |
| 4019 | @threadSafety("system") |
| 4020 | cmd VkResult vkCreateQueryPool( |
| 4021 | VkDevice device, |
| 4022 | const VkQueryPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4023 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4024 | VkQueryPool* pQueryPool) { |
| 4025 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO) |
| 4026 | deviceObject := GetDevice(device) |
| 4027 | |
| 4028 | queryPool := ? |
| 4029 | pQueryPool[0] = queryPool |
| 4030 | State.QueryPools[queryPool] = new!QueryPoolObject(device: device) |
| 4031 | |
| 4032 | return ? |
| 4033 | } |
| 4034 | |
| 4035 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4036 | cmd void vkDestroyQueryPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4037 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4038 | VkQueryPool queryPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4039 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4040 | deviceObject := GetDevice(device) |
| 4041 | queryPoolObject := GetQueryPool(queryPool) |
| 4042 | assert(queryPoolObject.device == device) |
| 4043 | |
| 4044 | State.QueryPools[queryPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4045 | } |
| 4046 | |
| 4047 | @threadSafety("system") |
| 4048 | cmd VkResult vkGetQueryPoolResults( |
| 4049 | VkDevice device, |
| 4050 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4051 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4052 | u32 queryCount, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4053 | platform.size_t dataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4054 | void* pData, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4055 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4056 | VkQueryResultFlags flags) { |
| 4057 | deviceObject := GetDevice(device) |
| 4058 | queryPoolObject := GetQueryPool(queryPool) |
| 4059 | assert(queryPoolObject.device == device) |
| 4060 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4061 | data := pData[0:dataSize] |
| 4062 | |
| 4063 | return ? |
| 4064 | } |
| 4065 | |
| 4066 | // Buffer functions |
| 4067 | |
| 4068 | @threadSafety("system") |
| 4069 | cmd VkResult vkCreateBuffer( |
| 4070 | VkDevice device, |
| 4071 | const VkBufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4072 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4073 | VkBuffer* pBuffer) { |
| 4074 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) |
| 4075 | deviceObject := GetDevice(device) |
| 4076 | |
| 4077 | buffer := ? |
| 4078 | pBuffer[0] = buffer |
| 4079 | State.Buffers[buffer] = new!BufferObject(device: device) |
| 4080 | |
| 4081 | return ? |
| 4082 | } |
| 4083 | |
| 4084 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4085 | cmd void vkDestroyBuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4086 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4087 | VkBuffer buffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4088 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4089 | deviceObject := GetDevice(device) |
| 4090 | bufferObject := GetBuffer(buffer) |
| 4091 | assert(bufferObject.device == device) |
| 4092 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4093 | assert(bufferObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4094 | State.Buffers[buffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4095 | } |
| 4096 | |
| 4097 | |
| 4098 | // Buffer view functions |
| 4099 | |
| 4100 | @threadSafety("system") |
| 4101 | cmd VkResult vkCreateBufferView( |
| 4102 | VkDevice device, |
| 4103 | const VkBufferViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4104 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4105 | VkBufferView* pView) { |
| 4106 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO) |
| 4107 | deviceObject := GetDevice(device) |
| 4108 | |
| 4109 | bufferObject := GetBuffer(pCreateInfo.buffer) |
| 4110 | assert(bufferObject.device == device) |
| 4111 | |
| 4112 | view := ? |
| 4113 | pView[0] = view |
| 4114 | State.BufferViews[view] = new!BufferViewObject(device: device, buffer: pCreateInfo.buffer) |
| 4115 | |
| 4116 | return ? |
| 4117 | } |
| 4118 | |
| 4119 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4120 | cmd void vkDestroyBufferView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4121 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4122 | VkBufferView bufferView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4123 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4124 | deviceObject := GetDevice(device) |
| 4125 | bufferViewObject := GetBufferView(bufferView) |
| 4126 | assert(bufferViewObject.device == device) |
| 4127 | |
| 4128 | State.BufferViews[bufferView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4129 | } |
| 4130 | |
| 4131 | |
| 4132 | // Image functions |
| 4133 | |
| 4134 | @threadSafety("system") |
| 4135 | cmd VkResult vkCreateImage( |
| 4136 | VkDevice device, |
| 4137 | const VkImageCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4138 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4139 | VkImage* pImage) { |
| 4140 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO) |
| 4141 | deviceObject := GetDevice(device) |
| 4142 | |
| 4143 | image := ? |
| 4144 | pImage[0] = image |
| 4145 | State.Images[image] = new!ImageObject(device: device) |
| 4146 | |
| 4147 | return ? |
| 4148 | } |
| 4149 | |
| 4150 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4151 | cmd void vkDestroyImage( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4152 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4153 | VkImage image, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4154 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4155 | deviceObject := GetDevice(device) |
| 4156 | imageObject := GetImage(image) |
| 4157 | assert(imageObject.device == device) |
| 4158 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4159 | assert(imageObject.memory == 0) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4160 | State.Images[image] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4161 | } |
| 4162 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4163 | cmd void vkGetImageSubresourceLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4164 | VkDevice device, |
| 4165 | VkImage image, |
| 4166 | const VkImageSubresource* pSubresource, |
| 4167 | VkSubresourceLayout* pLayout) { |
| 4168 | deviceObject := GetDevice(device) |
| 4169 | imageObject := GetImage(image) |
| 4170 | assert(imageObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4171 | } |
| 4172 | |
| 4173 | |
| 4174 | // Image view functions |
| 4175 | |
| 4176 | @threadSafety("system") |
| 4177 | cmd VkResult vkCreateImageView( |
| 4178 | VkDevice device, |
| 4179 | const VkImageViewCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4180 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4181 | VkImageView* pView) { |
| 4182 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO) |
| 4183 | deviceObject := GetDevice(device) |
| 4184 | |
| 4185 | imageObject := GetImage(pCreateInfo.image) |
| 4186 | assert(imageObject.device == device) |
| 4187 | |
| 4188 | view := ? |
| 4189 | pView[0] = view |
| 4190 | State.ImageViews[view] = new!ImageViewObject(device: device, image: pCreateInfo.image) |
| 4191 | |
| 4192 | return ? |
| 4193 | } |
| 4194 | |
| 4195 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4196 | cmd void vkDestroyImageView( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4197 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4198 | VkImageView imageView, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4199 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4200 | deviceObject := GetDevice(device) |
| 4201 | imageViewObject := GetImageView(imageView) |
| 4202 | assert(imageViewObject.device == device) |
| 4203 | |
| 4204 | State.ImageViews[imageView] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4205 | } |
| 4206 | |
| 4207 | |
| 4208 | // Shader functions |
| 4209 | |
| 4210 | cmd VkResult vkCreateShaderModule( |
| 4211 | VkDevice device, |
| 4212 | const VkShaderModuleCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4213 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4214 | VkShaderModule* pShaderModule) { |
| 4215 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO) |
| 4216 | deviceObject := GetDevice(device) |
| 4217 | |
| 4218 | shaderModule := ? |
| 4219 | pShaderModule[0] = shaderModule |
| 4220 | State.ShaderModules[shaderModule] = new!ShaderModuleObject(device: device) |
| 4221 | |
| 4222 | return ? |
| 4223 | } |
| 4224 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4225 | cmd void vkDestroyShaderModule( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4226 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4227 | VkShaderModule shaderModule, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4228 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4229 | deviceObject := GetDevice(device) |
| 4230 | shaderModuleObject := GetShaderModule(shaderModule) |
| 4231 | assert(shaderModuleObject.device == device) |
| 4232 | |
| 4233 | State.ShaderModules[shaderModule] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4234 | } |
| 4235 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4236 | |
| 4237 | // Pipeline functions |
| 4238 | |
| 4239 | cmd VkResult vkCreatePipelineCache( |
| 4240 | VkDevice device, |
| 4241 | const VkPipelineCacheCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4242 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4243 | VkPipelineCache* pPipelineCache) { |
| 4244 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO) |
| 4245 | deviceObject := GetDevice(device) |
| 4246 | |
| 4247 | pipelineCache := ? |
| 4248 | pPipelineCache[0] = pipelineCache |
| 4249 | State.PipelineCaches[pipelineCache] = new!PipelineCacheObject(device: device) |
| 4250 | |
| 4251 | return ? |
| 4252 | } |
| 4253 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4254 | cmd void vkDestroyPipelineCache( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4255 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4256 | VkPipelineCache pipelineCache, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4257 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4258 | deviceObject := GetDevice(device) |
| 4259 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4260 | assert(pipelineCacheObject.device == device) |
| 4261 | |
| 4262 | State.PipelineCaches[pipelineCache] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4263 | } |
| 4264 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4265 | cmd VkResult vkGetPipelineCacheData( |
| 4266 | VkDevice device, |
| 4267 | VkPipelineCache pipelineCache, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4268 | platform.size_t* pDataSize, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4269 | void* pData) { |
| 4270 | deviceObject := GetDevice(device) |
| 4271 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4272 | assert(pipelineCacheObject.device == device) |
| 4273 | |
| 4274 | return ? |
| 4275 | } |
| 4276 | |
| 4277 | cmd VkResult vkMergePipelineCaches( |
| 4278 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4279 | VkPipelineCache dstCache, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4280 | u32 srcCacheCount, |
| 4281 | const VkPipelineCache* pSrcCaches) { |
| 4282 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4283 | dstCacheObject := GetPipelineCache(dstCache) |
| 4284 | assert(dstCacheObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4285 | |
| 4286 | srcCaches := pSrcCaches[0:srcCacheCount] |
| 4287 | for i in (0 .. srcCacheCount) { |
| 4288 | srcCache := srcCaches[i] |
| 4289 | srcCacheObject := GetPipelineCache(srcCache) |
| 4290 | assert(srcCacheObject.device == device) |
| 4291 | } |
| 4292 | |
| 4293 | return ? |
| 4294 | } |
| 4295 | |
| 4296 | cmd VkResult vkCreateGraphicsPipelines( |
| 4297 | VkDevice device, |
| 4298 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4299 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4300 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4301 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4302 | VkPipeline* pPipelines) { |
| 4303 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4304 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4305 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4306 | assert(pipelineCacheObject.device == device) |
| 4307 | } |
| 4308 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4309 | createInfos := pCreateInfos[0:createInfoCount] |
| 4310 | pipelines := pPipelines[0:createInfoCount] |
| 4311 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4312 | pipeline := ? |
| 4313 | pipelines[i] = pipeline |
| 4314 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4315 | } |
| 4316 | |
| 4317 | return ? |
| 4318 | } |
| 4319 | |
| 4320 | cmd VkResult vkCreateComputePipelines( |
| 4321 | VkDevice device, |
| 4322 | VkPipelineCache pipelineCache, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4323 | u32 createInfoCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4324 | const VkComputePipelineCreateInfo* pCreateInfos, |
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 | VkPipeline* pPipelines) { |
| 4327 | deviceObject := GetDevice(device) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4328 | if pipelineCache != NULL_HANDLE { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4329 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 4330 | assert(pipelineCacheObject.device == device) |
| 4331 | } |
| 4332 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4333 | createInfos := pCreateInfos[0:createInfoCount] |
| 4334 | pipelines := pPipelines[0:createInfoCount] |
| 4335 | for i in (0 .. createInfoCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4336 | pipeline := ? |
| 4337 | pipelines[i] = pipeline |
| 4338 | State.Pipelines[pipeline] = new!PipelineObject(device: device) |
| 4339 | } |
| 4340 | |
| 4341 | return ? |
| 4342 | } |
| 4343 | |
| 4344 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4345 | cmd void vkDestroyPipeline( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4346 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4347 | VkPipeline pipeline, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4348 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4349 | deviceObject := GetDevice(device) |
| 4350 | pipelineObjects := GetPipeline(pipeline) |
| 4351 | assert(pipelineObjects.device == device) |
| 4352 | |
| 4353 | State.Pipelines[pipeline] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4354 | } |
| 4355 | |
| 4356 | |
| 4357 | // Pipeline layout functions |
| 4358 | |
| 4359 | @threadSafety("system") |
| 4360 | cmd VkResult vkCreatePipelineLayout( |
| 4361 | VkDevice device, |
| 4362 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4363 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4364 | VkPipelineLayout* pPipelineLayout) { |
| 4365 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO) |
| 4366 | deviceObject := GetDevice(device) |
| 4367 | |
| 4368 | pipelineLayout := ? |
| 4369 | pPipelineLayout[0] = pipelineLayout |
| 4370 | State.PipelineLayouts[pipelineLayout] = new!PipelineLayoutObject(device: device) |
| 4371 | |
| 4372 | return ? |
| 4373 | } |
| 4374 | |
| 4375 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4376 | cmd void vkDestroyPipelineLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4377 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4378 | VkPipelineLayout pipelineLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4379 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4380 | deviceObject := GetDevice(device) |
| 4381 | pipelineLayoutObjects := GetPipelineLayout(pipelineLayout) |
| 4382 | assert(pipelineLayoutObjects.device == device) |
| 4383 | |
| 4384 | State.PipelineLayouts[pipelineLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4385 | } |
| 4386 | |
| 4387 | |
| 4388 | // Sampler functions |
| 4389 | |
| 4390 | @threadSafety("system") |
| 4391 | cmd VkResult vkCreateSampler( |
| 4392 | VkDevice device, |
| 4393 | const VkSamplerCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4394 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4395 | VkSampler* pSampler) { |
| 4396 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO) |
| 4397 | deviceObject := GetDevice(device) |
| 4398 | |
| 4399 | sampler := ? |
| 4400 | pSampler[0] = sampler |
| 4401 | State.Samplers[sampler] = new!SamplerObject(device: device) |
| 4402 | |
| 4403 | return ? |
| 4404 | } |
| 4405 | |
| 4406 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4407 | cmd void vkDestroySampler( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4408 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4409 | VkSampler sampler, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4410 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4411 | deviceObject := GetDevice(device) |
| 4412 | samplerObject := GetSampler(sampler) |
| 4413 | assert(samplerObject.device == device) |
| 4414 | |
| 4415 | State.Samplers[sampler] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4416 | } |
| 4417 | |
| 4418 | |
| 4419 | // Descriptor set functions |
| 4420 | |
| 4421 | @threadSafety("system") |
| 4422 | cmd VkResult vkCreateDescriptorSetLayout( |
| 4423 | VkDevice device, |
| 4424 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4425 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4426 | VkDescriptorSetLayout* pSetLayout) { |
| 4427 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO) |
| 4428 | deviceObject := GetDevice(device) |
| 4429 | |
| 4430 | setLayout := ? |
| 4431 | pSetLayout[0] = setLayout |
| 4432 | State.DescriptorSetLayouts[setLayout] = new!DescriptorSetLayoutObject(device: device) |
| 4433 | |
| 4434 | return ? |
| 4435 | } |
| 4436 | |
| 4437 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4438 | cmd void vkDestroyDescriptorSetLayout( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4439 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4440 | VkDescriptorSetLayout descriptorSetLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4441 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4442 | deviceObject := GetDevice(device) |
| 4443 | descriptorSetLayoutObject := GetDescriptorSetLayout(descriptorSetLayout) |
| 4444 | assert(descriptorSetLayoutObject.device == device) |
| 4445 | |
| 4446 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4447 | } |
| 4448 | |
| 4449 | @threadSafety("system") |
| 4450 | cmd VkResult vkCreateDescriptorPool( |
| 4451 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4452 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4453 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4454 | VkDescriptorPool* pDescriptorPool) { |
| 4455 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 4456 | deviceObject := GetDevice(device) |
| 4457 | |
| 4458 | descriptorPool := ? |
| 4459 | pDescriptorPool[0] = descriptorPool |
| 4460 | State.DescriptorPools[descriptorPool] = new!DescriptorPoolObject(device: device) |
| 4461 | |
| 4462 | return ? |
| 4463 | } |
| 4464 | |
| 4465 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4466 | cmd void vkDestroyDescriptorPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4467 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4468 | VkDescriptorPool descriptorPool, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4469 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4470 | deviceObject := GetDevice(device) |
| 4471 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4472 | assert(descriptorPoolObject.device == device) |
| 4473 | |
| 4474 | State.DescriptorPools[descriptorPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4475 | } |
| 4476 | |
| 4477 | @threadSafety("app") |
| 4478 | cmd VkResult vkResetDescriptorPool( |
| 4479 | VkDevice device, |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4480 | VkDescriptorPool descriptorPool, |
| 4481 | VkDescriptorPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4482 | deviceObject := GetDevice(device) |
| 4483 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4484 | assert(descriptorPoolObject.device == device) |
| 4485 | |
| 4486 | return ? |
| 4487 | } |
| 4488 | |
| 4489 | @threadSafety("app") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4490 | cmd VkResult vkAllocateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4491 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4492 | const VkDescriptorSetAllocateInfo* pAllocateInfo, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4493 | VkDescriptorSet* pDescriptorSets) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4494 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4495 | allocInfo := pAllocateInfo[0] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4496 | descriptorPoolObject := GetDescriptorPool(allocInfo.descriptorPool) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4497 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4498 | setLayouts := allocInfo.pSetLayouts[0:allocInfo.setCount] |
| 4499 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4500 | setLayout := setLayouts[i] |
| 4501 | setLayoutObject := GetDescriptorSetLayout(setLayout) |
| 4502 | assert(setLayoutObject.device == device) |
| 4503 | } |
| 4504 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4505 | descriptorSets := pDescriptorSets[0:allocInfo.setCount] |
| 4506 | for i in (0 .. allocInfo.setCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4507 | descriptorSet := ? |
| 4508 | descriptorSets[i] = descriptorSet |
| 4509 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 4510 | } |
| 4511 | |
| 4512 | return ? |
| 4513 | } |
| 4514 | |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4515 | cmd VkResult vkFreeDescriptorSets( |
| 4516 | VkDevice device, |
| 4517 | VkDescriptorPool descriptorPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4518 | u32 descriptorSetCount, |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4519 | const VkDescriptorSet* pDescriptorSets) { |
| 4520 | deviceObject := GetDevice(device) |
| 4521 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 4522 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4523 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4524 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 4525 | descriptorSet := descriptorSets[i] |
| 4526 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
| 4527 | assert(descriptorSetObject.device == device) |
| 4528 | State.DescriptorSets[descriptorSet] = null |
| 4529 | } |
| 4530 | |
| 4531 | return ? |
| 4532 | } |
| 4533 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4534 | cmd void vkUpdateDescriptorSets( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4535 | VkDevice device, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4536 | u32 descriptorWriteCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4537 | const VkWriteDescriptorSet* pDescriptorWrites, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4538 | u32 descriptorCopyCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4539 | const VkCopyDescriptorSet* pDescriptorCopies) { |
| 4540 | deviceObject := GetDevice(device) |
| 4541 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4542 | descriptorWrites := pDescriptorWrites[0:descriptorWriteCount] |
| 4543 | for i in (0 .. descriptorWriteCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4544 | descriptorWrite := descriptorWrites[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4545 | descriptorWriteObject := GetDescriptorSet(descriptorWrite.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4546 | assert(descriptorWriteObject.device == device) |
| 4547 | } |
| 4548 | |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4549 | descriptorCopies := pDescriptorCopies[0:descriptorCopyCount] |
| 4550 | for i in (0 .. descriptorCopyCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4551 | descriptorCopy := descriptorCopies[i] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4552 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.dstSet) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4553 | assert(descriptorCopyObject.device == device) |
| 4554 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4555 | } |
| 4556 | |
| 4557 | |
| 4558 | // Framebuffer functions |
| 4559 | |
| 4560 | @threadSafety("system") |
| 4561 | cmd VkResult vkCreateFramebuffer( |
| 4562 | VkDevice device, |
| 4563 | const VkFramebufferCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4564 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4565 | VkFramebuffer* pFramebuffer) { |
| 4566 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO) |
| 4567 | deviceObject := GetDevice(device) |
| 4568 | |
| 4569 | framebuffer := ? |
| 4570 | pFramebuffer[0] = framebuffer |
| 4571 | State.Framebuffers[framebuffer] = new!FramebufferObject(device: device) |
| 4572 | |
| 4573 | return ? |
| 4574 | } |
| 4575 | |
| 4576 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4577 | cmd void vkDestroyFramebuffer( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4578 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4579 | VkFramebuffer framebuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4580 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4581 | deviceObject := GetDevice(device) |
| 4582 | framebufferObject := GetFramebuffer(framebuffer) |
| 4583 | assert(framebufferObject.device == device) |
| 4584 | |
| 4585 | State.Framebuffers[framebuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4586 | } |
| 4587 | |
| 4588 | |
| 4589 | // Renderpass functions |
| 4590 | |
| 4591 | @threadSafety("system") |
| 4592 | cmd VkResult vkCreateRenderPass( |
| 4593 | VkDevice device, |
| 4594 | const VkRenderPassCreateInfo* pCreateInfo, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4595 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4596 | VkRenderPass* pRenderPass) { |
| 4597 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO) |
| 4598 | deviceObject := GetDevice(device) |
| 4599 | |
| 4600 | renderpass := ? |
| 4601 | pRenderPass[0] = renderpass |
| 4602 | State.RenderPasses[renderpass] = new!RenderPassObject(device: device) |
| 4603 | |
| 4604 | return ? |
| 4605 | } |
| 4606 | |
| 4607 | @threadSafety("system") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4608 | cmd void vkDestroyRenderPass( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4609 | VkDevice device, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4610 | VkRenderPass renderPass, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4611 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4612 | deviceObject := GetDevice(device) |
| 4613 | renderPassObject := GetRenderPass(renderPass) |
| 4614 | assert(renderPassObject.device == device) |
| 4615 | |
| 4616 | State.RenderPasses[renderPass] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4617 | } |
| 4618 | |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 4619 | cmd void vkGetRenderAreaGranularity( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4620 | VkDevice device, |
| 4621 | VkRenderPass renderPass, |
| 4622 | VkExtent2D* pGranularity) { |
| 4623 | deviceObject := GetDevice(device) |
| 4624 | renderPassObject := GetRenderPass(renderPass) |
| 4625 | |
| 4626 | granularity := ? |
| 4627 | pGranularity[0] = granularity |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4628 | } |
| 4629 | |
| 4630 | // Command pool functions |
| 4631 | |
| 4632 | cmd VkResult vkCreateCommandPool( |
| 4633 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4634 | const VkCommandPoolCreateInfo* pCreateInfo, |
| 4635 | const VkAllocationCallbacks* pAllocator, |
| 4636 | VkCommandPool* pCommandPool) { |
| 4637 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4638 | deviceObject := GetDevice(device) |
| 4639 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4640 | commandPool := ? |
| 4641 | pCommandPool[0] = commandPool |
| 4642 | State.CommandPools[commandPool] = new!CommandPoolObject(device: device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4643 | |
| 4644 | return ? |
| 4645 | } |
| 4646 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4647 | cmd void vkDestroyCommandPool( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4648 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4649 | VkCommandPool commandPool, |
| 4650 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4651 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4652 | commandPoolObject := GetCommandPool(commandPool) |
| 4653 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4654 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4655 | State.CommandPools[commandPool] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4656 | } |
| 4657 | |
| 4658 | cmd VkResult vkResetCommandPool( |
| 4659 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4660 | VkCommandPool commandPool, |
| 4661 | VkCommandPoolResetFlags flags) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4662 | deviceObject := GetDevice(device) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4663 | commandPoolObject := GetCommandPool(commandPool) |
| 4664 | assert(commandPoolObject.device == device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4665 | |
| 4666 | return ? |
| 4667 | } |
| 4668 | |
| 4669 | // Command buffer functions |
| 4670 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4671 | macro void bindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4672 | memoryObject := GetDeviceMemory(memory) |
| 4673 | memoryObject.boundCommandBuffers[commandBuffer] = commandBuffer |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4674 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4675 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4676 | commandBufferObject.boundObjects[as!u64(obj)] = memory |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4677 | } |
| 4678 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4679 | macro void unbindCommandBuffer(VkCommandBuffer commandBuffer, any obj, VkDeviceMemory memory) { |
| 4680 | memoryObject := GetDeviceMemory(memory) |
| 4681 | memoryObject.boundCommandBuffers[commandBuffer] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4682 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4683 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4684 | commandBufferObject.boundObjects[as!u64(obj)] = null |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4685 | } |
| 4686 | |
| 4687 | @threadSafety("system") |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4688 | cmd VkResult vkAllocateCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4689 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4690 | const VkCommandBufferAllocateInfo* pAllocateInfo, |
| 4691 | VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 4692 | assert(pAllocateInfo[0].sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4693 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 4694 | count := pAllocateInfo[0].commandBufferCount |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4695 | commandBuffers := pCommandBuffers[0:count] |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4696 | for i in (0 .. count) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4697 | commandBuffer := ? |
| 4698 | commandBuffers[i] = commandBuffer |
| 4699 | State.CommandBuffers[commandBuffer] = new!CommandBufferObject(device: device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4700 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4701 | |
| 4702 | return ? |
| 4703 | } |
| 4704 | |
| 4705 | @threadSafety("system") |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4706 | cmd void vkFreeCommandBuffers( |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4707 | VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4708 | VkCommandPool commandPool, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4709 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4710 | const VkCommandBuffer* pCommandBuffers) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4711 | deviceObject := GetDevice(device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4712 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4713 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4714 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4715 | commandBufferObject := GetCommandBuffer(commandBuffers[i]) |
| 4716 | assert(commandBufferObject.device == device) |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4717 | // TODO: iterate over boundObjects and clear memory bindings |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4718 | State.CommandBuffers[commandBuffers[i]] = null |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 4719 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4720 | } |
| 4721 | |
| 4722 | @threadSafety("app") |
| 4723 | cmd VkResult vkBeginCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4724 | VkCommandBuffer commandBuffer, |
| 4725 | const VkCommandBufferBeginInfo* pBeginInfo) { |
| 4726 | assert(pBeginInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO) |
| 4727 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4728 | |
| 4729 | // TODO: iterate over boundObjects and clear memory bindings |
| 4730 | |
| 4731 | return ? |
| 4732 | } |
| 4733 | |
| 4734 | @threadSafety("app") |
| 4735 | cmd VkResult vkEndCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4736 | VkCommandBuffer commandBuffer) { |
| 4737 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4738 | |
| 4739 | return ? |
| 4740 | } |
| 4741 | |
| 4742 | @threadSafety("app") |
| 4743 | cmd VkResult vkResetCommandBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4744 | VkCommandBuffer commandBuffer, |
| 4745 | VkCommandBufferResetFlags flags) { |
| 4746 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4747 | |
| 4748 | // TODO: iterate over boundObjects and clear memory bindings |
| 4749 | |
| 4750 | return ? |
| 4751 | } |
| 4752 | |
| 4753 | |
| 4754 | // Command buffer building functions |
| 4755 | |
| 4756 | @threadSafety("app") |
| 4757 | cmd void vkCmdBindPipeline( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4758 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4759 | VkPipelineBindPoint pipelineBindPoint, |
| 4760 | VkPipeline pipeline) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4761 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4762 | pipelineObject := GetPipeline(pipeline) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4763 | assert(commandBufferObject.device == pipelineObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4764 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4765 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4766 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4767 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4768 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4769 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4770 | } |
| 4771 | |
| 4772 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4773 | cmd void vkCmdSetViewport( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4774 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4775 | u32 firstViewport, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4776 | u32 viewportCount, |
| 4777 | const VkViewport* pViewports) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4778 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4779 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4780 | } |
| 4781 | |
| 4782 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4783 | cmd void vkCmdSetScissor( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4784 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4785 | u32 firstScissor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4786 | u32 scissorCount, |
| 4787 | const VkRect2D* pScissors) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4788 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4789 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4790 | } |
| 4791 | |
| 4792 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4793 | cmd void vkCmdSetLineWidth( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4794 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4795 | f32 lineWidth) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4796 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4797 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4798 | } |
| 4799 | |
| 4800 | @threadSafety("app") |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4801 | cmd void vkCmdSetDepthBias( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4802 | VkCommandBuffer commandBuffer, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4803 | f32 depthBiasConstantFactor, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4804 | f32 depthBiasClamp, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 4805 | f32 depthBiasSlopeFactor) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4806 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4807 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4808 | } |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4809 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4810 | @threadSafety("app") |
| 4811 | cmd void vkCmdSetBlendConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4812 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4813 | // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 4814 | // an annotation as a quick hack to pass this to the template without |
| 4815 | // having to modify the AST and semantic model. |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 4816 | @readonly f32[4] blendConstants) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4817 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4818 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4819 | } |
| 4820 | |
| 4821 | @threadSafety("app") |
| 4822 | cmd void vkCmdSetDepthBounds( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4823 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4824 | f32 minDepthBounds, |
| 4825 | f32 maxDepthBounds) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4826 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4827 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4828 | } |
| 4829 | |
| 4830 | @threadSafety("app") |
| 4831 | cmd void vkCmdSetStencilCompareMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4832 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4833 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4834 | u32 compareMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4835 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4836 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4837 | } |
| 4838 | |
| 4839 | @threadSafety("app") |
| 4840 | cmd void vkCmdSetStencilWriteMask( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4841 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4842 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4843 | u32 writeMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4844 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4845 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4846 | } |
| 4847 | |
| 4848 | @threadSafety("app") |
| 4849 | cmd void vkCmdSetStencilReference( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4850 | VkCommandBuffer commandBuffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4851 | VkStencilFaceFlags faceMask, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 4852 | u32 reference) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4853 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 4854 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4855 | } |
| 4856 | |
| 4857 | @threadSafety("app") |
| 4858 | cmd void vkCmdBindDescriptorSets( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4859 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4860 | VkPipelineBindPoint pipelineBindPoint, |
| 4861 | VkPipelineLayout layout, |
| 4862 | u32 firstSet, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4863 | u32 descriptorSetCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4864 | const VkDescriptorSet* pDescriptorSets, |
| 4865 | u32 dynamicOffsetCount, |
| 4866 | const u32* pDynamicOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4867 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4868 | |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4869 | descriptorSets := pDescriptorSets[0:descriptorSetCount] |
| 4870 | for i in (0 .. descriptorSetCount) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4871 | descriptorSet := descriptorSets[i] |
| 4872 | descriptorSetObject := GetDescriptorSet(descriptorSet) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4873 | assert(commandBufferObject.device == descriptorSetObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4874 | } |
| 4875 | |
| 4876 | dynamicOffsets := pDynamicOffsets[0:dynamicOffsetCount] |
| 4877 | for i in (0 .. dynamicOffsetCount) { |
| 4878 | dynamicOffset := dynamicOffsets[i] |
| 4879 | } |
| 4880 | |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 4881 | queue := switch (pipelineBindPoint) { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4882 | case VK_PIPELINE_BIND_POINT_COMPUTE: VK_QUEUE_COMPUTE_BIT |
| 4883 | case VK_PIPELINE_BIND_POINT_GRAPHICS: VK_QUEUE_GRAPHICS_BIT |
| 4884 | } |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4885 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, queue) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4886 | } |
| 4887 | |
| 4888 | @threadSafety("app") |
| 4889 | cmd void vkCmdBindIndexBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4890 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4891 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4892 | VkDeviceSize offset, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4893 | VkIndexType indexType) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4894 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4895 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4896 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4897 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4898 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4899 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4900 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4901 | } |
| 4902 | |
| 4903 | @threadSafety("app") |
| 4904 | cmd void vkCmdBindVertexBuffers( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4905 | VkCommandBuffer commandBuffer, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4906 | u32 firstBinding, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4907 | u32 bindingCount, |
| 4908 | const VkBuffer* pBuffers, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4909 | const VkDeviceSize* pOffsets) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4910 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4911 | |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 4912 | // TODO: check if not [firstBinding:firstBinding+bindingCount] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4913 | buffers := pBuffers[0:bindingCount] |
| 4914 | offsets := pOffsets[0:bindingCount] |
| 4915 | for i in (0 .. bindingCount) { |
| 4916 | buffer := buffers[i] |
| 4917 | offset := offsets[i] |
| 4918 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4919 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4920 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4921 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4922 | } |
| 4923 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4924 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4925 | } |
| 4926 | |
| 4927 | @threadSafety("app") |
| 4928 | cmd void vkCmdDraw( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4929 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4930 | u32 vertexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4931 | u32 instanceCount, |
| 4932 | u32 firstVertex, |
| 4933 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4934 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4935 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4936 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4937 | } |
| 4938 | |
| 4939 | @threadSafety("app") |
| 4940 | cmd void vkCmdDrawIndexed( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4941 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4942 | u32 indexCount, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4943 | u32 instanceCount, |
| 4944 | u32 firstIndex, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4945 | s32 vertexOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4946 | u32 firstInstance) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4947 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4948 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4949 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4950 | } |
| 4951 | |
| 4952 | @threadSafety("app") |
| 4953 | cmd void vkCmdDrawIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4954 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4955 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4956 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4957 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4958 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4959 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4960 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4961 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4962 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4963 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4964 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4965 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4966 | } |
| 4967 | |
| 4968 | @threadSafety("app") |
| 4969 | cmd void vkCmdDrawIndexedIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4970 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4971 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4972 | VkDeviceSize offset, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 4973 | u32 drawCount, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4974 | u32 stride) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4975 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4976 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4977 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4978 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4979 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4980 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4981 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4982 | } |
| 4983 | |
| 4984 | @threadSafety("app") |
| 4985 | cmd void vkCmdDispatch( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4986 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4987 | u32 x, |
| 4988 | u32 y, |
| 4989 | u32 z) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4990 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4991 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4992 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4993 | } |
| 4994 | |
| 4995 | @threadSafety("app") |
| 4996 | cmd void vkCmdDispatchIndirect( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 4997 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 4998 | VkBuffer buffer, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 4999 | VkDeviceSize offset) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5000 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5001 | bufferObject := GetBuffer(buffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5002 | assert(commandBufferObject.device == bufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5003 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5004 | bindCommandBuffer(commandBuffer, buffer, bufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5005 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5006 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_COMPUTE_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5007 | } |
| 5008 | |
| 5009 | @threadSafety("app") |
| 5010 | cmd void vkCmdCopyBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5011 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5012 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5013 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5014 | u32 regionCount, |
| 5015 | const VkBufferCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5016 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5017 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5018 | dstBufferObject := GetBuffer(dstBuffer) |
| 5019 | assert(commandBufferObject.device == srcBufferObject.device) |
| 5020 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5021 | |
| 5022 | regions := pRegions[0:regionCount] |
| 5023 | for i in (0 .. regionCount) { |
| 5024 | region := regions[i] |
| 5025 | } |
| 5026 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5027 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 5028 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5029 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5030 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5031 | } |
| 5032 | |
| 5033 | @threadSafety("app") |
| 5034 | cmd void vkCmdCopyImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5035 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5036 | VkImage srcImage, |
| 5037 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5038 | VkImage dstImage, |
| 5039 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5040 | u32 regionCount, |
| 5041 | const VkImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5042 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5043 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5044 | dstImageObject := GetImage(dstImage) |
| 5045 | assert(commandBufferObject.device == srcImageObject.device) |
| 5046 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5047 | |
| 5048 | regions := pRegions[0:regionCount] |
| 5049 | for i in (0 .. regionCount) { |
| 5050 | region := regions[i] |
| 5051 | } |
| 5052 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5053 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5054 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5055 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5056 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5057 | } |
| 5058 | |
| 5059 | @threadSafety("app") |
| 5060 | cmd void vkCmdBlitImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5061 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5062 | VkImage srcImage, |
| 5063 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5064 | VkImage dstImage, |
| 5065 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5066 | u32 regionCount, |
| 5067 | const VkImageBlit* pRegions, |
Jesse Hall | 23ff73f | 2015-11-29 14:36:39 -0800 | [diff] [blame] | 5068 | VkFilter filter) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5069 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5070 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5071 | dstImageObject := GetImage(dstImage) |
| 5072 | assert(commandBufferObject.device == srcImageObject.device) |
| 5073 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5074 | |
| 5075 | regions := pRegions[0:regionCount] |
| 5076 | for i in (0 .. regionCount) { |
| 5077 | region := regions[i] |
| 5078 | } |
| 5079 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5080 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5081 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5082 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5083 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5084 | } |
| 5085 | |
| 5086 | @threadSafety("app") |
| 5087 | cmd void vkCmdCopyBufferToImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5088 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5089 | VkBuffer srcBuffer, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5090 | VkImage dstImage, |
| 5091 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5092 | u32 regionCount, |
| 5093 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5094 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5095 | srcBufferObject := GetBuffer(srcBuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5096 | dstImageObject := GetImage(dstImage) |
| 5097 | assert(commandBufferObject.device == srcBufferObject.device) |
| 5098 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5099 | |
| 5100 | regions := pRegions[0:regionCount] |
| 5101 | for i in (0 .. regionCount) { |
| 5102 | region := regions[i] |
| 5103 | } |
| 5104 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5105 | bindCommandBuffer(commandBuffer, srcBuffer, srcBufferObject.memory) |
| 5106 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5107 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5108 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5109 | } |
| 5110 | |
| 5111 | @threadSafety("app") |
| 5112 | cmd void vkCmdCopyImageToBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5113 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5114 | VkImage srcImage, |
| 5115 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5116 | VkBuffer dstBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5117 | u32 regionCount, |
| 5118 | const VkBufferImageCopy* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5119 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5120 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5121 | dstBufferObject := GetBuffer(dstBuffer) |
| 5122 | assert(commandBufferObject.device == srcImageObject.device) |
| 5123 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5124 | |
| 5125 | regions := pRegions[0:regionCount] |
| 5126 | for i in (0 .. regionCount) { |
| 5127 | region := regions[i] |
| 5128 | } |
| 5129 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5130 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5131 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5132 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5133 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5134 | } |
| 5135 | |
| 5136 | @threadSafety("app") |
| 5137 | cmd void vkCmdUpdateBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5138 | VkCommandBuffer commandBuffer, |
| 5139 | VkBuffer dstBuffer, |
| 5140 | VkDeviceSize dstOffset, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5141 | VkDeviceSize dataSize, |
Jesse Hall | 56d386a | 2016-07-26 15:20:40 -0700 | [diff] [blame] | 5142 | const void* pData) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5143 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5144 | dstBufferObject := GetBuffer(dstBuffer) |
| 5145 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5146 | |
| 5147 | data := pData[0:dataSize] |
| 5148 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5149 | bindCommandBuffer(commandBuffer, dstBuffer, dstBufferObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5150 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5151 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5152 | } |
| 5153 | |
| 5154 | @threadSafety("app") |
| 5155 | cmd void vkCmdFillBuffer( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5156 | VkCommandBuffer commandBuffer, |
| 5157 | VkBuffer dstBuffer, |
| 5158 | VkDeviceSize dstOffset, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5159 | VkDeviceSize size, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5160 | u32 data) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5161 | commandBufferObject := GetCommandBuffer(commandBuffer) |
| 5162 | dstBufferObject := GetBuffer(dstBuffer) |
| 5163 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5164 | |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5165 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_TRANSFER_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5166 | } |
| 5167 | |
| 5168 | @threadSafety("app") |
| 5169 | cmd void vkCmdClearColorImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5170 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5171 | VkImage image, |
| 5172 | VkImageLayout imageLayout, |
| 5173 | const VkClearColorValue* pColor, |
| 5174 | u32 rangeCount, |
| 5175 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5176 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5177 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5178 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5179 | |
| 5180 | ranges := pRanges[0:rangeCount] |
| 5181 | for i in (0 .. rangeCount) { |
| 5182 | range := ranges[i] |
| 5183 | } |
| 5184 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5185 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5186 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5187 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5188 | } |
| 5189 | |
| 5190 | @threadSafety("app") |
| 5191 | cmd void vkCmdClearDepthStencilImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5192 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5193 | VkImage image, |
| 5194 | VkImageLayout imageLayout, |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 5195 | const VkClearDepthStencilValue* pDepthStencil, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5196 | u32 rangeCount, |
| 5197 | const VkImageSubresourceRange* pRanges) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5198 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5199 | imageObject := GetImage(image) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5200 | assert(commandBufferObject.device == imageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5201 | |
| 5202 | ranges := pRanges[0:rangeCount] |
| 5203 | for i in (0 .. rangeCount) { |
| 5204 | range := ranges[i] |
| 5205 | } |
| 5206 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5207 | bindCommandBuffer(commandBuffer, image, imageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5208 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5209 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5210 | } |
| 5211 | |
| 5212 | @threadSafety("app") |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5213 | cmd void vkCmdClearAttachments( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5214 | VkCommandBuffer commandBuffer, |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 5215 | u32 attachmentCount, |
| 5216 | const VkClearAttachment* pAttachments, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5217 | u32 rectCount, |
Jesse Hall | a15a4bf | 2015-11-19 22:48:02 -0800 | [diff] [blame] | 5218 | const VkClearRect* pRects) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5219 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5220 | |
| 5221 | rects := pRects[0:rectCount] |
| 5222 | for i in (0 .. rectCount) { |
| 5223 | rect := rects[i] |
| 5224 | } |
| 5225 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5226 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5227 | } |
| 5228 | |
| 5229 | @threadSafety("app") |
| 5230 | cmd void vkCmdResolveImage( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5231 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5232 | VkImage srcImage, |
| 5233 | VkImageLayout srcImageLayout, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5234 | VkImage dstImage, |
| 5235 | VkImageLayout dstImageLayout, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5236 | u32 regionCount, |
| 5237 | const VkImageResolve* pRegions) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5238 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5239 | srcImageObject := GetImage(srcImage) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5240 | dstImageObject := GetImage(dstImage) |
| 5241 | assert(commandBufferObject.device == srcImageObject.device) |
| 5242 | assert(commandBufferObject.device == dstImageObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5243 | |
| 5244 | regions := pRegions[0:regionCount] |
| 5245 | for i in (0 .. regionCount) { |
| 5246 | region := regions[i] |
| 5247 | } |
| 5248 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5249 | bindCommandBuffer(commandBuffer, srcImage, srcImageObject.memory) |
| 5250 | bindCommandBuffer(commandBuffer, dstImage, dstImageObject.memory) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5251 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5252 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5253 | } |
| 5254 | |
| 5255 | @threadSafety("app") |
| 5256 | cmd void vkCmdSetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5257 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5258 | VkEvent event, |
| 5259 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5260 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5261 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5262 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5263 | } |
| 5264 | |
| 5265 | @threadSafety("app") |
| 5266 | cmd void vkCmdResetEvent( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5267 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5268 | VkEvent event, |
| 5269 | VkPipelineStageFlags stageMask) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5270 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5271 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5272 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5273 | } |
| 5274 | |
| 5275 | @threadSafety("app") |
| 5276 | cmd void vkCmdWaitEvents( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5277 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5278 | u32 eventCount, |
| 5279 | const VkEvent* pEvents, |
| 5280 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5281 | VkPipelineStageFlags dstStageMask, |
| 5282 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5283 | const VkMemoryBarrier* pMemoryBarriers, |
| 5284 | u32 bufferMemoryBarrierCount, |
| 5285 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5286 | u32 imageMemoryBarrierCount, |
| 5287 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5288 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5289 | |
| 5290 | events := pEvents[0:eventCount] |
| 5291 | for i in (0 .. eventCount) { |
| 5292 | event := events[i] |
| 5293 | eventObject := GetEvent(event) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5294 | assert(commandBufferObject.device == eventObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5295 | } |
| 5296 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5297 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5298 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5299 | memoryBarrier := memoryBarriers[i] |
| 5300 | } |
| 5301 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5302 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5303 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5304 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5305 | assert(bufferObject.device == commandBufferObject.device) |
| 5306 | } |
| 5307 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5308 | for i in (0 .. imageMemoryBarrierCount) { |
| 5309 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5310 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5311 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5312 | } |
| 5313 | } |
| 5314 | |
| 5315 | @threadSafety("app") |
| 5316 | cmd void vkCmdPipelineBarrier( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5317 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5318 | VkPipelineStageFlags srcStageMask, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5319 | VkPipelineStageFlags dstStageMask, |
Jesse Hall | dc6d36c | 2015-11-29 19:12:15 -0800 | [diff] [blame] | 5320 | VkDependencyFlags dependencyFlags, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5321 | u32 memoryBarrierCount, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5322 | const VkMemoryBarrier* pMemoryBarriers, |
| 5323 | u32 bufferMemoryBarrierCount, |
| 5324 | const VkBufferMemoryBarrier* pBufferMemoryBarriers, |
| 5325 | u32 imageMemoryBarrierCount, |
| 5326 | const VkImageMemoryBarrier* pImageMemoryBarriers) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5327 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5328 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5329 | memoryBarriers := pMemoryBarriers[0:memoryBarrierCount] |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5330 | for i in (0 .. memoryBarrierCount) { |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5331 | memoryBarrier := memoryBarriers[i] |
| 5332 | } |
| 5333 | bufferMemoryBarriers := pBufferMemoryBarriers[0:bufferMemoryBarrierCount] |
| 5334 | for i in (0 .. bufferMemoryBarrierCount) { |
| 5335 | bufferMemoryBarrier := bufferMemoryBarriers[i] |
| 5336 | bufferObject := GetBuffer(bufferMemoryBarrier.buffer) |
| 5337 | assert(bufferObject.device == commandBufferObject.device) |
| 5338 | } |
| 5339 | imageMemoryBarriers := pImageMemoryBarriers[0:imageMemoryBarrierCount] |
| 5340 | for i in (0 .. imageMemoryBarrierCount) { |
| 5341 | imageMemoryBarrier := imageMemoryBarriers[i] |
| 5342 | imageObject := GetImage(imageMemoryBarrier.image) |
| 5343 | assert(imageObject.device == commandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5344 | } |
| 5345 | } |
| 5346 | |
| 5347 | @threadSafety("app") |
| 5348 | cmd void vkCmdBeginQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5349 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5350 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5351 | u32 query, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5352 | VkQueryControlFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5353 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5354 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5355 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5356 | } |
| 5357 | |
| 5358 | @threadSafety("app") |
| 5359 | cmd void vkCmdEndQuery( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5360 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5361 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5362 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5363 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5364 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5365 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5366 | } |
| 5367 | |
| 5368 | @threadSafety("app") |
| 5369 | cmd void vkCmdResetQueryPool( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5370 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5371 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5372 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5373 | u32 queryCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5374 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5375 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5376 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5377 | } |
| 5378 | |
| 5379 | @threadSafety("app") |
| 5380 | cmd void vkCmdWriteTimestamp( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5381 | VkCommandBuffer commandBuffer, |
Jesse Hall | 6f39a6d | 2015-11-24 11:08:36 -0800 | [diff] [blame] | 5382 | VkPipelineStageFlagBits pipelineStage, |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5383 | VkQueryPool queryPool, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5384 | u32 query) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5385 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | a3a7a1d | 2015-11-24 11:37:23 -0800 | [diff] [blame] | 5386 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5387 | assert(commandBufferObject.device == queryPoolObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5388 | } |
| 5389 | |
| 5390 | @threadSafety("app") |
| 5391 | cmd void vkCmdCopyQueryPoolResults( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5392 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5393 | VkQueryPool queryPool, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5394 | u32 firstQuery, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5395 | u32 queryCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5396 | VkBuffer dstBuffer, |
| 5397 | VkDeviceSize dstOffset, |
Jesse Hall | a9bb62b | 2015-11-21 19:31:56 -0800 | [diff] [blame] | 5398 | VkDeviceSize stride, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5399 | VkQueryResultFlags flags) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5400 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5401 | queryPoolObject := GetQueryPool(queryPool) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5402 | dstBufferObject := GetBuffer(dstBuffer) |
| 5403 | assert(commandBufferObject.device == queryPoolObject.device) |
| 5404 | assert(commandBufferObject.device == dstBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5405 | } |
| 5406 | |
| 5407 | cmd void vkCmdPushConstants( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5408 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5409 | VkPipelineLayout layout, |
| 5410 | VkShaderStageFlags stageFlags, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5411 | u32 offset, |
| 5412 | u32 size, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5413 | const void* pValues) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5414 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5415 | layoutObject := GetPipelineLayout(layout) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5416 | assert(commandBufferObject.device == layoutObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5417 | } |
| 5418 | |
| 5419 | @threadSafety("app") |
| 5420 | cmd void vkCmdBeginRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5421 | VkCommandBuffer commandBuffer, |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5422 | const VkRenderPassBeginInfo* pRenderPassBegin, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5423 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5424 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5425 | renderPassObject := GetRenderPass(pRenderPassBegin.renderPass) |
| 5426 | framebufferObject := GetFramebuffer(pRenderPassBegin.framebuffer) |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5427 | assert(commandBufferObject.device == renderPassObject.device) |
| 5428 | assert(commandBufferObject.device == framebufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5429 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5430 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5431 | } |
| 5432 | |
| 5433 | cmd void vkCmdNextSubpass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5434 | VkCommandBuffer commandBuffer, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5435 | VkSubpassContents contents) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5436 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5437 | } |
| 5438 | |
| 5439 | @threadSafety("app") |
| 5440 | cmd void vkCmdEndRenderPass( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5441 | VkCommandBuffer commandBuffer) { |
| 5442 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5443 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5444 | commandBufferObject.queueFlags = AddQueueFlag(commandBufferObject.queueFlags, VK_QUEUE_GRAPHICS_BIT) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5445 | } |
| 5446 | |
| 5447 | cmd void vkCmdExecuteCommands( |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5448 | VkCommandBuffer commandBuffer, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5449 | u32 commandBufferCount, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5450 | const VkCommandBuffer* pCommandBuffers) { |
| 5451 | commandBufferObject := GetCommandBuffer(commandBuffer) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5452 | |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5453 | commandBuffers := pCommandBuffers[0:commandBufferCount] |
| 5454 | for i in (0 .. commandBufferCount) { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 5455 | secondaryCommandBuffer := commandBuffers[i] |
| 5456 | secondaryCommandBufferObject := GetCommandBuffer(secondaryCommandBuffer) |
| 5457 | assert(commandBufferObject.device == secondaryCommandBufferObject.device) |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 5458 | } |
| 5459 | } |
| 5460 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5461 | @extension("VK_KHR_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5462 | cmd void vkDestroySurfaceKHR( |
| 5463 | VkInstance instance, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5464 | VkSurfaceKHR surface, |
| 5465 | const VkAllocationCallbacks* pAllocator) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5466 | instanceObject := GetInstance(instance) |
| 5467 | surfaceObject := GetSurface(surface) |
| 5468 | assert(surfaceObject.instance == instance) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5469 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5470 | State.Surfaces[surface] = null |
Jesse Hall | 2818f93 | 2015-11-19 21:19:17 -0800 | [diff] [blame] | 5471 | } |
| 5472 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5473 | @extension("VK_KHR_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5474 | cmd VkResult vkGetPhysicalDeviceSurfaceSupportKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5475 | VkPhysicalDevice physicalDevice, |
| 5476 | u32 queueFamilyIndex, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5477 | VkSurfaceKHR surface, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5478 | VkBool32* pSupported) { |
| 5479 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5480 | |
| 5481 | return ? |
| 5482 | } |
| 5483 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5484 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5485 | cmd VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 5486 | VkPhysicalDevice physicalDevice, |
| 5487 | VkSurfaceKHR surface, |
| 5488 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 5489 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5490 | |
| 5491 | surfaceCapabilities := ? |
| 5492 | pSurfaceCapabilities[0] = surfaceCapabilities |
| 5493 | |
| 5494 | return ? |
| 5495 | } |
| 5496 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5497 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5498 | cmd VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( |
| 5499 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5500 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5501 | u32* pSurfaceFormatCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5502 | VkSurfaceFormatKHR* pSurfaceFormats) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5503 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5504 | |
| 5505 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5506 | pSurfaceFormatCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5507 | surfaceFormats := pSurfaceFormats[0:count] |
| 5508 | |
| 5509 | for i in (0 .. count) { |
| 5510 | surfaceFormat := ? |
| 5511 | surfaceFormats[i] = surfaceFormat |
| 5512 | } |
| 5513 | |
| 5514 | return ? |
| 5515 | } |
| 5516 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5517 | @extension("VK_KHR_surface") |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5518 | cmd VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( |
| 5519 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5520 | VkSurfaceKHR surface, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5521 | u32* pPresentModeCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5522 | VkPresentModeKHR* pPresentModes) { |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame] | 5523 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5524 | |
| 5525 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5526 | pPresentModeCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5527 | presentModes := pPresentModes[0:count] |
| 5528 | |
| 5529 | for i in (0 .. count) { |
| 5530 | presentMode := ? |
| 5531 | presentModes[i] = presentMode |
| 5532 | } |
| 5533 | |
| 5534 | return ? |
| 5535 | } |
| 5536 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5537 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5538 | cmd VkResult vkCreateSwapchainKHR( |
| 5539 | VkDevice device, |
| 5540 | const VkSwapchainCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5541 | const VkAllocationCallbacks* pAllocator, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5542 | VkSwapchainKHR* pSwapchain) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5543 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5544 | deviceObject := GetDevice(device) |
| 5545 | |
| 5546 | swapchain := ? |
| 5547 | pSwapchain[0] = swapchain |
| 5548 | State.Swapchains[swapchain] = new!SwapchainObject(device: device) |
| 5549 | |
| 5550 | return ? |
| 5551 | } |
| 5552 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5553 | @extension("VK_KHR_swapchain") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5554 | cmd void vkDestroySwapchainKHR( |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5555 | VkDevice device, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5556 | VkSwapchainKHR swapchain, |
| 5557 | const VkAllocationCallbacks* pAllocator) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5558 | deviceObject := GetDevice(device) |
| 5559 | swapchainObject := GetSwapchain(swapchain) |
| 5560 | assert(swapchainObject.device == device) |
| 5561 | |
| 5562 | State.Swapchains[swapchain] = null |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5563 | } |
| 5564 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5565 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5566 | cmd VkResult vkGetSwapchainImagesKHR( |
| 5567 | VkDevice device, |
| 5568 | VkSwapchainKHR swapchain, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5569 | u32* pSwapchainImageCount, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5570 | VkImage* pSwapchainImages) { |
| 5571 | deviceObject := GetDevice(device) |
| 5572 | |
| 5573 | count := as!u32(?) |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5574 | pSwapchainImageCount[0] = count |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5575 | swapchainImages := pSwapchainImages[0:count] |
| 5576 | |
| 5577 | for i in (0 .. count) { |
| 5578 | swapchainImage := ? |
| 5579 | swapchainImages[i] = swapchainImage |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5580 | State.Images[swapchainImage] = new!ImageObject(device: device) |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5581 | } |
| 5582 | |
| 5583 | return ? |
| 5584 | } |
| 5585 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5586 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5587 | cmd VkResult vkAcquireNextImageKHR( |
| 5588 | VkDevice device, |
| 5589 | VkSwapchainKHR swapchain, |
| 5590 | u64 timeout, |
| 5591 | VkSemaphore semaphore, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5592 | VkFence fence, |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5593 | u32* pImageIndex) { |
| 5594 | deviceObject := GetDevice(device) |
| 5595 | swapchainObject := GetSwapchain(swapchain) |
| 5596 | |
| 5597 | imageIndex := ? |
| 5598 | pImageIndex[0] = imageIndex |
| 5599 | |
| 5600 | return ? |
| 5601 | } |
| 5602 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5603 | @extension("VK_KHR_swapchain") |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5604 | cmd VkResult vkQueuePresentKHR( |
| 5605 | VkQueue queue, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5606 | const VkPresentInfoKHR* pPresentInfo) { |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 5607 | queueObject := GetQueue(queue) |
| 5608 | |
| 5609 | presentInfo := ? |
| 5610 | pPresentInfo[0] = presentInfo |
| 5611 | |
| 5612 | return ? |
| 5613 | } |
| 5614 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5615 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5616 | cmd VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( |
| 5617 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5618 | u32* pPropertyCount, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5619 | VkDisplayPropertiesKHR* pProperties) { |
| 5620 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5621 | return ? |
| 5622 | } |
| 5623 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5624 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5625 | cmd VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( |
| 5626 | VkPhysicalDevice physicalDevice, |
| 5627 | u32* pPropertyCount, |
| 5628 | VkDisplayPlanePropertiesKHR* pProperties) { |
| 5629 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5630 | return ? |
| 5631 | } |
| 5632 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5633 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5634 | cmd VkResult vkGetDisplayPlaneSupportedDisplaysKHR( |
| 5635 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 5636 | u32 planeIndex, |
Jesse Hall | f4ab2b1 | 2015-11-30 16:04:55 -0800 | [diff] [blame] | 5637 | u32* pDisplayCount, |
| 5638 | VkDisplayKHR* pDisplays) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5639 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5640 | return ? |
| 5641 | } |
| 5642 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5643 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5644 | cmd VkResult vkGetDisplayModePropertiesKHR( |
| 5645 | VkPhysicalDevice physicalDevice, |
| 5646 | VkDisplayKHR display, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 5647 | u32* pPropertyCount, |
| 5648 | VkDisplayModePropertiesKHR* pProperties) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5649 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5650 | return ? |
| 5651 | } |
| 5652 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5653 | @extension("VK_KHR_display") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5654 | cmd VkResult vkCreateDisplayModeKHR( |
| 5655 | VkPhysicalDevice physicalDevice, |
| 5656 | VkDisplayKHR display, |
| 5657 | const VkDisplayModeCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5658 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5659 | VkDisplayModeKHR* pMode) { |
| 5660 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5661 | return ? |
| 5662 | } |
| 5663 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5664 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5665 | cmd VkResult vkGetDisplayPlaneCapabilitiesKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5666 | VkPhysicalDevice physicalDevice, |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5667 | VkDisplayModeKHR mode, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5668 | u32 planeIndex, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5669 | VkDisplayPlaneCapabilitiesKHR* pCapabilities) { |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5670 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5671 | return ? |
| 5672 | } |
| 5673 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5674 | @extension("VK_KHR_display") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5675 | cmd VkResult vkCreateDisplayPlaneSurfaceKHR( |
| 5676 | VkInstance instance, |
| 5677 | const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5678 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5679 | VkSurfaceKHR* pSurface) { |
| 5680 | return ? |
| 5681 | } |
| 5682 | |
Jesse Hall | 9ba8bc8 | 2015-11-30 16:22:16 -0800 | [diff] [blame] | 5683 | @extension("VK_KHR_display_swapchain") |
| 5684 | cmd VkResult vkCreateSharedSwapchainsKHR( |
| 5685 | VkDevice device, |
| 5686 | u32 swapchainCount, |
| 5687 | const VkSwapchainCreateInfoKHR* pCreateInfos, |
| 5688 | const VkAllocationCallbacks* pAllocator, |
| 5689 | VkSwapchainKHR* pSwapchains) { |
| 5690 | return ? |
| 5691 | } |
| 5692 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5693 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5694 | cmd VkResult vkCreateXlibSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5695 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5696 | const VkXlibSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5697 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5698 | VkSurfaceKHR* pSurface) { |
| 5699 | instanceObject := GetInstance(instance) |
| 5700 | return ? |
| 5701 | } |
| 5702 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5703 | @extension("VK_KHR_xlib_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5704 | cmd VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( |
| 5705 | VkPhysicalDevice physicalDevice, |
| 5706 | u32 queueFamilyIndex, |
| 5707 | platform.Display* dpy, |
Jesse Hall | 65ab552 | 2015-11-30 00:07:16 -0800 | [diff] [blame] | 5708 | platform.VisualID visualID) { |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5709 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5710 | return ? |
| 5711 | } |
| 5712 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5713 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5714 | cmd VkResult vkCreateXcbSurfaceKHR( |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5715 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5716 | const VkXcbSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5717 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5718 | VkSurfaceKHR* pSurface) { |
| 5719 | instanceObject := GetInstance(instance) |
| 5720 | return ? |
| 5721 | } |
| 5722 | |
Jesse Hall | 523db34 | 2015-11-30 21:12:55 -0800 | [diff] [blame] | 5723 | @extension("VK_KHR_xcb_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5724 | cmd VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( |
| 5725 | VkPhysicalDevice physicalDevice, |
| 5726 | u32 queueFamilyIndex, |
| 5727 | platform.xcb_connection_t* connection, |
| 5728 | platform.xcb_visualid_t visual_id) { |
| 5729 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5730 | return ? |
| 5731 | } |
| 5732 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5733 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5734 | cmd VkResult vkCreateWaylandSurfaceKHR( |
| 5735 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5736 | const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5737 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5738 | VkSurfaceKHR* pSurface) { |
| 5739 | instanceObject := GetInstance(instance) |
| 5740 | return ? |
| 5741 | } |
| 5742 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5743 | @extension("VK_KHR_wayland_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5744 | cmd VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( |
| 5745 | VkPhysicalDevice physicalDevice, |
| 5746 | u32 queueFamilyIndex, |
| 5747 | platform.wl_display* display) { |
| 5748 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5749 | return ? |
| 5750 | } |
| 5751 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5752 | @extension("VK_KHR_mir_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5753 | cmd VkResult vkCreateMirSurfaceKHR( |
| 5754 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5755 | const VkMirSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5756 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5757 | VkSurfaceKHR* pSurface) { |
| 5758 | instanceObject := GetInstance(instance) |
| 5759 | return ? |
| 5760 | } |
| 5761 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5762 | @extension("VK_KHR_mir_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5763 | cmd VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( |
| 5764 | VkPhysicalDevice physicalDevice, |
| 5765 | u32 queueFamilyIndex, |
| 5766 | platform.MirConnection* connection) { |
| 5767 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 5768 | return ? |
| 5769 | } |
| 5770 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5771 | @extension("VK_KHR_android_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5772 | cmd VkResult vkCreateAndroidSurfaceKHR( |
| 5773 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5774 | const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5775 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5776 | VkSurfaceKHR* pSurface) { |
| 5777 | instanceObject := GetInstance(instance) |
| 5778 | return ? |
| 5779 | } |
| 5780 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5781 | @extension("VK_KHR_win32_surface") |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5782 | cmd VkResult vkCreateWin32SurfaceKHR( |
| 5783 | VkInstance instance, |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 5784 | const VkWin32SurfaceCreateInfoKHR* pCreateInfo, |
Jesse Hall | 0e74f00 | 2015-11-30 11:37:59 -0800 | [diff] [blame] | 5785 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 5786 | VkSurfaceKHR* pSurface) { |
| 5787 | instanceObject := GetInstance(instance) |
| 5788 | return ? |
| 5789 | } |
| 5790 | |
Jesse Hall | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 5791 | @extension("VK_KHR_win32_surface") |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5792 | cmd VkResult vkGetPhysicalDeviceWin32PresentationSupportKHR( |
| 5793 | VkPhysicalDevice physicalDevice, |
| 5794 | u32 queueFamilyIndex) { |
Jesse Hall | e2948d8 | 2016-02-25 04:19:32 -0800 | [diff] [blame] | 5795 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 5796 | return ? |
| 5797 | } |
| 5798 | |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5799 | @extension("VK_ANDROID_native_buffer") |
| 5800 | cmd VkResult vkGetSwapchainGrallocUsageANDROID( |
| 5801 | VkDevice device, |
| 5802 | VkFormat format, |
| 5803 | VkImageUsageFlags imageUsage, |
| 5804 | int* grallocUsage) { |
| 5805 | return ? |
| 5806 | } |
| 5807 | |
| 5808 | @extension("VK_ANDROID_native_buffer") |
Chris Forbes | 8e4438b | 2016-12-07 16:26:49 +1300 | [diff] [blame] | 5809 | cmd VkResult vkGetSwapchainGrallocUsage2ANDROID( |
| 5810 | VkDevice device, |
| 5811 | VkFormat format, |
| 5812 | VkImageUsageFlags imageUsage, |
| 5813 | VkSwapchainImageUsageFlagsANDROID swapchainImageUsage, |
| 5814 | int* grallocUsage) { |
| 5815 | return ? |
| 5816 | } |
| 5817 | |
| 5818 | @extension("VK_ANDROID_native_buffer") |
Chia-I Wu | b262ddc | 2016-03-22 07:38:20 +0800 | [diff] [blame] | 5819 | cmd VkResult vkAcquireImageANDROID( |
| 5820 | VkDevice device, |
| 5821 | VkImage image, |
| 5822 | int nativeFenceFd, |
| 5823 | VkSemaphore semaphore, |
| 5824 | VkFence fence) { |
| 5825 | return ? |
| 5826 | } |
| 5827 | |
| 5828 | @extension("VK_ANDROID_native_buffer") |
| 5829 | cmd VkResult vkQueueSignalReleaseImageANDROID( |
| 5830 | VkQueue queue, |
| 5831 | u32 waitSemaphoreCount, |
| 5832 | const VkSemaphore* pWaitSemaphores, |
| 5833 | VkImage image, |
| 5834 | int* pNativeFenceFd) { |
| 5835 | return ? |
| 5836 | } |
| 5837 | |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 5838 | @extension("VK_EXT_debug_report") |
| 5839 | @external type void* PFN_vkDebugReportCallbackEXT |
| 5840 | @extension("VK_EXT_debug_report") |
| 5841 | @pfn cmd VkBool32 vkDebugReportCallbackEXT( |
| 5842 | VkDebugReportFlagsEXT flags, |
| 5843 | VkDebugReportObjectTypeEXT objectType, |
| 5844 | u64 object, |
| 5845 | platform.size_t location, |
| 5846 | s32 messageCode, |
| 5847 | const char* pLayerPrefix, |
| 5848 | const char* pMessage, |
| 5849 | void* pUserData) { |
| 5850 | return ? |
| 5851 | } |
| 5852 | |
| 5853 | @extension("VK_EXT_debug_report") |
| 5854 | cmd VkResult vkCreateDebugReportCallbackEXT( |
| 5855 | VkInstance instance, |
| 5856 | const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, |
| 5857 | const VkAllocationCallbacks* pAllocator, |
| 5858 | VkDebugReportCallbackEXT* pCallback) { |
| 5859 | return ? |
| 5860 | } |
| 5861 | |
| 5862 | @extension("VK_EXT_debug_report") |
| 5863 | cmd void vkDestroyDebugReportCallbackEXT( |
| 5864 | VkInstance instance, |
| 5865 | VkDebugReportCallbackEXT callback, |
| 5866 | const VkAllocationCallbacks* pAllocator) { |
| 5867 | } |
| 5868 | |
| 5869 | @extension("VK_EXT_debug_report") |
| 5870 | cmd void vkDebugReportMessageEXT( |
| 5871 | VkInstance instance, |
| 5872 | VkDebugReportFlagsEXT flags, |
| 5873 | VkDebugReportObjectTypeEXT objectType, |
| 5874 | u64 object, |
| 5875 | platform.size_t location, |
| 5876 | s32 messageCode, |
| 5877 | const char* pLayerPrefix, |
| 5878 | const char* pMessage) { |
| 5879 | } |
| 5880 | |
Jesse Hall | 2676338 | 2016-05-20 07:13:52 -0700 | [diff] [blame] | 5881 | @extension("VK_EXT_debug_marker") |
| 5882 | cmd VkResult vkDebugMarkerSetObjectTagEXT( |
| 5883 | VkDevice device, |
| 5884 | VkDebugMarkerObjectTagInfoEXT* pTagInfo) { |
| 5885 | return ? |
| 5886 | } |
| 5887 | |
| 5888 | @extension("VK_EXT_debug_marker") |
| 5889 | cmd VkResult vkDebugMarkerSetObjectNameEXT( |
| 5890 | VkDevice device, |
| 5891 | VkDebugMarkerObjectNameInfoEXT* pNameInfo) { |
| 5892 | return ? |
| 5893 | } |
| 5894 | |
| 5895 | @extension("VK_EXT_debug_marker") |
| 5896 | cmd void vkCmdDebugMarkerBeginEXT( |
| 5897 | VkCommandBuffer commandBuffer, |
| 5898 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5899 | } |
| 5900 | |
| 5901 | @extension("VK_EXT_debug_marker") |
| 5902 | cmd void vkCmdDebugMarkerEndEXT( |
| 5903 | VkCommandBuffer commandBuffer) { |
| 5904 | } |
| 5905 | |
| 5906 | @extension("VK_EXT_debug_marker") |
| 5907 | cmd void vkCmdDebugMarkerInsertEXT( |
| 5908 | VkCommandBuffer commandBuffer, |
| 5909 | VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { |
| 5910 | } |
| 5911 | |
Chris Forbes | 1194ede | 2016-12-30 16:29:25 +1300 | [diff] [blame] | 5912 | @extension("VK_KHR_get_physical_device_properties2") |
| 5913 | cmd void vkGetPhysicalDeviceFeatures2KHR( |
| 5914 | VkPhysicalDevice physicalDevice, |
| 5915 | VkPhysicalDeviceFeatures2KHR* pFeatures) { |
| 5916 | } |
| 5917 | |
| 5918 | @extension("VK_KHR_get_physical_device_properties2") |
| 5919 | cmd void vkGetPhysicalDeviceProperties2KHR( |
| 5920 | VkPhysicalDevice physicalDevice, |
| 5921 | VkPhysicalDeviceProperties2KHR* pProperties) { |
| 5922 | } |
| 5923 | |
| 5924 | @extension("VK_KHR_get_physical_device_properties2") |
| 5925 | cmd void vkGetPhysicalDeviceFormatProperties2KHR( |
| 5926 | VkPhysicalDevice physicalDevice, |
| 5927 | VkFormat format, |
| 5928 | VkFormatProperties2KHR* pFormatProperties) { |
| 5929 | } |
| 5930 | |
| 5931 | @extension("VK_KHR_get_physical_device_properties2") |
| 5932 | cmd VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( |
| 5933 | VkPhysicalDevice physicalDevice, |
| 5934 | const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, |
| 5935 | VkImageFormatProperties2KHR* pImageFormatProperties) { |
| 5936 | return ? |
| 5937 | } |
| 5938 | |
| 5939 | @extension("VK_KHR_get_physical_device_properties2") |
| 5940 | cmd void vkGetPhysicalDeviceQueueFamilyProperties2KHR( |
| 5941 | VkPhysicalDevice physicalDevice, |
| 5942 | u32* pQueueFamilyPropertyCount, |
| 5943 | VkQueueFamilyProperties2KHR* pQueueFamilyProperties) { |
| 5944 | } |
| 5945 | |
| 5946 | @extension("VK_KHR_get_physical_device_properties2") |
| 5947 | cmd void vkGetPhysicalDeviceMemoryProperties2KHR( |
| 5948 | VkPhysicalDevice physicalDevice, |
| 5949 | VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties) { |
| 5950 | } |
| 5951 | |
| 5952 | @extension("VK_KHR_get_physical_device_properties2") |
| 5953 | cmd void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( |
| 5954 | VkPhysicalDevice physicalDevice, |
| 5955 | const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, |
| 5956 | u32* pPropertyCount, |
| 5957 | VkSparseImageFormatProperties2KHR* pProperties) { |
| 5958 | } |
| 5959 | |
Chris Forbes | 289cb79 | 2016-12-30 15:03:55 +1300 | [diff] [blame] | 5960 | @extension("VK_AMD_draw_indirect_count") |
| 5961 | cmd void vkCmdDrawIndirectCountAMD( |
| 5962 | VkCommandBuffer commandBuffer, |
| 5963 | VkBuffer buffer, |
| 5964 | VkDeviceSize offset, |
| 5965 | VkBuffer countBuffer, |
| 5966 | VkDeviceSize countBufferOffset, |
| 5967 | u32 maxDrawCount, |
| 5968 | u32 stride) { |
| 5969 | } |
| 5970 | |
| 5971 | @extension("VK_AMD_draw_indirect_count") |
| 5972 | cmd void vkCmdDrawIndexedIndirectCountAMD( |
| 5973 | VkCommandBuffer commandBuffer, |
| 5974 | VkBuffer buffer, |
| 5975 | VkDeviceSize offset, |
| 5976 | VkBuffer countBuffer, |
| 5977 | VkDeviceSize countBufferOffset, |
| 5978 | u32 maxDrawCount, |
| 5979 | u32 stride) { |
| 5980 | } |
| 5981 | |
| 5982 | @extension("VK_NV_external_memory_capabilities") |
| 5983 | cmd VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( |
| 5984 | VkPhysicalDevice physicalDevice, |
| 5985 | VkFormat format, |
| 5986 | VkImageType type, |
| 5987 | VkImageTiling tiling, |
| 5988 | VkImageUsageFlags usage, |
| 5989 | VkImageCreateFlags flags, |
| 5990 | VkExternalMemoryHandleTypeFlagsNV externalHandleType, |
| 5991 | VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { |
| 5992 | return ? |
| 5993 | } |
| 5994 | |
| 5995 | @extension("VK_NV_external_memory_win32") |
| 5996 | cmd VkResult vkGetMemoryWin32HandleNV( |
| 5997 | VkDevice device, |
| 5998 | VkDeviceMemory memory, |
| 5999 | VkExternalMemoryHandleTypeFlagsNV handleType, |
| 6000 | platform.HANDLE* pHandle) { |
| 6001 | return ? |
| 6002 | } |
| 6003 | |
| 6004 | @extension("VK_NV_external_memory_win32") |
| 6005 | cmd void vkCmdProcessCommandsNVX( |
| 6006 | VkCommandBuffer commandBuffer, |
| 6007 | const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) { |
| 6008 | } |
| 6009 | |
| 6010 | @extension("VK_NV_external_memory_win32") |
| 6011 | cmd void vkCmdReserveSpaceForCommandsNVX( |
| 6012 | VkCommandBuffer commandBuffer, |
| 6013 | const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) { |
| 6014 | } |
| 6015 | |
| 6016 | @extension("VK_NV_external_memory_win32") |
| 6017 | cmd VkResult vkCreateIndirectCommandsLayoutNVX( |
| 6018 | VkDevice device, |
| 6019 | const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, |
| 6020 | const VkAllocationCallbacks* pAllocator, |
| 6021 | VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) { |
| 6022 | return ? |
| 6023 | } |
| 6024 | |
| 6025 | @extension("VK_NV_external_memory_win32") |
| 6026 | cmd void vkDestroyIndirectCommandsLayoutNVX( |
| 6027 | VkDevice device, |
| 6028 | VkIndirectCommandsLayoutNVX indirectCommandsLayout, |
| 6029 | const VkAllocationCallbacks* pAllocator) { |
| 6030 | } |
| 6031 | |
| 6032 | @extension("VK_NV_external_memory_win32") |
| 6033 | cmd VkResult vkCreateObjectTableNVX( |
| 6034 | VkDevice device, |
| 6035 | const VkObjectTableCreateInfoNVX* pCreateInfo, |
| 6036 | const VkAllocationCallbacks* pAllocator, |
| 6037 | VkObjectTableNVX* pObjectTable) { |
| 6038 | return ? |
| 6039 | } |
| 6040 | |
| 6041 | @extension("VK_NV_external_memory_win32") |
| 6042 | cmd void vkDestroyObjectTableNVX( |
| 6043 | VkDevice device, |
| 6044 | VkObjectTableNVX objectTable, |
| 6045 | const VkAllocationCallbacks* pAllocator) { |
| 6046 | } |
| 6047 | |
| 6048 | @extension("VK_NV_external_memory_win32") |
| 6049 | cmd VkResult vkRegisterObjectsNVX( |
| 6050 | VkDevice device, |
| 6051 | VkObjectTableNVX objectTable, |
| 6052 | u32 objectCount, |
| 6053 | const VkObjectTableEntryNVX* const* ppObjectTableEntries, |
| 6054 | const u32* pObjectIndices) { |
| 6055 | return ? |
| 6056 | } |
| 6057 | |
| 6058 | @extension("VK_NV_external_memory_win32") |
| 6059 | cmd VkResult vkUnregisterObjectsNVX( |
| 6060 | VkDevice device, |
| 6061 | VkObjectTableNVX objectTable, |
| 6062 | u32 objectCount, |
| 6063 | const VkObjectEntryTypeNVX* pObjectEntryTypes, |
| 6064 | const u32* pObjectIndices) { |
| 6065 | return ? |
| 6066 | } |
| 6067 | |
| 6068 | @extension("VK_NV_external_memory_win32") |
| 6069 | cmd void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( |
| 6070 | VkPhysicalDevice physicalDevice, |
| 6071 | VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, |
| 6072 | VkDeviceGeneratedCommandsLimitsNVX* pLimits) { |
| 6073 | } |
| 6074 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6075 | |
| 6076 | //////////////// |
| 6077 | // Validation // |
| 6078 | //////////////// |
| 6079 | |
| 6080 | extern void validate(string layerName, bool condition, string message) |
| 6081 | |
| 6082 | |
| 6083 | ///////////////////////////// |
| 6084 | // Internal State Tracking // |
| 6085 | ///////////////////////////// |
| 6086 | |
| 6087 | StateObject State |
| 6088 | |
| 6089 | @internal class StateObject { |
| 6090 | // Dispatchable objects. |
| 6091 | map!(VkInstance, ref!InstanceObject) Instances |
| 6092 | map!(VkPhysicalDevice, ref!PhysicalDeviceObject) PhysicalDevices |
| 6093 | map!(VkDevice, ref!DeviceObject) Devices |
| 6094 | map!(VkQueue, ref!QueueObject) Queues |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6095 | map!(VkCommandBuffer, ref!CommandBufferObject) CommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6096 | |
| 6097 | // Non-dispatchable objects. |
| 6098 | map!(VkDeviceMemory, ref!DeviceMemoryObject) DeviceMemories |
| 6099 | map!(VkBuffer, ref!BufferObject) Buffers |
| 6100 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 6101 | map!(VkImage, ref!ImageObject) Images |
| 6102 | map!(VkImageView, ref!ImageViewObject) ImageViews |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6103 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6104 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 6105 | map!(VkPipelineLayout, ref!PipelineLayoutObject) PipelineLayouts |
| 6106 | map!(VkSampler, ref!SamplerObject) Samplers |
| 6107 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 6108 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 6109 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6110 | map!(VkFence, ref!FenceObject) Fences |
| 6111 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 6112 | map!(VkEvent, ref!EventObject) Events |
| 6113 | map!(VkQueryPool, ref!QueryPoolObject) QueryPools |
| 6114 | map!(VkFramebuffer, ref!FramebufferObject) Framebuffers |
| 6115 | map!(VkRenderPass, ref!RenderPassObject) RenderPasses |
| 6116 | map!(VkPipelineCache, ref!PipelineCacheObject) PipelineCaches |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6117 | map!(VkCommandPool, ref!CommandPoolObject) CommandPools |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6118 | map!(VkSurfaceKHR, ref!SurfaceObject) Surfaces |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6119 | map!(VkSwapchainKHR, ref!SwapchainObject) Swapchains |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6120 | } |
| 6121 | |
| 6122 | @internal class InstanceObject { |
| 6123 | } |
| 6124 | |
| 6125 | @internal class PhysicalDeviceObject { |
| 6126 | VkInstance instance |
| 6127 | } |
| 6128 | |
| 6129 | @internal class DeviceObject { |
| 6130 | VkPhysicalDevice physicalDevice |
| 6131 | } |
| 6132 | |
| 6133 | @internal class QueueObject { |
| 6134 | VkDevice device |
| 6135 | VkQueueFlags flags |
| 6136 | } |
| 6137 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6138 | @internal class CommandBufferObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6139 | VkDevice device |
| 6140 | map!(u64, VkDeviceMemory) boundObjects |
| 6141 | VkQueueFlags queueFlags |
| 6142 | } |
| 6143 | |
| 6144 | @internal class DeviceMemoryObject { |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6145 | VkDevice device |
| 6146 | VkDeviceSize allocationSize |
| 6147 | map!(u64, VkDeviceSize) boundObjects |
| 6148 | map!(VkCommandBuffer, VkCommandBuffer) boundCommandBuffers |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6149 | } |
| 6150 | |
| 6151 | @internal class BufferObject { |
| 6152 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6153 | VkDeviceMemory memory |
| 6154 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6155 | } |
| 6156 | |
| 6157 | @internal class BufferViewObject { |
| 6158 | VkDevice device |
| 6159 | VkBuffer buffer |
| 6160 | } |
| 6161 | |
| 6162 | @internal class ImageObject { |
| 6163 | VkDevice device |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6164 | VkDeviceMemory memory |
| 6165 | VkDeviceSize memoryOffset |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6166 | } |
| 6167 | |
| 6168 | @internal class ImageViewObject { |
| 6169 | VkDevice device |
| 6170 | VkImage image |
| 6171 | } |
| 6172 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6173 | @internal class ShaderObject { |
| 6174 | VkDevice device |
| 6175 | } |
| 6176 | |
| 6177 | @internal class ShaderModuleObject { |
| 6178 | VkDevice device |
| 6179 | } |
| 6180 | |
| 6181 | @internal class PipelineObject { |
| 6182 | VkDevice device |
| 6183 | } |
| 6184 | |
| 6185 | @internal class PipelineLayoutObject { |
| 6186 | VkDevice device |
| 6187 | } |
| 6188 | |
| 6189 | @internal class SamplerObject { |
| 6190 | VkDevice device |
| 6191 | } |
| 6192 | |
| 6193 | @internal class DescriptorSetObject { |
| 6194 | VkDevice device |
| 6195 | } |
| 6196 | |
| 6197 | @internal class DescriptorSetLayoutObject { |
| 6198 | VkDevice device |
| 6199 | } |
| 6200 | |
| 6201 | @internal class DescriptorPoolObject { |
| 6202 | VkDevice device |
| 6203 | } |
| 6204 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6205 | @internal class FenceObject { |
| 6206 | VkDevice device |
| 6207 | bool signaled |
| 6208 | } |
| 6209 | |
| 6210 | @internal class SemaphoreObject { |
| 6211 | VkDevice device |
| 6212 | } |
| 6213 | |
| 6214 | @internal class EventObject { |
| 6215 | VkDevice device |
| 6216 | } |
| 6217 | |
| 6218 | @internal class QueryPoolObject { |
| 6219 | VkDevice device |
| 6220 | } |
| 6221 | |
| 6222 | @internal class FramebufferObject { |
| 6223 | VkDevice device |
| 6224 | } |
| 6225 | |
| 6226 | @internal class RenderPassObject { |
| 6227 | VkDevice device |
| 6228 | } |
| 6229 | |
| 6230 | @internal class PipelineCacheObject { |
| 6231 | VkDevice device |
| 6232 | } |
| 6233 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6234 | @internal class CommandPoolObject { |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6235 | VkDevice device |
| 6236 | } |
| 6237 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6238 | @internal class SurfaceObject { |
| 6239 | VkInstance instance |
| 6240 | } |
| 6241 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6242 | @internal class SwapchainObject { |
| 6243 | VkDevice device |
| 6244 | } |
| 6245 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6246 | macro ref!InstanceObject GetInstance(VkInstance instance) { |
| 6247 | assert(instance in State.Instances) |
| 6248 | return State.Instances[instance] |
| 6249 | } |
| 6250 | |
| 6251 | macro ref!PhysicalDeviceObject GetPhysicalDevice(VkPhysicalDevice physicalDevice) { |
| 6252 | assert(physicalDevice in State.PhysicalDevices) |
| 6253 | return State.PhysicalDevices[physicalDevice] |
| 6254 | } |
| 6255 | |
| 6256 | macro ref!DeviceObject GetDevice(VkDevice device) { |
| 6257 | assert(device in State.Devices) |
| 6258 | return State.Devices[device] |
| 6259 | } |
| 6260 | |
| 6261 | macro ref!QueueObject GetQueue(VkQueue queue) { |
| 6262 | assert(queue in State.Queues) |
| 6263 | return State.Queues[queue] |
| 6264 | } |
| 6265 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6266 | macro ref!CommandBufferObject GetCommandBuffer(VkCommandBuffer commandBuffer) { |
| 6267 | assert(commandBuffer in State.CommandBuffers) |
| 6268 | return State.CommandBuffers[commandBuffer] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6269 | } |
| 6270 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6271 | macro ref!DeviceMemoryObject GetDeviceMemory(VkDeviceMemory memory) { |
| 6272 | assert(memory in State.DeviceMemories) |
| 6273 | return State.DeviceMemories[memory] |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6274 | } |
| 6275 | |
| 6276 | macro ref!BufferObject GetBuffer(VkBuffer buffer) { |
| 6277 | assert(buffer in State.Buffers) |
| 6278 | return State.Buffers[buffer] |
| 6279 | } |
| 6280 | |
| 6281 | macro ref!BufferViewObject GetBufferView(VkBufferView bufferView) { |
| 6282 | assert(bufferView in State.BufferViews) |
| 6283 | return State.BufferViews[bufferView] |
| 6284 | } |
| 6285 | |
| 6286 | macro ref!ImageObject GetImage(VkImage image) { |
| 6287 | assert(image in State.Images) |
| 6288 | return State.Images[image] |
| 6289 | } |
| 6290 | |
| 6291 | macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 6292 | assert(imageView in State.ImageViews) |
| 6293 | return State.ImageViews[imageView] |
| 6294 | } |
| 6295 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6296 | macro ref!ShaderModuleObject GetShaderModule(VkShaderModule shaderModule) { |
| 6297 | assert(shaderModule in State.ShaderModules) |
| 6298 | return State.ShaderModules[shaderModule] |
| 6299 | } |
| 6300 | |
| 6301 | macro ref!PipelineObject GetPipeline(VkPipeline pipeline) { |
| 6302 | assert(pipeline in State.Pipelines) |
| 6303 | return State.Pipelines[pipeline] |
| 6304 | } |
| 6305 | |
| 6306 | macro ref!PipelineLayoutObject GetPipelineLayout(VkPipelineLayout pipelineLayout) { |
| 6307 | assert(pipelineLayout in State.PipelineLayouts) |
| 6308 | return State.PipelineLayouts[pipelineLayout] |
| 6309 | } |
| 6310 | |
| 6311 | macro ref!SamplerObject GetSampler(VkSampler sampler) { |
| 6312 | assert(sampler in State.Samplers) |
| 6313 | return State.Samplers[sampler] |
| 6314 | } |
| 6315 | |
| 6316 | macro ref!DescriptorSetObject GetDescriptorSet(VkDescriptorSet descriptorSet) { |
| 6317 | assert(descriptorSet in State.DescriptorSets) |
| 6318 | return State.DescriptorSets[descriptorSet] |
| 6319 | } |
| 6320 | |
| 6321 | macro ref!DescriptorSetLayoutObject GetDescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) { |
| 6322 | assert(descriptorSetLayout in State.DescriptorSetLayouts) |
| 6323 | return State.DescriptorSetLayouts[descriptorSetLayout] |
| 6324 | } |
| 6325 | |
| 6326 | macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool) { |
| 6327 | assert(descriptorPool in State.DescriptorPools) |
| 6328 | return State.DescriptorPools[descriptorPool] |
| 6329 | } |
| 6330 | |
Jesse Hall | d27f6aa | 2015-08-15 17:58:48 -0700 | [diff] [blame] | 6331 | macro ref!FenceObject GetFence(VkFence fence) { |
| 6332 | assert(fence in State.Fences) |
| 6333 | return State.Fences[fence] |
| 6334 | } |
| 6335 | |
| 6336 | macro ref!SemaphoreObject GetSemaphore(VkSemaphore semaphore) { |
| 6337 | assert(semaphore in State.Semaphores) |
| 6338 | return State.Semaphores[semaphore] |
| 6339 | } |
| 6340 | |
| 6341 | macro ref!EventObject GetEvent(VkEvent event) { |
| 6342 | assert(event in State.Events) |
| 6343 | return State.Events[event] |
| 6344 | } |
| 6345 | |
| 6346 | macro ref!QueryPoolObject GetQueryPool(VkQueryPool queryPool) { |
| 6347 | assert(queryPool in State.QueryPools) |
| 6348 | return State.QueryPools[queryPool] |
| 6349 | } |
| 6350 | |
| 6351 | macro ref!FramebufferObject GetFramebuffer(VkFramebuffer framebuffer) { |
| 6352 | assert(framebuffer in State.Framebuffers) |
| 6353 | return State.Framebuffers[framebuffer] |
| 6354 | } |
| 6355 | |
| 6356 | macro ref!RenderPassObject GetRenderPass(VkRenderPass renderPass) { |
| 6357 | assert(renderPass in State.RenderPasses) |
| 6358 | return State.RenderPasses[renderPass] |
| 6359 | } |
| 6360 | |
| 6361 | macro ref!PipelineCacheObject GetPipelineCache(VkPipelineCache pipelineCache) { |
| 6362 | assert(pipelineCache in State.PipelineCaches) |
| 6363 | return State.PipelineCaches[pipelineCache] |
| 6364 | } |
| 6365 | |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 6366 | macro ref!CommandPoolObject GetCommandPool(VkCommandPool commandPool) { |
| 6367 | assert(commandPool in State.CommandPools) |
| 6368 | return State.CommandPools[commandPool] |
Jesse Hall | f09c6b1 | 2015-08-15 19:54:28 -0700 | [diff] [blame] | 6369 | } |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6370 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 6371 | macro ref!SurfaceObject GetSurface(VkSurfaceKHR surface) { |
| 6372 | assert(surface in State.Surfaces) |
| 6373 | return State.Surfaces[surface] |
| 6374 | } |
| 6375 | |
Michael Lentine | 88594d7 | 2015-11-12 12:49:45 -0800 | [diff] [blame] | 6376 | macro ref!SwapchainObject GetSwapchain(VkSwapchainKHR swapchain) { |
| 6377 | assert(swapchain in State.Swapchains) |
| 6378 | return State.Swapchains[swapchain] |
| 6379 | } |
Jesse Hall | d8bade0 | 2015-11-24 10:24:18 -0800 | [diff] [blame] | 6380 | |
| 6381 | macro VkQueueFlags AddQueueFlag(VkQueueFlags flags, VkQueueFlagBits bit) { |
| 6382 | return as!VkQueueFlags(as!u32(flags) | as!u32(bit)) |
| 6383 | } |