Jesse Hall | e37373b | 2015-10-08 22:22:56 -0700 | [diff] [blame] | 1 | From dc816657910a33b838074dca34c4a2f5739f1b6f Mon Sep 17 00:00:00 2001 |
| 2 | From: Jesse Hall <jessehall@google.com> |
| 3 | Date: Thu, 8 Oct 2015 14:00:22 -0700 |
| 4 | Subject: [PATCH] vulkan: Update from header 0.138.2 to 0.170.2 |
| 5 | |
| 6 | Change-Id: I011e1f27d025730d448ee5cfefc6701300b455c2 |
| 7 | --- |
| 8 | vulkan/api/platform.api | 6 - |
| 9 | vulkan/api/templates/vk_xml.tmpl | 33 +- |
| 10 | vulkan/api/templates/vulkan_common.tmpl | 2 +- |
| 11 | vulkan/api/templates/vulkan_h.tmpl | 27 +- |
| 12 | vulkan/api/vulkan.api | 1144 +++++++++++++------------------ |
| 13 | vulkan/include/hardware/hwvulkan.h | 3 +- |
| 14 | vulkan/include/vulkan/vk_platform.h | 16 - |
| 15 | vulkan/include/vulkan/vulkan.h | 924 ++++++++++++------------- |
| 16 | vulkan/libvulkan/entry.cpp | 249 +++---- |
| 17 | vulkan/libvulkan/get_proc_addr.cpp | 190 ++--- |
| 18 | vulkan/libvulkan/loader.cpp | 85 +-- |
| 19 | vulkan/libvulkan/loader.h | 42 +- |
| 20 | vulkan/libvulkan/swapchain.cpp | 44 +- |
| 21 | vulkan/nulldrv/null_driver.cpp | 139 ++-- |
| 22 | vulkan/nulldrv/null_driver.h | 40 +- |
| 23 | vulkan/nulldrv/null_driver_gen.cpp | 31 +- |
| 24 | vulkan/tools/Android.mk | 1 + |
| 25 | vulkan/tools/vkinfo.cpp | 82 ++- |
| 26 | 18 files changed, 1338 insertions(+), 1720 deletions(-) |
| 27 | |
| 28 | diff --git a/vulkan/api/platform.api b/vulkan/api/platform.api |
| 29 | index 3da6fed..23f649d 100644 |
| 30 | --- a/vulkan/api/platform.api |
| 31 | +++ b/vulkan/api/platform.api |
| 32 | @@ -22,9 +22,3 @@ |
| 33 | // Platform types, as defined or included in vk_platform.h |
| 34 | |
| 35 | type u64 size_t |
| 36 | - |
| 37 | -type u64 VkDeviceSize |
| 38 | -type u32 VkBool32 |
| 39 | - |
| 40 | -type u32 VkSampleMask |
| 41 | -type u32 VkFlags |
| 42 | diff --git a/vulkan/api/templates/vk_xml.tmpl b/vulkan/api/templates/vk_xml.tmpl |
| 43 | index c040938..893bde7 100644 |
| 44 | --- a/vulkan/api/templates/vk_xml.tmpl |
| 45 | +++ b/vulkan/api/templates/vk_xml.tmpl |
| 46 | @@ -68,13 +68,18 @@ This file, vk.xml, is the Vulkan API Registry.» |
| 47 | // the object handle as a bool in expressions like: |
| 48 | // if (obj) vkDestroy(obj); |
| 49 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() explicit operator bool() const { return handle != 0; } |
| 50 | + #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 51 | + explicit obj(uint64_t x) : handle(x) { } \ |
| 52 | + obj(decltype(nullptr)) : handle(0) { } |
| 53 | «#else» |
| 54 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() |
| 55 | + #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 56 | + obj(uint64_t x) : handle(x) { } |
| 57 | «#endif |
| 58 | #define <name>VK_DEFINE_NONDISP_HANDLE</name>(obj) \» |
| 59 | struct obj { \ |
| 60 | obj() { } \ |
| 61 | - obj(uint64_t x) { handle = x; } \ |
| 62 | + VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 63 | obj& operator =(uint64_t x) { handle = x; return *this; } \ |
| 64 | bool operator==(const obj& other) const { return handle == other.handle; } \ |
| 65 | bool operator!=(const obj& other) const { return handle != other.handle; } \ |
| 66 | @@ -87,6 +92,14 @@ This file, vk.xml, is the Vulkan API Registry.» |
| 67 | #endif |
| 68 | »»</type> |
| 69 | ¶ |
| 70 | + <type category="define"> |
| 71 | +#if defined(__cplusplus) && ((defined(_MSC_VER) && _MSC_VER >= 1800) || __cplusplus >= 201103L) |
| 72 | + »#define <name>VK_NULL_HANDLE</name> nullptr |
| 73 | +«#else |
| 74 | + »#define VK_NULL_HANDLE 0 |
| 75 | +«#endif |
| 76 | + »»</type> |
| 77 | +¶ |
| 78 | <type requires="vk_platform" name="VkDeviceSize"/> |
| 79 | <type requires="vk_platform" name="VkSampleMask"/> |
| 80 | <type requires="vk_platform" name="VkFlags"/> |
| 81 | @@ -170,12 +183,13 @@ This file, vk.xml, is the Vulkan API Registry.» |
| 82 | <enum value="{{$d.Expression}}" name="{{$d.Name}}"/>{{Macro "XML.Docs" $d.Docs}} |
| 83 | {{end}} |
| 84 | {{end}} |
| 85 | - <enum value="MAX_FLOAT" name="VK_LOD_CLAMP_NONE"/> |
| 86 | - <enum value="UINT32_MAX" name="VK_LAST_MIP_LEVEL"/> |
| 87 | - <enum value="UINT32_MAX" name="VK_LAST_ARRAY_SLICE"/> |
| 88 | - <enum value="UINT64_MAX" name="VK_WHOLE_SIZE"/> |
| 89 | - <enum value="UINT32_MAX" name="VK_ATTACHMENT_UNUSED"/> |
| 90 | - <enum value="UINT32_MAX" name="VK_QUEUE_FAMILY_IGNORED"/> |
| 91 | + <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/> |
| 92 | + <enum value="(-0U)" name="VK_REMAINING_MIP_LEVELS"/> |
| 93 | + <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/> |
| 94 | + <enum value="(_0ULL)" name="VK_WHOLE_SIZE"/> |
| 95 | + <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/> |
| 96 | + <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/> |
| 97 | + <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/> |
| 98 | «</enums> |
| 99 | ¶ |
| 100 | <!-- Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in» |
| 101 | @@ -217,13 +231,12 @@ This file, vk.xml, is the Vulkan API Registry.» |
| 102 | «</require> |
| 103 | <require comment="API constants">» |
| 104 | <enum name="VK_LOD_CLAMP_NONE"/> |
| 105 | - <enum name="VK_LAST_MIP_LEVEL"/> |
| 106 | - <enum name="VK_LAST_ARRAY_SLICE"/> |
| 107 | + <enum name="VK_REMAINING_MIP_LEVELS"/> |
| 108 | + <enum name="VK_REMAINING_ARRAY_LAYERS"/> |
| 109 | <enum name="VK_WHOLE_SIZE"/> |
| 110 | <enum name="VK_ATTACHMENT_UNUSED"/> |
| 111 | <enum name="VK_TRUE"/> |
| 112 | <enum name="VK_FALSE"/> |
| 113 | - <enum name="VK_NULL_HANDLE"/> |
| 114 | «</require> |
| 115 | <require comment="All functions (TODO: split by type)">» |
| 116 | {{range $f := AllCommands $}} |
| 117 | diff --git a/vulkan/api/templates/vulkan_common.tmpl b/vulkan/api/templates/vulkan_common.tmpl |
| 118 | index 135c835..12d5788 100644 |
| 119 | --- a/vulkan/api/templates/vulkan_common.tmpl |
| 120 | +++ b/vulkan/api/templates/vulkan_common.tmpl |
| 121 | @@ -137,7 +137,7 @@ |
| 122 | {{define "Parameter"}} |
| 123 | {{AssertType $ "Parameter"}} |
| 124 | |
| 125 | - {{Macro "ParameterType" $}} {{$.Name}}{{Macro "ArrayPostfix" $}} |
| 126 | + {{if GetAnnotation $ "readonly"}}const {{end}}{{Macro "ParameterType" $}} {{$.Name}}{{Macro "ArrayPostfix" $}} |
| 127 | {{end}} |
| 128 | |
| 129 | |
| 130 | diff --git a/vulkan/api/templates/vulkan_h.tmpl b/vulkan/api/templates/vulkan_h.tmpl |
| 131 | index 6747147..2dee541 100644 |
| 132 | --- a/vulkan/api/templates/vulkan_h.tmpl |
| 133 | +++ b/vulkan/api/templates/vulkan_h.tmpl |
| 134 | @@ -53,10 +53,16 @@ extern "C" { |
| 135 | #define VK_API_VERSION \ |
| 136 | VK_MAKE_VERSION({{Global "VERSION_MAJOR"}}, {{Global "VERSION_MINOR"}}, {{Global "VERSION_PATCH"}}) |
| 137 | ¶ |
| 138 | +#if defined(__cplusplus) && (_MSC_VER >= 1800 || __cplusplus >= 201103L) |
| 139 | + #define VK_NULL_HANDLE nullptr |
| 140 | +#else |
| 141 | + #define VK_NULL_HANDLE 0 |
| 142 | +#endif |
| 143 | +¶ |
| 144 | #define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj; |
| 145 | ¶ |
| 146 | #if defined(__cplusplus) |
| 147 | -#if (_MSC_VER >= 1800 || __cplusplus >= 201103L) |
| 148 | +#if ((defined(_MSC_VER) && _MSC_VER >= 1800 || __cplusplus >= 201103L) |
| 149 | // The bool operator only works if there are no implicit conversions from an obj to |
| 150 | // a bool-compatible type, which can then be used to unintentionally violate type safety. |
| 151 | // C++11 and above supports the "explicit" keyword on conversion operators to stop this |
| 152 | @@ -65,13 +71,18 @@ extern "C" { |
| 153 | // if (obj) vkDestroy(obj); |
| 154 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() \ |
| 155 | explicit operator bool() const { return handle != 0; } |
| 156 | +#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 157 | + explicit obj(uint64_t x) : handle(x) { } \ |
| 158 | + obj(decltype(nullptr)) : handle(0) { } |
| 159 | #else |
| 160 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() |
| 161 | +#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 162 | + obj(uint64_t x) : handle(x) { } |
| 163 | #endif |
| 164 | #define VK_DEFINE_NONDISP_HANDLE(obj) \ |
| 165 | struct obj { \ |
| 166 | obj() : handle(0) { } \ |
| 167 | - obj(uint64_t x) : handle(x) { } \ |
| 168 | + VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 169 | obj& operator=(uint64_t x) { \ |
| 170 | handle = x; \ |
| 171 | return *this; \ |
| 172 | @@ -87,11 +98,13 @@ extern "C" { |
| 173 | typedef struct obj##_T { uint64_t handle; } obj; |
| 174 | #endif |
| 175 | ¶ |
| 176 | -#define VK_LOD_CLAMP_NONE MAX_FLOAT |
| 177 | -#define VK_LAST_MIP_LEVEL UINT32_MAX |
| 178 | -#define VK_LAST_ARRAY_SLICE UINT32_MAX |
| 179 | -#define VK_WHOLE_SIZE UINT64_MAX |
| 180 | -#define VK_ATTACHMENT_UNUSED UINT32_MAX |
| 181 | +#define VK_LOD_CLAMP_NONE 1000.0f |
| 182 | +#define VK_REMAINING_MIP_LEVELS (~0U) |
| 183 | +#define VK_REMAINING_ARRAY_LAYERS (~0U) |
| 184 | +#define VK_WHOLE_SIZE (~0ULL) |
| 185 | +#define VK_ATTACHMENT_UNUSED (~0U) |
| 186 | +define VK_QUEUE_FAMILY_IGNORED (~0U) |
| 187 | +define VK_SUBPASS_EXTERNAL (~0U) |
| 188 | {{range $d := $.Definitions}} |
| 189 | {{if HasPrefix $d.Name "VK_"}}#define {{$d.Name}} {{$d.Expression}}{{end}} |
| 190 | {{end}} |
| 191 | diff --git a/vulkan/api/vulkan.api b/vulkan/api/vulkan.api |
| 192 | index c014454..9ea1ee4 100644 |
| 193 | --- a/vulkan/api/vulkan.api |
| 194 | +++ b/vulkan/api/vulkan.api |
| 195 | @@ -27,7 +27,7 @@ import platform "platform.api" |
| 196 | |
| 197 | // API version (major.minor.patch) |
| 198 | define VERSION_MAJOR 0 |
| 199 | -define VERSION_MINOR 138 |
| 200 | +define VERSION_MINOR 170 |
| 201 | define VERSION_PATCH 2 |
| 202 | |
| 203 | // API limits |
| 204 | @@ -41,13 +41,20 @@ define VK_MAX_MEMORY_HEAPS 16 /// The maximum number of unique memory |
| 205 | // API keywords |
| 206 | define VK_TRUE 1 |
| 207 | define VK_FALSE 0 |
| 208 | -define VK_NULL_HANDLE 0 |
| 209 | + |
| 210 | +// API keyword, but needs special handling by some templates |
| 211 | +define NULL_HANDLE 0 |
| 212 | |
| 213 | |
| 214 | ///////////// |
| 215 | // Types // |
| 216 | ///////////// |
| 217 | |
| 218 | +type u32 VkBool32 |
| 219 | +type u32 VkFlags |
| 220 | +type u64 VkDeviceSize |
| 221 | +type u32 VkSampleMask |
| 222 | + |
| 223 | /// Dispatchable handle types. |
| 224 | @dispatchHandle type u64 VkInstance |
| 225 | @dispatchHandle type u64 VkPhysicalDevice |
| 226 | @@ -62,7 +69,6 @@ define VK_NULL_HANDLE 0 |
| 227 | @nonDispatchHandle type u64 VkBufferView |
| 228 | @nonDispatchHandle type u64 VkImage |
| 229 | @nonDispatchHandle type u64 VkImageView |
| 230 | -@nonDispatchHandle type u64 VkAttachmentView |
| 231 | @nonDispatchHandle type u64 VkShaderModule |
| 232 | @nonDispatchHandle type u64 VkShader |
| 233 | @nonDispatchHandle type u64 VkPipeline |
| 234 | @@ -71,10 +77,6 @@ define VK_NULL_HANDLE 0 |
| 235 | @nonDispatchHandle type u64 VkDescriptorSet |
| 236 | @nonDispatchHandle type u64 VkDescriptorSetLayout |
| 237 | @nonDispatchHandle type u64 VkDescriptorPool |
| 238 | -@nonDispatchHandle type u64 VkDynamicViewportState |
| 239 | -@nonDispatchHandle type u64 VkDynamicRasterState |
| 240 | -@nonDispatchHandle type u64 VkDynamicColorBlendState |
| 241 | -@nonDispatchHandle type u64 VkDynamicDepthStencilState |
| 242 | @nonDispatchHandle type u64 VkFence |
| 243 | @nonDispatchHandle type u64 VkSemaphore |
| 244 | @nonDispatchHandle type u64 VkEvent |
| 245 | @@ -97,6 +99,7 @@ enum VkImageLayout { |
| 246 | VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, /// Optimal layout when image is used for read only shader access |
| 247 | VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000006, /// Optimal layout when image is used only as source of transfer operations |
| 248 | VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000007, /// Optimal layout when image is used only as destination of transfer operations |
| 249 | + VK_IMAGE_LAYOUT_PREINITIALIZED = 0x00000008, /// Initial layout used when the data is populated by the CPU |
| 250 | } |
| 251 | |
| 252 | enum VkAttachmentLoadOp { |
| 253 | @@ -138,11 +141,6 @@ enum VkImageAspect { |
| 254 | VK_IMAGE_ASPECT_METADATA = 0x00000003, |
| 255 | } |
| 256 | |
| 257 | -enum VkBufferViewType { |
| 258 | - VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, /// Raw buffer without special structure (UBO, SSBO) |
| 259 | - VK_BUFFER_VIEW_TYPE_FORMATTED = 0x00000001, /// Buffer with format (TBO, IBO) |
| 260 | -} |
| 261 | - |
| 262 | enum VkCmdBufferLevel { |
| 263 | VK_CMD_BUFFER_LEVEL_PRIMARY = 0x00000000, |
| 264 | VK_CMD_BUFFER_LEVEL_SECONDARY = 0x00000001, |
| 265 | @@ -240,12 +238,12 @@ enum VkTexMipmapMode { |
| 266 | VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, /// Linear filter between mip levels |
| 267 | } |
| 268 | |
| 269 | -enum VkTexAddress { |
| 270 | - VK_TEX_ADDRESS_WRAP = 0x00000000, |
| 271 | - VK_TEX_ADDRESS_MIRROR = 0x00000001, |
| 272 | - VK_TEX_ADDRESS_CLAMP = 0x00000002, |
| 273 | - VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003, |
| 274 | - VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004, |
| 275 | +enum VkTexAddressMode { |
| 276 | + VK_TEX_ADDRESS_MODE_WRAP = 0x00000000, |
| 277 | + VK_TEX_ADDRESS_MODE_MIRROR = 0x00000001, |
| 278 | + VK_TEX_ADDRESS_MODE_CLAMP = 0x00000002, |
| 279 | + VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 0x00000003, |
| 280 | + VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 0x00000004, |
| 281 | } |
| 282 | |
| 283 | enum VkCompareOp { |
| 284 | @@ -450,7 +448,7 @@ enum VkFormat { |
| 285 | VK_FORMAT_R11G11B10_UFLOAT = 0x00000057, |
| 286 | VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058, |
| 287 | VK_FORMAT_D16_UNORM = 0x00000059, |
| 288 | - VK_FORMAT_D24_UNORM = 0x0000005A, |
| 289 | + VK_FORMAT_D24_UNORM_X8 = 0x0000005A, |
| 290 | VK_FORMAT_D32_SFLOAT = 0x0000005B, |
| 291 | VK_FORMAT_S8_UINT = 0x0000005C, |
| 292 | VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D, |
| 293 | @@ -552,52 +550,49 @@ enum VkStructureType { |
| 294 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1, |
| 295 | VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2, |
| 296 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3, |
| 297 | - VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO = 4, |
| 298 | - VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 5, |
| 299 | - VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 6, |
| 300 | - VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 7, |
| 301 | - VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 8, |
| 302 | - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 9, |
| 303 | - VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO = 10, |
| 304 | - VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO = 11, |
| 305 | - VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO = 12, |
| 306 | - VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO = 13, |
| 307 | - VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 14, |
| 308 | - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 15, |
| 309 | - VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 16, |
| 310 | - VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 17, |
| 311 | - VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 18, |
| 312 | - VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 19, |
| 313 | - VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 20, |
| 314 | - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 21, |
| 315 | - VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 22, |
| 316 | - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 23, |
| 317 | - VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 24, |
| 318 | - VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 25, |
| 319 | - VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 26, |
| 320 | - VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 27, |
| 321 | - VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 28, |
| 322 | - VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 29, |
| 323 | - VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 30, |
| 324 | - VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 31, |
| 325 | - VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 32, |
| 326 | - VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 33, |
| 327 | - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 34, |
| 328 | - VK_STRUCTURE_TYPE_MEMORY_BARRIER = 35, |
| 329 | - VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 36, |
| 330 | - VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 37, |
| 331 | - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 38, |
| 332 | - VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 39, |
| 333 | - VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 40, |
| 334 | - VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 41, |
| 335 | - VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 42, |
| 336 | - VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 43, |
| 337 | - VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 44, |
| 338 | - VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 45, |
| 339 | - VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 46, |
| 340 | - VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 47, |
| 341 | - VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 48, |
| 342 | - VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 49, |
| 343 | + VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 4, |
| 344 | + VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 5, |
| 345 | + VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 6, |
| 346 | + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 7, |
| 347 | + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 8, |
| 348 | + VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 9, |
| 349 | + VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
| 350 | + VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 11, |
| 351 | + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 12, |
| 352 | + VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 13, |
| 353 | + VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 14, |
| 354 | + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 15, |
| 355 | + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 16, |
| 356 | + VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 17, |
| 357 | + VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 18, |
| 358 | + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 19, |
| 359 | + VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 20, |
| 360 | + VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 21, |
| 361 | + VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 22, |
| 362 | + VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 23, |
| 363 | + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 24, |
| 364 | + VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 25, |
| 365 | + VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 26, |
| 366 | + VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 27, |
| 367 | + VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 28, |
| 368 | + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 29, |
| 369 | + VK_STRUCTURE_TYPE_MEMORY_BARRIER = 30, |
| 370 | + VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 31, |
| 371 | + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 32, |
| 372 | + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
| 373 | + VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 34, |
| 374 | + VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 35, |
| 375 | + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 36, |
| 376 | + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 37, |
| 377 | + VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 38, |
| 378 | + VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 39, |
| 379 | + VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 40, |
| 380 | + VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 41, |
| 381 | + VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 42, |
| 382 | + VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 383 | + VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 44, |
| 384 | + VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 45, |
| 385 | + VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 46, |
| 386 | } |
| 387 | |
| 388 | enum VkRenderPassContents { |
| 389 | @@ -605,7 +600,7 @@ enum VkRenderPassContents { |
| 390 | VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 0x00000001, |
| 391 | } |
| 392 | |
| 393 | -@lastUnused(-33) |
| 394 | +@lastUnused(-8) |
| 395 | /// Error and return codes |
| 396 | enum VkResult { |
| 397 | // Return codes for successful operation execution (positive values) |
| 398 | @@ -618,38 +613,26 @@ enum VkResult { |
| 399 | VK_INCOMPLETE = 0x00000006, |
| 400 | |
| 401 | // Error codes (negative values) |
| 402 | - VK_ERROR_UNKNOWN = 0xFFFFFFFF, |
| 403 | - VK_ERROR_UNAVAILABLE = 0xFFFFFFFE, |
| 404 | + VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFF, |
| 405 | + VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFE, |
| 406 | VK_ERROR_INITIALIZATION_FAILED = 0xFFFFFFFD, |
| 407 | - VK_ERROR_OUT_OF_HOST_MEMORY = 0xFFFFFFFC, |
| 408 | - VK_ERROR_OUT_OF_DEVICE_MEMORY = 0xFFFFFFFB, |
| 409 | - VK_ERROR_DEVICE_ALREADY_CREATED = 0xFFFFFFFA, |
| 410 | - VK_ERROR_DEVICE_LOST = 0xFFFFFFF9, |
| 411 | - VK_ERROR_INVALID_POINTER = 0xFFFFFFF8, |
| 412 | - VK_ERROR_INVALID_VALUE = 0xFFFFFFF7, |
| 413 | - VK_ERROR_INVALID_HANDLE = 0xFFFFFFF6, |
| 414 | - VK_ERROR_INVALID_ORDINAL = 0xFFFFFFF5, |
| 415 | - VK_ERROR_INVALID_MEMORY_SIZE = 0xFFFFFFF4, |
| 416 | - VK_ERROR_INVALID_EXTENSION = 0xFFFFFFF3, |
| 417 | - VK_ERROR_INVALID_FLAGS = 0xFFFFFFF2, |
| 418 | - VK_ERROR_INVALID_ALIGNMENT = 0xFFFFFFF1, |
| 419 | - VK_ERROR_INVALID_FORMAT = 0xFFFFFFF0, |
| 420 | - VK_ERROR_INVALID_IMAGE = 0xFFFFFFEF, |
| 421 | - VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = 0xFFFFFFEE, |
| 422 | - VK_ERROR_INVALID_QUEUE_TYPE = 0xFFFFFFED, |
| 423 | - VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = 0xFFFFFFEC, |
| 424 | - VK_ERROR_BAD_SHADER_CODE = 0xFFFFFFEB, |
| 425 | - VK_ERROR_BAD_PIPELINE_DATA = 0xFFFFFFEA, |
| 426 | - VK_ERROR_NOT_MAPPABLE = 0xFFFFFFE9, |
| 427 | - VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFE8, |
| 428 | - VK_ERROR_MEMORY_UNMAP_FAILED = 0xFFFFFFE7, |
| 429 | - VK_ERROR_INCOMPATIBLE_DEVICE = 0xFFFFFFE6, |
| 430 | - VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFE5, |
| 431 | - VK_ERROR_INCOMPLETE_COMMAND_BUFFER = 0xFFFFFFE4, |
| 432 | - VK_ERROR_BUILDING_COMMAND_BUFFER = 0xFFFFFFE3, |
| 433 | - VK_ERROR_MEMORY_NOT_BOUND = 0xFFFFFFE2, |
| 434 | - VK_ERROR_INCOMPATIBLE_QUEUE = 0xFFFFFFE1, |
| 435 | - VK_ERROR_INVALID_LAYER = 0xFFFFFFE0, |
| 436 | + VK_ERROR_DEVICE_LOST = 0xFFFFFFFC, |
| 437 | + VK_ERROR_MEMORY_MAP_FAILED = 0xFFFFFFFB, |
| 438 | + VK_ERROR_LAYER_NOT_PRESENT = 0xFFFFFFFA, |
| 439 | + VK_ERROR_EXTENSION_NOT_PRESENT = 0xFFFFFFF9, |
| 440 | + VK_ERROR_INCOMPATIBLE_DRIVER = 0xFFFFFFF8, |
| 441 | +} |
| 442 | + |
| 443 | +enum VkDynamicState { |
| 444 | + VK_DYNAMIC_STATE_VIEWPORT = 0x00000000, |
| 445 | + VK_DYNAMIC_STATE_SCISSOR = 0x00000001, |
| 446 | + VK_DYNAMIC_STATE_LINE_WIDTH = 0x00000002, |
| 447 | + VK_DYNAMIC_STATE_DEPTH_BIAS = 0x00000003, |
| 448 | + VK_DYNAMIC_STATE_BLEND_CONSTANTS = 0x00000004, |
| 449 | + VK_DYNAMIC_STATE_DEPTH_BOUNDS = 0x00000005, |
| 450 | + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 0x00000006, |
| 451 | + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 0x00000007, |
| 452 | + VK_DYNAMIC_STATE_STENCIL_REFERENCE = 0x00000008, |
| 453 | } |
| 454 | |
| 455 | |
| 456 | @@ -657,11 +640,6 @@ enum VkResult { |
| 457 | // Bitfields // |
| 458 | ///////////////// |
| 459 | |
| 460 | -/// Device creation flags |
| 461 | -bitfield VkDeviceCreateFlags { |
| 462 | - VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001, |
| 463 | -} |
| 464 | - |
| 465 | /// Queue capabilities |
| 466 | bitfield VkQueueFlags { |
| 467 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, /// Queue supports graphics operations |
| 468 | @@ -684,7 +662,7 @@ bitfield VkMemoryPropertyFlags { |
| 469 | |
| 470 | /// Memory heap flags |
| 471 | bitfield VkMemoryHeapFlags { |
| 472 | - VK_MEMORY_HEAP_HOST_LOCAL = 0x00000001, /// If set, heap represents host memory |
| 473 | + VK_MEMORY_HEAP_HOST_LOCAL_BIT = 0x00000001, /// If set, heap represents host memory |
| 474 | } |
| 475 | |
| 476 | /// Memory output flags passed to resource transition commands |
| 477 | @@ -712,7 +690,6 @@ bitfield VkMemoryInputFlags { |
| 478 | |
| 479 | /// Buffer usage flags |
| 480 | bitfield VkBufferUsageFlags { |
| 481 | - VK_BUFFER_USAGE_GENERAL = 0x00000000, /// No special usage |
| 482 | VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 483 | VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, /// Can be used as a destination of transfer operations |
| 484 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, /// Can be used as TBO |
| 485 | @@ -726,7 +703,7 @@ bitfield VkBufferUsageFlags { |
| 486 | |
| 487 | /// Buffer creation flags |
| 488 | bitfield VkBufferCreateFlags { |
| 489 | - VK_BUFFER_CREATE_SPARSE_BIT = 0x00000001, /// Buffer should support sparse backing |
| 490 | + VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Buffer should support sparse backing |
| 491 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Buffer should support sparse backing with partial residency |
| 492 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers |
| 493 | } |
| 494 | @@ -745,31 +722,29 @@ bitfield VkShaderStageFlags { |
| 495 | |
| 496 | /// Image usage flags |
| 497 | bitfield VkImageUsageFlags { |
| 498 | - VK_IMAGE_USAGE_GENERAL = 0x00000000, /// No special usage |
| 499 | VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, /// Can be used as a source of transfer operations |
| 500 | VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, /// Can be used as a destination of transfer operations |
| 501 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, /// Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) |
| 502 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, /// Can be used as storage image (STORAGE_IMAGE descriptor type) |
| 503 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, /// Can be used as framebuffer color attachment |
| 504 | - VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment |
| 505 | + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, /// Can be used as framebuffer depth/stencil attachment |
| 506 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, /// Image data not needed outside of rendering |
| 507 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, /// Can be used as framebuffer input attachment |
| 508 | } |
| 509 | |
| 510 | /// Image creation flags |
| 511 | bitfield VkImageCreateFlags { |
| 512 | - VK_IMAGE_CREATE_SPARSE_BIT = 0x00000001, /// Image should support sparse backing |
| 513 | + VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, /// Image should support sparse backing |
| 514 | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, /// Image should support sparse backing with partial residency |
| 515 | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, /// Image should support constent data access to physical memory blocks mapped into multiple locations of sparse images |
| 516 | - VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000008, |
| 517 | - VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000010, /// Allows image views to have different format than the base image |
| 518 | - VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000020, /// Allows creating image views with cube type from the created image |
| 519 | + VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, /// Allows image views to have different format than the base image |
| 520 | + VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, /// Allows creating image views with cube type from the created image |
| 521 | } |
| 522 | |
| 523 | /// Framebuffer attachment view creation flags |
| 524 | -bitfield VkAttachmentViewCreateFlags { |
| 525 | - VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001, |
| 526 | - VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002, |
| 527 | +bitfield VkImageViewCreateFlags { |
| 528 | + VK_IMAGE_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001, |
| 529 | + VK_IMAGE_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002, |
| 530 | } |
| 531 | |
| 532 | /// Pipeline creation flags |
| 533 | @@ -808,7 +783,8 @@ bitfield VkFormatFeatureFlags { |
| 534 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, /// Format can be used for color attachment images |
| 535 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, /// Format supports blending in case it's used for color attachment images |
| 536 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, /// Format can be used for depth/stencil attachment images |
| 537 | - VK_FORMAT_FEATURE_CONVERSION_BIT = 0x00000400, /// Format can be used as the source or destination of format converting blits |
| 538 | + VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400, /// Format can be used as the source image of blits with vkCmdBlitImage |
| 539 | + VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800, /// Format can be used as the destination image of blits with vkCmdBlitImage |
| 540 | } |
| 541 | |
| 542 | /// Query control flags |
| 543 | @@ -904,11 +880,15 @@ bitfield VkPipelineStageFlags { |
| 544 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, /// Color attachment writes |
| 545 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, /// Compute shading |
| 546 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, /// Transfer/copy operations |
| 547 | - VK_PIPELINE_STAGE_TRANSITION_BIT = 0x00002000, /// Resource transition commands |
| 548 | - VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, /// Indicates host (CPU) is a source/sink of the dependency |
| 549 | + VK_PIPELINE_STAGE_HOST_BIT = 0x00002000, /// Indicates host (CPU) is a source/sink of the dependency |
| 550 | |
| 551 | VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF, /// All stages of the graphics pipeline |
| 552 | - VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00003FFF, /// All graphics, compute, copy, and transition commands |
| 553 | + VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF, /// All graphics, compute, copy, and transition commands |
| 554 | +} |
| 555 | + |
| 556 | +/// Render pass attachment description flags |
| 557 | +bitfield VkAttachmentDescriptionFlags { |
| 558 | + VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, /// The attachment may alias physical memory of another attachment in the same renderpass |
| 559 | } |
| 560 | |
| 561 | /// Subpass description flags |
| 562 | @@ -924,11 +904,27 @@ bitfield VkCmdPoolCreateFlags { |
| 563 | |
| 564 | /// Command pool reset flags |
| 565 | bitfield VkCmdPoolResetFlags { |
| 566 | - VK_CMD_POOL_RESET_RELEASE_RESOURCES = 0x00000001, /// Release resources owned by the pool |
| 567 | + VK_CMD_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the pool |
| 568 | } |
| 569 | |
| 570 | bitfield VkCmdBufferResetFlags { |
| 571 | - VK_CMD_BUFFER_RESET_RELEASE_RESOURCES = 0x00000001, /// Release resources owned by the buffer |
| 572 | + VK_CMD_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, /// Release resources owned by the buffer |
| 573 | +} |
| 574 | + |
| 575 | +bitfield VkSampleCountFlags { |
| 576 | + VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 577 | + VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 578 | + VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 579 | + VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 580 | + VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 581 | + VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 582 | + VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 583 | +} |
| 584 | + |
| 585 | +bitfield VkStencilFaceFlags { |
| 586 | + VK_STENCIL_FACE_NONE = 0x00000000, /// No faces |
| 587 | + VK_STENCIL_FACE_FRONT_BIT = 0x00000001, /// Front face |
| 588 | + VK_STENCIL_FACE_BACK_BIT = 0x00000002, /// Back face |
| 589 | } |
| 590 | |
| 591 | |
| 592 | @@ -992,6 +988,8 @@ class VkPhysicalDeviceProperties { |
| 593 | VkPhysicalDeviceType deviceType |
| 594 | char[VK_MAX_PHYSICAL_DEVICE_NAME] deviceName |
| 595 | u8[VK_UUID_LENGTH] pipelineCacheUUID |
| 596 | + VkPhysicalDeviceLimits limits |
| 597 | + VkPhysicalDeviceSparseProperties sparseProperties |
| 598 | } |
| 599 | |
| 600 | class VkExtensionProperties { |
| 601 | @@ -1023,6 +1021,8 @@ class VkAllocCallbacks { |
| 602 | } |
| 603 | |
| 604 | class VkDeviceQueueCreateInfo { |
| 605 | + VkStructureType sStype /// Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO |
| 606 | + const void* pNext /// Pointer to next structure |
| 607 | u32 queueFamilyIndex |
| 608 | u32 queueCount |
| 609 | } |
| 610 | @@ -1037,7 +1037,6 @@ class VkDeviceCreateInfo { |
| 611 | u32 extensionCount |
| 612 | const char* const* ppEnabledExtensionNames |
| 613 | const VkPhysicalDeviceFeatures* pEnabledFeatures |
| 614 | - VkDeviceCreateFlags flags /// Device creation flags |
| 615 | } |
| 616 | |
| 617 | class VkInstanceCreateInfo { |
| 618 | @@ -1051,10 +1050,10 @@ class VkInstanceCreateInfo { |
| 619 | const char* const* ppEnabledExtensionNames /// Extension names to be enabled |
| 620 | } |
| 621 | |
| 622 | -class VkPhysicalDeviceQueueProperties { |
| 623 | +class VkQueueFamilyProperties { |
| 624 | VkQueueFlags queueFlags /// Queue flags |
| 625 | u32 queueCount |
| 626 | - platform.VkBool32 supportsTimestamps |
| 627 | + VkBool32 supportsTimestamps |
| 628 | } |
| 629 | |
| 630 | class VkPhysicalDeviceMemoryProperties { |
| 631 | @@ -1067,13 +1066,13 @@ class VkPhysicalDeviceMemoryProperties { |
| 632 | class VkMemoryAllocInfo { |
| 633 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO |
| 634 | const void* pNext /// Pointer to next structure |
| 635 | - platform.VkDeviceSize allocationSize /// Size of memory allocation |
| 636 | + VkDeviceSize allocationSize /// Size of memory allocation |
| 637 | u32 memoryTypeIndex /// Index of the of the memory type to allocate from |
| 638 | } |
| 639 | |
| 640 | class VkMemoryRequirements { |
| 641 | - platform.VkDeviceSize size /// Specified in bytes |
| 642 | - platform.VkDeviceSize alignment /// Specified in bytes |
| 643 | + VkDeviceSize size /// Specified in bytes |
| 644 | + VkDeviceSize alignment /// Specified in bytes |
| 645 | u32 memoryTypeBits /// Bitfield of the allowed memory type indices into memoryTypes[] for this object |
| 646 | } |
| 647 | |
| 648 | @@ -1086,9 +1085,9 @@ class VkSparseImageFormatProperties { |
| 649 | class VkSparseImageMemoryRequirements { |
| 650 | VkSparseImageFormatProperties formatProps |
| 651 | u32 imageMipTailStartLOD |
| 652 | - platform.VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 653 | - platform.VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 654 | - platform.VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment |
| 655 | + VkDeviceSize imageMipTailSize /// Specified in bytes, must be a multiple of image block size / alignment |
| 656 | + VkDeviceSize imageMipTailOffset /// Specified in bytes, must be a multiple of image block size / alignment |
| 657 | + VkDeviceSize imageMipTailStride /// Specified in bytes, must be a multiple of image block size / alignment |
| 658 | } |
| 659 | |
| 660 | class VkMemoryType { |
| 661 | @@ -1097,7 +1096,7 @@ class VkMemoryType { |
| 662 | } |
| 663 | |
| 664 | class VkMemoryHeap { |
| 665 | - platform.VkDeviceSize size /// Available memory in the heap |
| 666 | + VkDeviceSize size /// Available memory in the heap |
| 667 | VkMemoryHeapFlags flags /// Flags for the heap |
| 668 | } |
| 669 | |
| 670 | @@ -1105,26 +1104,36 @@ class VkMappedMemoryRange { |
| 671 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE |
| 672 | const void* pNext /// Pointer to next structure |
| 673 | VkDeviceMemory mem /// Mapped memory object |
| 674 | - platform.VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 675 | - platform.VkDeviceSize size /// Size of the range within the mapped memory |
| 676 | + VkDeviceSize offset /// Offset within the mapped memory the range starts from |
| 677 | + VkDeviceSize size /// Size of the range within the mapped memory |
| 678 | } |
| 679 | |
| 680 | class VkFormatProperties { |
| 681 | VkFormatFeatureFlags linearTilingFeatures /// Format features in case of linear tiling |
| 682 | VkFormatFeatureFlags optimalTilingFeatures /// Format features in case of optimal tiling |
| 683 | + VkFormatFeatureFlags bufferFeatures /// Format features supported by buffers |
| 684 | } |
| 685 | |
| 686 | class VkImageFormatProperties { |
| 687 | - u64 maxResourceSize /// max size (in bytes) of this resource type |
| 688 | - u32 maxSamples /// max sample count for this resource type |
| 689 | + VkExtent3D maxExtent /// max image dimensions for this resource type |
| 690 | + u32 maxMipLevels /// max number of mipmap levels for this resource type |
| 691 | + u32 maxArraySize /// max array size for this resource type |
| 692 | + VkSampleCountFlags sampleCounts /// supported sample counts for this resource type |
| 693 | + VkDeviceSize maxResourceSize /// max size (in bytes) of this resource type |
| 694 | +} |
| 695 | + |
| 696 | +class VkDescriptorBufferInfo { |
| 697 | + VkBuffer buffer /// Buffer used for this descriptor when the descriptor is UNIFORM_BUFFER[_DYNAMIC] |
| 698 | + VkDeviceSize offset /// Base offset from buffer start in bytes to update in the descriptor set. |
| 699 | + VkDeviceSize range /// Size in bytes of the buffer resource for this descriptor update. |
| 700 | } |
| 701 | |
| 702 | class VkDescriptorInfo { |
| 703 | VkBufferView bufferView /// Buffer view to write to the descriptor (in case it's a buffer descriptor, otherwise should be VK_NULL_HANDLE) |
| 704 | VkSampler sampler /// Sampler to write to the descriptor (in case it's a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE) |
| 705 | - VkImageView imageView /// Image view to write to the descriptor (in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, or COMBINED_IMAGE_SAMPLER descriptor, otherwise should be VK_NULL_HANDLE) |
| 706 | - VkAttachmentView attachmentView /// Input attachment view to write to the descriptor (in case it's a INPUT_ATTACHMENT descriptor, otherwise should be VK_NULL_HANDLE) |
| 707 | - VkImageLayout imageLayout /// Layout the image is expected to be in when accessed using this descriptor (only used if imageView or attachmentView is not VK_NULL_HANDLE) |
| 708 | + VkImageView imageView /// Image view to write to the descriptor (in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor, otherwise should be VK_NULL_HANDLE) |
| 709 | + VkImageLayout imageLayout /// Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE) |
| 710 | + VkDescriptorBufferInfo bufferInfo /// Raw buffer, size and offset for UNIFORM_BUFFER[_DYNAMIC] or STORAGE_BUFFER[_DYNAMIC] descriptor types. Ignored otherwise. |
| 711 | } |
| 712 | |
| 713 | class VkWriteDescriptorSet { |
| 714 | @@ -1153,7 +1162,7 @@ class VkCopyDescriptorSet { |
| 715 | class VkBufferCreateInfo { |
| 716 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO |
| 717 | const void* pNext /// Pointer to next structure. |
| 718 | - platform.VkDeviceSize size /// Specified in bytes |
| 719 | + VkDeviceSize size /// Specified in bytes |
| 720 | VkBufferUsageFlags usage /// Buffer usage flags |
| 721 | VkBufferCreateFlags flags /// Buffer creation flags |
| 722 | VkSharingMode sharingMode |
| 723 | @@ -1165,23 +1174,22 @@ class VkBufferViewCreateInfo { |
| 724 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO |
| 725 | const void* pNext /// Pointer to next structure. |
| 726 | VkBuffer buffer |
| 727 | - VkBufferViewType viewType |
| 728 | VkFormat format /// Optionally specifies format of elements |
| 729 | - platform.VkDeviceSize offset /// Specified in bytes |
| 730 | - platform.VkDeviceSize range /// View size specified in bytes |
| 731 | + VkDeviceSize offset /// Specified in bytes |
| 732 | + VkDeviceSize range /// View size specified in bytes |
| 733 | } |
| 734 | |
| 735 | class VkImageSubresource { |
| 736 | VkImageAspect aspect |
| 737 | u32 mipLevel |
| 738 | - u32 arraySlice |
| 739 | + u32 arrayLayer |
| 740 | } |
| 741 | |
| 742 | class VkImageSubresourceRange { |
| 743 | - VkImageAspect aspect |
| 744 | + VkImageAspectFlags aspectMask |
| 745 | u32 baseMipLevel |
| 746 | u32 mipLevels |
| 747 | - u32 baseArraySlice |
| 748 | + u32 baseArrayLayer |
| 749 | u32 arraySize |
| 750 | } |
| 751 | |
| 752 | @@ -1200,8 +1208,8 @@ class VkBufferMemoryBarrier { |
| 753 | u32 srcQueueFamilyIndex /// Queue family to transition ownership from |
| 754 | u32 destQueueFamilyIndex /// Queue family to transition ownership to |
| 755 | VkBuffer buffer /// Buffer to sync |
| 756 | - platform.VkDeviceSize offset /// Offset within the buffer to sync |
| 757 | - platform.VkDeviceSize size /// Amount of bytes to sync |
| 758 | + VkDeviceSize offset /// Offset within the buffer to sync |
| 759 | + VkDeviceSize size /// Amount of bytes to sync |
| 760 | } |
| 761 | |
| 762 | class VkImageMemoryBarrier { |
| 763 | @@ -1232,13 +1240,14 @@ class VkImageCreateInfo { |
| 764 | VkSharingMode sharingMode /// Cross-queue-family sharing mode |
| 765 | u32 queueFamilyCount /// Number of queue families to share across |
| 766 | const u32* pQueueFamilyIndices /// Array of queue family indices to share across |
| 767 | + VkImageLayout initialLayout /// Initial image layout for all subresources |
| 768 | } |
| 769 | |
| 770 | class VkSubresourceLayout { |
| 771 | - platform.VkDeviceSize offset /// Specified in bytes |
| 772 | - platform.VkDeviceSize size /// Specified in bytes |
| 773 | - platform.VkDeviceSize rowPitch /// Specified in bytes |
| 774 | - platform.VkDeviceSize depthPitch /// Specified in bytes |
| 775 | + VkDeviceSize offset /// Specified in bytes |
| 776 | + VkDeviceSize size /// Specified in bytes |
| 777 | + VkDeviceSize rowPitch /// Specified in bytes |
| 778 | + VkDeviceSize depthPitch /// Specified in bytes |
| 779 | } |
| 780 | |
| 781 | class VkImageViewCreateInfo { |
| 782 | @@ -1249,34 +1258,19 @@ class VkImageViewCreateInfo { |
| 783 | VkFormat format |
| 784 | VkChannelMapping channels |
| 785 | VkImageSubresourceRange subresourceRange |
| 786 | -} |
| 787 | - |
| 788 | -class VkAttachmentViewCreateInfo { |
| 789 | - VkStructureType sType /// Must be VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO |
| 790 | - const void* pNext /// Pointer to next structure |
| 791 | - VkImage image |
| 792 | - VkFormat format |
| 793 | - u32 mipLevel |
| 794 | - u32 baseArraySlice |
| 795 | - u32 arraySize |
| 796 | - VkAttachmentViewCreateFlags flags /// Framebuffer attachment view flags |
| 797 | -} |
| 798 | - |
| 799 | -class VkAttachmentBindInfo { |
| 800 | - VkAttachmentView view |
| 801 | - VkImageLayout layout |
| 802 | + VkImageViewCreateFlags flags |
| 803 | } |
| 804 | |
| 805 | class VkBufferCopy { |
| 806 | - platform.VkDeviceSize srcOffset /// Specified in bytes |
| 807 | - platform.VkDeviceSize destOffset /// Specified in bytes |
| 808 | - platform.VkDeviceSize copySize /// Specified in bytes |
| 809 | + VkDeviceSize srcOffset /// Specified in bytes |
| 810 | + VkDeviceSize destOffset /// Specified in bytes |
| 811 | + VkDeviceSize copySize /// Specified in bytes |
| 812 | } |
| 813 | |
| 814 | class VkSparseMemoryBindInfo { |
| 815 | - platform.VkDeviceSize rangeOffset /// Specified in bytes |
| 816 | - platform.VkDeviceSize rangeSize /// Specified in bytes |
| 817 | - platform.VkDeviceSize memOffset /// Specified in bytes |
| 818 | + VkDeviceSize rangeOffset /// Specified in bytes |
| 819 | + VkDeviceSize rangeSize /// Specified in bytes |
| 820 | + VkDeviceSize memOffset /// Specified in bytes |
| 821 | VkDeviceMemory mem |
| 822 | VkSparseMemoryBindFlags flags |
| 823 | } |
| 824 | @@ -1285,41 +1279,48 @@ class VkSparseImageMemoryBindInfo { |
| 825 | VkImageSubresource subresource |
| 826 | VkOffset3D offset |
| 827 | VkExtent3D extent |
| 828 | - platform.VkDeviceSize memOffset /// Specified in bytes |
| 829 | + VkDeviceSize memOffset /// Specified in bytes |
| 830 | VkDeviceMemory mem |
| 831 | VkSparseMemoryBindFlags flags |
| 832 | } |
| 833 | |
| 834 | +class VkImageSubresourceCopy { |
| 835 | + VkImageAspect aspect |
| 836 | + u32 mipLevel |
| 837 | + u32 arrayLayer |
| 838 | + u32 arraySize |
| 839 | +} |
| 840 | + |
| 841 | class VkImageCopy { |
| 842 | - VkImageSubresource srcSubresource |
| 843 | + VkImageSubresourceCopy srcSubresource |
| 844 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
| 845 | - VkImageSubresource destSubresource |
| 846 | + VkImageSubresourceCopy destSubresource |
| 847 | VkOffset3D destOffset /// Specified in pixels for both compressed and uncompressed images |
| 848 | VkExtent3D extent /// Specified in pixels for both compressed and uncompressed images |
| 849 | } |
| 850 | |
| 851 | class VkImageBlit { |
| 852 | - VkImageSubresource srcSubresource |
| 853 | + VkImageSubresourceCopy srcSubresource |
| 854 | VkOffset3D srcOffset /// Specified in pixels for both compressed and uncompressed images |
| 855 | VkExtent3D srcExtent /// Specified in pixels for both compressed and uncompressed images |
| 856 | - VkImageSubresource destSubresource |
| 857 | + VkImageSubresourceCopy destSubresource |
| 858 | VkOffset3D destOffset /// Specified in pixels for both compressed and uncompressed images |
| 859 | VkExtent3D destExtent /// Specified in pixels for both compressed and uncompressed images |
| 860 | } |
| 861 | |
| 862 | class VkBufferImageCopy { |
| 863 | - platform.VkDeviceSize bufferOffset /// Specified in bytes |
| 864 | + VkDeviceSize bufferOffset /// Specified in bytes |
| 865 | u32 bufferRowLength /// Specified in texels |
| 866 | u32 bufferImageHeight |
| 867 | - VkImageSubresource imageSubresource |
| 868 | + VkImageSubresourceCopy imageSubresource |
| 869 | VkOffset3D imageOffset /// Specified in pixels for both compressed and uncompressed images |
| 870 | VkExtent3D imageExtent /// Specified in pixels for both compressed and uncompressed images |
| 871 | } |
| 872 | |
| 873 | class VkImageResolve { |
| 874 | - VkImageSubresource srcSubresource |
| 875 | + VkImageSubresourceCopy srcSubresource |
| 876 | VkOffset3D srcOffset |
| 877 | - VkImageSubresource destSubresource |
| 878 | + VkImageSubresourceCopy destSubresource |
| 879 | VkOffset3D destOffset |
| 880 | VkExtent3D extent |
| 881 | } |
| 882 | @@ -1338,6 +1339,7 @@ class VkShaderCreateInfo { |
| 883 | VkShaderModule module /// Module containing entry point |
| 884 | const char* pName /// Null-terminated entry point name |
| 885 | VkShaderCreateFlags flags /// Reserved |
| 886 | + VkShaderStage stage |
| 887 | } |
| 888 | |
| 889 | class VkDescriptorSetLayoutBinding { |
| 890 | @@ -1362,6 +1364,8 @@ class VkDescriptorTypeCount { |
| 891 | class VkDescriptorPoolCreateInfo { |
| 892 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO |
| 893 | const void* pNext /// Pointer to next structure |
| 894 | + VkDescriptorPoolUsage poolUsage |
| 895 | + u32 maxSets |
| 896 | u32 count |
| 897 | const VkDescriptorTypeCount* pTypeCount |
| 898 | } |
| 899 | @@ -1390,7 +1394,7 @@ class VkPipelineShaderStageCreateInfo { |
| 900 | class VkComputePipelineCreateInfo { |
| 901 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO |
| 902 | const void* pNext /// Pointer to next structure |
| 903 | - VkPipelineShaderStageCreateInfo cs |
| 904 | + VkPipelineShaderStageCreateInfo stage |
| 905 | VkPipelineCreateFlags flags /// Pipeline creation flags |
| 906 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 907 | 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 |
| 908 | @@ -1423,7 +1427,7 @@ class VkPipelineInputAssemblyStateCreateInfo { |
| 909 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO |
| 910 | const void* pNext /// Pointer to next structure |
| 911 | VkPrimitiveTopology topology |
| 912 | - platform.VkBool32 primitiveRestartEnable |
| 913 | + VkBool32 primitiveRestartEnable |
| 914 | } |
| 915 | |
| 916 | class VkPipelineTessellationStateCreateInfo { |
| 917 | @@ -1436,29 +1440,37 @@ class VkPipelineViewportStateCreateInfo { |
| 918 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO |
| 919 | const void* pNext /// Pointer to next structure |
| 920 | u32 viewportCount |
| 921 | + const VkViewport* pViewports |
| 922 | + u32 scissorCount |
| 923 | + const VkRect2D* pScissors |
| 924 | } |
| 925 | |
| 926 | class VkPipelineRasterStateCreateInfo { |
| 927 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO |
| 928 | const void* pNext /// Pointer to next structure |
| 929 | - platform.VkBool32 depthClipEnable |
| 930 | - platform.VkBool32 rasterizerDiscardEnable |
| 931 | + VkBool32 depthClipEnable |
| 932 | + VkBool32 rasterizerDiscardEnable |
| 933 | VkFillMode fillMode /// optional (GL45) |
| 934 | VkCullMode cullMode |
| 935 | VkFrontFace frontFace |
| 936 | + VkBool32 depthBiasEnable |
| 937 | + f32 depthBias |
| 938 | + f32 depthBiasClamp |
| 939 | + f32 slopeScaledDepthBias |
| 940 | + f32 lineWidth |
| 941 | } |
| 942 | |
| 943 | class VkPipelineMultisampleStateCreateInfo { |
| 944 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO |
| 945 | const void* pNext /// Pointer to next structure |
| 946 | u32 rasterSamples /// Number of samples used for rasterization |
| 947 | - platform.VkBool32 sampleShadingEnable /// optional (GL45) |
| 948 | + VkBool32 sampleShadingEnable /// optional (GL45) |
| 949 | f32 minSampleShading /// optional (GL45) |
| 950 | - platform.VkSampleMask sampleMask |
| 951 | + const VkSampleMask* pSampleMask |
| 952 | } |
| 953 | |
| 954 | class VkPipelineColorBlendAttachmentState { |
| 955 | - platform.VkBool32 blendEnable |
| 956 | + VkBool32 blendEnable |
| 957 | VkBlend srcBlendColor |
| 958 | VkBlend destBlendColor |
| 959 | VkBlendOp blendOpColor |
| 960 | @@ -1471,11 +1483,13 @@ class VkPipelineColorBlendAttachmentState { |
| 961 | class VkPipelineColorBlendStateCreateInfo { |
| 962 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO |
| 963 | const void* pNext /// Pointer to next structure |
| 964 | - platform.VkBool32 alphaToCoverageEnable |
| 965 | - platform.VkBool32 logicOpEnable |
| 966 | + VkBool32 alphaToCoverageEnable |
| 967 | + VkBool32 alphaToOneEnable |
| 968 | + VkBool32 logicOpEnable |
| 969 | VkLogicOp logicOp |
| 970 | u32 attachmentCount /// # of pAttachments |
| 971 | const VkPipelineColorBlendAttachmentState* pAttachments |
| 972 | + f32[4] blendConst |
| 973 | } |
| 974 | |
| 975 | class VkStencilOpState { |
| 976 | @@ -1483,18 +1497,30 @@ class VkStencilOpState { |
| 977 | VkStencilOp stencilPassOp |
| 978 | VkStencilOp stencilDepthFailOp |
| 979 | VkCompareOp stencilCompareOp |
| 980 | + u32 stencilCompareMask |
| 981 | + u32 stencilWriteMask |
| 982 | + u32 stencilReference |
| 983 | } |
| 984 | |
| 985 | class VkPipelineDepthStencilStateCreateInfo { |
| 986 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO |
| 987 | const void* pNext /// Pointer to next structure |
| 988 | - platform.VkBool32 depthTestEnable |
| 989 | - platform.VkBool32 depthWriteEnable |
| 990 | + VkBool32 depthTestEnable |
| 991 | + VkBool32 depthWriteEnable |
| 992 | VkCompareOp depthCompareOp |
| 993 | - platform.VkBool32 depthBoundsEnable /// optional (depth_bounds_test) |
| 994 | - platform.VkBool32 stencilTestEnable |
| 995 | + VkBool32 depthBoundsTestEnable /// optional (depth_bounds_test) |
| 996 | + VkBool32 stencilTestEnable |
| 997 | VkStencilOpState front |
| 998 | VkStencilOpState back |
| 999 | + f32 minDepthBounds |
| 1000 | + f32 maxDepthBounds |
| 1001 | +} |
| 1002 | + |
| 1003 | +class VkPipelineDynamicStateCreateInfo { |
| 1004 | + VkStructureType sType /// Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO |
| 1005 | + const void* pNext /// Pointer to next structure |
| 1006 | + u32 dynamicStateCount |
| 1007 | + const VkDynamicState* pDynamicStates |
| 1008 | } |
| 1009 | |
| 1010 | class VkGraphicsPipelineCreateInfo { |
| 1011 | @@ -1510,6 +1536,7 @@ class VkGraphicsPipelineCreateInfo { |
| 1012 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState |
| 1013 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState |
| 1014 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState |
| 1015 | + const VkPipelineDynamicStateCreateInfo* pDynamicState |
| 1016 | VkPipelineCreateFlags flags /// Pipeline creation flags |
| 1017 | VkPipelineLayout layout /// Interface layout of the pipeline |
| 1018 | VkRenderPass renderPass |
| 1019 | @@ -1547,50 +1574,17 @@ class VkSamplerCreateInfo { |
| 1020 | VkTexFilter magFilter /// Filter mode for magnification |
| 1021 | VkTexFilter minFilter /// Filter mode for minifiation |
| 1022 | VkTexMipmapMode mipMode /// Mipmap selection mode |
| 1023 | - VkTexAddress addressU |
| 1024 | - VkTexAddress addressV |
| 1025 | - VkTexAddress addressW |
| 1026 | + VkTexAddressMode addressModeU |
| 1027 | + VkTexAddressMode addressModeV |
| 1028 | + VkTexAddressMode addressModeW |
| 1029 | f32 mipLodBias |
| 1030 | f32 maxAnisotropy |
| 1031 | - platform.VkBool32 compareEnable |
| 1032 | + VkBool32 compareEnable |
| 1033 | VkCompareOp compareOp |
| 1034 | f32 minLod |
| 1035 | f32 maxLod |
| 1036 | VkBorderColor borderColor |
| 1037 | -} |
| 1038 | - |
| 1039 | -class VkDynamicViewportStateCreateInfo { |
| 1040 | - VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO |
| 1041 | - const void* pNext /// Pointer to next structure |
| 1042 | - u32 viewportAndScissorCount /// number of entries in pViewports and pScissors |
| 1043 | - const VkViewport* pViewports |
| 1044 | - const VkRect2D* pScissors |
| 1045 | -} |
| 1046 | - |
| 1047 | -class VkDynamicRasterStateCreateInfo { |
| 1048 | - VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO |
| 1049 | - const void* pNext /// Pointer to next structure |
| 1050 | - f32 depthBias |
| 1051 | - f32 depthBiasClamp |
| 1052 | - f32 slopeScaledDepthBias |
| 1053 | - f32 lineWidth /// optional (GL45) - Width of lines |
| 1054 | -} |
| 1055 | - |
| 1056 | -class VkDynamicColorBlendStateCreateInfo { |
| 1057 | - VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO |
| 1058 | - const void* pNext /// Pointer to next structure |
| 1059 | - f32[4] blendConst |
| 1060 | -} |
| 1061 | - |
| 1062 | -class VkDynamicDepthStencilStateCreateInfo { |
| 1063 | - VkStructureType sType /// Must be VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO |
| 1064 | - const void* pNext /// Pointer to next structure |
| 1065 | - f32 minDepthBounds /// optional (depth_bounds_test) |
| 1066 | - f32 maxDepthBounds /// optional (depth_bounds_test) |
| 1067 | - u32 stencilReadMask |
| 1068 | - u32 stencilWriteMask |
| 1069 | - u32 stencilFrontRef |
| 1070 | - u32 stencilBackRef |
| 1071 | + VkBool32 unnormalizedCoordinates |
| 1072 | } |
| 1073 | |
| 1074 | class VkCmdPoolCreateInfo { |
| 1075 | @@ -1613,6 +1607,7 @@ class VkCmdBufferBeginInfo { |
| 1076 | const void* pNext /// Pointer to next structure |
| 1077 | VkCmdBufferOptimizeFlags flags /// Command buffer optimization flags |
| 1078 | VkRenderPass renderPass /// Render pass for secondary command buffers |
| 1079 | + u32 subpass |
| 1080 | VkFramebuffer framebuffer /// Framebuffer for secondary command buffers |
| 1081 | } |
| 1082 | |
| 1083 | @@ -1622,16 +1617,16 @@ class VkRenderPassBeginInfo { |
| 1084 | VkRenderPass renderPass |
| 1085 | VkFramebuffer framebuffer |
| 1086 | VkRect2D renderArea |
| 1087 | - u32 attachmentCount |
| 1088 | - const VkClearValue* pAttachmentClearValues |
| 1089 | + u32 clearValueCount |
| 1090 | + const VkClearValue* pClearValues |
| 1091 | } |
| 1092 | |
| 1093 | @union |
| 1094 | /// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. |
| 1095 | class VkClearColorValue { |
| 1096 | - f32[4] f32 |
| 1097 | - s32[4] s32 |
| 1098 | - u32[4] u32 |
| 1099 | + f32[4] float32 |
| 1100 | + s32[4] int32 |
| 1101 | + u32[4] uint32 |
| 1102 | } |
| 1103 | |
| 1104 | class VkClearDepthStencilValue { |
| 1105 | @@ -1643,7 +1638,7 @@ class VkClearDepthStencilValue { |
| 1106 | /// Union allowing specification of color, depth, and stencil color values. Actual value selected is based on attachment being cleared. |
| 1107 | class VkClearValue { |
| 1108 | VkClearColorValue color |
| 1109 | - VkClearDepthStencilValue ds |
| 1110 | + VkClearDepthStencilValue depthStencil |
| 1111 | } |
| 1112 | |
| 1113 | class VkAttachmentDescription { |
| 1114 | @@ -1657,6 +1652,7 @@ class VkAttachmentDescription { |
| 1115 | VkAttachmentStoreOp stencilStoreOp /// Store op for stencil data |
| 1116 | VkImageLayout initialLayout |
| 1117 | VkImageLayout finalLayout |
| 1118 | + VkAttachmentDescriptionFlags flags |
| 1119 | } |
| 1120 | |
| 1121 | class VkAttachmentReference { |
| 1122 | @@ -1670,13 +1666,13 @@ class VkSubpassDescription { |
| 1123 | VkPipelineBindPoint pipelineBindPoint /// Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now |
| 1124 | VkSubpassDescriptionFlags flags |
| 1125 | u32 inputCount |
| 1126 | - const VkAttachmentReference* inputAttachments |
| 1127 | + const VkAttachmentReference* pInputAttachments |
| 1128 | u32 colorCount |
| 1129 | - const VkAttachmentReference* colorAttachments |
| 1130 | - const VkAttachmentReference* resolveAttachments |
| 1131 | + const VkAttachmentReference* pColorAttachments |
| 1132 | + const VkAttachmentReference* pResolveAttachments |
| 1133 | VkAttachmentReference depthStencilAttachment |
| 1134 | u32 preserveCount |
| 1135 | - const VkAttachmentReference* preserveAttachments |
| 1136 | + const VkAttachmentReference* pPreserveAttachments |
| 1137 | } |
| 1138 | |
| 1139 | class VkSubpassDependency { |
| 1140 | @@ -1688,7 +1684,7 @@ class VkSubpassDependency { |
| 1141 | VkPipelineStageFlags destStageMask |
| 1142 | VkMemoryOutputFlags outputMask |
| 1143 | VkMemoryInputFlags inputMask |
| 1144 | - platform.VkBool32 byRegion |
| 1145 | + VkBool32 byRegion |
| 1146 | } |
| 1147 | |
| 1148 | class VkRenderPassCreateInfo { |
| 1149 | @@ -1715,64 +1711,57 @@ class VkFenceCreateInfo { |
| 1150 | } |
| 1151 | |
| 1152 | class VkPhysicalDeviceFeatures { |
| 1153 | - platform.VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 1154 | - platform.VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 1155 | - platform.VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 1156 | - platform.VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 1157 | - platform.VkBool32 geometryShader /// geometry stage |
| 1158 | - platform.VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 1159 | - platform.VkBool32 sampleRateShading /// per-sample shading and interpolation |
| 1160 | - platform.VkBool32 dualSourceBlend /// blend operations which take two sources |
| 1161 | - platform.VkBool32 logicOp /// logic operations |
| 1162 | - platform.VkBool32 instancedDrawIndirect /// multi draw indirect |
| 1163 | - platform.VkBool32 depthClip /// depth clipping |
| 1164 | - platform.VkBool32 depthBiasClamp /// depth bias clamping |
| 1165 | - platform.VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 1166 | - platform.VkBool32 depthBounds /// depth bounds test |
| 1167 | - platform.VkBool32 wideLines /// lines with width greater than 1 |
| 1168 | - platform.VkBool32 largePoints /// points with size greater than 1 |
| 1169 | - platform.VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 1170 | - platform.VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 1171 | - platform.VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
| 1172 | - platform.VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
| 1173 | - platform.VkBool32 vertexSideEffects /// storage buffers and images in vertex stage |
| 1174 | - platform.VkBool32 tessellationSideEffects /// storage buffers and images in tessellation stage |
| 1175 | - platform.VkBool32 geometrySideEffects /// storage buffers and images in geometry stage |
| 1176 | - platform.VkBool32 fragmentSideEffects /// storage buffers and images in fragment stage |
| 1177 | - platform.VkBool32 shaderTessellationPointSize /// tessellation stage can export point size |
| 1178 | - platform.VkBool32 shaderGeometryPointSize /// geometry stage can export point size |
| 1179 | - platform.VkBool32 shaderTextureGatherExtended /// texture gather with run-time values and independent offsets |
| 1180 | - platform.VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 1181 | - platform.VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
| 1182 | - platform.VkBool32 shaderStorageBufferArrayConstantIndexing /// arrays of storage buffers can be accessed with constant indices |
| 1183 | - platform.VkBool32 shaderStorageImageArrayConstantIndexing /// arrays of storage images can be accessed with constant indices |
| 1184 | - platform.VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 1185 | - platform.VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 1186 | - platform.VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 1187 | - platform.VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 1188 | - platform.VkBool32 shaderClipDistance /// clip distance in shaders |
| 1189 | - platform.VkBool32 shaderCullDistance /// cull distance in shaders |
| 1190 | - platform.VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 1191 | - platform.VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 1192 | - platform.VkBool32 shaderFloat16 /// 16-bit floats in shaders |
| 1193 | - platform.VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 1194 | - platform.VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support) |
| 1195 | - platform.VkBool32 shaderResourceMinLOD /// shader can use texture operations that specify minimum resource LOD |
| 1196 | - platform.VkBool32 sparse /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 1197 | - platform.VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 1198 | - platform.VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 1199 | - platform.VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 1200 | - platform.VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 1201 | - platform.VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 1202 | - platform.VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 1203 | - platform.VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 1204 | - platform.VkBool32 sparseResidencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format) |
| 1205 | - platform.VkBool32 sparseResidencyStandard2DMSBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format) |
| 1206 | - platform.VkBool32 sparseResidencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 1207 | - platform.VkBool32 sparseResidencyAlignedMipSize /// Sparse resources support: Images with mip-level dimensions that are NOT a multiple of the block size will be placed in the mip tail |
| 1208 | - platform.VkBool32 sparseResidencyNonResident /// Sparse resources support: GPU can safely access non-resident regions of a resource, read values from read-write resources are undefined |
| 1209 | - platform.VkBool32 sparseResidencyNonResidentStrict /// Sparse resources support: GPU can safely access non-resident regions of a resource, all reads return as if data is 0, writes are discarded |
| 1210 | - platform.VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) |
| 1211 | + VkBool32 robustBufferAccess /// out of bounds buffer accesses are well defined |
| 1212 | + VkBool32 fullDrawIndexUint32 /// full 32-bit range of indices for indexed draw calls |
| 1213 | + VkBool32 imageCubeArray /// image views which are arrays of cube maps |
| 1214 | + VkBool32 independentBlend /// blending operations are controlled per-attachment |
| 1215 | + VkBool32 geometryShader /// geometry stage |
| 1216 | + VkBool32 tessellationShader /// tessellation control and evaluation stage |
| 1217 | + VkBool32 sampleRateShading /// per-sample shading and interpolation |
| 1218 | + VkBool32 dualSourceBlend /// blend operations which take two sources |
| 1219 | + VkBool32 logicOp /// logic operations |
| 1220 | + VkBool32 multiDrawIndirect /// multi draw indirect |
| 1221 | + VkBool32 depthClip /// depth clipping |
| 1222 | + VkBool32 depthBiasClamp /// depth bias clamping |
| 1223 | + VkBool32 fillModeNonSolid /// point and wireframe fill modes |
| 1224 | + VkBool32 depthBounds /// depth bounds test |
| 1225 | + VkBool32 wideLines /// lines with width greater than 1 |
| 1226 | + VkBool32 largePoints /// points with size greater than 1 |
| 1227 | + VkBool32 textureCompressionETC2 /// ETC texture compression formats |
| 1228 | + VkBool32 textureCompressionASTC_LDR /// ASTC LDR texture compression formats |
| 1229 | + VkBool32 textureCompressionBC /// BC1-7 texture compressed formats |
| 1230 | + VkBool32 occlusionQueryNonConservative /// non-conservative (exact) occlusion queries |
| 1231 | + VkBool32 pipelineStatisticsQuery /// pipeline statistics query |
| 1232 | + VkBool32 vertexSideEffects /// storage buffers and images in vertex stage |
| 1233 | + VkBool32 tessellationSideEffects /// storage buffers and images in tessellation stage |
| 1234 | + VkBool32 geometrySideEffects /// storage buffers and images in geometry stage |
| 1235 | + VkBool32 fragmentSideEffects /// storage buffers and images in fragment stage |
| 1236 | + VkBool32 shaderTessellationPointSize /// tessellation stage can export point size |
| 1237 | + VkBool32 shaderGeometryPointSize /// geometry stage can export point size |
| 1238 | + VkBool32 shaderImageGatherExtended /// texture gather with run-time values and independent offsets |
| 1239 | + VkBool32 shaderStorageImageExtendedFormats /// the extended set of formats can be used for storage images |
| 1240 | + VkBool32 shaderStorageImageMultisample /// multisample images can be used for storage images |
| 1241 | + VkBool32 shaderUniformBufferArrayDynamicIndexing /// arrays of uniform buffers can be accessed with dynamically uniform indices |
| 1242 | + VkBool32 shaderSampledImageArrayDynamicIndexing /// arrays of sampled images can be accessed with dynamically uniform indices |
| 1243 | + VkBool32 shaderStorageBufferArrayDynamicIndexing /// arrays of storage buffers can be accessed with dynamically uniform indices |
| 1244 | + VkBool32 shaderStorageImageArrayDynamicIndexing /// arrays of storage images can be accessed with dynamically uniform indices |
| 1245 | + VkBool32 shaderClipDistance /// clip distance in shaders |
| 1246 | + VkBool32 shaderCullDistance /// cull distance in shaders |
| 1247 | + VkBool32 shaderFloat64 /// 64-bit floats (doubles) in shaders |
| 1248 | + VkBool32 shaderInt64 /// 64-bit integers in shaders |
| 1249 | + VkBool32 shaderInt16 /// 16-bit integers in shaders |
| 1250 | + VkBool32 shaderResourceResidency /// shader can use texture operations that return resource residency information (requires sparseNonResident support) |
| 1251 | + VkBool32 shaderResourceMinLOD /// shader can use texture operations that specify minimum resource LOD |
| 1252 | + VkBool32 alphaToOne /// The fragment alpha channel can be forced to maximum representable alpha value |
| 1253 | + VkBool32 sparseBinding /// Sparse resources support: Resource memory can be managed at opaque page level rather than object level |
| 1254 | + VkBool32 sparseResidencyBuffer /// Sparse resources support: GPU can access partially resident buffers |
| 1255 | + VkBool32 sparseResidencyImage2D /// Sparse resources support: GPU can access partially resident 2D (non-MSAA non-DepthStencil) images |
| 1256 | + VkBool32 sparseResidencyImage3D /// Sparse resources support: GPU can access partially resident 3D images |
| 1257 | + VkBool32 sparseResidency2Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples |
| 1258 | + VkBool32 sparseResidency4Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples |
| 1259 | + VkBool32 sparseResidency8Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples |
| 1260 | + VkBool32 sparseResidency16Samples /// Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples |
| 1261 | + VkBool32 sparseResidencyAliased /// Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) |
| 1262 | } |
| 1263 | |
| 1264 | class VkPhysicalDeviceLimits { |
| 1265 | @@ -1782,13 +1771,15 @@ class VkPhysicalDeviceLimits { |
| 1266 | u32 maxImageDimension3D /// max 3D image dimension |
| 1267 | u32 maxImageDimensionCube /// max cubemap image dimension |
| 1268 | u32 maxImageArrayLayers /// max layers for image arrays |
| 1269 | + VkSampleCountFlags sampleCounts /// sample counts supported for all images supporting rendering and sampling |
| 1270 | u32 maxTexelBufferSize /// max texel buffer size (bytes) |
| 1271 | u32 maxUniformBufferSize /// max uniform buffer size (bytes) |
| 1272 | u32 maxStorageBufferSize /// max storage buffer size (bytes) |
| 1273 | u32 maxPushConstantsSize /// max size of the push constants pool (bytes) |
| 1274 | /// memory limits |
| 1275 | u32 maxMemoryAllocationCount /// max number of device memory allocations supported |
| 1276 | - platform.VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 1277 | + VkDeviceSize bufferImageGranularity /// Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage |
| 1278 | + VkDeviceSize sparseAddressSpaceSize /// Total address space available for sparse allocations (bytes) |
| 1279 | /// descriptor set limits |
| 1280 | u32 maxBoundDescriptorSets /// max number of descriptors sets that can be bound to a pipeline |
| 1281 | u32 maxDescriptorSets /// max number of allocated descriptor sets |
| 1282 | @@ -1799,11 +1790,14 @@ class VkPhysicalDeviceLimits { |
| 1283 | u32 maxPerStageDescriptorStorageImages /// max num of storage images allowed per-stage in a descriptor set |
| 1284 | u32 maxDescriptorSetSamplers /// max num of samplers allowed in all stages in a descriptor set |
| 1285 | u32 maxDescriptorSetUniformBuffers /// max num of uniform buffers allowed in all stages in a descriptor set |
| 1286 | + u32 maxDescriptorSetUniformBuffersDynamic /// max num of dynamic uniform buffers allowed in all stages in a descriptor set |
| 1287 | u32 maxDescriptorSetStorageBuffers /// max num of storage buffers allowed in all stages in a descriptor set |
| 1288 | + u32 maxDescriptorSetStorageBuffersDynamic /// max num of dynamic storage buffers allowed in all stages in a descriptor set |
| 1289 | u32 maxDescriptorSetSampledImages /// max num of sampled images allowed in all stages in a descriptor set |
| 1290 | u32 maxDescriptorSetStorageImages /// max num of storage images allowed in all stages in a descriptor set |
| 1291 | /// vertex stage limits |
| 1292 | u32 maxVertexInputAttributes /// max num of vertex input attribute slots |
| 1293 | + u32 maxVertexInputBindings /// max num of vertex input binding slots |
| 1294 | u32 maxVertexInputAttributeOffset /// max vertex input attribute offset added to vertex buffer offset |
| 1295 | u32 maxVertexInputBindingStride /// max vertex input binding stride |
| 1296 | u32 maxVertexOutputComponents /// max num of output components written by vertex shader |
| 1297 | @@ -1839,13 +1833,12 @@ class VkPhysicalDeviceLimits { |
| 1298 | |
| 1299 | u32 maxDrawIndexedIndexValue /// max index value for indexed draw calls (for 32-bit indices) |
| 1300 | u32 maxDrawIndirectInstanceCount /// max instance count for indirect draw calls |
| 1301 | - platform.VkBool32 primitiveRestartForPatches /// is primitive restart supported for PATCHES |
| 1302 | + VkBool32 primitiveRestartForPatches /// is primitive restart supported for PATCHES |
| 1303 | |
| 1304 | f32 maxSamplerLodBias /// max absolute sampler level of detail bias |
| 1305 | f32 maxSamplerAnisotropy /// max degree of sampler anisotropy |
| 1306 | |
| 1307 | u32 maxViewports /// max number of active viewports |
| 1308 | - u32 maxDynamicViewportStates /// max number of dynamic viewport state objects |
| 1309 | u32[2] maxViewportDimensions /// max viewport dimensions (x,y) |
| 1310 | f32[2] viewportBoundsRange /// viewport bounds range (min,max) |
| 1311 | u32 viewportSubPixelBits /// num bits of subpixel precision for viewport |
| 1312 | @@ -1883,12 +1876,21 @@ class VkPhysicalDeviceLimits { |
| 1313 | u32 maxCullDistances /// max number of cull distances |
| 1314 | u32 maxCombinedClipAndCullDistances /// max combined number of user clipping |
| 1315 | |
| 1316 | - f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 1317 | - f32[2] lineWidthRange /// range (min,max) of supported line widths |
| 1318 | + f32[2] pointSizeRange /// range (min,max) of supported point sizes |
| 1319 | + f32[2] lineWidthRange /// range (min,max) of supported line widths |
| 1320 | f32 pointSizeGranularity /// granularity of supported point sizes |
| 1321 | f32 lineWidthGranularity /// granularity of supported line widths |
| 1322 | } |
| 1323 | |
| 1324 | +class VkPhysicalDeviceSparseProperties { |
| 1325 | + VkBool32 residencyStandard2DBlockShape /// Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format) |
| 1326 | + VkBool32 residencyStandard2DMSBlockShape /// Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format) |
| 1327 | + VkBool32 residencyStandard3DBlockShape /// Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) |
| 1328 | + 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 |
| 1329 | + VkBool32 residencyNonResident /// Sparse resources support: GPU can safely access non-resident regions of a resource, read values from read-write resources are undefined |
| 1330 | + 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 |
| 1331 | +} |
| 1332 | + |
| 1333 | class VkSemaphoreCreateInfo { |
| 1334 | VkStructureType sType /// Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO |
| 1335 | const void* pNext /// Pointer to next structure |
| 1336 | @@ -1908,7 +1910,7 @@ class VkFramebufferCreateInfo { |
| 1337 | const void* pNext /// Pointer to next structure |
| 1338 | VkRenderPass renderPass |
| 1339 | u32 attachmentCount |
| 1340 | - const VkAttachmentBindInfo* pAttachments |
| 1341 | + const VkImageView* pAttachments |
| 1342 | u32 width |
| 1343 | u32 height |
| 1344 | u32 layers |
| 1345 | @@ -1981,13 +1983,11 @@ cmd VkResult vkCreateInstance( |
| 1346 | } |
| 1347 | |
| 1348 | @threadSafety("system") |
| 1349 | -cmd VkResult vkDestroyInstance( |
| 1350 | +cmd void vkDestroyInstance( |
| 1351 | VkInstance instance) { |
| 1352 | instanceObject := GetInstance(instance) |
| 1353 | |
| 1354 | State.Instances[instance] = null |
| 1355 | - |
| 1356 | - return ? |
| 1357 | } |
| 1358 | |
| 1359 | @threadSafety("system") |
| 1360 | @@ -2015,7 +2015,7 @@ cmd VkResult vkEnumeratePhysicalDevices( |
| 1361 | cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 1362 | VkDevice device, |
| 1363 | const char* pName) { |
| 1364 | - if device != VK_NULL_HANDLE { |
| 1365 | + if device != NULL_HANDLE { |
| 1366 | device := GetDevice(device) |
| 1367 | } |
| 1368 | |
| 1369 | @@ -2025,7 +2025,7 @@ cmd PFN_vkVoidFunction vkGetDeviceProcAddr( |
| 1370 | cmd PFN_vkVoidFunction vkGetInstanceProcAddr( |
| 1371 | VkInstance instance, |
| 1372 | const char* pName) { |
| 1373 | - if instance != VK_NULL_HANDLE { |
| 1374 | + if instance != NULL_HANDLE { |
| 1375 | instanceObject := GetInstance(instance) |
| 1376 | } |
| 1377 | |
| 1378 | @@ -2043,27 +2043,25 @@ cmd VkResult vkGetPhysicalDeviceProperties( |
| 1379 | return ? |
| 1380 | } |
| 1381 | |
| 1382 | -cmd VkResult vkGetPhysicalDeviceQueueCount( |
| 1383 | - VkPhysicalDevice physicalDevice, |
| 1384 | - u32* pCount) { |
| 1385 | - physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 1386 | - |
| 1387 | - count := ? |
| 1388 | - pCount[0] = count |
| 1389 | - |
| 1390 | - return ? |
| 1391 | -} |
| 1392 | - |
| 1393 | -cmd VkResult vkGetPhysicalDeviceQueueProperties( |
| 1394 | +cmd VkResult vkGetPhysicalDeviceQueueFamilyProperties( |
| 1395 | VkPhysicalDevice physicalDevice, |
| 1396 | - u32 count, |
| 1397 | - VkPhysicalDeviceQueueProperties* pQueueProperties) { |
| 1398 | + u32* pCount, |
| 1399 | + VkQueueFamilyProperties* pQueueFamilyProperties) { |
| 1400 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 1401 | - queuesProperties := pQueueProperties[0:count] |
| 1402 | - for i in (0 .. count) { |
| 1403 | - queueProperties := as!VkPhysicalDeviceQueueProperties(?) |
| 1404 | - queuesProperties[i] = queueProperties |
| 1405 | - } |
| 1406 | + // TODO: Figure out how to express fetch-count-or-properties |
| 1407 | + // This version fails 'apic validate' with 'fence not allowed in |
| 1408 | + // *semantic.Branch'. Other attempts have failed with the same or other |
| 1409 | + // errors. |
| 1410 | + // if pQueueFamilyProperties != null { |
| 1411 | + // queuesProperties := pQueueFamilyProperties[0:pCount[0]] |
| 1412 | + // for i in (0 .. pCount[0]) { |
| 1413 | + // queueProperties := as!VkQueueFamilyProperties(?) |
| 1414 | + // queuesProperties[i] = queueProperties |
| 1415 | + // } |
| 1416 | + // } else { |
| 1417 | + // count := ? |
| 1418 | + // pCount[0] = count |
| 1419 | + // } |
| 1420 | return ? |
| 1421 | } |
| 1422 | |
| 1423 | @@ -2107,6 +2105,7 @@ cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
| 1424 | VkImageType type, |
| 1425 | VkImageTiling tiling, |
| 1426 | VkImageUsageFlags usage, |
| 1427 | + VkImageCreateFlags flags, |
| 1428 | VkImageFormatProperties* pImageFormatProperties) { |
| 1429 | physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 1430 | |
| 1431 | @@ -2116,17 +2115,6 @@ cmd VkResult vkGetPhysicalDeviceImageFormatProperties( |
| 1432 | return ? |
| 1433 | } |
| 1434 | |
| 1435 | -cmd VkResult vkGetPhysicalDeviceLimits( |
| 1436 | - VkPhysicalDevice physicalDevice, |
| 1437 | - VkPhysicalDeviceLimits* pLimits) { |
| 1438 | - physicalDeviceObject := GetPhysicalDevice(physicalDevice) |
| 1439 | - |
| 1440 | - limits := ? |
| 1441 | - pLimits[0] = limits |
| 1442 | - |
| 1443 | - return ? |
| 1444 | -} |
| 1445 | - |
| 1446 | |
| 1447 | // Device functions |
| 1448 | |
| 1449 | @@ -2146,19 +2134,17 @@ cmd VkResult vkCreateDevice( |
| 1450 | } |
| 1451 | |
| 1452 | @threadSafety("system") |
| 1453 | -cmd VkResult vkDestroyDevice( |
| 1454 | +cmd void vkDestroyDevice( |
| 1455 | VkDevice device) { |
| 1456 | deviceObject := GetDevice(device) |
| 1457 | |
| 1458 | State.Devices[device] = null |
| 1459 | - |
| 1460 | - return ? |
| 1461 | } |
| 1462 | |
| 1463 | |
| 1464 | // Extension discovery functions |
| 1465 | |
| 1466 | -cmd VkResult vkGetGlobalLayerProperties( |
| 1467 | +cmd VkResult vkEnumerateInstanceLayerProperties( |
| 1468 | u32* pCount, |
| 1469 | VkLayerProperties* pProperties) { |
| 1470 | count := as!u32(?) |
| 1471 | @@ -2173,7 +2159,7 @@ cmd VkResult vkGetGlobalLayerProperties( |
| 1472 | return ? |
| 1473 | } |
| 1474 | |
| 1475 | -cmd VkResult vkGetGlobalExtensionProperties( |
| 1476 | +cmd VkResult vkEnumerateInstanceExtensionProperties( |
| 1477 | const char* pLayerName, |
| 1478 | u32* pCount, |
| 1479 | VkExtensionProperties* pProperties) { |
| 1480 | @@ -2189,7 +2175,7 @@ cmd VkResult vkGetGlobalExtensionProperties( |
| 1481 | return ? |
| 1482 | } |
| 1483 | |
| 1484 | -cmd VkResult vkGetPhysicalDeviceLayerProperties( |
| 1485 | +cmd VkResult vkEnumerateDeviceLayerProperties( |
| 1486 | VkPhysicalDevice physicalDevice, |
| 1487 | u32* pCount, |
| 1488 | VkLayerProperties* pProperties) { |
| 1489 | @@ -2206,7 +2192,7 @@ cmd VkResult vkGetPhysicalDeviceLayerProperties( |
| 1490 | return ? |
| 1491 | } |
| 1492 | |
| 1493 | -cmd VkResult vkGetPhysicalDeviceExtensionProperties( |
| 1494 | +cmd VkResult vkEnumerateDeviceExtensionProperties( |
| 1495 | VkPhysicalDevice physicalDevice, |
| 1496 | const char* pLayerName, |
| 1497 | u32* pCount, |
| 1498 | @@ -2254,7 +2240,7 @@ cmd VkResult vkQueueSubmit( |
| 1499 | VkFence fence) { |
| 1500 | queueObject := GetQueue(queue) |
| 1501 | |
| 1502 | - if fence != VK_NULL_HANDLE { |
| 1503 | + if fence != NULL_HANDLE { |
| 1504 | fenceObject := GetFence(fence) |
| 1505 | assert(fenceObject.device == queueObject.device) |
| 1506 | } |
| 1507 | @@ -2309,7 +2295,7 @@ cmd VkResult vkAllocMemory( |
| 1508 | } |
| 1509 | |
| 1510 | @threadSafety("system") |
| 1511 | -cmd VkResult vkFreeMemory( |
| 1512 | +cmd void vkFreeMemory( |
| 1513 | VkDevice device, |
| 1514 | VkDeviceMemory mem) { |
| 1515 | deviceObject := GetDevice(device) |
| 1516 | @@ -2322,16 +2308,14 @@ cmd VkResult vkFreeMemory( |
| 1517 | validate("MemoryCheck", len(memObject.boundCommandBuffers) == 0, |
| 1518 | "vkFreeMemory: cmdBuffers still bound") |
| 1519 | State.DeviceMemories[mem] = null |
| 1520 | - |
| 1521 | - return ? |
| 1522 | } |
| 1523 | |
| 1524 | @threadSafety("app") |
| 1525 | cmd VkResult vkMapMemory( |
| 1526 | VkDevice device, |
| 1527 | VkDeviceMemory mem, |
| 1528 | - platform.VkDeviceSize offset, |
| 1529 | - platform.VkDeviceSize size, |
| 1530 | + VkDeviceSize offset, |
| 1531 | + VkDeviceSize size, |
| 1532 | VkMemoryMapFlags flags, |
| 1533 | void** ppData) { |
| 1534 | deviceObject := GetDevice(device) |
| 1535 | @@ -2345,14 +2329,12 @@ cmd VkResult vkMapMemory( |
| 1536 | } |
| 1537 | |
| 1538 | @threadSafety("app") |
| 1539 | -cmd VkResult vkUnmapMemory( |
| 1540 | +cmd void vkUnmapMemory( |
| 1541 | VkDevice device, |
| 1542 | VkDeviceMemory mem) { |
| 1543 | deviceObject := GetDevice(device) |
| 1544 | memObject := GetDeviceMemory(mem) |
| 1545 | assert(memObject.device == device) |
| 1546 | - |
| 1547 | - return ? |
| 1548 | } |
| 1549 | |
| 1550 | cmd VkResult vkFlushMappedMemoryRanges( |
| 1551 | @@ -2395,10 +2377,10 @@ cmd VkResult vkInvalidateMappedMemoryRanges( |
| 1552 | cmd VkResult vkGetDeviceMemoryCommitment( |
| 1553 | VkDevice device, |
| 1554 | VkDeviceMemory memory, |
| 1555 | - platform.VkDeviceSize* pCommittedMemoryInBytes) { |
| 1556 | + VkDeviceSize* pCommittedMemoryInBytes) { |
| 1557 | deviceObject := GetDevice(device) |
| 1558 | |
| 1559 | - if memory != VK_NULL_HANDLE { |
| 1560 | + if memory != NULL_HANDLE { |
| 1561 | memoryObject := GetDeviceMemory(memory) |
| 1562 | assert(memoryObject.device == device) |
| 1563 | } |
| 1564 | @@ -2424,19 +2406,19 @@ cmd VkResult vkBindBufferMemory( |
| 1565 | VkDevice device, |
| 1566 | VkBuffer buffer, |
| 1567 | VkDeviceMemory mem, |
| 1568 | - platform.VkDeviceSize memOffset) { |
| 1569 | + VkDeviceSize memOffset) { |
| 1570 | deviceObject := GetDevice(device) |
| 1571 | bufferObject := GetBuffer(buffer) |
| 1572 | assert(bufferObject.device == device) |
| 1573 | |
| 1574 | // Unbind buffer from previous memory object, if not VK_NULL_HANDLE. |
| 1575 | - if bufferObject.mem != VK_NULL_HANDLE { |
| 1576 | + if bufferObject.mem != NULL_HANDLE { |
| 1577 | memObject := GetDeviceMemory(bufferObject.mem) |
| 1578 | memObject.boundObjects[as!u64(buffer)] = null |
| 1579 | } |
| 1580 | |
| 1581 | // Bind buffer to given memory object, if not VK_NULL_HANDLE. |
| 1582 | - if mem != VK_NULL_HANDLE { |
| 1583 | + if mem != NULL_HANDLE { |
| 1584 | memObject := GetDeviceMemory(mem) |
| 1585 | assert(memObject.device == device) |
| 1586 | memObject.boundObjects[as!u64(buffer)] = memOffset |
| 1587 | @@ -2462,19 +2444,19 @@ cmd VkResult vkBindImageMemory( |
| 1588 | VkDevice device, |
| 1589 | VkImage image, |
| 1590 | VkDeviceMemory mem, |
| 1591 | - platform.VkDeviceSize memOffset) { |
| 1592 | + VkDeviceSize memOffset) { |
| 1593 | deviceObject := GetDevice(device) |
| 1594 | imageObject := GetImage(image) |
| 1595 | assert(imageObject.device == device) |
| 1596 | |
| 1597 | // Unbind image from previous memory object, if not VK_NULL_HANDLE. |
| 1598 | - if imageObject.mem != VK_NULL_HANDLE { |
| 1599 | + if imageObject.mem != NULL_HANDLE { |
| 1600 | memObject := GetDeviceMemory(imageObject.mem) |
| 1601 | memObject.boundObjects[as!u64(image)] = null |
| 1602 | } |
| 1603 | |
| 1604 | // Bind image to given memory object, if not VK_NULL_HANDLE. |
| 1605 | - if mem != VK_NULL_HANDLE { |
| 1606 | + if mem != NULL_HANDLE { |
| 1607 | memObject := GetDeviceMemory(mem) |
| 1608 | assert(memObject.device == device) |
| 1609 | memObject.boundObjects[as!u64(image)] = memOffset |
| 1610 | @@ -2567,7 +2549,7 @@ cmd VkResult vkCreateFence( |
| 1611 | } |
| 1612 | |
| 1613 | @threadSafety("system") |
| 1614 | -cmd VkResult vkDestroyFence( |
| 1615 | +cmd void vkDestroyFence( |
| 1616 | VkDevice device, |
| 1617 | VkFence fence) { |
| 1618 | deviceObject := GetDevice(device) |
| 1619 | @@ -2575,8 +2557,6 @@ cmd VkResult vkDestroyFence( |
| 1620 | assert(fenceObject.device == device) |
| 1621 | |
| 1622 | State.Fences[fence] = null |
| 1623 | - |
| 1624 | - return ? |
| 1625 | } |
| 1626 | |
| 1627 | @threadSafety("system") |
| 1628 | @@ -2613,7 +2593,7 @@ cmd VkResult vkWaitForFences( |
| 1629 | VkDevice device, |
| 1630 | u32 fenceCount, |
| 1631 | const VkFence* pFences, |
| 1632 | - platform.VkBool32 waitAll, |
| 1633 | + VkBool32 waitAll, |
| 1634 | u64 timeout) { /// timeout in nanoseconds |
| 1635 | deviceObject := GetDevice(device) |
| 1636 | |
| 1637 | @@ -2646,7 +2626,7 @@ cmd VkResult vkCreateSemaphore( |
| 1638 | } |
| 1639 | |
| 1640 | @threadSafety("system") |
| 1641 | -cmd VkResult vkDestroySemaphore( |
| 1642 | +cmd void vkDestroySemaphore( |
| 1643 | VkDevice device, |
| 1644 | VkSemaphore semaphore) { |
| 1645 | deviceObject := GetDevice(device) |
| 1646 | @@ -2654,8 +2634,6 @@ cmd VkResult vkDestroySemaphore( |
| 1647 | assert(semaphoreObject.device == device) |
| 1648 | |
| 1649 | State.Semaphores[semaphore] = null |
| 1650 | - |
| 1651 | - return ? |
| 1652 | } |
| 1653 | |
| 1654 | @threadSafety("app") |
| 1655 | @@ -2699,7 +2677,7 @@ cmd VkResult vkCreateEvent( |
| 1656 | } |
| 1657 | |
| 1658 | @threadSafety("system") |
| 1659 | -cmd VkResult vkDestroyEvent( |
| 1660 | +cmd void vkDestroyEvent( |
| 1661 | VkDevice device, |
| 1662 | VkEvent event) { |
| 1663 | deviceObject := GetDevice(device) |
| 1664 | @@ -2707,8 +2685,6 @@ cmd VkResult vkDestroyEvent( |
| 1665 | assert(eventObject.device == device) |
| 1666 | |
| 1667 | State.Events[event] = null |
| 1668 | - |
| 1669 | - return ? |
| 1670 | } |
| 1671 | |
| 1672 | @threadSafety("system") |
| 1673 | @@ -2763,7 +2739,7 @@ cmd VkResult vkCreateQueryPool( |
| 1674 | } |
| 1675 | |
| 1676 | @threadSafety("system") |
| 1677 | -cmd VkResult vkDestroyQueryPool( |
| 1678 | +cmd void vkDestroyQueryPool( |
| 1679 | VkDevice device, |
| 1680 | VkQueryPool queryPool) { |
| 1681 | deviceObject := GetDevice(device) |
| 1682 | @@ -2771,8 +2747,6 @@ cmd VkResult vkDestroyQueryPool( |
| 1683 | assert(queryPoolObject.device == device) |
| 1684 | |
| 1685 | State.QueryPools[queryPool] = null |
| 1686 | - |
| 1687 | - return ? |
| 1688 | } |
| 1689 | |
| 1690 | @threadSafety("system") |
| 1691 | @@ -2813,7 +2787,7 @@ cmd VkResult vkCreateBuffer( |
| 1692 | } |
| 1693 | |
| 1694 | @threadSafety("system") |
| 1695 | -cmd VkResult vkDestroyBuffer( |
| 1696 | +cmd void vkDestroyBuffer( |
| 1697 | VkDevice device, |
| 1698 | VkBuffer buffer) { |
| 1699 | deviceObject := GetDevice(device) |
| 1700 | @@ -2822,8 +2796,6 @@ cmd VkResult vkDestroyBuffer( |
| 1701 | |
| 1702 | assert(bufferObject.mem == 0) |
| 1703 | State.Buffers[buffer] = null |
| 1704 | - |
| 1705 | - return ? |
| 1706 | } |
| 1707 | |
| 1708 | |
| 1709 | @@ -2848,7 +2820,7 @@ cmd VkResult vkCreateBufferView( |
| 1710 | } |
| 1711 | |
| 1712 | @threadSafety("system") |
| 1713 | -cmd VkResult vkDestroyBufferView( |
| 1714 | +cmd void vkDestroyBufferView( |
| 1715 | VkDevice device, |
| 1716 | VkBufferView bufferView) { |
| 1717 | deviceObject := GetDevice(device) |
| 1718 | @@ -2856,8 +2828,6 @@ cmd VkResult vkDestroyBufferView( |
| 1719 | assert(bufferViewObject.device == device) |
| 1720 | |
| 1721 | State.BufferViews[bufferView] = null |
| 1722 | - |
| 1723 | - return ? |
| 1724 | } |
| 1725 | |
| 1726 | |
| 1727 | @@ -2879,7 +2849,7 @@ cmd VkResult vkCreateImage( |
| 1728 | } |
| 1729 | |
| 1730 | @threadSafety("system") |
| 1731 | -cmd VkResult vkDestroyImage( |
| 1732 | +cmd void vkDestroyImage( |
| 1733 | VkDevice device, |
| 1734 | VkImage image) { |
| 1735 | deviceObject := GetDevice(device) |
| 1736 | @@ -2888,8 +2858,6 @@ cmd VkResult vkDestroyImage( |
| 1737 | |
| 1738 | assert(imageObject.mem == 0) |
| 1739 | State.Images[image] = null |
| 1740 | - |
| 1741 | - return ? |
| 1742 | } |
| 1743 | |
| 1744 | cmd VkResult vkGetImageSubresourceLayout( |
| 1745 | @@ -2926,7 +2894,7 @@ cmd VkResult vkCreateImageView( |
| 1746 | } |
| 1747 | |
| 1748 | @threadSafety("system") |
| 1749 | -cmd VkResult vkDestroyImageView( |
| 1750 | +cmd void vkDestroyImageView( |
| 1751 | VkDevice device, |
| 1752 | VkImageView imageView) { |
| 1753 | deviceObject := GetDevice(device) |
| 1754 | @@ -2934,39 +2902,6 @@ cmd VkResult vkDestroyImageView( |
| 1755 | assert(imageViewObject.device == device) |
| 1756 | |
| 1757 | State.ImageViews[imageView] = null |
| 1758 | - |
| 1759 | - return ? |
| 1760 | -} |
| 1761 | - |
| 1762 | -@threadSafety("system") |
| 1763 | -cmd VkResult vkCreateAttachmentView( |
| 1764 | - VkDevice device, |
| 1765 | - const VkAttachmentViewCreateInfo* pCreateInfo, |
| 1766 | - VkAttachmentView* pView) { |
| 1767 | - assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO) |
| 1768 | - deviceObject := GetDevice(device) |
| 1769 | - |
| 1770 | - imageObject := GetImage(pCreateInfo.image) |
| 1771 | - assert(imageObject.device == device) |
| 1772 | - |
| 1773 | - view := ? |
| 1774 | - pView[0] = view |
| 1775 | - State.AttachmentViews[view] = new!AttachmentViewObject(device: device, image: pCreateInfo.image) |
| 1776 | - |
| 1777 | - return ? |
| 1778 | -} |
| 1779 | - |
| 1780 | -@threadSafety("system") |
| 1781 | -cmd VkResult vkDestroyAttachmentView( |
| 1782 | - VkDevice device, |
| 1783 | - VkAttachmentView attachmentView) { |
| 1784 | - deviceObject := GetDevice(device) |
| 1785 | - attachmentViewObject := GetAttachmentView(attachmentView) |
| 1786 | - assert(attachmentViewObject.device == device) |
| 1787 | - |
| 1788 | - State.AttachmentViews[attachmentView] = null |
| 1789 | - |
| 1790 | - return ? |
| 1791 | } |
| 1792 | |
| 1793 | |
| 1794 | @@ -2986,7 +2921,7 @@ cmd VkResult vkCreateShaderModule( |
| 1795 | return ? |
| 1796 | } |
| 1797 | |
| 1798 | -cmd VkResult vkDestroyShaderModule( |
| 1799 | +cmd void vkDestroyShaderModule( |
| 1800 | VkDevice device, |
| 1801 | VkShaderModule shaderModule) { |
| 1802 | deviceObject := GetDevice(device) |
| 1803 | @@ -2994,8 +2929,6 @@ cmd VkResult vkDestroyShaderModule( |
| 1804 | assert(shaderModuleObject.device == device) |
| 1805 | |
| 1806 | State.ShaderModules[shaderModule] = null |
| 1807 | - |
| 1808 | - return ? |
| 1809 | } |
| 1810 | |
| 1811 | @threadSafety("system") |
| 1812 | @@ -3014,7 +2947,7 @@ cmd VkResult vkCreateShader( |
| 1813 | } |
| 1814 | |
| 1815 | @threadSafety("system") |
| 1816 | -cmd VkResult vkDestroyShader( |
| 1817 | +cmd void vkDestroyShader( |
| 1818 | VkDevice device, |
| 1819 | VkShader shader) { |
| 1820 | deviceObject := GetDevice(device) |
| 1821 | @@ -3022,8 +2955,6 @@ cmd VkResult vkDestroyShader( |
| 1822 | assert(shaderObject.device == device) |
| 1823 | |
| 1824 | State.Shaders[shader] = null |
| 1825 | - |
| 1826 | - return ? |
| 1827 | } |
| 1828 | |
| 1829 | |
| 1830 | @@ -3043,7 +2974,7 @@ cmd VkResult vkCreatePipelineCache( |
| 1831 | return ? |
| 1832 | } |
| 1833 | |
| 1834 | -cmd VkResult vkDestroyPipelineCache( |
| 1835 | +cmd void vkDestroyPipelineCache( |
| 1836 | VkDevice device, |
| 1837 | VkPipelineCache pipelineCache) { |
| 1838 | deviceObject := GetDevice(device) |
| 1839 | @@ -3051,8 +2982,6 @@ cmd VkResult vkDestroyPipelineCache( |
| 1840 | assert(pipelineCacheObject.device == device) |
| 1841 | |
| 1842 | State.PipelineCaches[pipelineCache] = null |
| 1843 | - |
| 1844 | - return ? |
| 1845 | } |
| 1846 | |
| 1847 | cmd platform.size_t vkGetPipelineCacheSize( |
| 1848 | @@ -3102,7 +3031,7 @@ cmd VkResult vkCreateGraphicsPipelines( |
| 1849 | const VkGraphicsPipelineCreateInfo* pCreateInfos, |
| 1850 | VkPipeline* pPipelines) { |
| 1851 | deviceObject := GetDevice(device) |
| 1852 | - if pipelineCache != VK_NULL_HANDLE { |
| 1853 | + if pipelineCache != NULL_HANDLE { |
| 1854 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 1855 | assert(pipelineCacheObject.device == device) |
| 1856 | } |
| 1857 | @@ -3125,7 +3054,7 @@ cmd VkResult vkCreateComputePipelines( |
| 1858 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 1859 | VkPipeline* pPipelines) { |
| 1860 | deviceObject := GetDevice(device) |
| 1861 | - if pipelineCache != VK_NULL_HANDLE { |
| 1862 | + if pipelineCache != NULL_HANDLE { |
| 1863 | pipelineCacheObject := GetPipelineCache(pipelineCache) |
| 1864 | assert(pipelineCacheObject.device == device) |
| 1865 | } |
| 1866 | @@ -3142,7 +3071,7 @@ cmd VkResult vkCreateComputePipelines( |
| 1867 | } |
| 1868 | |
| 1869 | @threadSafety("system") |
| 1870 | -cmd VkResult vkDestroyPipeline( |
| 1871 | +cmd void vkDestroyPipeline( |
| 1872 | VkDevice device, |
| 1873 | VkPipeline pipeline) { |
| 1874 | deviceObject := GetDevice(device) |
| 1875 | @@ -3150,8 +3079,6 @@ cmd VkResult vkDestroyPipeline( |
| 1876 | assert(pipelineObjects.device == device) |
| 1877 | |
| 1878 | State.Pipelines[pipeline] = null |
| 1879 | - |
| 1880 | - return ? |
| 1881 | } |
| 1882 | |
| 1883 | |
| 1884 | @@ -3173,7 +3100,7 @@ cmd VkResult vkCreatePipelineLayout( |
| 1885 | } |
| 1886 | |
| 1887 | @threadSafety("system") |
| 1888 | -cmd VkResult vkDestroyPipelineLayout( |
| 1889 | +cmd void vkDestroyPipelineLayout( |
| 1890 | VkDevice device, |
| 1891 | VkPipelineLayout pipelineLayout) { |
| 1892 | deviceObject := GetDevice(device) |
| 1893 | @@ -3181,8 +3108,6 @@ cmd VkResult vkDestroyPipelineLayout( |
| 1894 | assert(pipelineLayoutObjects.device == device) |
| 1895 | |
| 1896 | State.PipelineLayouts[pipelineLayout] = null |
| 1897 | - |
| 1898 | - return ? |
| 1899 | } |
| 1900 | |
| 1901 | |
| 1902 | @@ -3204,7 +3129,7 @@ cmd VkResult vkCreateSampler( |
| 1903 | } |
| 1904 | |
| 1905 | @threadSafety("system") |
| 1906 | -cmd VkResult vkDestroySampler( |
| 1907 | +cmd void vkDestroySampler( |
| 1908 | VkDevice device, |
| 1909 | VkSampler sampler) { |
| 1910 | deviceObject := GetDevice(device) |
| 1911 | @@ -3212,8 +3137,6 @@ cmd VkResult vkDestroySampler( |
| 1912 | assert(samplerObject.device == device) |
| 1913 | |
| 1914 | State.Samplers[sampler] = null |
| 1915 | - |
| 1916 | - return ? |
| 1917 | } |
| 1918 | |
| 1919 | |
| 1920 | @@ -3235,7 +3158,7 @@ cmd VkResult vkCreateDescriptorSetLayout( |
| 1921 | } |
| 1922 | |
| 1923 | @threadSafety("system") |
| 1924 | -cmd VkResult vkDestroyDescriptorSetLayout( |
| 1925 | +cmd void vkDestroyDescriptorSetLayout( |
| 1926 | VkDevice device, |
| 1927 | VkDescriptorSetLayout descriptorSetLayout) { |
| 1928 | deviceObject := GetDevice(device) |
| 1929 | @@ -3243,16 +3166,12 @@ cmd VkResult vkDestroyDescriptorSetLayout( |
| 1930 | assert(descriptorSetLayoutObject.device == device) |
| 1931 | |
| 1932 | State.DescriptorSetLayouts[descriptorSetLayout] = null |
| 1933 | - |
| 1934 | - return ? |
| 1935 | } |
| 1936 | |
| 1937 | @threadSafety("system") |
| 1938 | cmd VkResult vkCreateDescriptorPool( |
| 1939 | VkDevice device, |
| 1940 | - VkDescriptorPoolUsage poolUsage, |
| 1941 | - u32 maxSets, |
| 1942 | - const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 1943 | + const VkDescriptorPoolCreateInfo* pCreateInfo |
| 1944 | VkDescriptorPool* pDescriptorPool) { |
| 1945 | assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO) |
| 1946 | deviceObject := GetDevice(device) |
| 1947 | @@ -3265,7 +3184,7 @@ cmd VkResult vkCreateDescriptorPool( |
| 1948 | } |
| 1949 | |
| 1950 | @threadSafety("system") |
| 1951 | -cmd VkResult vkDestroyDescriptorPool( |
| 1952 | +cmd void vkDestroyDescriptorPool( |
| 1953 | VkDevice device, |
| 1954 | VkDescriptorPool descriptorPool) { |
| 1955 | deviceObject := GetDevice(device) |
| 1956 | @@ -3273,8 +3192,6 @@ cmd VkResult vkDestroyDescriptorPool( |
| 1957 | assert(descriptorPoolObject.device == device) |
| 1958 | |
| 1959 | State.DescriptorPools[descriptorPool] = null |
| 1960 | - |
| 1961 | - return ? |
| 1962 | } |
| 1963 | |
| 1964 | @threadSafety("app") |
| 1965 | @@ -3295,8 +3212,7 @@ cmd VkResult vkAllocDescriptorSets( |
| 1966 | VkDescriptorSetUsage setUsage, |
| 1967 | u32 count, |
| 1968 | const VkDescriptorSetLayout* pSetLayouts, |
| 1969 | - VkDescriptorSet* pDescriptorSets, |
| 1970 | - u32* pCount) { |
| 1971 | + VkDescriptorSet* pDescriptorSets) { |
| 1972 | deviceObject := GetDevice(device) |
| 1973 | descriptorPoolObject := GetDescriptorPool(descriptorPool) |
| 1974 | |
| 1975 | @@ -3307,10 +3223,8 @@ cmd VkResult vkAllocDescriptorSets( |
| 1976 | assert(setLayoutObject.device == device) |
| 1977 | } |
| 1978 | |
| 1979 | - setsCount := as!u32(?) |
| 1980 | - pCount[0] = setsCount |
| 1981 | - descriptorSets := pDescriptorSets[0:setsCount] |
| 1982 | - for i in (0 .. setsCount) { |
| 1983 | + descriptorSets := pDescriptorSets[0:count] |
| 1984 | + for i in (0 .. count) { |
| 1985 | descriptorSet := ? |
| 1986 | descriptorSets[i] = descriptorSet |
| 1987 | State.DescriptorSets[descriptorSet] = new!DescriptorSetObject(device: device) |
| 1988 | @@ -3338,7 +3252,7 @@ cmd VkResult vkFreeDescriptorSets( |
| 1989 | return ? |
| 1990 | } |
| 1991 | |
| 1992 | -cmd VkResult vkUpdateDescriptorSets( |
| 1993 | +cmd void vkUpdateDescriptorSets( |
| 1994 | VkDevice device, |
| 1995 | u32 writeCount, |
| 1996 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 1997 | @@ -3359,123 +3273,6 @@ cmd VkResult vkUpdateDescriptorSets( |
| 1998 | descriptorCopyObject := GetDescriptorSet(descriptorCopy.destSet) |
| 1999 | assert(descriptorCopyObject.device == device) |
| 2000 | } |
| 2001 | - |
| 2002 | - return ? |
| 2003 | -} |
| 2004 | - |
| 2005 | - |
| 2006 | -// State object functions |
| 2007 | - |
| 2008 | -@threadSafety("system") |
| 2009 | -cmd VkResult vkCreateDynamicViewportState( |
| 2010 | - VkDevice device, |
| 2011 | - const VkDynamicViewportStateCreateInfo* pCreateInfo, |
| 2012 | - VkDynamicViewportState* pState) { |
| 2013 | - assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO) |
| 2014 | - deviceObject := GetDevice(device) |
| 2015 | - |
| 2016 | - state := ? |
| 2017 | - pState[0] = state |
| 2018 | - State.DynamicViewportStates[state] = new!DynamicViewportStateObject(device: device) |
| 2019 | - |
| 2020 | - return ? |
| 2021 | -} |
| 2022 | - |
| 2023 | -@threadSafety("system") |
| 2024 | -cmd VkResult vkDestroyDynamicViewportState( |
| 2025 | - VkDevice device, |
| 2026 | - VkDynamicViewportState dynamicViewportState) { |
| 2027 | - deviceObject := GetDevice(device) |
| 2028 | - dynamicViewportStateObject := GetDynamicViewportState(dynamicViewportState) |
| 2029 | - assert(dynamicViewportStateObject.device == device) |
| 2030 | - |
| 2031 | - State.DynamicViewportStates[dynamicViewportState] = null |
| 2032 | - |
| 2033 | - return ? |
| 2034 | -} |
| 2035 | - |
| 2036 | -@threadSafety("system") |
| 2037 | -cmd VkResult vkCreateDynamicRasterState( |
| 2038 | - VkDevice device, |
| 2039 | - const VkDynamicRasterStateCreateInfo* pCreateInfo, |
| 2040 | - VkDynamicRasterState* pState) { |
| 2041 | - assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO) |
| 2042 | - deviceObject := GetDevice(device) |
| 2043 | - |
| 2044 | - state := ? |
| 2045 | - pState[0] = state |
| 2046 | - State.DynamicRasterStates[state] = new!DynamicRasterStateObject(device: device) |
| 2047 | - |
| 2048 | - return ? |
| 2049 | -} |
| 2050 | - |
| 2051 | -@threadSafety("system") |
| 2052 | -cmd VkResult vkDestroyDynamicRasterState( |
| 2053 | - VkDevice device, |
| 2054 | - VkDynamicRasterState dynamicRasterState) { |
| 2055 | - deviceObject := GetDevice(device) |
| 2056 | - dynamicRasterStateObject := GetDynamicRasterState(dynamicRasterState) |
| 2057 | - assert(dynamicRasterStateObject.device == device) |
| 2058 | - |
| 2059 | - State.DynamicRasterStates[dynamicRasterState] = null |
| 2060 | - |
| 2061 | - return ? |
| 2062 | -} |
| 2063 | - |
| 2064 | -@threadSafety("system") |
| 2065 | -cmd VkResult vkCreateDynamicColorBlendState( |
| 2066 | - VkDevice device, |
| 2067 | - const VkDynamicColorBlendStateCreateInfo* pCreateInfo, |
| 2068 | - VkDynamicColorBlendState* pState) { |
| 2069 | - assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO) |
| 2070 | - deviceObject := GetDevice(device) |
| 2071 | - |
| 2072 | - state := ? |
| 2073 | - pState[0] = state |
| 2074 | - State.DynamicColorBlendStates[state] = new!DynamicColorBlendStateObject(device: device) |
| 2075 | - |
| 2076 | - return ? |
| 2077 | -} |
| 2078 | - |
| 2079 | -@threadSafety("system") |
| 2080 | -cmd VkResult vkDestroyDynamicColorBlendState( |
| 2081 | - VkDevice device, |
| 2082 | - VkDynamicColorBlendState dynamicColorBlendState) { |
| 2083 | - deviceObject := GetDevice(device) |
| 2084 | - dynamicColorBlendStateObject := GetDynamicColorBlendState(dynamicColorBlendState) |
| 2085 | - assert(dynamicColorBlendStateObject.device == device) |
| 2086 | - |
| 2087 | - State.DynamicColorBlendStates[dynamicColorBlendState] = null |
| 2088 | - |
| 2089 | - return ? |
| 2090 | -} |
| 2091 | - |
| 2092 | -@threadSafety("system") |
| 2093 | -cmd VkResult vkCreateDynamicDepthStencilState( |
| 2094 | - VkDevice device, |
| 2095 | - const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, |
| 2096 | - VkDynamicDepthStencilState* pState) { |
| 2097 | - assert(pCreateInfo.sType == VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO) |
| 2098 | - deviceObject := GetDevice(device) |
| 2099 | - |
| 2100 | - state := ? |
| 2101 | - pState[0] = state |
| 2102 | - State.DynamicDepthStencilStates[state] = new!DynamicDepthStencilStateObject(device: device) |
| 2103 | - |
| 2104 | - return ? |
| 2105 | -} |
| 2106 | - |
| 2107 | -@threadSafety("system") |
| 2108 | -cmd VkResult vkDestroyDynamicDepthStencilState( |
| 2109 | - VkDevice device, |
| 2110 | - VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 2111 | - deviceObject := GetDevice(device) |
| 2112 | - dynamicDepthStencilStateObject := GetDynamicDepthStencilState(dynamicDepthStencilState) |
| 2113 | - assert(dynamicDepthStencilStateObject.device == device) |
| 2114 | - |
| 2115 | - State.DynamicDepthStencilStates[dynamicDepthStencilState] = null |
| 2116 | - |
| 2117 | - return ? |
| 2118 | } |
| 2119 | |
| 2120 | |
| 2121 | @@ -3497,7 +3294,7 @@ cmd VkResult vkCreateFramebuffer( |
| 2122 | } |
| 2123 | |
| 2124 | @threadSafety("system") |
| 2125 | -cmd VkResult vkDestroyFramebuffer( |
| 2126 | +cmd void vkDestroyFramebuffer( |
| 2127 | VkDevice device, |
| 2128 | VkFramebuffer framebuffer) { |
| 2129 | deviceObject := GetDevice(device) |
| 2130 | @@ -3505,8 +3302,6 @@ cmd VkResult vkDestroyFramebuffer( |
| 2131 | assert(framebufferObject.device == device) |
| 2132 | |
| 2133 | State.Framebuffers[framebuffer] = null |
| 2134 | - |
| 2135 | - return ? |
| 2136 | } |
| 2137 | |
| 2138 | |
| 2139 | @@ -3528,7 +3323,7 @@ cmd VkResult vkCreateRenderPass( |
| 2140 | } |
| 2141 | |
| 2142 | @threadSafety("system") |
| 2143 | -cmd VkResult vkDestroyRenderPass( |
| 2144 | +cmd void vkDestroyRenderPass( |
| 2145 | VkDevice device, |
| 2146 | VkRenderPass renderPass) { |
| 2147 | deviceObject := GetDevice(device) |
| 2148 | @@ -3536,8 +3331,6 @@ cmd VkResult vkDestroyRenderPass( |
| 2149 | assert(renderPassObject.device == device) |
| 2150 | |
| 2151 | State.RenderPasses[renderPass] = null |
| 2152 | - |
| 2153 | - return ? |
| 2154 | } |
| 2155 | |
| 2156 | cmd VkResult vkGetRenderAreaGranularity( |
| 2157 | @@ -3569,7 +3362,7 @@ cmd VkResult vkCreateCommandPool( |
| 2158 | return ? |
| 2159 | } |
| 2160 | |
| 2161 | -cmd VkResult vkDestroyCommandPool( |
| 2162 | +cmd void vkDestroyCommandPool( |
| 2163 | VkDevice device, |
| 2164 | VkCmdPool cmdPool) { |
| 2165 | deviceObject := GetDevice(device) |
| 2166 | @@ -3577,8 +3370,6 @@ cmd VkResult vkDestroyCommandPool( |
| 2167 | assert(cmdPoolObject.device == device) |
| 2168 | |
| 2169 | State.CmdPools[cmdPool] = null |
| 2170 | - |
| 2171 | - return ? |
| 2172 | } |
| 2173 | |
| 2174 | cmd VkResult vkResetCommandPool( |
| 2175 | @@ -3625,7 +3416,7 @@ cmd VkResult vkCreateCommandBuffer( |
| 2176 | } |
| 2177 | |
| 2178 | @threadSafety("system") |
| 2179 | -cmd VkResult vkDestroyCommandBuffer( |
| 2180 | +cmd void vkDestroyCommandBuffer( |
| 2181 | VkDevice device, |
| 2182 | VkCmdBuffer commandBuffer) { |
| 2183 | deviceObject := GetDevice(device) |
| 2184 | @@ -3634,8 +3425,6 @@ cmd VkResult vkDestroyCommandBuffer( |
| 2185 | |
| 2186 | // TODO: iterate over boundObjects and clear memory bindings |
| 2187 | State.CmdBuffers[commandBuffer] = null |
| 2188 | - |
| 2189 | - return ? |
| 2190 | } |
| 2191 | |
| 2192 | @threadSafety("app") |
| 2193 | @@ -3689,49 +3478,93 @@ cmd void vkCmdBindPipeline( |
| 2194 | } |
| 2195 | |
| 2196 | @threadSafety("app") |
| 2197 | -cmd void vkCmdBindDynamicViewportState( |
| 2198 | +cmd void vkCmdSetViewport( |
| 2199 | VkCmdBuffer cmdBuffer, |
| 2200 | - VkDynamicViewportState dynamicViewportState) { |
| 2201 | + u32 viewportCount, |
| 2202 | + const VkViewport* pViewports) { |
| 2203 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2204 | - dynamicViewportStateObject := GetDynamicViewportState(dynamicViewportState) |
| 2205 | - assert(cmdBufferObject.device == dynamicViewportStateObject.device) |
| 2206 | + queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2207 | + cmdBufferObject.queueFlags = queueFlags |
| 2208 | +} |
| 2209 | |
| 2210 | +@threadSafety("app") |
| 2211 | +cmd void vkCmdSetScissor( |
| 2212 | + VkCmdBuffer cmdBuffer, |
| 2213 | + u32 scissorCount, |
| 2214 | + const VkRect2D* pScissors) { |
| 2215 | + cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2216 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2217 | cmdBufferObject.queueFlags = queueFlags |
| 2218 | } |
| 2219 | |
| 2220 | @threadSafety("app") |
| 2221 | -cmd void vkCmdBindDynamicRasterState( |
| 2222 | +cmd void vkCmdSetLineWidth( |
| 2223 | VkCmdBuffer cmdBuffer, |
| 2224 | - VkDynamicRasterState dynamicRasterState) { |
| 2225 | + f32 lineWidth) { |
| 2226 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2227 | - dynamicRasterStateObject := GetDynamicRasterState(dynamicRasterState) |
| 2228 | - assert(cmdBufferObject.device == dynamicRasterStateObject.device) |
| 2229 | + queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2230 | + cmdBufferObject.queueFlags = queueFlags |
| 2231 | +} |
| 2232 | |
| 2233 | +@threadSafety("app") |
| 2234 | +cmd void vkCmdSetDepthBias( |
| 2235 | + VkCmdBuffer cmdBuffer, |
| 2236 | + f32 depthBias, |
| 2237 | + f32 depthBiasClamp, |
| 2238 | + f32 slopeScaledDepthBias) { |
| 2239 | + cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2240 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2241 | cmdBufferObject.queueFlags = queueFlags |
| 2242 | } |
| 2243 | |
| 2244 | @threadSafety("app") |
| 2245 | -cmd void vkCmdBindDynamicColorBlendState( |
| 2246 | +cmd void vkCmdSetBlendConstants( |
| 2247 | VkCmdBuffer cmdBuffer, |
| 2248 | - VkDynamicColorBlendState dynamicColorBlendState) { |
| 2249 | + // TODO(jessehall): apic only supports 'const' on pointer types. Using |
| 2250 | + // an annotation as a quick hack to pass this to the template without |
| 2251 | + // having to modify the AST and semantic model. |
| 2252 | + @readonly f32[4] blendConst) { |
| 2253 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2254 | - dynamicColorBlendStateObject := GetDynamicColorBlendState(dynamicColorBlendState) |
| 2255 | - assert(cmdBufferObject.device == dynamicColorBlendStateObject.device) |
| 2256 | + queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2257 | + cmdBufferObject.queueFlags = queueFlags |
| 2258 | +} |
| 2259 | |
| 2260 | +@threadSafety("app") |
| 2261 | +cmd void vkCmdSetDepthBounds( |
| 2262 | + VkCmdBuffer cmdBuffer, |
| 2263 | + f32 minDepthBounds, |
| 2264 | + f32 maxDepthBounds) { |
| 2265 | + cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2266 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2267 | cmdBufferObject.queueFlags = queueFlags |
| 2268 | } |
| 2269 | |
| 2270 | @threadSafety("app") |
| 2271 | -cmd void vkCmdBindDynamicDepthStencilState( |
| 2272 | +cmd void vkCmdSetStencilCompareMask( |
| 2273 | VkCmdBuffer cmdBuffer, |
| 2274 | - VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 2275 | + VkStencilFaceFlags faceMask, |
| 2276 | + u32 stencilCompareMask) { |
| 2277 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2278 | - dynamicDepthStencilStateObject := GetDynamicDepthStencilState(dynamicDepthStencilState) |
| 2279 | - assert(cmdBufferObject.device == dynamicDepthStencilStateObject.device) |
| 2280 | + queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2281 | + cmdBufferObject.queueFlags = queueFlags |
| 2282 | +} |
| 2283 | |
| 2284 | +@threadSafety("app") |
| 2285 | +cmd void vkCmdSetStencilWriteMask( |
| 2286 | + VkCmdBuffer cmdBuffer, |
| 2287 | + VkStencilFaceFlags faceMask, |
| 2288 | + u32 stencilWriteMask) { |
| 2289 | + cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2290 | + queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2291 | + cmdBufferObject.queueFlags = queueFlags |
| 2292 | +} |
| 2293 | + |
| 2294 | +@threadSafety("app") |
| 2295 | +cmd void vkCmdSetStencilReference( |
| 2296 | + VkCmdBuffer cmdBuffer, |
| 2297 | + VkStencilFaceFlags faceMask, |
| 2298 | + u32 stencilReference) { |
| 2299 | + cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2300 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2301 | cmdBufferObject.queueFlags = queueFlags |
| 2302 | } |
| 2303 | @@ -3771,7 +3604,7 @@ cmd void vkCmdBindDescriptorSets( |
| 2304 | cmd void vkCmdBindIndexBuffer( |
| 2305 | VkCmdBuffer cmdBuffer, |
| 2306 | VkBuffer buffer, |
| 2307 | - platform.VkDeviceSize offset, |
| 2308 | + VkDeviceSize offset, |
| 2309 | VkIndexType indexType) { |
| 2310 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2311 | bufferObject := GetBuffer(buffer) |
| 2312 | @@ -3789,7 +3622,7 @@ cmd void vkCmdBindVertexBuffers( |
| 2313 | u32 startBinding, |
| 2314 | u32 bindingCount, |
| 2315 | const VkBuffer* pBuffers, |
| 2316 | - const platform.VkDeviceSize* pOffsets) { |
| 2317 | + const VkDeviceSize* pOffsets) { |
| 2318 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2319 | |
| 2320 | // TODO: check if not [startBinding:startBinding+bindingCount] |
| 2321 | @@ -3811,10 +3644,10 @@ cmd void vkCmdBindVertexBuffers( |
| 2322 | @threadSafety("app") |
| 2323 | cmd void vkCmdDraw( |
| 2324 | VkCmdBuffer cmdBuffer, |
| 2325 | - u32 firstVertex, |
| 2326 | u32 vertexCount, |
| 2327 | - u32 firstInstance, |
| 2328 | - u32 instanceCount) { |
| 2329 | + u32 instanceCount, |
| 2330 | + u32 firstVertex, |
| 2331 | + u32 firstInstance) { |
| 2332 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2333 | |
| 2334 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2335 | @@ -3824,11 +3657,11 @@ cmd void vkCmdDraw( |
| 2336 | @threadSafety("app") |
| 2337 | cmd void vkCmdDrawIndexed( |
| 2338 | VkCmdBuffer cmdBuffer, |
| 2339 | - u32 firstIndex, |
| 2340 | u32 indexCount, |
| 2341 | + u32 instanceCount, |
| 2342 | + u32 firstIndex, |
| 2343 | s32 vertexOffset, |
| 2344 | - u32 firstInstance, |
| 2345 | - u32 instanceCount) { |
| 2346 | + u32 firstInstance) { |
| 2347 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2348 | |
| 2349 | queueFlags := cmdBufferObject.queueFlags | VK_QUEUE_GRAPHICS_BIT |
| 2350 | @@ -3839,7 +3672,7 @@ cmd void vkCmdDrawIndexed( |
| 2351 | cmd void vkCmdDrawIndirect( |
| 2352 | VkCmdBuffer cmdBuffer, |
| 2353 | VkBuffer buffer, |
| 2354 | - platform.VkDeviceSize offset, |
| 2355 | + VkDeviceSize offset, |
| 2356 | u32 count, |
| 2357 | u32 stride) { |
| 2358 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2359 | @@ -3856,7 +3689,7 @@ cmd void vkCmdDrawIndirect( |
| 2360 | cmd void vkCmdDrawIndexedIndirect( |
| 2361 | VkCmdBuffer cmdBuffer, |
| 2362 | VkBuffer buffer, |
| 2363 | - platform.VkDeviceSize offset, |
| 2364 | + VkDeviceSize offset, |
| 2365 | u32 count, |
| 2366 | u32 stride) { |
| 2367 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2368 | @@ -3885,7 +3718,7 @@ cmd void vkCmdDispatch( |
| 2369 | cmd void vkCmdDispatchIndirect( |
| 2370 | VkCmdBuffer cmdBuffer, |
| 2371 | VkBuffer buffer, |
| 2372 | - platform.VkDeviceSize offset) { |
| 2373 | + VkDeviceSize offset) { |
| 2374 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2375 | bufferObject := GetBuffer(buffer) |
| 2376 | assert(cmdBufferObject.device == bufferObject.device) |
| 2377 | @@ -4032,8 +3865,8 @@ cmd void vkCmdCopyImageToBuffer( |
| 2378 | cmd void vkCmdUpdateBuffer( |
| 2379 | VkCmdBuffer cmdBuffer, |
| 2380 | VkBuffer destBuffer, |
| 2381 | - platform.VkDeviceSize destOffset, |
| 2382 | - platform.VkDeviceSize dataSize, |
| 2383 | + VkDeviceSize destOffset, |
| 2384 | + VkDeviceSize dataSize, |
| 2385 | const u32* pData) { |
| 2386 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2387 | destBufferObject := GetBuffer(destBuffer) |
| 2388 | @@ -4051,8 +3884,8 @@ cmd void vkCmdUpdateBuffer( |
| 2389 | cmd void vkCmdFillBuffer( |
| 2390 | VkCmdBuffer cmdBuffer, |
| 2391 | VkBuffer destBuffer, |
| 2392 | - platform.VkDeviceSize destOffset, |
| 2393 | - platform.VkDeviceSize fillSize, |
| 2394 | + VkDeviceSize destOffset, |
| 2395 | + VkDeviceSize fillSize, |
| 2396 | u32 data) { |
| 2397 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2398 | destBufferObject := GetBuffer(destBuffer) |
| 2399 | @@ -4090,8 +3923,7 @@ cmd void vkCmdClearDepthStencilImage( |
| 2400 | VkCmdBuffer cmdBuffer, |
| 2401 | VkImage image, |
| 2402 | VkImageLayout imageLayout, |
| 2403 | - f32 depth, |
| 2404 | - u32 stencil, |
| 2405 | + const VkClearDepthStencilValue* pDepthStencil, |
| 2406 | u32 rangeCount, |
| 2407 | const VkImageSubresourceRange* pRanges) { |
| 2408 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2409 | @@ -4131,10 +3963,9 @@ cmd void vkCmdClearColorAttachment( |
| 2410 | @threadSafety("app") |
| 2411 | cmd void vkCmdClearDepthStencilAttachment( |
| 2412 | VkCmdBuffer cmdBuffer, |
| 2413 | - VkImageAspectFlags imageAspectMask, |
| 2414 | + VkImageAspectFlags aspectMask, |
| 2415 | VkImageLayout imageLayout, |
| 2416 | - f32 depth, |
| 2417 | - u32 stencil, |
| 2418 | + const VkClearDepthStencilValue* pDepthStencil, |
| 2419 | u32 rectCount, |
| 2420 | const VkRect3D* pRects) { |
| 2421 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2422 | @@ -4238,7 +4069,7 @@ cmd void vkCmdPipelineBarrier( |
| 2423 | VkCmdBuffer cmdBuffer, |
| 2424 | VkPipelineStageFlags srcStageMask, |
| 2425 | VkPipelineStageFlags destStageMask, |
| 2426 | - platform.VkBool32 byRegion, |
| 2427 | + VkBool32 byRegion, |
| 2428 | u32 memBarrierCount, |
| 2429 | const void* const* ppMemBarriers) { |
| 2430 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2431 | @@ -4300,7 +4131,7 @@ cmd void vkCmdWriteTimestamp( |
| 2432 | VkCmdBuffer cmdBuffer, |
| 2433 | VkTimestampType timestampType, |
| 2434 | VkBuffer destBuffer, |
| 2435 | - platform.VkDeviceSize destOffset) { |
| 2436 | + VkDeviceSize destOffset) { |
| 2437 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2438 | destBufferObject := GetBuffer(destBuffer) |
| 2439 | assert(cmdBufferObject.device == destBufferObject.device) |
| 2440 | @@ -4313,8 +4144,8 @@ cmd void vkCmdCopyQueryPoolResults( |
| 2441 | u32 startQuery, |
| 2442 | u32 queryCount, |
| 2443 | VkBuffer destBuffer, |
| 2444 | - platform.VkDeviceSize destOffset, |
| 2445 | - platform.VkDeviceSize destStride, |
| 2446 | + VkDeviceSize destOffset, |
| 2447 | + VkDeviceSize destStride, |
| 2448 | VkQueryResultFlags flags) { |
| 2449 | cmdBufferObject := GetCmdBuffer(cmdBuffer) |
| 2450 | queryPoolObject := GetQueryPool(queryPool) |
| 2451 | @@ -4407,7 +4238,6 @@ StateObject State |
| 2452 | map!(VkBufferView, ref!BufferViewObject) BufferViews |
| 2453 | map!(VkImage, ref!ImageObject) Images |
| 2454 | map!(VkImageView, ref!ImageViewObject) ImageViews |
| 2455 | - map!(VkAttachmentView, ref!AttachmentViewObject) AttachmentViews |
| 2456 | map!(VkShaderModule, ref!ShaderModuleObject) ShaderModules |
| 2457 | map!(VkShader, ref!ShaderObject) Shaders |
| 2458 | map!(VkPipeline, ref!PipelineObject) Pipelines |
| 2459 | @@ -4416,10 +4246,6 @@ StateObject State |
| 2460 | map!(VkDescriptorSet, ref!DescriptorSetObject) DescriptorSets |
| 2461 | map!(VkDescriptorSetLayout, ref!DescriptorSetLayoutObject) DescriptorSetLayouts |
| 2462 | map!(VkDescriptorPool, ref!DescriptorPoolObject) DescriptorPools |
| 2463 | - map!(VkDynamicViewportState, ref!DynamicViewportStateObject) DynamicViewportStates |
| 2464 | - map!(VkDynamicRasterState, ref!DynamicRasterStateObject) DynamicRasterStates |
| 2465 | - map!(VkDynamicColorBlendState, ref!DynamicColorBlendStateObject) DynamicColorBlendStates |
| 2466 | - map!(VkDynamicDepthStencilState, ref!DynamicDepthStencilStateObject) DynamicDepthStencilStates |
| 2467 | map!(VkFence, ref!FenceObject) Fences |
| 2468 | map!(VkSemaphore, ref!SemaphoreObject) Semaphores |
| 2469 | map!(VkEvent, ref!EventObject) Events |
| 2470 | @@ -4454,15 +4280,15 @@ StateObject State |
| 2471 | |
| 2472 | @internal class DeviceMemoryObject { |
| 2473 | VkDevice device |
| 2474 | - platform.VkDeviceSize allocationSize |
| 2475 | - map!(u64, platform.VkDeviceSize) boundObjects |
| 2476 | + VkDeviceSize allocationSize |
| 2477 | + map!(u64, VkDeviceSize ) boundObjects |
| 2478 | map!(VkCmdBuffer, VkCmdBuffer) boundCommandBuffers |
| 2479 | } |
| 2480 | |
| 2481 | @internal class BufferObject { |
| 2482 | VkDevice device |
| 2483 | VkDeviceMemory mem |
| 2484 | - platform.VkDeviceSize memOffset |
| 2485 | + VkDeviceSize memOffset |
| 2486 | } |
| 2487 | |
| 2488 | @internal class BufferViewObject { |
| 2489 | @@ -4473,7 +4299,7 @@ StateObject State |
| 2490 | @internal class ImageObject { |
| 2491 | VkDevice device |
| 2492 | VkDeviceMemory mem |
| 2493 | - platform.VkDeviceSize memOffset |
| 2494 | + VkDeviceSize memOffset |
| 2495 | } |
| 2496 | |
| 2497 | @internal class ImageViewObject { |
| 2498 | @@ -4481,11 +4307,6 @@ StateObject State |
| 2499 | VkImage image |
| 2500 | } |
| 2501 | |
| 2502 | -@internal class AttachmentViewObject { |
| 2503 | - VkDevice device |
| 2504 | - VkImage image |
| 2505 | -} |
| 2506 | - |
| 2507 | @internal class ShaderObject { |
| 2508 | VkDevice device |
| 2509 | } |
| 2510 | @@ -4518,22 +4339,6 @@ StateObject State |
| 2511 | VkDevice device |
| 2512 | } |
| 2513 | |
| 2514 | -@internal class DynamicViewportStateObject { |
| 2515 | - VkDevice device |
| 2516 | -} |
| 2517 | - |
| 2518 | -@internal class DynamicRasterStateObject { |
| 2519 | - VkDevice device |
| 2520 | -} |
| 2521 | - |
| 2522 | -@internal class DynamicColorBlendStateObject { |
| 2523 | - VkDevice device |
| 2524 | -} |
| 2525 | - |
| 2526 | -@internal class DynamicDepthStencilStateObject { |
| 2527 | - VkDevice device |
| 2528 | -} |
| 2529 | - |
| 2530 | @internal class FenceObject { |
| 2531 | VkDevice device |
| 2532 | bool signaled |
| 2533 | @@ -4617,11 +4422,6 @@ macro ref!ImageViewObject GetImageView(VkImageView imageView) { |
| 2534 | return State.ImageViews[imageView] |
| 2535 | } |
| 2536 | |
| 2537 | -macro ref!AttachmentViewObject GetAttachmentView(VkAttachmentView attachmentView) { |
| 2538 | - assert(attachmentView in State.AttachmentViews) |
| 2539 | - return State.AttachmentViews[attachmentView] |
| 2540 | -} |
| 2541 | - |
| 2542 | macro ref!ShaderObject GetShader(VkShader shader) { |
| 2543 | assert(shader in State.Shaders) |
| 2544 | return State.Shaders[shader] |
| 2545 | @@ -4662,26 +4462,6 @@ macro ref!DescriptorPoolObject GetDescriptorPool(VkDescriptorPool descriptorPool |
| 2546 | return State.DescriptorPools[descriptorPool] |
| 2547 | } |
| 2548 | |
| 2549 | -macro ref!DynamicViewportStateObject GetDynamicViewportState(VkDynamicViewportState dynamicViewportState) { |
| 2550 | - assert(dynamicViewportState in State.DynamicViewportStates) |
| 2551 | - return State.DynamicViewportStates[dynamicViewportState] |
| 2552 | -} |
| 2553 | - |
| 2554 | -macro ref!DynamicRasterStateObject GetDynamicRasterState(VkDynamicRasterState dynamicRasterState) { |
| 2555 | - assert(dynamicRasterState in State.DynamicRasterStates) |
| 2556 | - return State.DynamicRasterStates[dynamicRasterState] |
| 2557 | -} |
| 2558 | - |
| 2559 | -macro ref!DynamicColorBlendStateObject GetDynamicColorBlendState(VkDynamicColorBlendState dynamicColorBlendState) { |
| 2560 | - assert(dynamicColorBlendState in State.DynamicColorBlendStates) |
| 2561 | - return State.DynamicColorBlendStates[dynamicColorBlendState] |
| 2562 | -} |
| 2563 | - |
| 2564 | -macro ref!DynamicDepthStencilStateObject GetDynamicDepthStencilState(VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 2565 | - assert(dynamicDepthStencilState in State.DynamicDepthStencilStates) |
| 2566 | - return State.DynamicDepthStencilStates[dynamicDepthStencilState] |
| 2567 | -} |
| 2568 | - |
| 2569 | macro ref!FenceObject GetFence(VkFence fence) { |
| 2570 | assert(fence in State.Fences) |
| 2571 | return State.Fences[fence] |
| 2572 | diff --git a/vulkan/include/hardware/hwvulkan.h b/vulkan/include/hardware/hwvulkan.h |
| 2573 | index 91dd41e..e973f46 100644 |
| 2574 | --- a/vulkan/include/hardware/hwvulkan.h |
| 2575 | +++ b/vulkan/include/hardware/hwvulkan.h |
| 2576 | @@ -61,7 +61,8 @@ typedef union { |
| 2577 | typedef struct hwvulkan_device_t { |
| 2578 | struct hw_device_t common; |
| 2579 | |
| 2580 | - PFN_vkGetGlobalExtensionProperties GetGlobalExtensionProperties; |
| 2581 | + PFN_vkEnumerateInstanceExtensionProperties |
| 2582 | + EnumerateInstanceExtensionProperties; |
| 2583 | PFN_vkCreateInstance CreateInstance; |
| 2584 | PFN_vkGetInstanceProcAddr GetInstanceProcAddr; |
| 2585 | } hwvulkan_device_t; |
| 2586 | diff --git a/vulkan/include/vulkan/vk_platform.h b/vulkan/include/vulkan/vk_platform.h |
| 2587 | index 7ba8d77..969e532 100644 |
| 2588 | --- a/vulkan/include/vulkan/vk_platform.h |
| 2589 | +++ b/vulkan/include/vulkan/vk_platform.h |
| 2590 | @@ -67,22 +67,6 @@ extern "C" |
| 2591 | #endif |
| 2592 | #endif // !defined(VK_NO_STDINT_H) |
| 2593 | |
| 2594 | -typedef uint64_t VkDeviceSize; |
| 2595 | -typedef uint32_t VkBool32; |
| 2596 | - |
| 2597 | -typedef uint32_t VkSampleMask; |
| 2598 | -typedef uint32_t VkFlags; |
| 2599 | - |
| 2600 | -#if (UINTPTR_MAX >= UINT64_MAX) |
| 2601 | - #define VK_UINTPTRLEAST64_MAX UINTPTR_MAX |
| 2602 | - |
| 2603 | - typedef uintptr_t VkUintPtrLeast64; |
| 2604 | -#else |
| 2605 | - #define VK_UINTPTRLEAST64_MAX UINT64_MAX |
| 2606 | - |
| 2607 | - typedef uint64_t VkUintPtrLeast64; |
| 2608 | -#endif |
| 2609 | - |
| 2610 | #ifdef __cplusplus |
| 2611 | } // extern "C" |
| 2612 | #endif // __cplusplus |
| 2613 | diff --git a/vulkan/include/vulkan/vulkan.h b/vulkan/include/vulkan/vulkan.h |
| 2614 | index 9877233..03bcefe 100644 |
| 2615 | --- a/vulkan/include/vulkan/vulkan.h |
| 2616 | +++ b/vulkan/include/vulkan/vulkan.h |
| 2617 | @@ -41,14 +41,21 @@ extern "C" { |
| 2618 | ((major << 22) | (minor << 12) | patch) |
| 2619 | |
| 2620 | // Vulkan API version supported by this file |
| 2621 | -#define VK_API_VERSION VK_MAKE_VERSION(0, 138, 2) |
| 2622 | +#define VK_API_VERSION VK_MAKE_VERSION(0, 170, 2) |
| 2623 | + |
| 2624 | + |
| 2625 | +#if defined(__cplusplus) && (_MSC_VER >= 1800 || __cplusplus >= 201103L) |
| 2626 | + #define VK_NULL_HANDLE nullptr |
| 2627 | +#else |
| 2628 | + #define VK_NULL_HANDLE 0 |
| 2629 | +#endif |
| 2630 | |
| 2631 | |
| 2632 | #define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj; |
| 2633 | |
| 2634 | |
| 2635 | #if defined(__cplusplus) |
| 2636 | - #if (_MSC_VER >= 1800 || __cplusplus >= 201103L) |
| 2637 | + #if ((defined(_MSC_VER) && _MSC_VER >= 1800) || __cplusplus >= 201103L) |
| 2638 | // The bool operator only works if there are no implicit conversions from an obj to |
| 2639 | // a bool-compatible type, which can then be used to unintentionally violate type safety. |
| 2640 | // C++11 and above supports the "explicit" keyword on conversion operators to stop this |
| 2641 | @@ -56,13 +63,18 @@ extern "C" { |
| 2642 | // the object handle as a bool in expressions like: |
| 2643 | // if (obj) vkDestroy(obj); |
| 2644 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() explicit operator bool() const { return handle != 0; } |
| 2645 | + #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 2646 | + explicit obj(uint64_t x) : handle(x) { } \ |
| 2647 | + obj(decltype(nullptr)) : handle(0) { } |
| 2648 | #else |
| 2649 | #define VK_NONDISP_HANDLE_OPERATOR_BOOL() |
| 2650 | + #define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 2651 | + obj(uint64_t x) : handle(x) { } |
| 2652 | #endif |
| 2653 | #define VK_DEFINE_NONDISP_HANDLE(obj) \ |
| 2654 | struct obj { \ |
| 2655 | obj() : handle(0) { } \ |
| 2656 | - obj(uint64_t x) : handle(x) { } \ |
| 2657 | + VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \ |
| 2658 | obj& operator =(uint64_t x) { handle = x; return *this; } \ |
| 2659 | bool operator==(const obj& other) const { return handle == other.handle; } \ |
| 2660 | bool operator!=(const obj& other) const { return handle != other.handle; } \ |
| 2661 | @@ -76,20 +88,10 @@ extern "C" { |
| 2662 | |
| 2663 | |
| 2664 | |
| 2665 | -#define VK_LOD_CLAMP_NONE MAX_FLOAT |
| 2666 | -#define VK_LAST_MIP_LEVEL UINT32_MAX |
| 2667 | -#define VK_LAST_ARRAY_SLICE UINT32_MAX |
| 2668 | -#define VK_WHOLE_SIZE UINT64_MAX |
| 2669 | -#define VK_ATTACHMENT_UNUSED UINT32_MAX |
| 2670 | -#define VK_TRUE 1 |
| 2671 | -#define VK_FALSE 0 |
| 2672 | -#define VK_NULL_HANDLE 0 |
| 2673 | -#define VK_MAX_PHYSICAL_DEVICE_NAME 256 |
| 2674 | -#define VK_UUID_LENGTH 16 |
| 2675 | -#define VK_MAX_MEMORY_TYPES 32 |
| 2676 | -#define VK_MAX_MEMORY_HEAPS 16 |
| 2677 | -#define VK_MAX_EXTENSION_NAME 256 |
| 2678 | -#define VK_MAX_DESCRIPTION 256 |
| 2679 | +typedef uint32_t VkBool32; |
| 2680 | +typedef uint32_t VkFlags; |
| 2681 | +typedef uint64_t VkDeviceSize; |
| 2682 | +typedef uint32_t VkSampleMask; |
| 2683 | |
| 2684 | VK_DEFINE_HANDLE(VkInstance) |
| 2685 | VK_DEFINE_HANDLE(VkPhysicalDevice) |
| 2686 | @@ -105,7 +107,6 @@ VK_DEFINE_NONDISP_HANDLE(VkEvent) |
| 2687 | VK_DEFINE_NONDISP_HANDLE(VkQueryPool) |
| 2688 | VK_DEFINE_NONDISP_HANDLE(VkBufferView) |
| 2689 | VK_DEFINE_NONDISP_HANDLE(VkImageView) |
| 2690 | -VK_DEFINE_NONDISP_HANDLE(VkAttachmentView) |
| 2691 | VK_DEFINE_NONDISP_HANDLE(VkShaderModule) |
| 2692 | VK_DEFINE_NONDISP_HANDLE(VkShader) |
| 2693 | VK_DEFINE_NONDISP_HANDLE(VkPipelineCache) |
| 2694 | @@ -116,13 +117,25 @@ VK_DEFINE_NONDISP_HANDLE(VkDescriptorSetLayout) |
| 2695 | VK_DEFINE_NONDISP_HANDLE(VkSampler) |
| 2696 | VK_DEFINE_NONDISP_HANDLE(VkDescriptorPool) |
| 2697 | VK_DEFINE_NONDISP_HANDLE(VkDescriptorSet) |
| 2698 | -VK_DEFINE_NONDISP_HANDLE(VkDynamicViewportState) |
| 2699 | -VK_DEFINE_NONDISP_HANDLE(VkDynamicRasterState) |
| 2700 | -VK_DEFINE_NONDISP_HANDLE(VkDynamicColorBlendState) |
| 2701 | -VK_DEFINE_NONDISP_HANDLE(VkDynamicDepthStencilState) |
| 2702 | VK_DEFINE_NONDISP_HANDLE(VkFramebuffer) |
| 2703 | VK_DEFINE_NONDISP_HANDLE(VkCmdPool) |
| 2704 | |
| 2705 | +#define VK_LOD_CLAMP_NONE 1000.0f |
| 2706 | +#define VK_REMAINING_MIP_LEVELS (~0U) |
| 2707 | +#define VK_REMAINING_ARRAY_LAYERS (~0U) |
| 2708 | +#define VK_WHOLE_SIZE (~0ULL) |
| 2709 | +#define VK_ATTACHMENT_UNUSED (~0U) |
| 2710 | +#define VK_TRUE 1 |
| 2711 | +#define VK_FALSE 0 |
| 2712 | +#define VK_QUEUE_FAMILY_IGNORED (~0U) |
| 2713 | +#define VK_SUBPASS_EXTERNAL (~0U) |
| 2714 | +#define VK_MAX_PHYSICAL_DEVICE_NAME 256 |
| 2715 | +#define VK_UUID_LENGTH 16 |
| 2716 | +#define VK_MAX_MEMORY_TYPES 32 |
| 2717 | +#define VK_MAX_MEMORY_HEAPS 16 |
| 2718 | +#define VK_MAX_EXTENSION_NAME 256 |
| 2719 | +#define VK_MAX_DESCRIPTION 256 |
| 2720 | + |
| 2721 | |
| 2722 | typedef enum { |
| 2723 | VK_SUCCESS = 0, |
| 2724 | @@ -132,41 +145,17 @@ typedef enum { |
| 2725 | VK_EVENT_SET = 4, |
| 2726 | VK_EVENT_RESET = 5, |
| 2727 | VK_INCOMPLETE = 6, |
| 2728 | - VK_ERROR_UNKNOWN = -1, |
| 2729 | - VK_ERROR_UNAVAILABLE = -2, |
| 2730 | + VK_ERROR_OUT_OF_HOST_MEMORY = -1, |
| 2731 | + VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, |
| 2732 | VK_ERROR_INITIALIZATION_FAILED = -3, |
| 2733 | - VK_ERROR_OUT_OF_HOST_MEMORY = -4, |
| 2734 | - VK_ERROR_OUT_OF_DEVICE_MEMORY = -5, |
| 2735 | - VK_ERROR_DEVICE_ALREADY_CREATED = -6, |
| 2736 | - VK_ERROR_DEVICE_LOST = -7, |
| 2737 | - VK_ERROR_INVALID_POINTER = -8, |
| 2738 | - VK_ERROR_INVALID_VALUE = -9, |
| 2739 | - VK_ERROR_INVALID_HANDLE = -10, |
| 2740 | - VK_ERROR_INVALID_ORDINAL = -11, |
| 2741 | - VK_ERROR_INVALID_MEMORY_SIZE = -12, |
| 2742 | - VK_ERROR_INVALID_EXTENSION = -13, |
| 2743 | - VK_ERROR_INVALID_FLAGS = -14, |
| 2744 | - VK_ERROR_INVALID_ALIGNMENT = -15, |
| 2745 | - VK_ERROR_INVALID_FORMAT = -16, |
| 2746 | - VK_ERROR_INVALID_IMAGE = -17, |
| 2747 | - VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -18, |
| 2748 | - VK_ERROR_INVALID_QUEUE_TYPE = -19, |
| 2749 | - VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -20, |
| 2750 | - VK_ERROR_BAD_SHADER_CODE = -21, |
| 2751 | - VK_ERROR_BAD_PIPELINE_DATA = -22, |
| 2752 | - VK_ERROR_NOT_MAPPABLE = -23, |
| 2753 | - VK_ERROR_MEMORY_MAP_FAILED = -24, |
| 2754 | - VK_ERROR_MEMORY_UNMAP_FAILED = -25, |
| 2755 | - VK_ERROR_INCOMPATIBLE_DEVICE = -26, |
| 2756 | - VK_ERROR_INCOMPATIBLE_DRIVER = -27, |
| 2757 | - VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -28, |
| 2758 | - VK_ERROR_BUILDING_COMMAND_BUFFER = -29, |
| 2759 | - VK_ERROR_MEMORY_NOT_BOUND = -30, |
| 2760 | - VK_ERROR_INCOMPATIBLE_QUEUE = -31, |
| 2761 | - VK_ERROR_INVALID_LAYER = -32, |
| 2762 | - VK_RESULT_BEGIN_RANGE = VK_ERROR_INVALID_LAYER, |
| 2763 | + VK_ERROR_DEVICE_LOST = -4, |
| 2764 | + VK_ERROR_MEMORY_MAP_FAILED = -5, |
| 2765 | + VK_ERROR_LAYER_NOT_PRESENT = -6, |
| 2766 | + VK_ERROR_EXTENSION_NOT_PRESENT = -7, |
| 2767 | + VK_ERROR_INCOMPATIBLE_DRIVER = -8, |
| 2768 | + VK_RESULT_BEGIN_RANGE = VK_ERROR_INCOMPATIBLE_DRIVER, |
| 2769 | VK_RESULT_END_RANGE = VK_INCOMPLETE, |
| 2770 | - VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INVALID_LAYER + 1), |
| 2771 | + VK_RESULT_NUM = (VK_INCOMPLETE - VK_ERROR_INCOMPATIBLE_DRIVER + 1), |
| 2772 | VK_RESULT_MAX_ENUM = 0x7FFFFFFF |
| 2773 | } VkResult; |
| 2774 | |
| 2775 | @@ -175,55 +164,52 @@ typedef enum { |
| 2776 | VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1, |
| 2777 | VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2, |
| 2778 | VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 3, |
| 2779 | - VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO = 4, |
| 2780 | - VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 5, |
| 2781 | - VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 6, |
| 2782 | - VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 7, |
| 2783 | - VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 8, |
| 2784 | - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 9, |
| 2785 | - VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO = 10, |
| 2786 | - VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO = 11, |
| 2787 | - VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO = 12, |
| 2788 | - VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO = 13, |
| 2789 | - VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 14, |
| 2790 | - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 15, |
| 2791 | - VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 16, |
| 2792 | - VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 17, |
| 2793 | - VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 18, |
| 2794 | - VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 19, |
| 2795 | - VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 20, |
| 2796 | - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 21, |
| 2797 | - VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 22, |
| 2798 | - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 23, |
| 2799 | - VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 24, |
| 2800 | - VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 25, |
| 2801 | - VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 26, |
| 2802 | - VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 27, |
| 2803 | - VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 28, |
| 2804 | - VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 29, |
| 2805 | - VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 30, |
| 2806 | - VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 31, |
| 2807 | - VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 32, |
| 2808 | - VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 33, |
| 2809 | - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 34, |
| 2810 | - VK_STRUCTURE_TYPE_MEMORY_BARRIER = 35, |
| 2811 | - VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 36, |
| 2812 | - VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 37, |
| 2813 | - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 38, |
| 2814 | - VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 39, |
| 2815 | - VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 40, |
| 2816 | - VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 41, |
| 2817 | - VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 42, |
| 2818 | - VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 43, |
| 2819 | - VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 44, |
| 2820 | - VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 45, |
| 2821 | - VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 46, |
| 2822 | - VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 47, |
| 2823 | - VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 48, |
| 2824 | - VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 49, |
| 2825 | + VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 4, |
| 2826 | + VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 5, |
| 2827 | + VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 6, |
| 2828 | + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 7, |
| 2829 | + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 8, |
| 2830 | + VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 9, |
| 2831 | + VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, |
| 2832 | + VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 11, |
| 2833 | + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 12, |
| 2834 | + VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 13, |
| 2835 | + VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 14, |
| 2836 | + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 15, |
| 2837 | + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 16, |
| 2838 | + VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 17, |
| 2839 | + VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 18, |
| 2840 | + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 19, |
| 2841 | + VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO = 20, |
| 2842 | + VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 21, |
| 2843 | + VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 22, |
| 2844 | + VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 23, |
| 2845 | + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 24, |
| 2846 | + VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 25, |
| 2847 | + VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 26, |
| 2848 | + VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 27, |
| 2849 | + VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 28, |
| 2850 | + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 29, |
| 2851 | + VK_STRUCTURE_TYPE_MEMORY_BARRIER = 30, |
| 2852 | + VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 31, |
| 2853 | + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 32, |
| 2854 | + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, |
| 2855 | + VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 34, |
| 2856 | + VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 35, |
| 2857 | + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 36, |
| 2858 | + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 37, |
| 2859 | + VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 38, |
| 2860 | + VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 39, |
| 2861 | + VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION = 40, |
| 2862 | + VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION = 41, |
| 2863 | + VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY = 42, |
| 2864 | + VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, |
| 2865 | + VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO = 44, |
| 2866 | + VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 45, |
| 2867 | + VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 46, |
| 2868 | VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO, |
| 2869 | - VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO, |
| 2870 | - VK_STRUCTURE_TYPE_NUM = (VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), |
| 2871 | + VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, |
| 2872 | + VK_STRUCTURE_TYPE_NUM = (VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), |
| 2873 | VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF |
| 2874 | } VkStructureType; |
| 2875 | |
| 2876 | @@ -330,7 +316,7 @@ typedef enum { |
| 2877 | VK_FORMAT_R11G11B10_UFLOAT = 87, |
| 2878 | VK_FORMAT_R9G9B9E5_UFLOAT = 88, |
| 2879 | VK_FORMAT_D16_UNORM = 89, |
| 2880 | - VK_FORMAT_D24_UNORM = 90, |
| 2881 | + VK_FORMAT_D24_UNORM_X8 = 90, |
| 2882 | VK_FORMAT_D32_SFLOAT = 91, |
| 2883 | VK_FORMAT_S8_UINT = 92, |
| 2884 | VK_FORMAT_D16_UNORM_S8_UINT = 93, |
| 2885 | @@ -481,13 +467,20 @@ typedef enum { |
| 2886 | } VkSharingMode; |
| 2887 | |
| 2888 | typedef enum { |
| 2889 | - VK_BUFFER_VIEW_TYPE_RAW = 0, |
| 2890 | - VK_BUFFER_VIEW_TYPE_FORMATTED = 1, |
| 2891 | - VK_BUFFER_VIEW_TYPE_BEGIN_RANGE = VK_BUFFER_VIEW_TYPE_RAW, |
| 2892 | - VK_BUFFER_VIEW_TYPE_END_RANGE = VK_BUFFER_VIEW_TYPE_FORMATTED, |
| 2893 | - VK_BUFFER_VIEW_TYPE_NUM = (VK_BUFFER_VIEW_TYPE_FORMATTED - VK_BUFFER_VIEW_TYPE_RAW + 1), |
| 2894 | - VK_BUFFER_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF |
| 2895 | -} VkBufferViewType; |
| 2896 | + VK_IMAGE_LAYOUT_UNDEFINED = 0, |
| 2897 | + VK_IMAGE_LAYOUT_GENERAL = 1, |
| 2898 | + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, |
| 2899 | + VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, |
| 2900 | + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, |
| 2901 | + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, |
| 2902 | + VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 6, |
| 2903 | + VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 7, |
| 2904 | + VK_IMAGE_LAYOUT_PREINITIALIZED = 8, |
| 2905 | + VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED, |
| 2906 | + VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED, |
| 2907 | + VK_IMAGE_LAYOUT_NUM = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1), |
| 2908 | + VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF |
| 2909 | +} VkImageLayout; |
| 2910 | |
| 2911 | typedef enum { |
| 2912 | VK_IMAGE_VIEW_TYPE_1D = 0, |
| 2913 | @@ -678,6 +671,22 @@ typedef enum { |
| 2914 | } VkBlendOp; |
| 2915 | |
| 2916 | typedef enum { |
| 2917 | + VK_DYNAMIC_STATE_VIEWPORT = 0, |
| 2918 | + VK_DYNAMIC_STATE_SCISSOR = 1, |
| 2919 | + VK_DYNAMIC_STATE_LINE_WIDTH = 2, |
| 2920 | + VK_DYNAMIC_STATE_DEPTH_BIAS = 3, |
| 2921 | + VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, |
| 2922 | + VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, |
| 2923 | + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, |
| 2924 | + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, |
| 2925 | + VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, |
| 2926 | + VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT, |
| 2927 | + VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE, |
| 2928 | + VK_DYNAMIC_STATE_NUM = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1), |
| 2929 | + VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF |
| 2930 | +} VkDynamicState; |
| 2931 | + |
| 2932 | +typedef enum { |
| 2933 | VK_TEX_FILTER_NEAREST = 0, |
| 2934 | VK_TEX_FILTER_LINEAR = 1, |
| 2935 | VK_TEX_FILTER_BEGIN_RANGE = VK_TEX_FILTER_NEAREST, |
| 2936 | @@ -697,16 +706,16 @@ typedef enum { |
| 2937 | } VkTexMipmapMode; |
| 2938 | |
| 2939 | typedef enum { |
| 2940 | - VK_TEX_ADDRESS_WRAP = 0, |
| 2941 | - VK_TEX_ADDRESS_MIRROR = 1, |
| 2942 | - VK_TEX_ADDRESS_CLAMP = 2, |
| 2943 | - VK_TEX_ADDRESS_MIRROR_ONCE = 3, |
| 2944 | - VK_TEX_ADDRESS_CLAMP_BORDER = 4, |
| 2945 | - VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_WRAP, |
| 2946 | - VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_CLAMP_BORDER, |
| 2947 | - VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_CLAMP_BORDER - VK_TEX_ADDRESS_WRAP + 1), |
| 2948 | + VK_TEX_ADDRESS_MODE_WRAP = 0, |
| 2949 | + VK_TEX_ADDRESS_MODE_MIRROR = 1, |
| 2950 | + VK_TEX_ADDRESS_MODE_CLAMP = 2, |
| 2951 | + VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 3, |
| 2952 | + VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 4, |
| 2953 | + VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_MODE_WRAP, |
| 2954 | + VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_MODE_CLAMP_BORDER, |
| 2955 | + VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_MODE_CLAMP_BORDER - VK_TEX_ADDRESS_MODE_WRAP + 1), |
| 2956 | VK_TEX_ADDRESS_MAX_ENUM = 0x7FFFFFFF |
| 2957 | -} VkTexAddress; |
| 2958 | +} VkTexAddressMode; |
| 2959 | |
| 2960 | typedef enum { |
| 2961 | VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, |
| 2962 | @@ -758,21 +767,6 @@ typedef enum { |
| 2963 | } VkDescriptorSetUsage; |
| 2964 | |
| 2965 | typedef enum { |
| 2966 | - VK_IMAGE_LAYOUT_UNDEFINED = 0, |
| 2967 | - VK_IMAGE_LAYOUT_GENERAL = 1, |
| 2968 | - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, |
| 2969 | - VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, |
| 2970 | - VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, |
| 2971 | - VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, |
| 2972 | - VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 6, |
| 2973 | - VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 7, |
| 2974 | - VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED, |
| 2975 | - VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL, |
| 2976 | - VK_IMAGE_LAYOUT_NUM = (VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL - VK_IMAGE_LAYOUT_UNDEFINED + 1), |
| 2977 | - VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF |
| 2978 | -} VkImageLayout; |
| 2979 | - |
| 2980 | -typedef enum { |
| 2981 | VK_ATTACHMENT_LOAD_OP_LOAD = 0, |
| 2982 | VK_ATTACHMENT_LOAD_OP_CLEAR = 1, |
| 2983 | VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, |
| 2984 | @@ -848,24 +842,44 @@ typedef enum { |
| 2985 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, |
| 2986 | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, |
| 2987 | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, |
| 2988 | - VK_FORMAT_FEATURE_CONVERSION_BIT = 0x00000400, |
| 2989 | + VK_FORMAT_FEATURE_BLIT_SOURCE_BIT = 0x00000400, |
| 2990 | + VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT = 0x00000800, |
| 2991 | } VkFormatFeatureFlagBits; |
| 2992 | typedef VkFlags VkFormatFeatureFlags; |
| 2993 | |
| 2994 | typedef enum { |
| 2995 | - VK_IMAGE_USAGE_GENERAL = 0, |
| 2996 | VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, |
| 2997 | VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, |
| 2998 | VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, |
| 2999 | VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, |
| 3000 | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, |
| 3001 | - VK_IMAGE_USAGE_DEPTH_STENCIL_BIT = 0x00000020, |
| 3002 | + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, |
| 3003 | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, |
| 3004 | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, |
| 3005 | } VkImageUsageFlagBits; |
| 3006 | typedef VkFlags VkImageUsageFlags; |
| 3007 | |
| 3008 | typedef enum { |
| 3009 | + VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, |
| 3010 | + VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, |
| 3011 | + VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, |
| 3012 | + VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, |
| 3013 | + VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, |
| 3014 | +} VkImageCreateFlagBits; |
| 3015 | +typedef VkFlags VkImageCreateFlags; |
| 3016 | + |
| 3017 | +typedef enum { |
| 3018 | + VK_SAMPLE_COUNT_1_BIT = 0x00000001, |
| 3019 | + VK_SAMPLE_COUNT_2_BIT = 0x00000002, |
| 3020 | + VK_SAMPLE_COUNT_4_BIT = 0x00000004, |
| 3021 | + VK_SAMPLE_COUNT_8_BIT = 0x00000008, |
| 3022 | + VK_SAMPLE_COUNT_16_BIT = 0x00000010, |
| 3023 | + VK_SAMPLE_COUNT_32_BIT = 0x00000020, |
| 3024 | + VK_SAMPLE_COUNT_64_BIT = 0x00000040, |
| 3025 | +} VkSampleCountFlagBits; |
| 3026 | +typedef VkFlags VkSampleCountFlags; |
| 3027 | + |
| 3028 | +typedef enum { |
| 3029 | VK_QUEUE_GRAPHICS_BIT = 0x00000001, |
| 3030 | VK_QUEUE_COMPUTE_BIT = 0x00000002, |
| 3031 | VK_QUEUE_DMA_BIT = 0x00000004, |
| 3032 | @@ -885,14 +899,9 @@ typedef enum { |
| 3033 | typedef VkFlags VkMemoryPropertyFlags; |
| 3034 | |
| 3035 | typedef enum { |
| 3036 | - VK_MEMORY_HEAP_HOST_LOCAL = 0x00000001, |
| 3037 | + VK_MEMORY_HEAP_HOST_LOCAL_BIT = 0x00000001, |
| 3038 | } VkMemoryHeapFlagBits; |
| 3039 | typedef VkFlags VkMemoryHeapFlags; |
| 3040 | - |
| 3041 | -typedef enum { |
| 3042 | - VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001, |
| 3043 | -} VkDeviceCreateFlagBits; |
| 3044 | -typedef VkFlags VkDeviceCreateFlags; |
| 3045 | typedef VkFlags VkMemoryMapFlags; |
| 3046 | |
| 3047 | typedef enum { |
| 3048 | @@ -939,7 +948,6 @@ typedef enum { |
| 3049 | typedef VkFlags VkQueryResultFlags; |
| 3050 | |
| 3051 | typedef enum { |
| 3052 | - VK_BUFFER_USAGE_GENERAL = 0, |
| 3053 | VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT = 0x00000001, |
| 3054 | VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT = 0x00000002, |
| 3055 | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, |
| 3056 | @@ -953,27 +961,25 @@ typedef enum { |
| 3057 | typedef VkFlags VkBufferUsageFlags; |
| 3058 | |
| 3059 | typedef enum { |
| 3060 | - VK_BUFFER_CREATE_SPARSE_BIT = 0x00000001, |
| 3061 | + VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, |
| 3062 | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, |
| 3063 | VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, |
| 3064 | } VkBufferCreateFlagBits; |
| 3065 | typedef VkFlags VkBufferCreateFlags; |
| 3066 | |
| 3067 | typedef enum { |
| 3068 | - VK_IMAGE_CREATE_SPARSE_BIT = 0x00000001, |
| 3069 | - VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, |
| 3070 | - VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, |
| 3071 | - VK_IMAGE_CREATE_INVARIANT_DATA_BIT = 0x00000008, |
| 3072 | - VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000010, |
| 3073 | - VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000020, |
| 3074 | -} VkImageCreateFlagBits; |
| 3075 | -typedef VkFlags VkImageCreateFlags; |
| 3076 | + VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 3077 | + VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 3078 | + VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 3079 | + VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 3080 | +} VkImageAspectFlagBits; |
| 3081 | +typedef VkFlags VkImageAspectFlags; |
| 3082 | |
| 3083 | typedef enum { |
| 3084 | - VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001, |
| 3085 | - VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002, |
| 3086 | -} VkAttachmentViewCreateFlagBits; |
| 3087 | -typedef VkFlags VkAttachmentViewCreateFlags; |
| 3088 | + VK_IMAGE_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001, |
| 3089 | + VK_IMAGE_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002, |
| 3090 | +} VkImageViewCreateFlagBits; |
| 3091 | +typedef VkFlags VkImageViewCreateFlags; |
| 3092 | typedef VkFlags VkShaderModuleCreateFlags; |
| 3093 | typedef VkFlags VkShaderCreateFlags; |
| 3094 | |
| 3095 | @@ -1004,6 +1010,11 @@ typedef enum { |
| 3096 | typedef VkFlags VkShaderStageFlags; |
| 3097 | |
| 3098 | typedef enum { |
| 3099 | + VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, |
| 3100 | +} VkAttachmentDescriptionFlagBits; |
| 3101 | +typedef VkFlags VkAttachmentDescriptionFlags; |
| 3102 | + |
| 3103 | +typedef enum { |
| 3104 | VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT = 0x00000001, |
| 3105 | } VkSubpassDescriptionFlagBits; |
| 3106 | typedef VkFlags VkSubpassDescriptionFlags; |
| 3107 | @@ -1022,10 +1033,9 @@ typedef enum { |
| 3108 | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, |
| 3109 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, |
| 3110 | VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, |
| 3111 | - VK_PIPELINE_STAGE_TRANSITION_BIT = 0x00002000, |
| 3112 | - VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, |
| 3113 | + VK_PIPELINE_STAGE_HOST_BIT = 0x00002000, |
| 3114 | VK_PIPELINE_STAGE_ALL_GRAPHICS = 0x000007FF, |
| 3115 | - VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00003FFF, |
| 3116 | + VK_PIPELINE_STAGE_ALL_GPU_COMMANDS = 0x00001FFF, |
| 3117 | } VkPipelineStageFlagBits; |
| 3118 | typedef VkFlags VkPipelineStageFlags; |
| 3119 | |
| 3120 | @@ -1059,7 +1069,7 @@ typedef enum { |
| 3121 | typedef VkFlags VkCmdPoolCreateFlags; |
| 3122 | |
| 3123 | typedef enum { |
| 3124 | - VK_CMD_POOL_RESET_RELEASE_RESOURCES = 0x00000001, |
| 3125 | + VK_CMD_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, |
| 3126 | } VkCmdPoolResetFlagBits; |
| 3127 | typedef VkFlags VkCmdPoolResetFlags; |
| 3128 | typedef VkFlags VkCmdBufferCreateFlags; |
| 3129 | @@ -1074,33 +1084,22 @@ typedef enum { |
| 3130 | typedef VkFlags VkCmdBufferOptimizeFlags; |
| 3131 | |
| 3132 | typedef enum { |
| 3133 | - VK_CMD_BUFFER_RESET_RELEASE_RESOURCES = 0x00000001, |
| 3134 | + VK_CMD_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, |
| 3135 | } VkCmdBufferResetFlagBits; |
| 3136 | typedef VkFlags VkCmdBufferResetFlags; |
| 3137 | |
| 3138 | typedef enum { |
| 3139 | - VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, |
| 3140 | - VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, |
| 3141 | - VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, |
| 3142 | - VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, |
| 3143 | -} VkImageAspectFlagBits; |
| 3144 | -typedef VkFlags VkImageAspectFlags; |
| 3145 | + VK_STENCIL_FACE_NONE = 0, |
| 3146 | + VK_STENCIL_FACE_FRONT_BIT = 0x00000001, |
| 3147 | + VK_STENCIL_FACE_BACK_BIT = 0x00000002, |
| 3148 | +} VkStencilFaceFlagBits; |
| 3149 | +typedef VkFlags VkStencilFaceFlags; |
| 3150 | |
| 3151 | typedef enum { |
| 3152 | VK_QUERY_CONTROL_CONSERVATIVE_BIT = 0x00000001, |
| 3153 | } VkQueryControlFlagBits; |
| 3154 | typedef VkFlags VkQueryControlFlags; |
| 3155 | |
| 3156 | -typedef struct { |
| 3157 | - VkStructureType sType; |
| 3158 | - const void* pNext; |
| 3159 | - const char* pAppName; |
| 3160 | - uint32_t appVersion; |
| 3161 | - const char* pEngineName; |
| 3162 | - uint32_t engineVersion; |
| 3163 | - uint32_t apiVersion; |
| 3164 | -} VkApplicationInfo; |
| 3165 | - |
| 3166 | typedef void* (VKAPI *PFN_vkAllocFunction)( |
| 3167 | void* pUserData, |
| 3168 | size_t size, |
| 3169 | @@ -1111,6 +1110,18 @@ typedef void (VKAPI *PFN_vkFreeFunction)( |
| 3170 | void* pUserData, |
| 3171 | void* pMem); |
| 3172 | |
| 3173 | +typedef void (VKAPI *PFN_vkVoidFunction)(void); |
| 3174 | + |
| 3175 | +typedef struct { |
| 3176 | + VkStructureType sType; |
| 3177 | + const void* pNext; |
| 3178 | + const char* pAppName; |
| 3179 | + uint32_t appVersion; |
| 3180 | + const char* pEngineName; |
| 3181 | + uint32_t engineVersion; |
| 3182 | + uint32_t apiVersion; |
| 3183 | +} VkApplicationInfo; |
| 3184 | + |
| 3185 | typedef struct { |
| 3186 | void* pUserData; |
| 3187 | PFN_vkAllocFunction pfnAlloc; |
| 3188 | @@ -1138,7 +1149,7 @@ typedef struct { |
| 3189 | VkBool32 sampleRateShading; |
| 3190 | VkBool32 dualSourceBlend; |
| 3191 | VkBool32 logicOp; |
| 3192 | - VkBool32 instancedDrawIndirect; |
| 3193 | + VkBool32 multiDrawIndirect; |
| 3194 | VkBool32 depthClip; |
| 3195 | VkBool32 depthBiasClamp; |
| 3196 | VkBool32 fillModeNonSolid; |
| 3197 | @@ -1148,6 +1159,7 @@ typedef struct { |
| 3198 | VkBool32 textureCompressionETC2; |
| 3199 | VkBool32 textureCompressionASTC_LDR; |
| 3200 | VkBool32 textureCompressionBC; |
| 3201 | + VkBool32 occlusionQueryNonConservative; |
| 3202 | VkBool32 pipelineStatisticsQuery; |
| 3203 | VkBool32 vertexSideEffects; |
| 3204 | VkBool32 tessellationSideEffects; |
| 3205 | @@ -1155,11 +1167,9 @@ typedef struct { |
| 3206 | VkBool32 fragmentSideEffects; |
| 3207 | VkBool32 shaderTessellationPointSize; |
| 3208 | VkBool32 shaderGeometryPointSize; |
| 3209 | - VkBool32 shaderTextureGatherExtended; |
| 3210 | + VkBool32 shaderImageGatherExtended; |
| 3211 | VkBool32 shaderStorageImageExtendedFormats; |
| 3212 | VkBool32 shaderStorageImageMultisample; |
| 3213 | - VkBool32 shaderStorageBufferArrayConstantIndexing; |
| 3214 | - VkBool32 shaderStorageImageArrayConstantIndexing; |
| 3215 | VkBool32 shaderUniformBufferArrayDynamicIndexing; |
| 3216 | VkBool32 shaderSampledImageArrayDynamicIndexing; |
| 3217 | VkBool32 shaderStorageBufferArrayDynamicIndexing; |
| 3218 | @@ -1168,11 +1178,11 @@ typedef struct { |
| 3219 | VkBool32 shaderCullDistance; |
| 3220 | VkBool32 shaderFloat64; |
| 3221 | VkBool32 shaderInt64; |
| 3222 | - VkBool32 shaderFloat16; |
| 3223 | VkBool32 shaderInt16; |
| 3224 | VkBool32 shaderResourceResidency; |
| 3225 | VkBool32 shaderResourceMinLOD; |
| 3226 | - VkBool32 sparse; |
| 3227 | + VkBool32 alphaToOne; |
| 3228 | + VkBool32 sparseBinding; |
| 3229 | VkBool32 sparseResidencyBuffer; |
| 3230 | VkBool32 sparseResidencyImage2D; |
| 3231 | VkBool32 sparseResidencyImage3D; |
| 3232 | @@ -1180,23 +1190,27 @@ typedef struct { |
| 3233 | VkBool32 sparseResidency4Samples; |
| 3234 | VkBool32 sparseResidency8Samples; |
| 3235 | VkBool32 sparseResidency16Samples; |
| 3236 | - VkBool32 sparseResidencyStandard2DBlockShape; |
| 3237 | - VkBool32 sparseResidencyStandard2DMSBlockShape; |
| 3238 | - VkBool32 sparseResidencyStandard3DBlockShape; |
| 3239 | - VkBool32 sparseResidencyAlignedMipSize; |
| 3240 | - VkBool32 sparseResidencyNonResident; |
| 3241 | - VkBool32 sparseResidencyNonResidentStrict; |
| 3242 | VkBool32 sparseResidencyAliased; |
| 3243 | } VkPhysicalDeviceFeatures; |
| 3244 | |
| 3245 | typedef struct { |
| 3246 | VkFormatFeatureFlags linearTilingFeatures; |
| 3247 | VkFormatFeatureFlags optimalTilingFeatures; |
| 3248 | + VkFormatFeatureFlags bufferFeatures; |
| 3249 | } VkFormatProperties; |
| 3250 | |
| 3251 | typedef struct { |
| 3252 | - uint64_t maxResourceSize; |
| 3253 | - uint32_t maxSamples; |
| 3254 | + int32_t width; |
| 3255 | + int32_t height; |
| 3256 | + int32_t depth; |
| 3257 | +} VkExtent3D; |
| 3258 | + |
| 3259 | +typedef struct { |
| 3260 | + VkExtent3D maxExtent; |
| 3261 | + uint32_t maxMipLevels; |
| 3262 | + uint32_t maxArraySize; |
| 3263 | + VkSampleCountFlags sampleCounts; |
| 3264 | + VkDeviceSize maxResourceSize; |
| 3265 | } VkImageFormatProperties; |
| 3266 | |
| 3267 | typedef struct { |
| 3268 | @@ -1205,12 +1219,14 @@ typedef struct { |
| 3269 | uint32_t maxImageDimension3D; |
| 3270 | uint32_t maxImageDimensionCube; |
| 3271 | uint32_t maxImageArrayLayers; |
| 3272 | + VkSampleCountFlags sampleCounts; |
| 3273 | uint32_t maxTexelBufferSize; |
| 3274 | uint32_t maxUniformBufferSize; |
| 3275 | uint32_t maxStorageBufferSize; |
| 3276 | uint32_t maxPushConstantsSize; |
| 3277 | uint32_t maxMemoryAllocationCount; |
| 3278 | VkDeviceSize bufferImageGranularity; |
| 3279 | + VkDeviceSize sparseAddressSpaceSize; |
| 3280 | uint32_t maxBoundDescriptorSets; |
| 3281 | uint32_t maxDescriptorSets; |
| 3282 | uint32_t maxPerStageDescriptorSamplers; |
| 3283 | @@ -1220,10 +1236,13 @@ typedef struct { |
| 3284 | uint32_t maxPerStageDescriptorStorageImages; |
| 3285 | uint32_t maxDescriptorSetSamplers; |
| 3286 | uint32_t maxDescriptorSetUniformBuffers; |
| 3287 | + uint32_t maxDescriptorSetUniformBuffersDynamic; |
| 3288 | uint32_t maxDescriptorSetStorageBuffers; |
| 3289 | + uint32_t maxDescriptorSetStorageBuffersDynamic; |
| 3290 | uint32_t maxDescriptorSetSampledImages; |
| 3291 | uint32_t maxDescriptorSetStorageImages; |
| 3292 | uint32_t maxVertexInputAttributes; |
| 3293 | + uint32_t maxVertexInputBindings; |
| 3294 | uint32_t maxVertexInputAttributeOffset; |
| 3295 | uint32_t maxVertexInputBindingStride; |
| 3296 | uint32_t maxVertexOutputComponents; |
| 3297 | @@ -1257,7 +1276,6 @@ typedef struct { |
| 3298 | float maxSamplerLodBias; |
| 3299 | float maxSamplerAnisotropy; |
| 3300 | uint32_t maxViewports; |
| 3301 | - uint32_t maxDynamicViewportStates; |
| 3302 | uint32_t maxViewportDimensions[2]; |
| 3303 | float viewportBoundsRange[2]; |
| 3304 | uint32_t viewportSubPixelBits; |
| 3305 | @@ -1295,6 +1313,15 @@ typedef struct { |
| 3306 | } VkPhysicalDeviceLimits; |
| 3307 | |
| 3308 | typedef struct { |
| 3309 | + VkBool32 residencyStandard2DBlockShape; |
| 3310 | + VkBool32 residencyStandard2DMSBlockShape; |
| 3311 | + VkBool32 residencyStandard3DBlockShape; |
| 3312 | + VkBool32 residencyAlignedMipSize; |
| 3313 | + VkBool32 residencyNonResident; |
| 3314 | + VkBool32 residencyNonResidentStrict; |
| 3315 | +} VkPhysicalDeviceSparseProperties; |
| 3316 | + |
| 3317 | +typedef struct { |
| 3318 | uint32_t apiVersion; |
| 3319 | uint32_t driverVersion; |
| 3320 | uint32_t vendorId; |
| 3321 | @@ -1302,13 +1329,15 @@ typedef struct { |
| 3322 | VkPhysicalDeviceType deviceType; |
| 3323 | char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME]; |
| 3324 | uint8_t pipelineCacheUUID[VK_UUID_LENGTH]; |
| 3325 | + VkPhysicalDeviceLimits limits; |
| 3326 | + VkPhysicalDeviceSparseProperties sparseProperties; |
| 3327 | } VkPhysicalDeviceProperties; |
| 3328 | |
| 3329 | typedef struct { |
| 3330 | VkQueueFlags queueFlags; |
| 3331 | uint32_t queueCount; |
| 3332 | VkBool32 supportsTimestamps; |
| 3333 | -} VkPhysicalDeviceQueueProperties; |
| 3334 | +} VkQueueFamilyProperties; |
| 3335 | |
| 3336 | typedef struct { |
| 3337 | VkMemoryPropertyFlags propertyFlags; |
| 3338 | @@ -1327,8 +1356,9 @@ typedef struct { |
| 3339 | VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; |
| 3340 | } VkPhysicalDeviceMemoryProperties; |
| 3341 | |
| 3342 | -typedef void (VKAPI *PFN_vkVoidFunction)(void); |
| 3343 | typedef struct { |
| 3344 | + VkStructureType sType; |
| 3345 | + const void* pNext; |
| 3346 | uint32_t queueFamilyIndex; |
| 3347 | uint32_t queueCount; |
| 3348 | } VkDeviceQueueCreateInfo; |
| 3349 | @@ -1343,7 +1373,6 @@ typedef struct { |
| 3350 | uint32_t extensionCount; |
| 3351 | const char*const* ppEnabledExtensionNames; |
| 3352 | const VkPhysicalDeviceFeatures* pEnabledFeatures; |
| 3353 | - VkDeviceCreateFlags flags; |
| 3354 | } VkDeviceCreateInfo; |
| 3355 | |
| 3356 | typedef struct { |
| 3357 | @@ -1380,12 +1409,6 @@ typedef struct { |
| 3358 | } VkMemoryRequirements; |
| 3359 | |
| 3360 | typedef struct { |
| 3361 | - int32_t width; |
| 3362 | - int32_t height; |
| 3363 | - int32_t depth; |
| 3364 | -} VkExtent3D; |
| 3365 | - |
| 3366 | -typedef struct { |
| 3367 | VkImageAspect aspect; |
| 3368 | VkExtent3D imageGranularity; |
| 3369 | VkSparseImageFormatFlags flags; |
| 3370 | @@ -1410,7 +1433,7 @@ typedef struct { |
| 3371 | typedef struct { |
| 3372 | VkImageAspect aspect; |
| 3373 | uint32_t mipLevel; |
| 3374 | - uint32_t arraySlice; |
| 3375 | + uint32_t arrayLayer; |
| 3376 | } VkImageSubresource; |
| 3377 | |
| 3378 | typedef struct { |
| 3379 | @@ -1469,7 +1492,6 @@ typedef struct { |
| 3380 | VkStructureType sType; |
| 3381 | const void* pNext; |
| 3382 | VkBuffer buffer; |
| 3383 | - VkBufferViewType viewType; |
| 3384 | VkFormat format; |
| 3385 | VkDeviceSize offset; |
| 3386 | VkDeviceSize range; |
| 3387 | @@ -1490,6 +1512,7 @@ typedef struct { |
| 3388 | VkSharingMode sharingMode; |
| 3389 | uint32_t queueFamilyCount; |
| 3390 | const uint32_t* pQueueFamilyIndices; |
| 3391 | + VkImageLayout initialLayout; |
| 3392 | } VkImageCreateInfo; |
| 3393 | |
| 3394 | typedef struct { |
| 3395 | @@ -1507,10 +1530,10 @@ typedef struct { |
| 3396 | } VkChannelMapping; |
| 3397 | |
| 3398 | typedef struct { |
| 3399 | - VkImageAspect aspect; |
| 3400 | + VkImageAspectFlags aspectMask; |
| 3401 | uint32_t baseMipLevel; |
| 3402 | uint32_t mipLevels; |
| 3403 | - uint32_t baseArraySlice; |
| 3404 | + uint32_t baseArrayLayer; |
| 3405 | uint32_t arraySize; |
| 3406 | } VkImageSubresourceRange; |
| 3407 | |
| 3408 | @@ -1522,22 +1545,12 @@ typedef struct { |
| 3409 | VkFormat format; |
| 3410 | VkChannelMapping channels; |
| 3411 | VkImageSubresourceRange subresourceRange; |
| 3412 | + VkImageViewCreateFlags flags; |
| 3413 | } VkImageViewCreateInfo; |
| 3414 | |
| 3415 | typedef struct { |
| 3416 | VkStructureType sType; |
| 3417 | const void* pNext; |
| 3418 | - VkImage image; |
| 3419 | - VkFormat format; |
| 3420 | - uint32_t mipLevel; |
| 3421 | - uint32_t baseArraySlice; |
| 3422 | - uint32_t arraySize; |
| 3423 | - VkAttachmentViewCreateFlags flags; |
| 3424 | -} VkAttachmentViewCreateInfo; |
| 3425 | - |
| 3426 | -typedef struct { |
| 3427 | - VkStructureType sType; |
| 3428 | - const void* pNext; |
| 3429 | size_t codeSize; |
| 3430 | const void* pCode; |
| 3431 | VkShaderModuleCreateFlags flags; |
| 3432 | @@ -1549,6 +1562,7 @@ typedef struct { |
| 3433 | VkShaderModule module; |
| 3434 | const char* pName; |
| 3435 | VkShaderCreateFlags flags; |
| 3436 | + VkShaderStage stage; |
| 3437 | } VkShaderCreateInfo; |
| 3438 | |
| 3439 | typedef struct { |
| 3440 | @@ -1616,9 +1630,36 @@ typedef struct { |
| 3441 | } VkPipelineTessellationStateCreateInfo; |
| 3442 | |
| 3443 | typedef struct { |
| 3444 | + float originX; |
| 3445 | + float originY; |
| 3446 | + float width; |
| 3447 | + float height; |
| 3448 | + float minDepth; |
| 3449 | + float maxDepth; |
| 3450 | +} VkViewport; |
| 3451 | + |
| 3452 | +typedef struct { |
| 3453 | + int32_t x; |
| 3454 | + int32_t y; |
| 3455 | +} VkOffset2D; |
| 3456 | + |
| 3457 | +typedef struct { |
| 3458 | + int32_t width; |
| 3459 | + int32_t height; |
| 3460 | +} VkExtent2D; |
| 3461 | + |
| 3462 | +typedef struct { |
| 3463 | + VkOffset2D offset; |
| 3464 | + VkExtent2D extent; |
| 3465 | +} VkRect2D; |
| 3466 | + |
| 3467 | +typedef struct { |
| 3468 | VkStructureType sType; |
| 3469 | const void* pNext; |
| 3470 | uint32_t viewportCount; |
| 3471 | + const VkViewport* pViewports; |
| 3472 | + uint32_t scissorCount; |
| 3473 | + const VkRect2D* pScissors; |
| 3474 | } VkPipelineViewportStateCreateInfo; |
| 3475 | |
| 3476 | typedef struct { |
| 3477 | @@ -1629,6 +1670,11 @@ typedef struct { |
| 3478 | VkFillMode fillMode; |
| 3479 | VkCullMode cullMode; |
| 3480 | VkFrontFace frontFace; |
| 3481 | + VkBool32 depthBiasEnable; |
| 3482 | + float depthBias; |
| 3483 | + float depthBiasClamp; |
| 3484 | + float slopeScaledDepthBias; |
| 3485 | + float lineWidth; |
| 3486 | } VkPipelineRasterStateCreateInfo; |
| 3487 | |
| 3488 | typedef struct { |
| 3489 | @@ -1637,7 +1683,7 @@ typedef struct { |
| 3490 | uint32_t rasterSamples; |
| 3491 | VkBool32 sampleShadingEnable; |
| 3492 | float minSampleShading; |
| 3493 | - VkSampleMask sampleMask; |
| 3494 | + const VkSampleMask* pSampleMask; |
| 3495 | } VkPipelineMultisampleStateCreateInfo; |
| 3496 | |
| 3497 | typedef struct { |
| 3498 | @@ -1645,6 +1691,9 @@ typedef struct { |
| 3499 | VkStencilOp stencilPassOp; |
| 3500 | VkStencilOp stencilDepthFailOp; |
| 3501 | VkCompareOp stencilCompareOp; |
| 3502 | + uint32_t stencilCompareMask; |
| 3503 | + uint32_t stencilWriteMask; |
| 3504 | + uint32_t stencilReference; |
| 3505 | } VkStencilOpState; |
| 3506 | |
| 3507 | typedef struct { |
| 3508 | @@ -1653,10 +1702,12 @@ typedef struct { |
| 3509 | VkBool32 depthTestEnable; |
| 3510 | VkBool32 depthWriteEnable; |
| 3511 | VkCompareOp depthCompareOp; |
| 3512 | - VkBool32 depthBoundsEnable; |
| 3513 | + VkBool32 depthBoundsTestEnable; |
| 3514 | VkBool32 stencilTestEnable; |
| 3515 | VkStencilOpState front; |
| 3516 | VkStencilOpState back; |
| 3517 | + float minDepthBounds; |
| 3518 | + float maxDepthBounds; |
| 3519 | } VkPipelineDepthStencilStateCreateInfo; |
| 3520 | |
| 3521 | typedef struct { |
| 3522 | @@ -1674,15 +1725,24 @@ typedef struct { |
| 3523 | VkStructureType sType; |
| 3524 | const void* pNext; |
| 3525 | VkBool32 alphaToCoverageEnable; |
| 3526 | + VkBool32 alphaToOneEnable; |
| 3527 | VkBool32 logicOpEnable; |
| 3528 | VkLogicOp logicOp; |
| 3529 | uint32_t attachmentCount; |
| 3530 | const VkPipelineColorBlendAttachmentState* pAttachments; |
| 3531 | + float blendConst[4]; |
| 3532 | } VkPipelineColorBlendStateCreateInfo; |
| 3533 | |
| 3534 | typedef struct { |
| 3535 | VkStructureType sType; |
| 3536 | const void* pNext; |
| 3537 | + uint32_t dynamicStateCount; |
| 3538 | + const VkDynamicState* pDynamicStates; |
| 3539 | +} VkPipelineDynamicStateCreateInfo; |
| 3540 | + |
| 3541 | +typedef struct { |
| 3542 | + VkStructureType sType; |
| 3543 | + const void* pNext; |
| 3544 | uint32_t stageCount; |
| 3545 | const VkPipelineShaderStageCreateInfo* pStages; |
| 3546 | const VkPipelineVertexInputStateCreateInfo* pVertexInputState; |
| 3547 | @@ -1693,6 +1753,7 @@ typedef struct { |
| 3548 | const VkPipelineMultisampleStateCreateInfo* pMultisampleState; |
| 3549 | const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; |
| 3550 | const VkPipelineColorBlendStateCreateInfo* pColorBlendState; |
| 3551 | + const VkPipelineDynamicStateCreateInfo* pDynamicState; |
| 3552 | VkPipelineCreateFlags flags; |
| 3553 | VkPipelineLayout layout; |
| 3554 | VkRenderPass renderPass; |
| 3555 | @@ -1704,7 +1765,7 @@ typedef struct { |
| 3556 | typedef struct { |
| 3557 | VkStructureType sType; |
| 3558 | const void* pNext; |
| 3559 | - VkPipelineShaderStageCreateInfo cs; |
| 3560 | + VkPipelineShaderStageCreateInfo stage; |
| 3561 | VkPipelineCreateFlags flags; |
| 3562 | VkPipelineLayout layout; |
| 3563 | VkPipeline basePipelineHandle; |
| 3564 | @@ -1732,9 +1793,9 @@ typedef struct { |
| 3565 | VkTexFilter magFilter; |
| 3566 | VkTexFilter minFilter; |
| 3567 | VkTexMipmapMode mipMode; |
| 3568 | - VkTexAddress addressU; |
| 3569 | - VkTexAddress addressV; |
| 3570 | - VkTexAddress addressW; |
| 3571 | + VkTexAddressMode addressModeU; |
| 3572 | + VkTexAddressMode addressModeV; |
| 3573 | + VkTexAddressMode addressModeW; |
| 3574 | float mipLodBias; |
| 3575 | float maxAnisotropy; |
| 3576 | VkBool32 compareEnable; |
| 3577 | @@ -1742,6 +1803,7 @@ typedef struct { |
| 3578 | float minLod; |
| 3579 | float maxLod; |
| 3580 | VkBorderColor borderColor; |
| 3581 | + VkBool32 unnormalizedCoordinates; |
| 3582 | } VkSamplerCreateInfo; |
| 3583 | |
| 3584 | typedef struct { |
| 3585 | @@ -1766,16 +1828,24 @@ typedef struct { |
| 3586 | typedef struct { |
| 3587 | VkStructureType sType; |
| 3588 | const void* pNext; |
| 3589 | + VkDescriptorPoolUsage poolUsage; |
| 3590 | + uint32_t maxSets; |
| 3591 | uint32_t count; |
| 3592 | const VkDescriptorTypeCount* pTypeCount; |
| 3593 | } VkDescriptorPoolCreateInfo; |
| 3594 | |
| 3595 | typedef struct { |
| 3596 | + VkBuffer buffer; |
| 3597 | + VkDeviceSize offset; |
| 3598 | + VkDeviceSize range; |
| 3599 | +} VkDescriptorBufferInfo; |
| 3600 | + |
| 3601 | +typedef struct { |
| 3602 | VkBufferView bufferView; |
| 3603 | VkSampler sampler; |
| 3604 | VkImageView imageView; |
| 3605 | - VkAttachmentView attachmentView; |
| 3606 | VkImageLayout imageLayout; |
| 3607 | + VkDescriptorBufferInfo bufferInfo; |
| 3608 | } VkDescriptorInfo; |
| 3609 | |
| 3610 | typedef struct { |
| 3611 | @@ -1802,74 +1872,11 @@ typedef struct { |
| 3612 | } VkCopyDescriptorSet; |
| 3613 | |
| 3614 | typedef struct { |
| 3615 | - float originX; |
| 3616 | - float originY; |
| 3617 | - float width; |
| 3618 | - float height; |
| 3619 | - float minDepth; |
| 3620 | - float maxDepth; |
| 3621 | -} VkViewport; |
| 3622 | - |
| 3623 | -typedef struct { |
| 3624 | - int32_t x; |
| 3625 | - int32_t y; |
| 3626 | -} VkOffset2D; |
| 3627 | - |
| 3628 | -typedef struct { |
| 3629 | - int32_t width; |
| 3630 | - int32_t height; |
| 3631 | -} VkExtent2D; |
| 3632 | - |
| 3633 | -typedef struct { |
| 3634 | - VkOffset2D offset; |
| 3635 | - VkExtent2D extent; |
| 3636 | -} VkRect2D; |
| 3637 | - |
| 3638 | -typedef struct { |
| 3639 | - VkStructureType sType; |
| 3640 | - const void* pNext; |
| 3641 | - uint32_t viewportAndScissorCount; |
| 3642 | - const VkViewport* pViewports; |
| 3643 | - const VkRect2D* pScissors; |
| 3644 | -} VkDynamicViewportStateCreateInfo; |
| 3645 | - |
| 3646 | -typedef struct { |
| 3647 | - VkStructureType sType; |
| 3648 | - const void* pNext; |
| 3649 | - float depthBias; |
| 3650 | - float depthBiasClamp; |
| 3651 | - float slopeScaledDepthBias; |
| 3652 | - float lineWidth; |
| 3653 | -} VkDynamicRasterStateCreateInfo; |
| 3654 | - |
| 3655 | -typedef struct { |
| 3656 | - VkStructureType sType; |
| 3657 | - const void* pNext; |
| 3658 | - float blendConst[4]; |
| 3659 | -} VkDynamicColorBlendStateCreateInfo; |
| 3660 | - |
| 3661 | -typedef struct { |
| 3662 | - VkStructureType sType; |
| 3663 | - const void* pNext; |
| 3664 | - float minDepthBounds; |
| 3665 | - float maxDepthBounds; |
| 3666 | - uint32_t stencilReadMask; |
| 3667 | - uint32_t stencilWriteMask; |
| 3668 | - uint32_t stencilFrontRef; |
| 3669 | - uint32_t stencilBackRef; |
| 3670 | -} VkDynamicDepthStencilStateCreateInfo; |
| 3671 | - |
| 3672 | -typedef struct { |
| 3673 | - VkAttachmentView view; |
| 3674 | - VkImageLayout layout; |
| 3675 | -} VkAttachmentBindInfo; |
| 3676 | - |
| 3677 | -typedef struct { |
| 3678 | VkStructureType sType; |
| 3679 | const void* pNext; |
| 3680 | VkRenderPass renderPass; |
| 3681 | uint32_t attachmentCount; |
| 3682 | - const VkAttachmentBindInfo* pAttachments; |
| 3683 | + const VkImageView* pAttachments; |
| 3684 | uint32_t width; |
| 3685 | uint32_t height; |
| 3686 | uint32_t layers; |
| 3687 | @@ -1886,6 +1893,7 @@ typedef struct { |
| 3688 | VkAttachmentStoreOp stencilStoreOp; |
| 3689 | VkImageLayout initialLayout; |
| 3690 | VkImageLayout finalLayout; |
| 3691 | + VkAttachmentDescriptionFlags flags; |
| 3692 | } VkAttachmentDescription; |
| 3693 | |
| 3694 | typedef struct { |
| 3695 | @@ -1899,13 +1907,13 @@ typedef struct { |
| 3696 | VkPipelineBindPoint pipelineBindPoint; |
| 3697 | VkSubpassDescriptionFlags flags; |
| 3698 | uint32_t inputCount; |
| 3699 | - const VkAttachmentReference* inputAttachments; |
| 3700 | + const VkAttachmentReference* pInputAttachments; |
| 3701 | uint32_t colorCount; |
| 3702 | - const VkAttachmentReference* colorAttachments; |
| 3703 | - const VkAttachmentReference* resolveAttachments; |
| 3704 | + const VkAttachmentReference* pColorAttachments; |
| 3705 | + const VkAttachmentReference* pResolveAttachments; |
| 3706 | VkAttachmentReference depthStencilAttachment; |
| 3707 | uint32_t preserveCount; |
| 3708 | - const VkAttachmentReference* preserveAttachments; |
| 3709 | + const VkAttachmentReference* pPreserveAttachments; |
| 3710 | } VkSubpassDescription; |
| 3711 | |
| 3712 | typedef struct { |
| 3713 | @@ -1951,6 +1959,7 @@ typedef struct { |
| 3714 | const void* pNext; |
| 3715 | VkCmdBufferOptimizeFlags flags; |
| 3716 | VkRenderPass renderPass; |
| 3717 | + uint32_t subpass; |
| 3718 | VkFramebuffer framebuffer; |
| 3719 | } VkCmdBufferBeginInfo; |
| 3720 | |
| 3721 | @@ -1961,18 +1970,25 @@ typedef struct { |
| 3722 | } VkBufferCopy; |
| 3723 | |
| 3724 | typedef struct { |
| 3725 | - VkImageSubresource srcSubresource; |
| 3726 | + VkImageAspect aspect; |
| 3727 | + uint32_t mipLevel; |
| 3728 | + uint32_t arrayLayer; |
| 3729 | + uint32_t arraySize; |
| 3730 | +} VkImageSubresourceCopy; |
| 3731 | + |
| 3732 | +typedef struct { |
| 3733 | + VkImageSubresourceCopy srcSubresource; |
| 3734 | VkOffset3D srcOffset; |
| 3735 | - VkImageSubresource destSubresource; |
| 3736 | + VkImageSubresourceCopy destSubresource; |
| 3737 | VkOffset3D destOffset; |
| 3738 | VkExtent3D extent; |
| 3739 | } VkImageCopy; |
| 3740 | |
| 3741 | typedef struct { |
| 3742 | - VkImageSubresource srcSubresource; |
| 3743 | + VkImageSubresourceCopy srcSubresource; |
| 3744 | VkOffset3D srcOffset; |
| 3745 | VkExtent3D srcExtent; |
| 3746 | - VkImageSubresource destSubresource; |
| 3747 | + VkImageSubresourceCopy destSubresource; |
| 3748 | VkOffset3D destOffset; |
| 3749 | VkExtent3D destExtent; |
| 3750 | } VkImageBlit; |
| 3751 | @@ -1981,38 +1997,38 @@ typedef struct { |
| 3752 | VkDeviceSize bufferOffset; |
| 3753 | uint32_t bufferRowLength; |
| 3754 | uint32_t bufferImageHeight; |
| 3755 | - VkImageSubresource imageSubresource; |
| 3756 | + VkImageSubresourceCopy imageSubresource; |
| 3757 | VkOffset3D imageOffset; |
| 3758 | VkExtent3D imageExtent; |
| 3759 | } VkBufferImageCopy; |
| 3760 | |
| 3761 | typedef union { |
| 3762 | - float f32[4]; |
| 3763 | - int32_t s32[4]; |
| 3764 | - uint32_t u32[4]; |
| 3765 | + float float32[4]; |
| 3766 | + int32_t int32[4]; |
| 3767 | + uint32_t uint32[4]; |
| 3768 | } VkClearColorValue; |
| 3769 | |
| 3770 | typedef struct { |
| 3771 | + float depth; |
| 3772 | + uint32_t stencil; |
| 3773 | +} VkClearDepthStencilValue; |
| 3774 | + |
| 3775 | +typedef struct { |
| 3776 | VkOffset3D offset; |
| 3777 | VkExtent3D extent; |
| 3778 | } VkRect3D; |
| 3779 | |
| 3780 | typedef struct { |
| 3781 | - VkImageSubresource srcSubresource; |
| 3782 | + VkImageSubresourceCopy srcSubresource; |
| 3783 | VkOffset3D srcOffset; |
| 3784 | - VkImageSubresource destSubresource; |
| 3785 | + VkImageSubresourceCopy destSubresource; |
| 3786 | VkOffset3D destOffset; |
| 3787 | VkExtent3D extent; |
| 3788 | } VkImageResolve; |
| 3789 | |
| 3790 | -typedef struct { |
| 3791 | - float depth; |
| 3792 | - uint32_t stencil; |
| 3793 | -} VkClearDepthStencilValue; |
| 3794 | - |
| 3795 | typedef union { |
| 3796 | VkClearColorValue color; |
| 3797 | - VkClearDepthStencilValue ds; |
| 3798 | + VkClearDepthStencilValue depthStencil; |
| 3799 | } VkClearValue; |
| 3800 | |
| 3801 | typedef struct { |
| 3802 | @@ -2021,8 +2037,8 @@ typedef struct { |
| 3803 | VkRenderPass renderPass; |
| 3804 | VkFramebuffer framebuffer; |
| 3805 | VkRect2D renderArea; |
| 3806 | - uint32_t attachmentCount; |
| 3807 | - const VkClearValue* pAttachmentClearValues; |
| 3808 | + uint32_t clearValueCount; |
| 3809 | + const VkClearValue* pClearValues; |
| 3810 | } VkRenderPassBeginInfo; |
| 3811 | |
| 3812 | typedef struct { |
| 3813 | @@ -2080,32 +2096,30 @@ typedef struct { |
| 3814 | |
| 3815 | |
| 3816 | typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance); |
| 3817 | -typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance); |
| 3818 | +typedef void (VKAPI *PFN_vkDestroyInstance)(VkInstance instance); |
| 3819 | typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); |
| 3820 | typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); |
| 3821 | typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); |
| 3822 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties); |
| 3823 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLimits)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits); |
| 3824 | +typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties); |
| 3825 | typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); |
| 3826 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueCount)(VkPhysicalDevice physicalDevice, uint32_t* pCount); |
| 3827 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueProperties)(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties); |
| 3828 | +typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties); |
| 3829 | typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); |
| 3830 | typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); |
| 3831 | typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); |
| 3832 | typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice); |
| 3833 | -typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device); |
| 3834 | -typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 3835 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 3836 | -typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties); |
| 3837 | -typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties); |
| 3838 | +typedef void (VKAPI *PFN_vkDestroyDevice)(VkDevice device); |
| 3839 | +typedef VkResult (VKAPI *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 3840 | +typedef VkResult (VKAPI *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 3841 | +typedef VkResult (VKAPI *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties); |
| 3842 | +typedef VkResult (VKAPI *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties); |
| 3843 | typedef VkResult (VKAPI *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); |
| 3844 | typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence); |
| 3845 | typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue); |
| 3846 | typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device); |
| 3847 | typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem); |
| 3848 | -typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem); |
| 3849 | +typedef void (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem); |
| 3850 | typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); |
| 3851 | -typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem); |
| 3852 | +typedef void (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem); |
| 3853 | typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); |
| 3854 | typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); |
| 3855 | typedef VkResult (VKAPI *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); |
| 3856 | @@ -2119,88 +2133,83 @@ typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuf |
| 3857 | typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageOpaqueMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo); |
| 3858 | typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo); |
| 3859 | typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence); |
| 3860 | -typedef VkResult (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence); |
| 3861 | +typedef void (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence); |
| 3862 | typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences); |
| 3863 | typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence); |
| 3864 | typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); |
| 3865 | typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore); |
| 3866 | -typedef VkResult (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore); |
| 3867 | +typedef void (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore); |
| 3868 | typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore); |
| 3869 | typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore); |
| 3870 | typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent); |
| 3871 | -typedef VkResult (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event); |
| 3872 | +typedef void (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event); |
| 3873 | typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event); |
| 3874 | typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event); |
| 3875 | typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event); |
| 3876 | typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool); |
| 3877 | -typedef VkResult (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool); |
| 3878 | +typedef void (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool); |
| 3879 | typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags); |
| 3880 | typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer); |
| 3881 | -typedef VkResult (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer); |
| 3882 | +typedef void (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer); |
| 3883 | typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView); |
| 3884 | -typedef VkResult (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView); |
| 3885 | +typedef void (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView); |
| 3886 | typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage); |
| 3887 | -typedef VkResult (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image); |
| 3888 | +typedef void (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image); |
| 3889 | typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); |
| 3890 | typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView); |
| 3891 | -typedef VkResult (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView); |
| 3892 | -typedef VkResult (VKAPI *PFN_vkCreateAttachmentView)(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView); |
| 3893 | -typedef VkResult (VKAPI *PFN_vkDestroyAttachmentView)(VkDevice device, VkAttachmentView attachmentView); |
| 3894 | +typedef void (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView); |
| 3895 | typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); |
| 3896 | -typedef VkResult (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule); |
| 3897 | +typedef void (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule); |
| 3898 | typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); |
| 3899 | -typedef VkResult (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); |
| 3900 | +typedef void (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); |
| 3901 | typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); |
| 3902 | -typedef VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache); |
| 3903 | +typedef void (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache); |
| 3904 | typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache); |
| 3905 | typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData); |
| 3906 | typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); |
| 3907 | typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); |
| 3908 | typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); |
| 3909 | -typedef VkResult (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline); |
| 3910 | +typedef void (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline); |
| 3911 | typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout); |
| 3912 | -typedef VkResult (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout); |
| 3913 | +typedef void (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout); |
| 3914 | typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler); |
| 3915 | -typedef VkResult (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler); |
| 3916 | +typedef void (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler); |
| 3917 | typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); |
| 3918 | -typedef VkResult (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); |
| 3919 | -typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); |
| 3920 | -typedef VkResult (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); |
| 3921 | +typedef void (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); |
| 3922 | +typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); |
| 3923 | +typedef void (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); |
| 3924 | typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); |
| 3925 | -typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount); |
| 3926 | +typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets); |
| 3927 | typedef VkResult (VKAPI *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets); |
| 3928 | -typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); |
| 3929 | -typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState); |
| 3930 | -typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState); |
| 3931 | -typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState); |
| 3932 | -typedef VkResult (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDynamicRasterState dynamicRasterState); |
| 3933 | -typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); |
| 3934 | -typedef VkResult (VKAPI *PFN_vkDestroyDynamicColorBlendState)(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); |
| 3935 | -typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); |
| 3936 | -typedef VkResult (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); |
| 3937 | +typedef void (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); |
| 3938 | typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); |
| 3939 | -typedef VkResult (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer); |
| 3940 | +typedef void (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer); |
| 3941 | typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); |
| 3942 | -typedef VkResult (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass); |
| 3943 | +typedef void (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass); |
| 3944 | typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); |
| 3945 | typedef VkResult (VKAPI *PFN_vkCreateCommandPool)(VkDevice device, const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool); |
| 3946 | -typedef VkResult (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool); |
| 3947 | +typedef void (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool); |
| 3948 | typedef VkResult (VKAPI *PFN_vkResetCommandPool)(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags); |
| 3949 | typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer); |
| 3950 | -typedef VkResult (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer); |
| 3951 | +typedef void (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer); |
| 3952 | typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo); |
| 3953 | typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer); |
| 3954 | typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags); |
| 3955 | typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); |
| 3956 | -typedef void (VKAPI *PFN_vkCmdBindDynamicViewportState)(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState); |
| 3957 | -typedef void (VKAPI *PFN_vkCmdBindDynamicRasterState)(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState); |
| 3958 | -typedef void (VKAPI *PFN_vkCmdBindDynamicColorBlendState)(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState); |
| 3959 | -typedef void (VKAPI *PFN_vkCmdBindDynamicDepthStencilState)(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState); |
| 3960 | +typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports); |
| 3961 | +typedef void (VKAPI *PFN_vkCmdSetScissor)(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors); |
| 3962 | +typedef void (VKAPI *PFN_vkCmdSetLineWidth)(VkCmdBuffer cmdBuffer, float lineWidth); |
| 3963 | +typedef void (VKAPI *PFN_vkCmdSetDepthBias)(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias); |
| 3964 | +typedef void (VKAPI *PFN_vkCmdSetBlendConstants)(VkCmdBuffer cmdBuffer, const float blendConst[4]); |
| 3965 | +typedef void (VKAPI *PFN_vkCmdSetDepthBounds)(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds); |
| 3966 | +typedef void (VKAPI *PFN_vkCmdSetStencilCompareMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask); |
| 3967 | +typedef void (VKAPI *PFN_vkCmdSetStencilWriteMask)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask); |
| 3968 | +typedef void (VKAPI *PFN_vkCmdSetStencilReference)(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference); |
| 3969 | typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); |
| 3970 | typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); |
| 3971 | typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); |
| 3972 | -typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount); |
| 3973 | -typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount); |
| 3974 | +typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); |
| 3975 | +typedef void (VKAPI *PFN_vkCmdDrawIndexed)(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); |
| 3976 | typedef void (VKAPI *PFN_vkCmdDrawIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride); |
| 3977 | typedef void (VKAPI *PFN_vkCmdDrawIndexedIndirect)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride); |
| 3978 | typedef void (VKAPI *PFN_vkCmdDispatch)(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z); |
| 3979 | @@ -2213,9 +2222,9 @@ typedef void (VKAPI *PFN_vkCmdCopyImageToBuffer)(VkCmdBuffer cmdBuffer, VkImage |
| 3980 | typedef void (VKAPI *PFN_vkCmdUpdateBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData); |
| 3981 | typedef void (VKAPI *PFN_vkCmdFillBuffer)(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data); |
| 3982 | typedef void (VKAPI *PFN_vkCmdClearColorImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 3983 | -typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 3984 | +typedef void (VKAPI *PFN_vkCmdClearDepthStencilImage)(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 3985 | typedef void (VKAPI *PFN_vkCmdClearColorAttachment)(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects); |
| 3986 | -typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects); |
| 3987 | +typedef void (VKAPI *PFN_vkCmdClearDepthStencilAttachment)(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects); |
| 3988 | typedef void (VKAPI *PFN_vkCmdResolveImage)(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); |
| 3989 | typedef void (VKAPI *PFN_vkCmdSetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask); |
| 3990 | typedef void (VKAPI *PFN_vkCmdResetEvent)(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask); |
| 3991 | @@ -2237,7 +2246,7 @@ VkResult VKAPI vkCreateInstance( |
| 3992 | const VkInstanceCreateInfo* pCreateInfo, |
| 3993 | VkInstance* pInstance); |
| 3994 | |
| 3995 | -VkResult VKAPI vkDestroyInstance( |
| 3996 | +void VKAPI vkDestroyInstance( |
| 3997 | VkInstance instance); |
| 3998 | |
| 3999 | VkResult VKAPI vkEnumeratePhysicalDevices( |
| 4000 | @@ -2260,24 +2269,17 @@ VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties( |
| 4001 | VkImageType type, |
| 4002 | VkImageTiling tiling, |
| 4003 | VkImageUsageFlags usage, |
| 4004 | + VkImageCreateFlags flags, |
| 4005 | VkImageFormatProperties* pImageFormatProperties); |
| 4006 | |
| 4007 | -VkResult VKAPI vkGetPhysicalDeviceLimits( |
| 4008 | - VkPhysicalDevice physicalDevice, |
| 4009 | - VkPhysicalDeviceLimits* pLimits); |
| 4010 | - |
| 4011 | VkResult VKAPI vkGetPhysicalDeviceProperties( |
| 4012 | VkPhysicalDevice physicalDevice, |
| 4013 | VkPhysicalDeviceProperties* pProperties); |
| 4014 | |
| 4015 | -VkResult VKAPI vkGetPhysicalDeviceQueueCount( |
| 4016 | +VkResult VKAPI vkGetPhysicalDeviceQueueFamilyProperties( |
| 4017 | VkPhysicalDevice physicalDevice, |
| 4018 | - uint32_t* pCount); |
| 4019 | - |
| 4020 | -VkResult VKAPI vkGetPhysicalDeviceQueueProperties( |
| 4021 | - VkPhysicalDevice physicalDevice, |
| 4022 | - uint32_t count, |
| 4023 | - VkPhysicalDeviceQueueProperties* pQueueProperties); |
| 4024 | + uint32_t* pCount, |
| 4025 | + VkQueueFamilyProperties* pQueueFamilyProperties); |
| 4026 | |
| 4027 | VkResult VKAPI vkGetPhysicalDeviceMemoryProperties( |
| 4028 | VkPhysicalDevice physicalDevice, |
| 4029 | @@ -2296,25 +2298,25 @@ VkResult VKAPI vkCreateDevice( |
| 4030 | const VkDeviceCreateInfo* pCreateInfo, |
| 4031 | VkDevice* pDevice); |
| 4032 | |
| 4033 | -VkResult VKAPI vkDestroyDevice( |
| 4034 | +void VKAPI vkDestroyDevice( |
| 4035 | VkDevice device); |
| 4036 | |
| 4037 | -VkResult VKAPI vkGetGlobalExtensionProperties( |
| 4038 | +VkResult VKAPI vkEnumerateInstanceExtensionProperties( |
| 4039 | const char* pLayerName, |
| 4040 | uint32_t* pCount, |
| 4041 | VkExtensionProperties* pProperties); |
| 4042 | |
| 4043 | -VkResult VKAPI vkGetPhysicalDeviceExtensionProperties( |
| 4044 | +VkResult VKAPI vkEnumerateDeviceExtensionProperties( |
| 4045 | VkPhysicalDevice physicalDevice, |
| 4046 | const char* pLayerName, |
| 4047 | uint32_t* pCount, |
| 4048 | VkExtensionProperties* pProperties); |
| 4049 | |
| 4050 | -VkResult VKAPI vkGetGlobalLayerProperties( |
| 4051 | +VkResult VKAPI vkEnumerateInstanceLayerProperties( |
| 4052 | uint32_t* pCount, |
| 4053 | VkLayerProperties* pProperties); |
| 4054 | |
| 4055 | -VkResult VKAPI vkGetPhysicalDeviceLayerProperties( |
| 4056 | +VkResult VKAPI vkEnumerateDeviceLayerProperties( |
| 4057 | VkPhysicalDevice physicalDevice, |
| 4058 | uint32_t* pCount, |
| 4059 | VkLayerProperties* pProperties); |
| 4060 | @@ -2342,7 +2344,7 @@ VkResult VKAPI vkAllocMemory( |
| 4061 | const VkMemoryAllocInfo* pAllocInfo, |
| 4062 | VkDeviceMemory* pMem); |
| 4063 | |
| 4064 | -VkResult VKAPI vkFreeMemory( |
| 4065 | +void VKAPI vkFreeMemory( |
| 4066 | VkDevice device, |
| 4067 | VkDeviceMemory mem); |
| 4068 | |
| 4069 | @@ -2354,7 +2356,7 @@ VkResult VKAPI vkMapMemory( |
| 4070 | VkMemoryMapFlags flags, |
| 4071 | void** ppData); |
| 4072 | |
| 4073 | -VkResult VKAPI vkUnmapMemory( |
| 4074 | +void VKAPI vkUnmapMemory( |
| 4075 | VkDevice device, |
| 4076 | VkDeviceMemory mem); |
| 4077 | |
| 4078 | @@ -2434,7 +2436,7 @@ VkResult VKAPI vkCreateFence( |
| 4079 | const VkFenceCreateInfo* pCreateInfo, |
| 4080 | VkFence* pFence); |
| 4081 | |
| 4082 | -VkResult VKAPI vkDestroyFence( |
| 4083 | +void VKAPI vkDestroyFence( |
| 4084 | VkDevice device, |
| 4085 | VkFence fence); |
| 4086 | |
| 4087 | @@ -2459,7 +2461,7 @@ VkResult VKAPI vkCreateSemaphore( |
| 4088 | const VkSemaphoreCreateInfo* pCreateInfo, |
| 4089 | VkSemaphore* pSemaphore); |
| 4090 | |
| 4091 | -VkResult VKAPI vkDestroySemaphore( |
| 4092 | +void VKAPI vkDestroySemaphore( |
| 4093 | VkDevice device, |
| 4094 | VkSemaphore semaphore); |
| 4095 | |
| 4096 | @@ -2476,7 +2478,7 @@ VkResult VKAPI vkCreateEvent( |
| 4097 | const VkEventCreateInfo* pCreateInfo, |
| 4098 | VkEvent* pEvent); |
| 4099 | |
| 4100 | -VkResult VKAPI vkDestroyEvent( |
| 4101 | +void VKAPI vkDestroyEvent( |
| 4102 | VkDevice device, |
| 4103 | VkEvent event); |
| 4104 | |
| 4105 | @@ -2497,7 +2499,7 @@ VkResult VKAPI vkCreateQueryPool( |
| 4106 | const VkQueryPoolCreateInfo* pCreateInfo, |
| 4107 | VkQueryPool* pQueryPool); |
| 4108 | |
| 4109 | -VkResult VKAPI vkDestroyQueryPool( |
| 4110 | +void VKAPI vkDestroyQueryPool( |
| 4111 | VkDevice device, |
| 4112 | VkQueryPool queryPool); |
| 4113 | |
| 4114 | @@ -2515,7 +2517,7 @@ VkResult VKAPI vkCreateBuffer( |
| 4115 | const VkBufferCreateInfo* pCreateInfo, |
| 4116 | VkBuffer* pBuffer); |
| 4117 | |
| 4118 | -VkResult VKAPI vkDestroyBuffer( |
| 4119 | +void VKAPI vkDestroyBuffer( |
| 4120 | VkDevice device, |
| 4121 | VkBuffer buffer); |
| 4122 | |
| 4123 | @@ -2524,7 +2526,7 @@ VkResult VKAPI vkCreateBufferView( |
| 4124 | const VkBufferViewCreateInfo* pCreateInfo, |
| 4125 | VkBufferView* pView); |
| 4126 | |
| 4127 | -VkResult VKAPI vkDestroyBufferView( |
| 4128 | +void VKAPI vkDestroyBufferView( |
| 4129 | VkDevice device, |
| 4130 | VkBufferView bufferView); |
| 4131 | |
| 4132 | @@ -2533,7 +2535,7 @@ VkResult VKAPI vkCreateImage( |
| 4133 | const VkImageCreateInfo* pCreateInfo, |
| 4134 | VkImage* pImage); |
| 4135 | |
| 4136 | -VkResult VKAPI vkDestroyImage( |
| 4137 | +void VKAPI vkDestroyImage( |
| 4138 | VkDevice device, |
| 4139 | VkImage image); |
| 4140 | |
| 4141 | @@ -2548,25 +2550,16 @@ VkResult VKAPI vkCreateImageView( |
| 4142 | const VkImageViewCreateInfo* pCreateInfo, |
| 4143 | VkImageView* pView); |
| 4144 | |
| 4145 | -VkResult VKAPI vkDestroyImageView( |
| 4146 | +void VKAPI vkDestroyImageView( |
| 4147 | VkDevice device, |
| 4148 | VkImageView imageView); |
| 4149 | |
| 4150 | -VkResult VKAPI vkCreateAttachmentView( |
| 4151 | - VkDevice device, |
| 4152 | - const VkAttachmentViewCreateInfo* pCreateInfo, |
| 4153 | - VkAttachmentView* pView); |
| 4154 | - |
| 4155 | -VkResult VKAPI vkDestroyAttachmentView( |
| 4156 | - VkDevice device, |
| 4157 | - VkAttachmentView attachmentView); |
| 4158 | - |
| 4159 | VkResult VKAPI vkCreateShaderModule( |
| 4160 | VkDevice device, |
| 4161 | const VkShaderModuleCreateInfo* pCreateInfo, |
| 4162 | VkShaderModule* pShaderModule); |
| 4163 | |
| 4164 | -VkResult VKAPI vkDestroyShaderModule( |
| 4165 | +void VKAPI vkDestroyShaderModule( |
| 4166 | VkDevice device, |
| 4167 | VkShaderModule shaderModule); |
| 4168 | |
| 4169 | @@ -2575,7 +2568,7 @@ VkResult VKAPI vkCreateShader( |
| 4170 | const VkShaderCreateInfo* pCreateInfo, |
| 4171 | VkShader* pShader); |
| 4172 | |
| 4173 | -VkResult VKAPI vkDestroyShader( |
| 4174 | +void VKAPI vkDestroyShader( |
| 4175 | VkDevice device, |
| 4176 | VkShader shader); |
| 4177 | |
| 4178 | @@ -2584,7 +2577,7 @@ VkResult VKAPI vkCreatePipelineCache( |
| 4179 | const VkPipelineCacheCreateInfo* pCreateInfo, |
| 4180 | VkPipelineCache* pPipelineCache); |
| 4181 | |
| 4182 | -VkResult VKAPI vkDestroyPipelineCache( |
| 4183 | +void VKAPI vkDestroyPipelineCache( |
| 4184 | VkDevice device, |
| 4185 | VkPipelineCache pipelineCache); |
| 4186 | |
| 4187 | @@ -2617,7 +2610,7 @@ VkResult VKAPI vkCreateComputePipelines( |
| 4188 | const VkComputePipelineCreateInfo* pCreateInfos, |
| 4189 | VkPipeline* pPipelines); |
| 4190 | |
| 4191 | -VkResult VKAPI vkDestroyPipeline( |
| 4192 | +void VKAPI vkDestroyPipeline( |
| 4193 | VkDevice device, |
| 4194 | VkPipeline pipeline); |
| 4195 | |
| 4196 | @@ -2626,7 +2619,7 @@ VkResult VKAPI vkCreatePipelineLayout( |
| 4197 | const VkPipelineLayoutCreateInfo* pCreateInfo, |
| 4198 | VkPipelineLayout* pPipelineLayout); |
| 4199 | |
| 4200 | -VkResult VKAPI vkDestroyPipelineLayout( |
| 4201 | +void VKAPI vkDestroyPipelineLayout( |
| 4202 | VkDevice device, |
| 4203 | VkPipelineLayout pipelineLayout); |
| 4204 | |
| 4205 | @@ -2635,7 +2628,7 @@ VkResult VKAPI vkCreateSampler( |
| 4206 | const VkSamplerCreateInfo* pCreateInfo, |
| 4207 | VkSampler* pSampler); |
| 4208 | |
| 4209 | -VkResult VKAPI vkDestroySampler( |
| 4210 | +void VKAPI vkDestroySampler( |
| 4211 | VkDevice device, |
| 4212 | VkSampler sampler); |
| 4213 | |
| 4214 | @@ -2644,18 +2637,16 @@ VkResult VKAPI vkCreateDescriptorSetLayout( |
| 4215 | const VkDescriptorSetLayoutCreateInfo* pCreateInfo, |
| 4216 | VkDescriptorSetLayout* pSetLayout); |
| 4217 | |
| 4218 | -VkResult VKAPI vkDestroyDescriptorSetLayout( |
| 4219 | +void VKAPI vkDestroyDescriptorSetLayout( |
| 4220 | VkDevice device, |
| 4221 | VkDescriptorSetLayout descriptorSetLayout); |
| 4222 | |
| 4223 | VkResult VKAPI vkCreateDescriptorPool( |
| 4224 | VkDevice device, |
| 4225 | - VkDescriptorPoolUsage poolUsage, |
| 4226 | - uint32_t maxSets, |
| 4227 | const VkDescriptorPoolCreateInfo* pCreateInfo, |
| 4228 | VkDescriptorPool* pDescriptorPool); |
| 4229 | |
| 4230 | -VkResult VKAPI vkDestroyDescriptorPool( |
| 4231 | +void VKAPI vkDestroyDescriptorPool( |
| 4232 | VkDevice device, |
| 4233 | VkDescriptorPool descriptorPool); |
| 4234 | |
| 4235 | @@ -2669,8 +2660,7 @@ VkResult VKAPI vkAllocDescriptorSets( |
| 4236 | VkDescriptorSetUsage setUsage, |
| 4237 | uint32_t count, |
| 4238 | const VkDescriptorSetLayout* pSetLayouts, |
| 4239 | - VkDescriptorSet* pDescriptorSets, |
| 4240 | - uint32_t* pCount); |
| 4241 | + VkDescriptorSet* pDescriptorSets); |
| 4242 | |
| 4243 | VkResult VKAPI vkFreeDescriptorSets( |
| 4244 | VkDevice device, |
| 4245 | @@ -2678,55 +2668,19 @@ VkResult VKAPI vkFreeDescriptorSets( |
| 4246 | uint32_t count, |
| 4247 | const VkDescriptorSet* pDescriptorSets); |
| 4248 | |
| 4249 | -VkResult VKAPI vkUpdateDescriptorSets( |
| 4250 | +void VKAPI vkUpdateDescriptorSets( |
| 4251 | VkDevice device, |
| 4252 | uint32_t writeCount, |
| 4253 | const VkWriteDescriptorSet* pDescriptorWrites, |
| 4254 | uint32_t copyCount, |
| 4255 | const VkCopyDescriptorSet* pDescriptorCopies); |
| 4256 | |
| 4257 | -VkResult VKAPI vkCreateDynamicViewportState( |
| 4258 | - VkDevice device, |
| 4259 | - const VkDynamicViewportStateCreateInfo* pCreateInfo, |
| 4260 | - VkDynamicViewportState* pState); |
| 4261 | - |
| 4262 | -VkResult VKAPI vkDestroyDynamicViewportState( |
| 4263 | - VkDevice device, |
| 4264 | - VkDynamicViewportState dynamicViewportState); |
| 4265 | - |
| 4266 | -VkResult VKAPI vkCreateDynamicRasterState( |
| 4267 | - VkDevice device, |
| 4268 | - const VkDynamicRasterStateCreateInfo* pCreateInfo, |
| 4269 | - VkDynamicRasterState* pState); |
| 4270 | - |
| 4271 | -VkResult VKAPI vkDestroyDynamicRasterState( |
| 4272 | - VkDevice device, |
| 4273 | - VkDynamicRasterState dynamicRasterState); |
| 4274 | - |
| 4275 | -VkResult VKAPI vkCreateDynamicColorBlendState( |
| 4276 | - VkDevice device, |
| 4277 | - const VkDynamicColorBlendStateCreateInfo* pCreateInfo, |
| 4278 | - VkDynamicColorBlendState* pState); |
| 4279 | - |
| 4280 | -VkResult VKAPI vkDestroyDynamicColorBlendState( |
| 4281 | - VkDevice device, |
| 4282 | - VkDynamicColorBlendState dynamicColorBlendState); |
| 4283 | - |
| 4284 | -VkResult VKAPI vkCreateDynamicDepthStencilState( |
| 4285 | - VkDevice device, |
| 4286 | - const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, |
| 4287 | - VkDynamicDepthStencilState* pState); |
| 4288 | - |
| 4289 | -VkResult VKAPI vkDestroyDynamicDepthStencilState( |
| 4290 | - VkDevice device, |
| 4291 | - VkDynamicDepthStencilState dynamicDepthStencilState); |
| 4292 | - |
| 4293 | VkResult VKAPI vkCreateFramebuffer( |
| 4294 | VkDevice device, |
| 4295 | const VkFramebufferCreateInfo* pCreateInfo, |
| 4296 | VkFramebuffer* pFramebuffer); |
| 4297 | |
| 4298 | -VkResult VKAPI vkDestroyFramebuffer( |
| 4299 | +void VKAPI vkDestroyFramebuffer( |
| 4300 | VkDevice device, |
| 4301 | VkFramebuffer framebuffer); |
| 4302 | |
| 4303 | @@ -2735,7 +2689,7 @@ VkResult VKAPI vkCreateRenderPass( |
| 4304 | const VkRenderPassCreateInfo* pCreateInfo, |
| 4305 | VkRenderPass* pRenderPass); |
| 4306 | |
| 4307 | -VkResult VKAPI vkDestroyRenderPass( |
| 4308 | +void VKAPI vkDestroyRenderPass( |
| 4309 | VkDevice device, |
| 4310 | VkRenderPass renderPass); |
| 4311 | |
| 4312 | @@ -2749,7 +2703,7 @@ VkResult VKAPI vkCreateCommandPool( |
| 4313 | const VkCmdPoolCreateInfo* pCreateInfo, |
| 4314 | VkCmdPool* pCmdPool); |
| 4315 | |
| 4316 | -VkResult VKAPI vkDestroyCommandPool( |
| 4317 | +void VKAPI vkDestroyCommandPool( |
| 4318 | VkDevice device, |
| 4319 | VkCmdPool cmdPool); |
| 4320 | |
| 4321 | @@ -2763,7 +2717,7 @@ VkResult VKAPI vkCreateCommandBuffer( |
| 4322 | const VkCmdBufferCreateInfo* pCreateInfo, |
| 4323 | VkCmdBuffer* pCmdBuffer); |
| 4324 | |
| 4325 | -VkResult VKAPI vkDestroyCommandBuffer( |
| 4326 | +void VKAPI vkDestroyCommandBuffer( |
| 4327 | VkDevice device, |
| 4328 | VkCmdBuffer commandBuffer); |
| 4329 | |
| 4330 | @@ -2783,21 +2737,49 @@ void VKAPI vkCmdBindPipeline( |
| 4331 | VkPipelineBindPoint pipelineBindPoint, |
| 4332 | VkPipeline pipeline); |
| 4333 | |
| 4334 | -void VKAPI vkCmdBindDynamicViewportState( |
| 4335 | +void VKAPI vkCmdSetViewport( |
| 4336 | + VkCmdBuffer cmdBuffer, |
| 4337 | + uint32_t viewportCount, |
| 4338 | + const VkViewport* pViewports); |
| 4339 | + |
| 4340 | +void VKAPI vkCmdSetScissor( |
| 4341 | + VkCmdBuffer cmdBuffer, |
| 4342 | + uint32_t scissorCount, |
| 4343 | + const VkRect2D* pScissors); |
| 4344 | + |
| 4345 | +void VKAPI vkCmdSetLineWidth( |
| 4346 | + VkCmdBuffer cmdBuffer, |
| 4347 | + float lineWidth); |
| 4348 | + |
| 4349 | +void VKAPI vkCmdSetDepthBias( |
| 4350 | VkCmdBuffer cmdBuffer, |
| 4351 | - VkDynamicViewportState dynamicViewportState); |
| 4352 | + float depthBias, |
| 4353 | + float depthBiasClamp, |
| 4354 | + float slopeScaledDepthBias); |
| 4355 | |
| 4356 | -void VKAPI vkCmdBindDynamicRasterState( |
| 4357 | +void VKAPI vkCmdSetBlendConstants( |
| 4358 | VkCmdBuffer cmdBuffer, |
| 4359 | - VkDynamicRasterState dynamicRasterState); |
| 4360 | + const float blendConst[4]); |
| 4361 | |
| 4362 | -void VKAPI vkCmdBindDynamicColorBlendState( |
| 4363 | +void VKAPI vkCmdSetDepthBounds( |
| 4364 | VkCmdBuffer cmdBuffer, |
| 4365 | - VkDynamicColorBlendState dynamicColorBlendState); |
| 4366 | + float minDepthBounds, |
| 4367 | + float maxDepthBounds); |
| 4368 | |
| 4369 | -void VKAPI vkCmdBindDynamicDepthStencilState( |
| 4370 | +void VKAPI vkCmdSetStencilCompareMask( |
| 4371 | VkCmdBuffer cmdBuffer, |
| 4372 | - VkDynamicDepthStencilState dynamicDepthStencilState); |
| 4373 | + VkStencilFaceFlags faceMask, |
| 4374 | + uint32_t stencilCompareMask); |
| 4375 | + |
| 4376 | +void VKAPI vkCmdSetStencilWriteMask( |
| 4377 | + VkCmdBuffer cmdBuffer, |
| 4378 | + VkStencilFaceFlags faceMask, |
| 4379 | + uint32_t stencilWriteMask); |
| 4380 | + |
| 4381 | +void VKAPI vkCmdSetStencilReference( |
| 4382 | + VkCmdBuffer cmdBuffer, |
| 4383 | + VkStencilFaceFlags faceMask, |
| 4384 | + uint32_t stencilReference); |
| 4385 | |
| 4386 | void VKAPI vkCmdBindDescriptorSets( |
| 4387 | VkCmdBuffer cmdBuffer, |
| 4388 | @@ -2824,18 +2806,18 @@ void VKAPI vkCmdBindVertexBuffers( |
| 4389 | |
| 4390 | void VKAPI vkCmdDraw( |
| 4391 | VkCmdBuffer cmdBuffer, |
| 4392 | - uint32_t firstVertex, |
| 4393 | uint32_t vertexCount, |
| 4394 | - uint32_t firstInstance, |
| 4395 | - uint32_t instanceCount); |
| 4396 | + uint32_t instanceCount, |
| 4397 | + uint32_t firstVertex, |
| 4398 | + uint32_t firstInstance); |
| 4399 | |
| 4400 | void VKAPI vkCmdDrawIndexed( |
| 4401 | VkCmdBuffer cmdBuffer, |
| 4402 | - uint32_t firstIndex, |
| 4403 | uint32_t indexCount, |
| 4404 | + uint32_t instanceCount, |
| 4405 | + uint32_t firstIndex, |
| 4406 | int32_t vertexOffset, |
| 4407 | - uint32_t firstInstance, |
| 4408 | - uint32_t instanceCount); |
| 4409 | + uint32_t firstInstance); |
| 4410 | |
| 4411 | void VKAPI vkCmdDrawIndirect( |
| 4412 | VkCmdBuffer cmdBuffer, |
| 4413 | @@ -2930,8 +2912,7 @@ void VKAPI vkCmdClearDepthStencilImage( |
| 4414 | VkCmdBuffer cmdBuffer, |
| 4415 | VkImage image, |
| 4416 | VkImageLayout imageLayout, |
| 4417 | - float depth, |
| 4418 | - uint32_t stencil, |
| 4419 | + const VkClearDepthStencilValue* pDepthStencil, |
| 4420 | uint32_t rangeCount, |
| 4421 | const VkImageSubresourceRange* pRanges); |
| 4422 | |
| 4423 | @@ -2945,10 +2926,9 @@ void VKAPI vkCmdClearColorAttachment( |
| 4424 | |
| 4425 | void VKAPI vkCmdClearDepthStencilAttachment( |
| 4426 | VkCmdBuffer cmdBuffer, |
| 4427 | - VkImageAspectFlags imageAspectMask, |
| 4428 | + VkImageAspectFlags aspectMask, |
| 4429 | VkImageLayout imageLayout, |
| 4430 | - float depth, |
| 4431 | - uint32_t stencil, |
| 4432 | + const VkClearDepthStencilValue* pDepthStencil, |
| 4433 | uint32_t rectCount, |
| 4434 | const VkRect3D* pRects); |
| 4435 | |
| 4436 | diff --git a/vulkan/libvulkan/entry.cpp b/vulkan/libvulkan/entry.cpp |
| 4437 | index cd5dd99..2f7583d 100644 |
| 4438 | --- a/vulkan/libvulkan/entry.cpp |
| 4439 | +++ b/vulkan/libvulkan/entry.cpp |
| 4440 | @@ -47,8 +47,8 @@ VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, VkInstance* p |
| 4441 | } |
| 4442 | |
| 4443 | __attribute__((visibility("default"))) |
| 4444 | -VkResult vkDestroyInstance(VkInstance instance) { |
| 4445 | - return GetVtbl(instance).DestroyInstance(instance); |
| 4446 | +void vkDestroyInstance(VkInstance instance) { |
| 4447 | + GetVtbl(instance).DestroyInstance(instance); |
| 4448 | } |
| 4449 | |
| 4450 | __attribute__((visibility("default"))) |
| 4451 | @@ -72,13 +72,8 @@ VkResult vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysic |
| 4452 | } |
| 4453 | |
| 4454 | __attribute__((visibility("default"))) |
| 4455 | -VkResult vkGetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) { |
| 4456 | - return GetVtbl(physicalDevice).GetPhysicalDeviceQueueCount(physicalDevice, pCount); |
| 4457 | -} |
| 4458 | - |
| 4459 | -__attribute__((visibility("default"))) |
| 4460 | -VkResult vkGetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) { |
| 4461 | - return GetVtbl(physicalDevice).GetPhysicalDeviceQueueProperties(physicalDevice, count, pQueueProperties); |
| 4462 | +VkResult vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties) { |
| 4463 | + return GetVtbl(physicalDevice).GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pCount, pQueueFamilyProperties); |
| 4464 | } |
| 4465 | |
| 4466 | __attribute__((visibility("default"))) |
| 4467 | @@ -97,13 +92,8 @@ VkResult vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, Vk |
| 4468 | } |
| 4469 | |
| 4470 | __attribute__((visibility("default"))) |
| 4471 | -VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageFormatProperties* pImageFormatProperties) { |
| 4472 | - return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, pImageFormatProperties); |
| 4473 | -} |
| 4474 | - |
| 4475 | -__attribute__((visibility("default"))) |
| 4476 | -VkResult vkGetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits) { |
| 4477 | - return GetVtbl(physicalDevice).GetPhysicalDeviceLimits(physicalDevice, pLimits); |
| 4478 | +VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) { |
| 4479 | + return GetVtbl(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); |
| 4480 | } |
| 4481 | |
| 4482 | __attribute__((visibility("default"))) |
| 4483 | @@ -112,28 +102,28 @@ VkResult vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInf |
| 4484 | } |
| 4485 | |
| 4486 | __attribute__((visibility("default"))) |
| 4487 | -VkResult vkDestroyDevice(VkDevice device) { |
| 4488 | - return vulkan::DestroyDevice(device); |
| 4489 | +void vkDestroyDevice(VkDevice device) { |
| 4490 | + vulkan::DestroyDevice(device); |
| 4491 | } |
| 4492 | |
| 4493 | __attribute__((visibility("default"))) |
| 4494 | -VkResult vkGetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { |
| 4495 | - return vulkan::GetGlobalLayerProperties(pCount, pProperties); |
| 4496 | +VkResult vkEnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { |
| 4497 | + return vulkan::EnumerateInstanceLayerProperties(pCount, pProperties); |
| 4498 | } |
| 4499 | |
| 4500 | __attribute__((visibility("default"))) |
| 4501 | -VkResult vkGetGlobalExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 4502 | - return vulkan::GetGlobalExtensionProperties(pLayerName, pCount, pProperties); |
| 4503 | +VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 4504 | + return vulkan::EnumerateInstanceExtensionProperties(pLayerName, pCount, pProperties); |
| 4505 | } |
| 4506 | |
| 4507 | __attribute__((visibility("default"))) |
| 4508 | -VkResult vkGetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) { |
| 4509 | - return GetVtbl(physicalDevice).GetPhysicalDeviceLayerProperties(physicalDevice, pCount, pProperties); |
| 4510 | +VkResult vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) { |
| 4511 | + return GetVtbl(physicalDevice).EnumerateDeviceLayerProperties(physicalDevice, pCount, pProperties); |
| 4512 | } |
| 4513 | |
| 4514 | __attribute__((visibility("default"))) |
| 4515 | -VkResult vkGetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 4516 | - return GetVtbl(physicalDevice).GetPhysicalDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); |
| 4517 | +VkResult vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 4518 | + return GetVtbl(physicalDevice).EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); |
| 4519 | } |
| 4520 | |
| 4521 | __attribute__((visibility("default"))) |
| 4522 | @@ -162,8 +152,8 @@ VkResult vkAllocMemory(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkD |
| 4523 | } |
| 4524 | |
| 4525 | __attribute__((visibility("default"))) |
| 4526 | -VkResult vkFreeMemory(VkDevice device, VkDeviceMemory mem) { |
| 4527 | - return GetVtbl(device).FreeMemory(device, mem); |
| 4528 | +void vkFreeMemory(VkDevice device, VkDeviceMemory mem) { |
| 4529 | + GetVtbl(device).FreeMemory(device, mem); |
| 4530 | } |
| 4531 | |
| 4532 | __attribute__((visibility("default"))) |
| 4533 | @@ -172,8 +162,8 @@ VkResult vkMapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, V |
| 4534 | } |
| 4535 | |
| 4536 | __attribute__((visibility("default"))) |
| 4537 | -VkResult vkUnmapMemory(VkDevice device, VkDeviceMemory mem) { |
| 4538 | - return GetVtbl(device).UnmapMemory(device, mem); |
| 4539 | +void vkUnmapMemory(VkDevice device, VkDeviceMemory mem) { |
| 4540 | + GetVtbl(device).UnmapMemory(device, mem); |
| 4541 | } |
| 4542 | |
| 4543 | __attribute__((visibility("default"))) |
| 4544 | @@ -242,8 +232,8 @@ VkResult vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, Vk |
| 4545 | } |
| 4546 | |
| 4547 | __attribute__((visibility("default"))) |
| 4548 | -VkResult vkDestroyFence(VkDevice device, VkFence fence) { |
| 4549 | - return GetVtbl(device).DestroyFence(device, fence); |
| 4550 | +void vkDestroyFence(VkDevice device, VkFence fence) { |
| 4551 | + GetVtbl(device).DestroyFence(device, fence); |
| 4552 | } |
| 4553 | |
| 4554 | __attribute__((visibility("default"))) |
| 4555 | @@ -267,8 +257,8 @@ VkResult vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreate |
| 4556 | } |
| 4557 | |
| 4558 | __attribute__((visibility("default"))) |
| 4559 | -VkResult vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) { |
| 4560 | - return GetVtbl(device).DestroySemaphore(device, semaphore); |
| 4561 | +void vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) { |
| 4562 | + GetVtbl(device).DestroySemaphore(device, semaphore); |
| 4563 | } |
| 4564 | |
| 4565 | __attribute__((visibility("default"))) |
| 4566 | @@ -287,8 +277,8 @@ VkResult vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, Vk |
| 4567 | } |
| 4568 | |
| 4569 | __attribute__((visibility("default"))) |
| 4570 | -VkResult vkDestroyEvent(VkDevice device, VkEvent event) { |
| 4571 | - return GetVtbl(device).DestroyEvent(device, event); |
| 4572 | +void vkDestroyEvent(VkDevice device, VkEvent event) { |
| 4573 | + GetVtbl(device).DestroyEvent(device, event); |
| 4574 | } |
| 4575 | |
| 4576 | __attribute__((visibility("default"))) |
| 4577 | @@ -312,8 +302,8 @@ VkResult vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreate |
| 4578 | } |
| 4579 | |
| 4580 | __attribute__((visibility("default"))) |
| 4581 | -VkResult vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) { |
| 4582 | - return GetVtbl(device).DestroyQueryPool(device, queryPool); |
| 4583 | +void vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) { |
| 4584 | + GetVtbl(device).DestroyQueryPool(device, queryPool); |
| 4585 | } |
| 4586 | |
| 4587 | __attribute__((visibility("default"))) |
| 4588 | @@ -327,8 +317,8 @@ VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, |
| 4589 | } |
| 4590 | |
| 4591 | __attribute__((visibility("default"))) |
| 4592 | -VkResult vkDestroyBuffer(VkDevice device, VkBuffer buffer) { |
| 4593 | - return GetVtbl(device).DestroyBuffer(device, buffer); |
| 4594 | +void vkDestroyBuffer(VkDevice device, VkBuffer buffer) { |
| 4595 | + GetVtbl(device).DestroyBuffer(device, buffer); |
| 4596 | } |
| 4597 | |
| 4598 | __attribute__((visibility("default"))) |
| 4599 | @@ -337,8 +327,8 @@ VkResult vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCrea |
| 4600 | } |
| 4601 | |
| 4602 | __attribute__((visibility("default"))) |
| 4603 | -VkResult vkDestroyBufferView(VkDevice device, VkBufferView bufferView) { |
| 4604 | - return GetVtbl(device).DestroyBufferView(device, bufferView); |
| 4605 | +void vkDestroyBufferView(VkDevice device, VkBufferView bufferView) { |
| 4606 | + GetVtbl(device).DestroyBufferView(device, bufferView); |
| 4607 | } |
| 4608 | |
| 4609 | __attribute__((visibility("default"))) |
| 4610 | @@ -347,8 +337,8 @@ VkResult vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, Vk |
| 4611 | } |
| 4612 | |
| 4613 | __attribute__((visibility("default"))) |
| 4614 | -VkResult vkDestroyImage(VkDevice device, VkImage image) { |
| 4615 | - return GetVtbl(device).DestroyImage(device, image); |
| 4616 | +void vkDestroyImage(VkDevice device, VkImage image) { |
| 4617 | + GetVtbl(device).DestroyImage(device, image); |
| 4618 | } |
| 4619 | |
| 4620 | __attribute__((visibility("default"))) |
| 4621 | @@ -362,18 +352,8 @@ VkResult vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreate |
| 4622 | } |
| 4623 | |
| 4624 | __attribute__((visibility("default"))) |
| 4625 | -VkResult vkDestroyImageView(VkDevice device, VkImageView imageView) { |
| 4626 | - return GetVtbl(device).DestroyImageView(device, imageView); |
| 4627 | -} |
| 4628 | - |
| 4629 | -__attribute__((visibility("default"))) |
| 4630 | -VkResult vkCreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView) { |
| 4631 | - return GetVtbl(device).CreateAttachmentView(device, pCreateInfo, pView); |
| 4632 | -} |
| 4633 | - |
| 4634 | -__attribute__((visibility("default"))) |
| 4635 | -VkResult vkDestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) { |
| 4636 | - return GetVtbl(device).DestroyAttachmentView(device, attachmentView); |
| 4637 | +void vkDestroyImageView(VkDevice device, VkImageView imageView) { |
| 4638 | + GetVtbl(device).DestroyImageView(device, imageView); |
| 4639 | } |
| 4640 | |
| 4641 | __attribute__((visibility("default"))) |
| 4642 | @@ -382,8 +362,8 @@ VkResult vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* p |
| 4643 | } |
| 4644 | |
| 4645 | __attribute__((visibility("default"))) |
| 4646 | -VkResult vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) { |
| 4647 | - return GetVtbl(device).DestroyShaderModule(device, shaderModule); |
| 4648 | +void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) { |
| 4649 | + GetVtbl(device).DestroyShaderModule(device, shaderModule); |
| 4650 | } |
| 4651 | |
| 4652 | __attribute__((visibility("default"))) |
| 4653 | @@ -392,8 +372,8 @@ VkResult vkCreateShader(VkDevice device, const VkShaderCreateInfo* pCreateInfo, |
| 4654 | } |
| 4655 | |
| 4656 | __attribute__((visibility("default"))) |
| 4657 | -VkResult vkDestroyShader(VkDevice device, VkShader shader) { |
| 4658 | - return GetVtbl(device).DestroyShader(device, shader); |
| 4659 | +void vkDestroyShader(VkDevice device, VkShader shader) { |
| 4660 | + GetVtbl(device).DestroyShader(device, shader); |
| 4661 | } |
| 4662 | |
| 4663 | __attribute__((visibility("default"))) |
| 4664 | @@ -402,8 +382,8 @@ VkResult vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* |
| 4665 | } |
| 4666 | |
| 4667 | __attribute__((visibility("default"))) |
| 4668 | -VkResult vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) { |
| 4669 | - return GetVtbl(device).DestroyPipelineCache(device, pipelineCache); |
| 4670 | +void vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) { |
| 4671 | + GetVtbl(device).DestroyPipelineCache(device, pipelineCache); |
| 4672 | } |
| 4673 | |
| 4674 | __attribute__((visibility("default"))) |
| 4675 | @@ -432,8 +412,8 @@ VkResult vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache |
| 4676 | } |
| 4677 | |
| 4678 | __attribute__((visibility("default"))) |
| 4679 | -VkResult vkDestroyPipeline(VkDevice device, VkPipeline pipeline) { |
| 4680 | - return GetVtbl(device).DestroyPipeline(device, pipeline); |
| 4681 | +void vkDestroyPipeline(VkDevice device, VkPipeline pipeline) { |
| 4682 | + GetVtbl(device).DestroyPipeline(device, pipeline); |
| 4683 | } |
| 4684 | |
| 4685 | __attribute__((visibility("default"))) |
| 4686 | @@ -442,8 +422,8 @@ VkResult vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInf |
| 4687 | } |
| 4688 | |
| 4689 | __attribute__((visibility("default"))) |
| 4690 | -VkResult vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) { |
| 4691 | - return GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout); |
| 4692 | +void vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) { |
| 4693 | + GetVtbl(device).DestroyPipelineLayout(device, pipelineLayout); |
| 4694 | } |
| 4695 | |
| 4696 | __attribute__((visibility("default"))) |
| 4697 | @@ -452,8 +432,8 @@ VkResult vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo |
| 4698 | } |
| 4699 | |
| 4700 | __attribute__((visibility("default"))) |
| 4701 | -VkResult vkDestroySampler(VkDevice device, VkSampler sampler) { |
| 4702 | - return GetVtbl(device).DestroySampler(device, sampler); |
| 4703 | +void vkDestroySampler(VkDevice device, VkSampler sampler) { |
| 4704 | + GetVtbl(device).DestroySampler(device, sampler); |
| 4705 | } |
| 4706 | |
| 4707 | __attribute__((visibility("default"))) |
| 4708 | @@ -462,18 +442,18 @@ VkResult vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayou |
| 4709 | } |
| 4710 | |
| 4711 | __attribute__((visibility("default"))) |
| 4712 | -VkResult vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) { |
| 4713 | - return GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout); |
| 4714 | +void vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) { |
| 4715 | + GetVtbl(device).DestroyDescriptorSetLayout(device, descriptorSetLayout); |
| 4716 | } |
| 4717 | |
| 4718 | __attribute__((visibility("default"))) |
| 4719 | -VkResult vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) { |
| 4720 | - return GetVtbl(device).CreateDescriptorPool(device, poolUsage, maxSets, pCreateInfo, pDescriptorPool); |
| 4721 | +VkResult vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) { |
| 4722 | + return GetVtbl(device).CreateDescriptorPool(device, pCreateInfo, pDescriptorPool); |
| 4723 | } |
| 4724 | |
| 4725 | __attribute__((visibility("default"))) |
| 4726 | -VkResult vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) { |
| 4727 | - return GetVtbl(device).DestroyDescriptorPool(device, descriptorPool); |
| 4728 | +void vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) { |
| 4729 | + GetVtbl(device).DestroyDescriptorPool(device, descriptorPool); |
| 4730 | } |
| 4731 | |
| 4732 | __attribute__((visibility("default"))) |
| 4733 | @@ -482,8 +462,8 @@ VkResult vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) |
| 4734 | } |
| 4735 | |
| 4736 | __attribute__((visibility("default"))) |
| 4737 | -VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount) { |
| 4738 | - return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount); |
| 4739 | +VkResult vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets) { |
| 4740 | + return GetVtbl(device).AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets); |
| 4741 | } |
| 4742 | |
| 4743 | __attribute__((visibility("default"))) |
| 4744 | @@ -492,48 +472,8 @@ VkResult vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, |
| 4745 | } |
| 4746 | |
| 4747 | __attribute__((visibility("default"))) |
| 4748 | -VkResult vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) { |
| 4749 | - return GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); |
| 4750 | -} |
| 4751 | - |
| 4752 | -__attribute__((visibility("default"))) |
| 4753 | -VkResult vkCreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState) { |
| 4754 | - return GetVtbl(device).CreateDynamicViewportState(device, pCreateInfo, pState); |
| 4755 | -} |
| 4756 | - |
| 4757 | -__attribute__((visibility("default"))) |
| 4758 | -VkResult vkDestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) { |
| 4759 | - return GetVtbl(device).DestroyDynamicViewportState(device, dynamicViewportState); |
| 4760 | -} |
| 4761 | - |
| 4762 | -__attribute__((visibility("default"))) |
| 4763 | -VkResult vkCreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState) { |
| 4764 | - return GetVtbl(device).CreateDynamicRasterState(device, pCreateInfo, pState); |
| 4765 | -} |
| 4766 | - |
| 4767 | -__attribute__((visibility("default"))) |
| 4768 | -VkResult vkDestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) { |
| 4769 | - return GetVtbl(device).DestroyDynamicRasterState(device, dynamicRasterState); |
| 4770 | -} |
| 4771 | - |
| 4772 | -__attribute__((visibility("default"))) |
| 4773 | -VkResult vkCreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState) { |
| 4774 | - return GetVtbl(device).CreateDynamicColorBlendState(device, pCreateInfo, pState); |
| 4775 | -} |
| 4776 | - |
| 4777 | -__attribute__((visibility("default"))) |
| 4778 | -VkResult vkDestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) { |
| 4779 | - return GetVtbl(device).DestroyDynamicColorBlendState(device, dynamicColorBlendState); |
| 4780 | -} |
| 4781 | - |
| 4782 | -__attribute__((visibility("default"))) |
| 4783 | -VkResult vkCreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState) { |
| 4784 | - return GetVtbl(device).CreateDynamicDepthStencilState(device, pCreateInfo, pState); |
| 4785 | -} |
| 4786 | - |
| 4787 | -__attribute__((visibility("default"))) |
| 4788 | -VkResult vkDestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 4789 | - return GetVtbl(device).DestroyDynamicDepthStencilState(device, dynamicDepthStencilState); |
| 4790 | +void vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) { |
| 4791 | + GetVtbl(device).UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); |
| 4792 | } |
| 4793 | |
| 4794 | __attribute__((visibility("default"))) |
| 4795 | @@ -542,8 +482,8 @@ VkResult vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCr |
| 4796 | } |
| 4797 | |
| 4798 | __attribute__((visibility("default"))) |
| 4799 | -VkResult vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) { |
| 4800 | - return GetVtbl(device).DestroyFramebuffer(device, framebuffer); |
| 4801 | +void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) { |
| 4802 | + GetVtbl(device).DestroyFramebuffer(device, framebuffer); |
| 4803 | } |
| 4804 | |
| 4805 | __attribute__((visibility("default"))) |
| 4806 | @@ -552,8 +492,8 @@ VkResult vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCrea |
| 4807 | } |
| 4808 | |
| 4809 | __attribute__((visibility("default"))) |
| 4810 | -VkResult vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) { |
| 4811 | - return GetVtbl(device).DestroyRenderPass(device, renderPass); |
| 4812 | +void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) { |
| 4813 | + GetVtbl(device).DestroyRenderPass(device, renderPass); |
| 4814 | } |
| 4815 | |
| 4816 | __attribute__((visibility("default"))) |
| 4817 | @@ -567,8 +507,8 @@ VkResult vkCreateCommandPool(VkDevice device, const VkCmdPoolCreateInfo* pCreate |
| 4818 | } |
| 4819 | |
| 4820 | __attribute__((visibility("default"))) |
| 4821 | -VkResult vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) { |
| 4822 | - return GetVtbl(device).DestroyCommandPool(device, cmdPool); |
| 4823 | +void vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) { |
| 4824 | + GetVtbl(device).DestroyCommandPool(device, cmdPool); |
| 4825 | } |
| 4826 | |
| 4827 | __attribute__((visibility("default"))) |
| 4828 | @@ -582,8 +522,8 @@ VkResult vkCreateCommandBuffer(VkDevice device, const VkCmdBufferCreateInfo* pCr |
| 4829 | } |
| 4830 | |
| 4831 | __attribute__((visibility("default"))) |
| 4832 | -VkResult vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) { |
| 4833 | - return GetVtbl(device).DestroyCommandBuffer(device, commandBuffer); |
| 4834 | +void vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) { |
| 4835 | + GetVtbl(device).DestroyCommandBuffer(device, commandBuffer); |
| 4836 | } |
| 4837 | |
| 4838 | __attribute__((visibility("default"))) |
| 4839 | @@ -607,23 +547,48 @@ void vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPo |
| 4840 | } |
| 4841 | |
| 4842 | __attribute__((visibility("default"))) |
| 4843 | -void vkCmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) { |
| 4844 | - GetVtbl(cmdBuffer).CmdBindDynamicViewportState(cmdBuffer, dynamicViewportState); |
| 4845 | +void vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports) { |
| 4846 | + GetVtbl(cmdBuffer).CmdSetViewport(cmdBuffer, viewportCount, pViewports); |
| 4847 | +} |
| 4848 | + |
| 4849 | +__attribute__((visibility("default"))) |
| 4850 | +void vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { |
| 4851 | + GetVtbl(cmdBuffer).CmdSetScissor(cmdBuffer, scissorCount, pScissors); |
| 4852 | +} |
| 4853 | + |
| 4854 | +__attribute__((visibility("default"))) |
| 4855 | +void vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth) { |
| 4856 | + GetVtbl(cmdBuffer).CmdSetLineWidth(cmdBuffer, lineWidth); |
| 4857 | +} |
| 4858 | + |
| 4859 | +__attribute__((visibility("default"))) |
| 4860 | +void vkCmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) { |
| 4861 | + GetVtbl(cmdBuffer).CmdSetDepthBias(cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias); |
| 4862 | +} |
| 4863 | + |
| 4864 | +__attribute__((visibility("default"))) |
| 4865 | +void vkCmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]) { |
| 4866 | + GetVtbl(cmdBuffer).CmdSetBlendConstants(cmdBuffer, blendConst); |
| 4867 | +} |
| 4868 | + |
| 4869 | +__attribute__((visibility("default"))) |
| 4870 | +void vkCmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) { |
| 4871 | + GetVtbl(cmdBuffer).CmdSetDepthBounds(cmdBuffer, minDepthBounds, maxDepthBounds); |
| 4872 | } |
| 4873 | |
| 4874 | __attribute__((visibility("default"))) |
| 4875 | -void vkCmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) { |
| 4876 | - GetVtbl(cmdBuffer).CmdBindDynamicRasterState(cmdBuffer, dynamicRasterState); |
| 4877 | +void vkCmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask) { |
| 4878 | + GetVtbl(cmdBuffer).CmdSetStencilCompareMask(cmdBuffer, faceMask, stencilCompareMask); |
| 4879 | } |
| 4880 | |
| 4881 | __attribute__((visibility("default"))) |
| 4882 | -void vkCmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) { |
| 4883 | - GetVtbl(cmdBuffer).CmdBindDynamicColorBlendState(cmdBuffer, dynamicColorBlendState); |
| 4884 | +void vkCmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask) { |
| 4885 | + GetVtbl(cmdBuffer).CmdSetStencilWriteMask(cmdBuffer, faceMask, stencilWriteMask); |
| 4886 | } |
| 4887 | |
| 4888 | __attribute__((visibility("default"))) |
| 4889 | -void vkCmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 4890 | - GetVtbl(cmdBuffer).CmdBindDynamicDepthStencilState(cmdBuffer, dynamicDepthStencilState); |
| 4891 | +void vkCmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference) { |
| 4892 | + GetVtbl(cmdBuffer).CmdSetStencilReference(cmdBuffer, faceMask, stencilReference); |
| 4893 | } |
| 4894 | |
| 4895 | __attribute__((visibility("default"))) |
| 4896 | @@ -642,13 +607,13 @@ void vkCmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32 |
| 4897 | } |
| 4898 | |
| 4899 | __attribute__((visibility("default"))) |
| 4900 | -void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) { |
| 4901 | - GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount); |
| 4902 | +void vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { |
| 4903 | + GetVtbl(cmdBuffer).CmdDraw(cmdBuffer, vertexCount, instanceCount, firstVertex, firstInstance); |
| 4904 | } |
| 4905 | |
| 4906 | __attribute__((visibility("default"))) |
| 4907 | -void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) { |
| 4908 | - GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount); |
| 4909 | +void vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { |
| 4910 | + GetVtbl(cmdBuffer).CmdDrawIndexed(cmdBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); |
| 4911 | } |
| 4912 | |
| 4913 | __attribute__((visibility("default"))) |
| 4914 | @@ -712,8 +677,8 @@ void vkCmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout im |
| 4915 | } |
| 4916 | |
| 4917 | __attribute__((visibility("default"))) |
| 4918 | -void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 4919 | - GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges); |
| 4920 | +void vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 4921 | + GetVtbl(cmdBuffer).CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); |
| 4922 | } |
| 4923 | |
| 4924 | __attribute__((visibility("default"))) |
| 4925 | @@ -722,8 +687,8 @@ void vkCmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, |
| 4926 | } |
| 4927 | |
| 4928 | __attribute__((visibility("default"))) |
| 4929 | -void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) { |
| 4930 | - GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, imageAspectMask, imageLayout, depth, stencil, rectCount, pRects); |
| 4931 | +void vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) { |
| 4932 | + GetVtbl(cmdBuffer).CmdClearDepthStencilAttachment(cmdBuffer, aspectMask, imageLayout, pDepthStencil, rectCount, pRects); |
| 4933 | } |
| 4934 | |
| 4935 | __attribute__((visibility("default"))) |
| 4936 | diff --git a/vulkan/libvulkan/get_proc_addr.cpp b/vulkan/libvulkan/get_proc_addr.cpp |
| 4937 | index ceb76b9..5247950 100644 |
| 4938 | --- a/vulkan/libvulkan/get_proc_addr.cpp |
| 4939 | +++ b/vulkan/libvulkan/get_proc_addr.cpp |
| 4940 | @@ -51,18 +51,16 @@ const NameProcEntry kInstanceProcTbl[] = { |
| 4941 | // clang-format off |
| 4942 | {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDevice)}, |
| 4943 | {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyInstance)}, |
| 4944 | + {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceExtensionProperties)}, |
| 4945 | + {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceLayerProperties)}, |
| 4946 | {"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(vkEnumeratePhysicalDevices)}, |
| 4947 | {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetInstanceProcAddr)}, |
| 4948 | - {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceExtensionProperties)}, |
| 4949 | {"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFeatures)}, |
| 4950 | {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFormatProperties)}, |
| 4951 | {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceImageFormatProperties)}, |
| 4952 | - {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLayerProperties)}, |
| 4953 | - {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLimits)}, |
| 4954 | {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceMemoryProperties)}, |
| 4955 | {"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceProperties)}, |
| 4956 | - {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueCount)}, |
| 4957 | - {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueProperties)}, |
| 4958 | + {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueFamilyProperties)}, |
| 4959 | {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSparseImageFormatProperties)}, |
| 4960 | // clang-format on |
| 4961 | }; |
| 4962 | @@ -77,10 +75,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 4963 | {"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginQuery)}, |
| 4964 | {"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginRenderPass)}, |
| 4965 | {"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDescriptorSets)}, |
| 4966 | - {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicColorBlendState)}, |
| 4967 | - {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicDepthStencilState)}, |
| 4968 | - {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicRasterState)}, |
| 4969 | - {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicViewportState)}, |
| 4970 | {"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindIndexBuffer)}, |
| 4971 | {"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindPipeline)}, |
| 4972 | {"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindVertexBuffers)}, |
| 4973 | @@ -110,11 +104,19 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 4974 | {"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetEvent)}, |
| 4975 | {"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetQueryPool)}, |
| 4976 | {"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResolveImage)}, |
| 4977 | + {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetBlendConstants)}, |
| 4978 | + {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBias)}, |
| 4979 | + {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBounds)}, |
| 4980 | {"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetEvent)}, |
| 4981 | + {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetLineWidth)}, |
| 4982 | + {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetScissor)}, |
| 4983 | + {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilCompareMask)}, |
| 4984 | + {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilReference)}, |
| 4985 | + {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilWriteMask)}, |
| 4986 | + {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetViewport)}, |
| 4987 | {"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdUpdateBuffer)}, |
| 4988 | {"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWaitEvents)}, |
| 4989 | {"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWriteTimestamp)}, |
| 4990 | - {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateAttachmentView)}, |
| 4991 | {"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBuffer)}, |
| 4992 | {"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBufferView)}, |
| 4993 | {"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandBuffer)}, |
| 4994 | @@ -122,10 +124,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 4995 | {"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateComputePipelines)}, |
| 4996 | {"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorPool)}, |
| 4997 | {"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorSetLayout)}, |
| 4998 | - {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicColorBlendState)}, |
| 4999 | - {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicDepthStencilState)}, |
| 5000 | - {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicRasterState)}, |
| 5001 | - {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicViewportState)}, |
| 5002 | {"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCreateEvent)}, |
| 5003 | {"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFence)}, |
| 5004 | {"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFramebuffer)}, |
| 5005 | @@ -140,7 +138,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 5006 | {"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSemaphore)}, |
| 5007 | {"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShader)}, |
| 5008 | {"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShaderModule)}, |
| 5009 | - {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyAttachmentView)}, |
| 5010 | {"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBuffer)}, |
| 5011 | {"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBufferView)}, |
| 5012 | {"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandBuffer)}, |
| 5013 | @@ -148,10 +145,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 5014 | {"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorPool)}, |
| 5015 | {"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorSetLayout)}, |
| 5016 | {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDevice)}, |
| 5017 | - {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicColorBlendState)}, |
| 5018 | - {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicDepthStencilState)}, |
| 5019 | - {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicRasterState)}, |
| 5020 | - {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicViewportState)}, |
| 5021 | {"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyEvent)}, |
| 5022 | {"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFence)}, |
| 5023 | {"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFramebuffer)}, |
| 5024 | @@ -210,18 +203,16 @@ const NameOffsetEntry kInstanceOffsetTbl[] = { |
| 5025 | // clang-format off |
| 5026 | {"vkCreateDevice", offsetof(InstanceVtbl, CreateDevice)}, |
| 5027 | {"vkDestroyInstance", offsetof(InstanceVtbl, DestroyInstance)}, |
| 5028 | + {"vkEnumerateDeviceExtensionProperties", offsetof(InstanceVtbl, EnumerateDeviceExtensionProperties)}, |
| 5029 | + {"vkEnumerateDeviceLayerProperties", offsetof(InstanceVtbl, EnumerateDeviceLayerProperties)}, |
| 5030 | {"vkEnumeratePhysicalDevices", offsetof(InstanceVtbl, EnumeratePhysicalDevices)}, |
| 5031 | {"vkGetInstanceProcAddr", offsetof(InstanceVtbl, GetInstanceProcAddr)}, |
| 5032 | - {"vkGetPhysicalDeviceExtensionProperties", offsetof(InstanceVtbl, GetPhysicalDeviceExtensionProperties)}, |
| 5033 | {"vkGetPhysicalDeviceFeatures", offsetof(InstanceVtbl, GetPhysicalDeviceFeatures)}, |
| 5034 | {"vkGetPhysicalDeviceFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceFormatProperties)}, |
| 5035 | {"vkGetPhysicalDeviceImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceImageFormatProperties)}, |
| 5036 | - {"vkGetPhysicalDeviceLayerProperties", offsetof(InstanceVtbl, GetPhysicalDeviceLayerProperties)}, |
| 5037 | - {"vkGetPhysicalDeviceLimits", offsetof(InstanceVtbl, GetPhysicalDeviceLimits)}, |
| 5038 | {"vkGetPhysicalDeviceMemoryProperties", offsetof(InstanceVtbl, GetPhysicalDeviceMemoryProperties)}, |
| 5039 | {"vkGetPhysicalDeviceProperties", offsetof(InstanceVtbl, GetPhysicalDeviceProperties)}, |
| 5040 | - {"vkGetPhysicalDeviceQueueCount", offsetof(InstanceVtbl, GetPhysicalDeviceQueueCount)}, |
| 5041 | - {"vkGetPhysicalDeviceQueueProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueProperties)}, |
| 5042 | + {"vkGetPhysicalDeviceQueueFamilyProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueFamilyProperties)}, |
| 5043 | {"vkGetPhysicalDeviceSparseImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceSparseImageFormatProperties)}, |
| 5044 | // clang-format on |
| 5045 | }; |
| 5046 | @@ -236,10 +227,6 @@ const NameOffsetEntry kDeviceOffsetTbl[] = { |
| 5047 | {"vkCmdBeginQuery", offsetof(DeviceVtbl, CmdBeginQuery)}, |
| 5048 | {"vkCmdBeginRenderPass", offsetof(DeviceVtbl, CmdBeginRenderPass)}, |
| 5049 | {"vkCmdBindDescriptorSets", offsetof(DeviceVtbl, CmdBindDescriptorSets)}, |
| 5050 | - {"vkCmdBindDynamicColorBlendState", offsetof(DeviceVtbl, CmdBindDynamicColorBlendState)}, |
| 5051 | - {"vkCmdBindDynamicDepthStencilState", offsetof(DeviceVtbl, CmdBindDynamicDepthStencilState)}, |
| 5052 | - {"vkCmdBindDynamicRasterState", offsetof(DeviceVtbl, CmdBindDynamicRasterState)}, |
| 5053 | - {"vkCmdBindDynamicViewportState", offsetof(DeviceVtbl, CmdBindDynamicViewportState)}, |
| 5054 | {"vkCmdBindIndexBuffer", offsetof(DeviceVtbl, CmdBindIndexBuffer)}, |
| 5055 | {"vkCmdBindPipeline", offsetof(DeviceVtbl, CmdBindPipeline)}, |
| 5056 | {"vkCmdBindVertexBuffers", offsetof(DeviceVtbl, CmdBindVertexBuffers)}, |
| 5057 | @@ -269,11 +256,19 @@ const NameOffsetEntry kDeviceOffsetTbl[] = { |
| 5058 | {"vkCmdResetEvent", offsetof(DeviceVtbl, CmdResetEvent)}, |
| 5059 | {"vkCmdResetQueryPool", offsetof(DeviceVtbl, CmdResetQueryPool)}, |
| 5060 | {"vkCmdResolveImage", offsetof(DeviceVtbl, CmdResolveImage)}, |
| 5061 | + {"vkCmdSetBlendConstants", offsetof(DeviceVtbl, CmdSetBlendConstants)}, |
| 5062 | + {"vkCmdSetDepthBias", offsetof(DeviceVtbl, CmdSetDepthBias)}, |
| 5063 | + {"vkCmdSetDepthBounds", offsetof(DeviceVtbl, CmdSetDepthBounds)}, |
| 5064 | {"vkCmdSetEvent", offsetof(DeviceVtbl, CmdSetEvent)}, |
| 5065 | + {"vkCmdSetLineWidth", offsetof(DeviceVtbl, CmdSetLineWidth)}, |
| 5066 | + {"vkCmdSetScissor", offsetof(DeviceVtbl, CmdSetScissor)}, |
| 5067 | + {"vkCmdSetStencilCompareMask", offsetof(DeviceVtbl, CmdSetStencilCompareMask)}, |
| 5068 | + {"vkCmdSetStencilReference", offsetof(DeviceVtbl, CmdSetStencilReference)}, |
| 5069 | + {"vkCmdSetStencilWriteMask", offsetof(DeviceVtbl, CmdSetStencilWriteMask)}, |
| 5070 | + {"vkCmdSetViewport", offsetof(DeviceVtbl, CmdSetViewport)}, |
| 5071 | {"vkCmdUpdateBuffer", offsetof(DeviceVtbl, CmdUpdateBuffer)}, |
| 5072 | {"vkCmdWaitEvents", offsetof(DeviceVtbl, CmdWaitEvents)}, |
| 5073 | {"vkCmdWriteTimestamp", offsetof(DeviceVtbl, CmdWriteTimestamp)}, |
| 5074 | - {"vkCreateAttachmentView", offsetof(DeviceVtbl, CreateAttachmentView)}, |
| 5075 | {"vkCreateBuffer", offsetof(DeviceVtbl, CreateBuffer)}, |
| 5076 | {"vkCreateBufferView", offsetof(DeviceVtbl, CreateBufferView)}, |
| 5077 | {"vkCreateCommandBuffer", offsetof(DeviceVtbl, CreateCommandBuffer)}, |
| 5078 | @@ -281,10 +276,6 @@ const NameOffsetEntry kDeviceOffsetTbl[] = { |
| 5079 | {"vkCreateComputePipelines", offsetof(DeviceVtbl, CreateComputePipelines)}, |
| 5080 | {"vkCreateDescriptorPool", offsetof(DeviceVtbl, CreateDescriptorPool)}, |
| 5081 | {"vkCreateDescriptorSetLayout", offsetof(DeviceVtbl, CreateDescriptorSetLayout)}, |
| 5082 | - {"vkCreateDynamicColorBlendState", offsetof(DeviceVtbl, CreateDynamicColorBlendState)}, |
| 5083 | - {"vkCreateDynamicDepthStencilState", offsetof(DeviceVtbl, CreateDynamicDepthStencilState)}, |
| 5084 | - {"vkCreateDynamicRasterState", offsetof(DeviceVtbl, CreateDynamicRasterState)}, |
| 5085 | - {"vkCreateDynamicViewportState", offsetof(DeviceVtbl, CreateDynamicViewportState)}, |
| 5086 | {"vkCreateEvent", offsetof(DeviceVtbl, CreateEvent)}, |
| 5087 | {"vkCreateFence", offsetof(DeviceVtbl, CreateFence)}, |
| 5088 | {"vkCreateFramebuffer", offsetof(DeviceVtbl, CreateFramebuffer)}, |
| 5089 | @@ -299,7 +290,6 @@ const NameOffsetEntry kDeviceOffsetTbl[] = { |
| 5090 | {"vkCreateSemaphore", offsetof(DeviceVtbl, CreateSemaphore)}, |
| 5091 | {"vkCreateShader", offsetof(DeviceVtbl, CreateShader)}, |
| 5092 | {"vkCreateShaderModule", offsetof(DeviceVtbl, CreateShaderModule)}, |
| 5093 | - {"vkDestroyAttachmentView", offsetof(DeviceVtbl, DestroyAttachmentView)}, |
| 5094 | {"vkDestroyBuffer", offsetof(DeviceVtbl, DestroyBuffer)}, |
| 5095 | {"vkDestroyBufferView", offsetof(DeviceVtbl, DestroyBufferView)}, |
| 5096 | {"vkDestroyCommandBuffer", offsetof(DeviceVtbl, DestroyCommandBuffer)}, |
| 5097 | @@ -307,10 +297,6 @@ const NameOffsetEntry kDeviceOffsetTbl[] = { |
| 5098 | {"vkDestroyDescriptorPool", offsetof(DeviceVtbl, DestroyDescriptorPool)}, |
| 5099 | {"vkDestroyDescriptorSetLayout", offsetof(DeviceVtbl, DestroyDescriptorSetLayout)}, |
| 5100 | {"vkDestroyDevice", offsetof(DeviceVtbl, DestroyDevice)}, |
| 5101 | - {"vkDestroyDynamicColorBlendState", offsetof(DeviceVtbl, DestroyDynamicColorBlendState)}, |
| 5102 | - {"vkDestroyDynamicDepthStencilState", offsetof(DeviceVtbl, DestroyDynamicDepthStencilState)}, |
| 5103 | - {"vkDestroyDynamicRasterState", offsetof(DeviceVtbl, DestroyDynamicRasterState)}, |
| 5104 | - {"vkDestroyDynamicViewportState", offsetof(DeviceVtbl, DestroyDynamicViewportState)}, |
| 5105 | {"vkDestroyEvent", offsetof(DeviceVtbl, DestroyEvent)}, |
| 5106 | {"vkDestroyFence", offsetof(DeviceVtbl, DestroyFence)}, |
| 5107 | {"vkDestroyFramebuffer", offsetof(DeviceVtbl, DestroyFramebuffer)}, |
| 5108 | @@ -453,7 +439,6 @@ PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl, |
| 5109 | const_cast<unsigned char*>(base) + entry->offset); |
| 5110 | } |
| 5111 | |
| 5112 | -// TODO: remove need for instance_next |
| 5113 | bool LoadInstanceVtbl(VkInstance instance, |
| 5114 | VkInstance instance_next, |
| 5115 | PFN_vkGetInstanceProcAddr get_proc_addr, |
| 5116 | @@ -484,14 +469,9 @@ bool LoadInstanceVtbl(VkInstance instance, |
| 5117 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceProperties"); |
| 5118 | success = false; |
| 5119 | } |
| 5120 | - vtbl.GetPhysicalDeviceQueueCount = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueCount>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueCount")); |
| 5121 | - if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueCount)) { |
| 5122 | - ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueCount"); |
| 5123 | - success = false; |
| 5124 | - } |
| 5125 | - vtbl.GetPhysicalDeviceQueueProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueProperties")); |
| 5126 | - if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueProperties)) { |
| 5127 | - ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueProperties"); |
| 5128 | + vtbl.GetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueFamilyProperties")); |
| 5129 | + if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueFamilyProperties)) { |
| 5130 | + ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueFamilyProperties"); |
| 5131 | success = false; |
| 5132 | } |
| 5133 | vtbl.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties")); |
| 5134 | @@ -514,24 +494,19 @@ bool LoadInstanceVtbl(VkInstance instance, |
| 5135 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceImageFormatProperties"); |
| 5136 | success = false; |
| 5137 | } |
| 5138 | - vtbl.GetPhysicalDeviceLimits = reinterpret_cast<PFN_vkGetPhysicalDeviceLimits>(get_proc_addr(instance, "vkGetPhysicalDeviceLimits")); |
| 5139 | - if (UNLIKELY(!vtbl.GetPhysicalDeviceLimits)) { |
| 5140 | - ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLimits"); |
| 5141 | - success = false; |
| 5142 | - } |
| 5143 | vtbl.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice")); |
| 5144 | if (UNLIKELY(!vtbl.CreateDevice)) { |
| 5145 | ALOGE("missing instance proc: %s", "vkCreateDevice"); |
| 5146 | success = false; |
| 5147 | } |
| 5148 | - vtbl.GetPhysicalDeviceLayerProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceLayerProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceLayerProperties")); |
| 5149 | - if (UNLIKELY(!vtbl.GetPhysicalDeviceLayerProperties)) { |
| 5150 | - ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLayerProperties"); |
| 5151 | + vtbl.EnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(get_proc_addr(instance, "vkEnumerateDeviceLayerProperties")); |
| 5152 | + if (UNLIKELY(!vtbl.EnumerateDeviceLayerProperties)) { |
| 5153 | + ALOGE("missing instance proc: %s", "vkEnumerateDeviceLayerProperties"); |
| 5154 | success = false; |
| 5155 | } |
| 5156 | - vtbl.GetPhysicalDeviceExtensionProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExtensionProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceExtensionProperties")); |
| 5157 | - if (UNLIKELY(!vtbl.GetPhysicalDeviceExtensionProperties)) { |
| 5158 | - ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceExtensionProperties"); |
| 5159 | + vtbl.EnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(get_proc_addr(instance, "vkEnumerateDeviceExtensionProperties")); |
| 5160 | + if (UNLIKELY(!vtbl.EnumerateDeviceExtensionProperties)) { |
| 5161 | + ALOGE("missing instance proc: %s", "vkEnumerateDeviceExtensionProperties"); |
| 5162 | success = false; |
| 5163 | } |
| 5164 | vtbl.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties")); |
| 5165 | @@ -784,16 +759,6 @@ bool LoadDeviceVtbl(VkDevice device, |
| 5166 | ALOGE("missing device proc: %s", "vkDestroyImageView"); |
| 5167 | success = false; |
| 5168 | } |
| 5169 | - vtbl.CreateAttachmentView = reinterpret_cast<PFN_vkCreateAttachmentView>(get_proc_addr(device, "vkCreateAttachmentView")); |
| 5170 | - if (UNLIKELY(!vtbl.CreateAttachmentView)) { |
| 5171 | - ALOGE("missing device proc: %s", "vkCreateAttachmentView"); |
| 5172 | - success = false; |
| 5173 | - } |
| 5174 | - vtbl.DestroyAttachmentView = reinterpret_cast<PFN_vkDestroyAttachmentView>(get_proc_addr(device, "vkDestroyAttachmentView")); |
| 5175 | - if (UNLIKELY(!vtbl.DestroyAttachmentView)) { |
| 5176 | - ALOGE("missing device proc: %s", "vkDestroyAttachmentView"); |
| 5177 | - success = false; |
| 5178 | - } |
| 5179 | vtbl.CreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(get_proc_addr(device, "vkCreateShaderModule")); |
| 5180 | if (UNLIKELY(!vtbl.CreateShaderModule)) { |
| 5181 | ALOGE("missing device proc: %s", "vkCreateShaderModule"); |
| 5182 | @@ -914,46 +879,6 @@ bool LoadDeviceVtbl(VkDevice device, |
| 5183 | ALOGE("missing device proc: %s", "vkUpdateDescriptorSets"); |
| 5184 | success = false; |
| 5185 | } |
| 5186 | - vtbl.CreateDynamicViewportState = reinterpret_cast<PFN_vkCreateDynamicViewportState>(get_proc_addr(device, "vkCreateDynamicViewportState")); |
| 5187 | - if (UNLIKELY(!vtbl.CreateDynamicViewportState)) { |
| 5188 | - ALOGE("missing device proc: %s", "vkCreateDynamicViewportState"); |
| 5189 | - success = false; |
| 5190 | - } |
| 5191 | - vtbl.DestroyDynamicViewportState = reinterpret_cast<PFN_vkDestroyDynamicViewportState>(get_proc_addr(device, "vkDestroyDynamicViewportState")); |
| 5192 | - if (UNLIKELY(!vtbl.DestroyDynamicViewportState)) { |
| 5193 | - ALOGE("missing device proc: %s", "vkDestroyDynamicViewportState"); |
| 5194 | - success = false; |
| 5195 | - } |
| 5196 | - vtbl.CreateDynamicRasterState = reinterpret_cast<PFN_vkCreateDynamicRasterState>(get_proc_addr(device, "vkCreateDynamicRasterState")); |
| 5197 | - if (UNLIKELY(!vtbl.CreateDynamicRasterState)) { |
| 5198 | - ALOGE("missing device proc: %s", "vkCreateDynamicRasterState"); |
| 5199 | - success = false; |
| 5200 | - } |
| 5201 | - vtbl.DestroyDynamicRasterState = reinterpret_cast<PFN_vkDestroyDynamicRasterState>(get_proc_addr(device, "vkDestroyDynamicRasterState")); |
| 5202 | - if (UNLIKELY(!vtbl.DestroyDynamicRasterState)) { |
| 5203 | - ALOGE("missing device proc: %s", "vkDestroyDynamicRasterState"); |
| 5204 | - success = false; |
| 5205 | - } |
| 5206 | - vtbl.CreateDynamicColorBlendState = reinterpret_cast<PFN_vkCreateDynamicColorBlendState>(get_proc_addr(device, "vkCreateDynamicColorBlendState")); |
| 5207 | - if (UNLIKELY(!vtbl.CreateDynamicColorBlendState)) { |
| 5208 | - ALOGE("missing device proc: %s", "vkCreateDynamicColorBlendState"); |
| 5209 | - success = false; |
| 5210 | - } |
| 5211 | - vtbl.DestroyDynamicColorBlendState = reinterpret_cast<PFN_vkDestroyDynamicColorBlendState>(get_proc_addr(device, "vkDestroyDynamicColorBlendState")); |
| 5212 | - if (UNLIKELY(!vtbl.DestroyDynamicColorBlendState)) { |
| 5213 | - ALOGE("missing device proc: %s", "vkDestroyDynamicColorBlendState"); |
| 5214 | - success = false; |
| 5215 | - } |
| 5216 | - vtbl.CreateDynamicDepthStencilState = reinterpret_cast<PFN_vkCreateDynamicDepthStencilState>(get_proc_addr(device, "vkCreateDynamicDepthStencilState")); |
| 5217 | - if (UNLIKELY(!vtbl.CreateDynamicDepthStencilState)) { |
| 5218 | - ALOGE("missing device proc: %s", "vkCreateDynamicDepthStencilState"); |
| 5219 | - success = false; |
| 5220 | - } |
| 5221 | - vtbl.DestroyDynamicDepthStencilState = reinterpret_cast<PFN_vkDestroyDynamicDepthStencilState>(get_proc_addr(device, "vkDestroyDynamicDepthStencilState")); |
| 5222 | - if (UNLIKELY(!vtbl.DestroyDynamicDepthStencilState)) { |
| 5223 | - ALOGE("missing device proc: %s", "vkDestroyDynamicDepthStencilState"); |
| 5224 | - success = false; |
| 5225 | - } |
| 5226 | vtbl.CreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(get_proc_addr(device, "vkCreateFramebuffer")); |
| 5227 | if (UNLIKELY(!vtbl.CreateFramebuffer)) { |
| 5228 | ALOGE("missing device proc: %s", "vkCreateFramebuffer"); |
| 5229 | @@ -1024,24 +949,49 @@ bool LoadDeviceVtbl(VkDevice device, |
| 5230 | ALOGE("missing device proc: %s", "vkCmdBindPipeline"); |
| 5231 | success = false; |
| 5232 | } |
| 5233 | - vtbl.CmdBindDynamicViewportState = reinterpret_cast<PFN_vkCmdBindDynamicViewportState>(get_proc_addr(device, "vkCmdBindDynamicViewportState")); |
| 5234 | - if (UNLIKELY(!vtbl.CmdBindDynamicViewportState)) { |
| 5235 | - ALOGE("missing device proc: %s", "vkCmdBindDynamicViewportState"); |
| 5236 | + vtbl.CmdSetViewport = reinterpret_cast<PFN_vkCmdSetViewport>(get_proc_addr(device, "vkCmdSetViewport")); |
| 5237 | + if (UNLIKELY(!vtbl.CmdSetViewport)) { |
| 5238 | + ALOGE("missing device proc: %s", "vkCmdSetViewport"); |
| 5239 | + success = false; |
| 5240 | + } |
| 5241 | + vtbl.CmdSetScissor = reinterpret_cast<PFN_vkCmdSetScissor>(get_proc_addr(device, "vkCmdSetScissor")); |
| 5242 | + if (UNLIKELY(!vtbl.CmdSetScissor)) { |
| 5243 | + ALOGE("missing device proc: %s", "vkCmdSetScissor"); |
| 5244 | + success = false; |
| 5245 | + } |
| 5246 | + vtbl.CmdSetLineWidth = reinterpret_cast<PFN_vkCmdSetLineWidth>(get_proc_addr(device, "vkCmdSetLineWidth")); |
| 5247 | + if (UNLIKELY(!vtbl.CmdSetLineWidth)) { |
| 5248 | + ALOGE("missing device proc: %s", "vkCmdSetLineWidth"); |
| 5249 | + success = false; |
| 5250 | + } |
| 5251 | + vtbl.CmdSetDepthBias = reinterpret_cast<PFN_vkCmdSetDepthBias>(get_proc_addr(device, "vkCmdSetDepthBias")); |
| 5252 | + if (UNLIKELY(!vtbl.CmdSetDepthBias)) { |
| 5253 | + ALOGE("missing device proc: %s", "vkCmdSetDepthBias"); |
| 5254 | + success = false; |
| 5255 | + } |
| 5256 | + vtbl.CmdSetBlendConstants = reinterpret_cast<PFN_vkCmdSetBlendConstants>(get_proc_addr(device, "vkCmdSetBlendConstants")); |
| 5257 | + if (UNLIKELY(!vtbl.CmdSetBlendConstants)) { |
| 5258 | + ALOGE("missing device proc: %s", "vkCmdSetBlendConstants"); |
| 5259 | + success = false; |
| 5260 | + } |
| 5261 | + vtbl.CmdSetDepthBounds = reinterpret_cast<PFN_vkCmdSetDepthBounds>(get_proc_addr(device, "vkCmdSetDepthBounds")); |
| 5262 | + if (UNLIKELY(!vtbl.CmdSetDepthBounds)) { |
| 5263 | + ALOGE("missing device proc: %s", "vkCmdSetDepthBounds"); |
| 5264 | success = false; |
| 5265 | } |
| 5266 | - vtbl.CmdBindDynamicRasterState = reinterpret_cast<PFN_vkCmdBindDynamicRasterState>(get_proc_addr(device, "vkCmdBindDynamicRasterState")); |
| 5267 | - if (UNLIKELY(!vtbl.CmdBindDynamicRasterState)) { |
| 5268 | - ALOGE("missing device proc: %s", "vkCmdBindDynamicRasterState"); |
| 5269 | + vtbl.CmdSetStencilCompareMask = reinterpret_cast<PFN_vkCmdSetStencilCompareMask>(get_proc_addr(device, "vkCmdSetStencilCompareMask")); |
| 5270 | + if (UNLIKELY(!vtbl.CmdSetStencilCompareMask)) { |
| 5271 | + ALOGE("missing device proc: %s", "vkCmdSetStencilCompareMask"); |
| 5272 | success = false; |
| 5273 | } |
| 5274 | - vtbl.CmdBindDynamicColorBlendState = reinterpret_cast<PFN_vkCmdBindDynamicColorBlendState>(get_proc_addr(device, "vkCmdBindDynamicColorBlendState")); |
| 5275 | - if (UNLIKELY(!vtbl.CmdBindDynamicColorBlendState)) { |
| 5276 | - ALOGE("missing device proc: %s", "vkCmdBindDynamicColorBlendState"); |
| 5277 | + vtbl.CmdSetStencilWriteMask = reinterpret_cast<PFN_vkCmdSetStencilWriteMask>(get_proc_addr(device, "vkCmdSetStencilWriteMask")); |
| 5278 | + if (UNLIKELY(!vtbl.CmdSetStencilWriteMask)) { |
| 5279 | + ALOGE("missing device proc: %s", "vkCmdSetStencilWriteMask"); |
| 5280 | success = false; |
| 5281 | } |
| 5282 | - vtbl.CmdBindDynamicDepthStencilState = reinterpret_cast<PFN_vkCmdBindDynamicDepthStencilState>(get_proc_addr(device, "vkCmdBindDynamicDepthStencilState")); |
| 5283 | - if (UNLIKELY(!vtbl.CmdBindDynamicDepthStencilState)) { |
| 5284 | - ALOGE("missing device proc: %s", "vkCmdBindDynamicDepthStencilState"); |
| 5285 | + vtbl.CmdSetStencilReference = reinterpret_cast<PFN_vkCmdSetStencilReference>(get_proc_addr(device, "vkCmdSetStencilReference")); |
| 5286 | + if (UNLIKELY(!vtbl.CmdSetStencilReference)) { |
| 5287 | + ALOGE("missing device proc: %s", "vkCmdSetStencilReference"); |
| 5288 | success = false; |
| 5289 | } |
| 5290 | vtbl.CmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(get_proc_addr(device, "vkCmdBindDescriptorSets")); |
| 5291 | diff --git a/vulkan/libvulkan/loader.cpp b/vulkan/libvulkan/loader.cpp |
| 5292 | index 97ceb4a..f608c57 100644 |
| 5293 | --- a/vulkan/libvulkan/loader.cpp |
| 5294 | +++ b/vulkan/libvulkan/loader.cpp |
| 5295 | @@ -257,12 +257,12 @@ void FindLayersInDirectory( |
| 5296 | } |
| 5297 | |
| 5298 | // Get Layers in so |
| 5299 | - PFN_vkGetGlobalLayerProperties get_layer_properties = |
| 5300 | - reinterpret_cast<PFN_vkGetGlobalLayerProperties>( |
| 5301 | - dlsym(layer_handle, "vkGetGlobalLayerProperties")); |
| 5302 | + PFN_vkEnumerateInstanceLayerProperties get_layer_properties = |
| 5303 | + reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>( |
| 5304 | + dlsym(layer_handle, "vkEnumerateInstanceLayerProperties")); |
| 5305 | if (!get_layer_properties) { |
| 5306 | ALOGE( |
| 5307 | - "%s failed to find vkGetGlobalLayerProperties with " |
| 5308 | + "%s failed to find vkEnumerateInstanceLayerProperties with " |
| 5309 | "error %s; Skipping", |
| 5310 | entry->d_name, dlerror()); |
| 5311 | dlclose(layer_handle); |
| 5312 | @@ -353,7 +353,7 @@ void LogDebugMessageCallback(VkFlags message_flags, |
| 5313 | // "Bottom" functions. These are called at the end of the instance dispatch |
| 5314 | // chain. |
| 5315 | |
| 5316 | -VkResult DestroyInstanceBottom(VkInstance instance) { |
| 5317 | +void DestroyInstanceBottom(VkInstance instance) { |
| 5318 | // These checks allow us to call DestroyInstanceBottom from any error path |
| 5319 | // in CreateInstanceBottom, before the driver instance is fully initialized. |
| 5320 | if (instance->drv.vtbl.instance != VK_NULL_HANDLE && |
| 5321 | @@ -372,7 +372,6 @@ VkResult DestroyInstanceBottom(VkInstance instance) { |
| 5322 | const VkAllocCallbacks* alloc = instance->alloc; |
| 5323 | instance->~VkInstance_T(); |
| 5324 | alloc->pfnFree(alloc->pUserData, instance); |
| 5325 | - return VK_SUCCESS; |
| 5326 | } |
| 5327 | |
| 5328 | VkResult CreateInstanceBottom(const VkInstanceCreateInfo* create_info, |
| 5329 | @@ -484,16 +483,11 @@ VkResult GetPhysicalDeviceImageFormatPropertiesBottom( |
| 5330 | VkImageType type, |
| 5331 | VkImageTiling tiling, |
| 5332 | VkImageUsageFlags usage, |
| 5333 | + VkImageCreateFlags flags, |
| 5334 | VkImageFormatProperties* properties) { |
| 5335 | return GetVtbl(pdev) |
| 5336 | ->instance->drv.vtbl.GetPhysicalDeviceImageFormatProperties( |
| 5337 | - pdev, format, type, tiling, usage, properties); |
| 5338 | -} |
| 5339 | - |
| 5340 | -VkResult GetPhysicalDeviceLimitsBottom(VkPhysicalDevice pdev, |
| 5341 | - VkPhysicalDeviceLimits* limits) { |
| 5342 | - return GetVtbl(pdev) |
| 5343 | - ->instance->drv.vtbl.GetPhysicalDeviceLimits(pdev, limits); |
| 5344 | + pdev, format, type, tiling, usage, flags, properties); |
| 5345 | } |
| 5346 | |
| 5347 | VkResult GetPhysicalDevicePropertiesBottom( |
| 5348 | @@ -503,18 +497,13 @@ VkResult GetPhysicalDevicePropertiesBottom( |
| 5349 | ->instance->drv.vtbl.GetPhysicalDeviceProperties(pdev, properties); |
| 5350 | } |
| 5351 | |
| 5352 | -VkResult GetPhysicalDeviceQueueCountBottom(VkPhysicalDevice pdev, |
| 5353 | - uint32_t* count) { |
| 5354 | - return GetVtbl(pdev) |
| 5355 | - ->instance->drv.vtbl.GetPhysicalDeviceQueueCount(pdev, count); |
| 5356 | -} |
| 5357 | - |
| 5358 | -VkResult GetPhysicalDeviceQueuePropertiesBottom( |
| 5359 | +VkResult GetPhysicalDeviceQueueFamilyPropertiesBottom( |
| 5360 | VkPhysicalDevice pdev, |
| 5361 | - uint32_t count, |
| 5362 | - VkPhysicalDeviceQueueProperties* properties) { |
| 5363 | - return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceQueueProperties( |
| 5364 | - pdev, count, properties); |
| 5365 | + uint32_t* pCount, |
| 5366 | + VkQueueFamilyProperties* properties) { |
| 5367 | + return GetVtbl(pdev) |
| 5368 | + ->instance->drv.vtbl.GetPhysicalDeviceQueueFamilyProperties( |
| 5369 | + pdev, pCount, properties); |
| 5370 | } |
| 5371 | |
| 5372 | VkResult GetPhysicalDeviceMemoryPropertiesBottom( |
| 5373 | @@ -618,21 +607,20 @@ VkResult CreateDeviceBottom(VkPhysicalDevice pdev, |
| 5374 | return VK_SUCCESS; |
| 5375 | } |
| 5376 | |
| 5377 | -VkResult GetPhysicalDeviceExtensionPropertiesBottom( |
| 5378 | +VkResult EnumerateDeviceExtensionPropertiesBottom( |
| 5379 | VkPhysicalDevice pdev, |
| 5380 | const char* layer_name, |
| 5381 | uint32_t* properties_count, |
| 5382 | VkExtensionProperties* properties) { |
| 5383 | // TODO: what are we supposed to do with layer_name here? |
| 5384 | - return GetVtbl(pdev) |
| 5385 | - ->instance->drv.vtbl.GetPhysicalDeviceExtensionProperties( |
| 5386 | - pdev, layer_name, properties_count, properties); |
| 5387 | + return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceExtensionProperties( |
| 5388 | + pdev, layer_name, properties_count, properties); |
| 5389 | } |
| 5390 | |
| 5391 | -VkResult GetPhysicalDeviceLayerPropertiesBottom(VkPhysicalDevice pdev, |
| 5392 | - uint32_t* properties_count, |
| 5393 | - VkLayerProperties* properties) { |
| 5394 | - return GetVtbl(pdev)->instance->drv.vtbl.GetPhysicalDeviceLayerProperties( |
| 5395 | +VkResult EnumerateDeviceLayerPropertiesBottom(VkPhysicalDevice pdev, |
| 5396 | + uint32_t* properties_count, |
| 5397 | + VkLayerProperties* properties) { |
| 5398 | + return GetVtbl(pdev)->instance->drv.vtbl.EnumerateDeviceLayerProperties( |
| 5399 | pdev, properties_count, properties); |
| 5400 | } |
| 5401 | |
| 5402 | @@ -663,14 +651,12 @@ const InstanceVtbl kBottomInstanceFunctions = { |
| 5403 | .GetPhysicalDeviceFeatures = GetPhysicalDeviceFeaturesBottom, |
| 5404 | .GetPhysicalDeviceFormatProperties = GetPhysicalDeviceFormatPropertiesBottom, |
| 5405 | .GetPhysicalDeviceImageFormatProperties = GetPhysicalDeviceImageFormatPropertiesBottom, |
| 5406 | - .GetPhysicalDeviceLimits = GetPhysicalDeviceLimitsBottom, |
| 5407 | .GetPhysicalDeviceProperties = GetPhysicalDevicePropertiesBottom, |
| 5408 | - .GetPhysicalDeviceQueueCount = GetPhysicalDeviceQueueCountBottom, |
| 5409 | - .GetPhysicalDeviceQueueProperties = GetPhysicalDeviceQueuePropertiesBottom, |
| 5410 | + .GetPhysicalDeviceQueueFamilyProperties = GetPhysicalDeviceQueueFamilyPropertiesBottom, |
| 5411 | .GetPhysicalDeviceMemoryProperties = GetPhysicalDeviceMemoryPropertiesBottom, |
| 5412 | .CreateDevice = CreateDeviceBottom, |
| 5413 | - .GetPhysicalDeviceExtensionProperties = GetPhysicalDeviceExtensionPropertiesBottom, |
| 5414 | - .GetPhysicalDeviceLayerProperties = GetPhysicalDeviceLayerPropertiesBottom, |
| 5415 | + .EnumerateDeviceExtensionProperties = EnumerateDeviceExtensionPropertiesBottom, |
| 5416 | + .EnumerateDeviceLayerProperties = EnumerateDeviceLayerPropertiesBottom, |
| 5417 | .GetPhysicalDeviceSparseImageFormatProperties = GetPhysicalDeviceSparseImageFormatPropertiesBottom, |
| 5418 | .GetPhysicalDeviceSurfaceSupportKHR = GetPhysicalDeviceSurfaceSupportKHR, |
| 5419 | // clang-format on |
| 5420 | @@ -701,30 +687,27 @@ PFN_vkVoidFunction GetInstanceProcAddrBottom(VkInstance, const char* name) { |
| 5421 | |
| 5422 | namespace vulkan { |
| 5423 | |
| 5424 | -VkResult GetGlobalExtensionProperties(const char* /*layer_name*/, |
| 5425 | - uint32_t* count, |
| 5426 | - VkExtensionProperties* /*properties*/) { |
| 5427 | - if (!count) |
| 5428 | - return VK_ERROR_INVALID_POINTER; |
| 5429 | +VkResult EnumerateInstanceExtensionProperties( |
| 5430 | + const char* /*layer_name*/, |
| 5431 | + uint32_t* count, |
| 5432 | + VkExtensionProperties* /*properties*/) { |
| 5433 | if (!EnsureInitialized()) |
| 5434 | - return VK_ERROR_UNAVAILABLE; |
| 5435 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5436 | |
| 5437 | // TODO: not yet implemented |
| 5438 | - ALOGW("vkGetGlobalExtensionProperties not implemented"); |
| 5439 | + ALOGW("vkEnumerateInstanceExtensionProperties not implemented"); |
| 5440 | |
| 5441 | *count = 0; |
| 5442 | return VK_SUCCESS; |
| 5443 | } |
| 5444 | |
| 5445 | -VkResult GetGlobalLayerProperties(uint32_t* count, |
| 5446 | - VkLayerProperties* /*properties*/) { |
| 5447 | - if (!count) |
| 5448 | - return VK_ERROR_INVALID_POINTER; |
| 5449 | +VkResult EnumerateInstanceLayerProperties(uint32_t* count, |
| 5450 | + VkLayerProperties* /*properties*/) { |
| 5451 | if (!EnsureInitialized()) |
| 5452 | - return VK_ERROR_UNAVAILABLE; |
| 5453 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5454 | |
| 5455 | // TODO: not yet implemented |
| 5456 | - ALOGW("vkGetGlobalLayerProperties not implemented"); |
| 5457 | + ALOGW("vkEnumerateInstanceLayerProperties not implemented"); |
| 5458 | |
| 5459 | *count = 0; |
| 5460 | return VK_SUCCESS; |
| 5461 | @@ -735,7 +718,7 @@ VkResult CreateInstance(const VkInstanceCreateInfo* create_info, |
| 5462 | VkResult result; |
| 5463 | |
| 5464 | if (!EnsureInitialized()) |
| 5465 | - return VK_ERROR_UNAVAILABLE; |
| 5466 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5467 | |
| 5468 | VkInstanceCreateInfo local_create_info = *create_info; |
| 5469 | if (!local_create_info.pAllocCb) |
| 5470 | diff --git a/vulkan/libvulkan/loader.h b/vulkan/libvulkan/loader.h |
| 5471 | index 5933eb2..ef3d1f1 100644 |
| 5472 | --- a/vulkan/libvulkan/loader.h |
| 5473 | +++ b/vulkan/libvulkan/loader.h |
| 5474 | @@ -43,14 +43,12 @@ struct InstanceVtbl { |
| 5475 | PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; |
| 5476 | PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties; |
| 5477 | PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties; |
| 5478 | - PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits; |
| 5479 | PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; |
| 5480 | - PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount; |
| 5481 | - PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties; |
| 5482 | + PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties; |
| 5483 | PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; |
| 5484 | PFN_vkCreateDevice CreateDevice; |
| 5485 | - PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties; |
| 5486 | - PFN_vkGetPhysicalDeviceLayerProperties GetPhysicalDeviceLayerProperties; |
| 5487 | + PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; |
| 5488 | + PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties; |
| 5489 | PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties; |
| 5490 | |
| 5491 | // Layers and loader only, not implemented by drivers |
| 5492 | @@ -101,8 +99,6 @@ struct DeviceVtbl { |
| 5493 | PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout; |
| 5494 | PFN_vkCreateImageView CreateImageView; |
| 5495 | PFN_vkDestroyImageView DestroyImageView; |
| 5496 | - PFN_vkCreateAttachmentView CreateAttachmentView; |
| 5497 | - PFN_vkDestroyAttachmentView DestroyAttachmentView; |
| 5498 | PFN_vkCreateShaderModule CreateShaderModule; |
| 5499 | PFN_vkDestroyShaderModule DestroyShaderModule; |
| 5500 | PFN_vkCreateShader CreateShader; |
| 5501 | @@ -127,14 +123,6 @@ struct DeviceVtbl { |
| 5502 | PFN_vkAllocDescriptorSets AllocDescriptorSets; |
| 5503 | PFN_vkFreeDescriptorSets FreeDescriptorSets; |
| 5504 | PFN_vkUpdateDescriptorSets UpdateDescriptorSets; |
| 5505 | - PFN_vkCreateDynamicViewportState CreateDynamicViewportState; |
| 5506 | - PFN_vkDestroyDynamicViewportState DestroyDynamicViewportState; |
| 5507 | - PFN_vkCreateDynamicRasterState CreateDynamicRasterState; |
| 5508 | - PFN_vkDestroyDynamicRasterState DestroyDynamicRasterState; |
| 5509 | - PFN_vkCreateDynamicColorBlendState CreateDynamicColorBlendState; |
| 5510 | - PFN_vkDestroyDynamicColorBlendState DestroyDynamicColorBlendState; |
| 5511 | - PFN_vkCreateDynamicDepthStencilState CreateDynamicDepthStencilState; |
| 5512 | - PFN_vkDestroyDynamicDepthStencilState DestroyDynamicDepthStencilState; |
| 5513 | PFN_vkCreateFramebuffer CreateFramebuffer; |
| 5514 | PFN_vkDestroyFramebuffer DestroyFramebuffer; |
| 5515 | PFN_vkCreateRenderPass CreateRenderPass; |
| 5516 | @@ -158,10 +146,15 @@ struct DeviceVtbl { |
| 5517 | PFN_vkEndCommandBuffer EndCommandBuffer; |
| 5518 | PFN_vkResetCommandBuffer ResetCommandBuffer; |
| 5519 | PFN_vkCmdBindPipeline CmdBindPipeline; |
| 5520 | - PFN_vkCmdBindDynamicViewportState CmdBindDynamicViewportState; |
| 5521 | - PFN_vkCmdBindDynamicRasterState CmdBindDynamicRasterState; |
| 5522 | - PFN_vkCmdBindDynamicColorBlendState CmdBindDynamicColorBlendState; |
| 5523 | - PFN_vkCmdBindDynamicDepthStencilState CmdBindDynamicDepthStencilState; |
| 5524 | + PFN_vkCmdSetViewport CmdSetViewport; |
| 5525 | + PFN_vkCmdSetScissor CmdSetScissor; |
| 5526 | + PFN_vkCmdSetLineWidth CmdSetLineWidth; |
| 5527 | + PFN_vkCmdSetDepthBias CmdSetDepthBias; |
| 5528 | + PFN_vkCmdSetBlendConstants CmdSetBlendConstants; |
| 5529 | + PFN_vkCmdSetDepthBounds CmdSetDepthBounds; |
| 5530 | + PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; |
| 5531 | + PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; |
| 5532 | + PFN_vkCmdSetStencilReference CmdSetStencilReference; |
| 5533 | PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; |
| 5534 | PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; |
| 5535 | PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; |
| 5536 | @@ -216,11 +209,12 @@ struct DeviceVtbl { |
| 5537 | // ----------------------------------------------------------------------------- |
| 5538 | // loader.cpp |
| 5539 | |
| 5540 | -VkResult GetGlobalExtensionProperties(const char* layer_name, |
| 5541 | - uint32_t* count, |
| 5542 | - VkExtensionProperties* properties); |
| 5543 | -VkResult GetGlobalLayerProperties(uint32_t* count, |
| 5544 | - VkLayerProperties* properties); |
| 5545 | +VkResult EnumerateInstanceExtensionProperties( |
| 5546 | + const char* layer_name, |
| 5547 | + uint32_t* count, |
| 5548 | + VkExtensionProperties* properties); |
| 5549 | +VkResult EnumerateInstanceLayerProperties(uint32_t* count, |
| 5550 | + VkLayerProperties* properties); |
| 5551 | VkResult CreateInstance(const VkInstanceCreateInfo* create_info, |
| 5552 | VkInstance* instance); |
| 5553 | PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name); |
| 5554 | diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp |
| 5555 | index af3d585..6320192 100644 |
| 5556 | --- a/vulkan/libvulkan/swapchain.cpp |
| 5557 | +++ b/vulkan/libvulkan/swapchain.cpp |
| 5558 | @@ -27,6 +27,11 @@ |
| 5559 | |
| 5560 | using namespace vulkan; |
| 5561 | |
| 5562 | +// TODO(jessehall): Currently we don't have a good error code for when a native |
| 5563 | +// window operation fails. Just returning INITIALIZATION_FAILED for now. Later |
| 5564 | +// versions (post SDK 0.9) of the API/extension have a better error code. |
| 5565 | +// When updating to that version, audit all error returns. |
| 5566 | + |
| 5567 | namespace { |
| 5568 | |
| 5569 | // ---------------------------------------------------------------------------- |
| 5570 | @@ -118,8 +123,11 @@ VkResult GetPhysicalDeviceSurfaceSupportKHR( |
| 5571 | #pragma clang diagnostic push |
| 5572 | #pragma clang diagnostic ignored "-Wold-style-cast" |
| 5573 | #pragma clang diagnostic ignored "-Wsign-conversion" |
| 5574 | - if (surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR) |
| 5575 | - return VK_ERROR_INVALID_VALUE; |
| 5576 | + ALOGE_IF( |
| 5577 | + surface_desc->sType != VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR, |
| 5578 | + "vkGetPhysicalDeviceSurfaceSupportKHR: pSurfaceDescription->sType=%#x " |
| 5579 | + "not supported", |
| 5580 | + surface_desc->sType); |
| 5581 | #pragma clang diagnostic pop |
| 5582 | |
| 5583 | const VkSurfaceDescriptionWindowKHR* window_desc = |
| 5584 | @@ -170,7 +178,7 @@ VkResult GetSurfacePropertiesKHR(VkDevice /*device*/, |
| 5585 | } else if (err != 0) { |
| 5586 | // TODO(jessehall): Improve error reporting. Can we enumerate possible |
| 5587 | // errors and translate them to valid Vulkan result codes? |
| 5588 | - return VK_ERROR_UNKNOWN; |
| 5589 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5590 | } |
| 5591 | |
| 5592 | int width, height; |
| 5593 | @@ -180,7 +188,7 @@ VkResult GetSurfacePropertiesKHR(VkDevice /*device*/, |
| 5594 | strerror(-err), err); |
| 5595 | if (disconnect) |
| 5596 | native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); |
| 5597 | - return VK_ERROR_UNKNOWN; |
| 5598 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5599 | } |
| 5600 | err = window->query(window, NATIVE_WINDOW_DEFAULT_HEIGHT, &height); |
| 5601 | if (err != 0) { |
| 5602 | @@ -188,7 +196,7 @@ VkResult GetSurfacePropertiesKHR(VkDevice /*device*/, |
| 5603 | strerror(-err), err); |
| 5604 | if (disconnect) |
| 5605 | native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); |
| 5606 | - return VK_ERROR_UNKNOWN; |
| 5607 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5608 | } |
| 5609 | |
| 5610 | if (disconnect) |
| 5611 | @@ -311,7 +319,7 @@ VkResult CreateSwapchainKHR(VkDevice device, |
| 5612 | // errors and translate them to valid Vulkan result codes? |
| 5613 | ALOGE("native_window_api_connect() failed: %s (%d)", strerror(-err), |
| 5614 | err); |
| 5615 | - return VK_ERROR_UNKNOWN; |
| 5616 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5617 | } |
| 5618 | |
| 5619 | err = native_window_set_buffers_dimensions(window.get(), |
| 5620 | @@ -324,7 +332,7 @@ VkResult CreateSwapchainKHR(VkDevice device, |
| 5621 | create_info->imageExtent.width, create_info->imageExtent.height, |
| 5622 | strerror(-err), err); |
| 5623 | native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL); |
| 5624 | - return VK_ERROR_UNKNOWN; |
| 5625 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5626 | } |
| 5627 | |
| 5628 | uint32_t min_undequeued_buffers; |
| 5629 | @@ -335,7 +343,7 @@ VkResult CreateSwapchainKHR(VkDevice device, |
| 5630 | // errors and translate them to valid Vulkan result codes? |
| 5631 | ALOGE("window->query failed: %s (%d)", strerror(-err), err); |
| 5632 | native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL); |
| 5633 | - return VK_ERROR_UNKNOWN; |
| 5634 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5635 | } |
| 5636 | uint32_t num_images = |
| 5637 | (create_info->minImageCount - 1) + min_undequeued_buffers; |
| 5638 | @@ -346,7 +354,7 @@ VkResult CreateSwapchainKHR(VkDevice device, |
| 5639 | ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err), |
| 5640 | err); |
| 5641 | native_window_api_disconnect(window.get(), NATIVE_WINDOW_API_EGL); |
| 5642 | - return VK_ERROR_UNKNOWN; |
| 5643 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5644 | } |
| 5645 | |
| 5646 | // TODO(jessehall): Do we need to call modify native_window_set_usage() |
| 5647 | @@ -401,7 +409,7 @@ VkResult CreateSwapchainKHR(VkDevice device, |
| 5648 | // TODO(jessehall): Improve error reporting. Can we enumerate |
| 5649 | // possible errors and translate them to valid Vulkan result codes? |
| 5650 | ALOGE("dequeueBuffer[%u] failed: %s (%d)", i, strerror(-err), err); |
| 5651 | - result = VK_ERROR_UNKNOWN; |
| 5652 | + result = VK_ERROR_INITIALIZATION_FAILED; |
| 5653 | break; |
| 5654 | } |
| 5655 | img.buffer = InitSharedPtr(device, buffer); |
| 5656 | @@ -517,7 +525,7 @@ VkResult AcquireNextImageKHR(VkDevice device, |
| 5657 | // TODO(jessehall): Improve error reporting. Can we enumerate possible |
| 5658 | // errors and translate them to valid Vulkan result codes? |
| 5659 | ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), err); |
| 5660 | - return VK_ERROR_UNKNOWN; |
| 5661 | + return VK_ERROR_INITIALIZATION_FAILED; |
| 5662 | } |
| 5663 | |
| 5664 | uint32_t idx; |
| 5665 | @@ -582,20 +590,10 @@ VkResult QueuePresentKHR(VkQueue queue, VkPresentInfoKHR* present_info) { |
| 5666 | Swapchain& swapchain = |
| 5667 | *SwapchainFromHandle(present_info->swapchains[sc]); |
| 5668 | uint32_t image_idx = present_info->imageIndices[sc]; |
| 5669 | + Swapchain::Image& img = swapchain.images[image_idx]; |
| 5670 | VkResult result; |
| 5671 | int err; |
| 5672 | |
| 5673 | - if (image_idx >= swapchain.num_images || |
| 5674 | - !swapchain.images[image_idx].dequeued) { |
| 5675 | - ALOGE( |
| 5676 | - "invalid image index or image not acquired: swapchain=%u " |
| 5677 | - "index=%u", |
| 5678 | - sc, image_idx); |
| 5679 | - final_result = VK_ERROR_INVALID_VALUE; |
| 5680 | - continue; |
| 5681 | - } |
| 5682 | - Swapchain::Image& img = swapchain.images[image_idx]; |
| 5683 | - |
| 5684 | int fence = -1; |
| 5685 | result = driver_vtbl.QueueSignalNativeFenceANDROID(queue, &fence); |
| 5686 | if (result != VK_SUCCESS) { |
| 5687 | @@ -616,7 +614,7 @@ VkResult QueuePresentKHR(VkQueue queue, VkPresentInfoKHR* present_info) { |
| 5688 | // I guess? |
| 5689 | ALOGE("queueBuffer failed: %s (%d)", strerror(-err), err); |
| 5690 | if (final_result == VK_SUCCESS) |
| 5691 | - final_result = VK_ERROR_UNKNOWN; |
| 5692 | + final_result = VK_ERROR_INITIALIZATION_FAILED; |
| 5693 | continue; |
| 5694 | } |
| 5695 | |
| 5696 | diff --git a/vulkan/nulldrv/null_driver.cpp b/vulkan/nulldrv/null_driver.cpp |
| 5697 | index 8f65156..a7b66dd 100644 |
| 5698 | --- a/vulkan/nulldrv/null_driver.cpp |
| 5699 | +++ b/vulkan/nulldrv/null_driver.cpp |
| 5700 | @@ -66,16 +66,11 @@ namespace { |
| 5701 | // constants but also want implicit conversions to integral types. |
| 5702 | namespace HandleType { |
| 5703 | enum Enum { |
| 5704 | - kAttachmentView, |
| 5705 | kBufferView, |
| 5706 | kCmdPool, |
| 5707 | kDescriptorPool, |
| 5708 | kDescriptorSet, |
| 5709 | kDescriptorSetLayout, |
| 5710 | - kDynamicColorBlendState, |
| 5711 | - kDynamicDepthStencilState, |
| 5712 | - kDynamicRasterState, |
| 5713 | - kDynamicViewportState, |
| 5714 | kEvent, |
| 5715 | kFence, |
| 5716 | kFramebuffer, |
| 5717 | @@ -170,7 +165,8 @@ hwvulkan_device_t nulldrv_device = { |
| 5718 | .module = &HAL_MODULE_INFO_SYM.common, |
| 5719 | .close = CloseDevice, |
| 5720 | }, |
| 5721 | - .GetGlobalExtensionProperties = GetGlobalExtensionProperties, |
| 5722 | + .EnumerateInstanceExtensionProperties = |
| 5723 | + EnumerateInstanceExtensionProperties, |
| 5724 | .CreateInstance = CreateInstance, |
| 5725 | .GetInstanceProcAddr = GetInstanceProcAddr}; |
| 5726 | |
| 5727 | @@ -221,9 +217,9 @@ typename T::HandleType GetHandleToObject(const T* obj) { |
| 5728 | // ----------------------------------------------------------------------------- |
| 5729 | // Global |
| 5730 | |
| 5731 | -VkResult GetGlobalExtensionProperties(const char*, |
| 5732 | - uint32_t* count, |
| 5733 | - VkExtensionProperties*) { |
| 5734 | +VkResult EnumerateInstanceExtensionProperties(const char*, |
| 5735 | + uint32_t* count, |
| 5736 | + VkExtensionProperties*) { |
| 5737 | *count = 0; |
| 5738 | return VK_SUCCESS; |
| 5739 | } |
| 5740 | @@ -271,8 +267,8 @@ VkResult GetPhysicalDeviceProperties(VkPhysicalDevice, |
| 5741 | VkPhysicalDeviceProperties* properties) { |
| 5742 | properties->apiVersion = VK_API_VERSION; |
| 5743 | properties->driverVersion = VK_MAKE_VERSION(0, 0, 1); |
| 5744 | - properties->vendorId = 0xC0DE; |
| 5745 | - properties->deviceId = 0xCAFE; |
| 5746 | + properties->vendorId = 0; |
| 5747 | + properties->deviceId = 0; |
| 5748 | properties->deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER; |
| 5749 | strcpy(properties->deviceName, "Android Vulkan Null Driver"); |
| 5750 | memset(properties->pipelineCacheUUID, 0, |
| 5751 | @@ -280,6 +276,22 @@ VkResult GetPhysicalDeviceProperties(VkPhysicalDevice, |
| 5752 | return VK_SUCCESS; |
| 5753 | } |
| 5754 | |
| 5755 | +VkResult GetPhysicalDeviceQueueFamilyProperties( |
| 5756 | + VkPhysicalDevice, |
| 5757 | + uint32_t* count, |
| 5758 | + VkQueueFamilyProperties* properties) { |
| 5759 | + if (properties) { |
| 5760 | + if (*count < 1) |
| 5761 | + return VK_INCOMPLETE; |
| 5762 | + properties->queueFlags = |
| 5763 | + VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_DMA_BIT; |
| 5764 | + properties->queueCount = 1; |
| 5765 | + properties->supportsTimestamps = VK_FALSE; |
| 5766 | + } |
| 5767 | + *count = 1; |
| 5768 | + return VK_SUCCESS; |
| 5769 | +} |
| 5770 | + |
| 5771 | VkResult GetPhysicalDeviceMemoryProperties( |
| 5772 | VkPhysicalDevice, |
| 5773 | VkPhysicalDeviceMemoryProperties* properties) { |
| 5774 | @@ -289,7 +301,7 @@ VkResult GetPhysicalDeviceMemoryProperties( |
| 5775 | properties->memoryTypes[0].heapIndex = 0; |
| 5776 | properties->memoryHeapCount = 1; |
| 5777 | properties->memoryHeaps[0].size = kMaxDeviceMemory; |
| 5778 | - properties->memoryHeaps[0].flags = VK_MEMORY_HEAP_HOST_LOCAL; |
| 5779 | + properties->memoryHeaps[0].flags = VK_MEMORY_HEAP_HOST_LOCAL_BIT; |
| 5780 | return VK_SUCCESS; |
| 5781 | } |
| 5782 | |
| 5783 | @@ -470,7 +482,7 @@ VkResult CreateImage(VkDevice device, |
| 5784 | ALOGE("CreateImage: not yet implemented: type=%d format=%d mips=%u", |
| 5785 | create_info->imageType, create_info->format, |
| 5786 | create_info->mipLevels); |
| 5787 | - return VK_ERROR_UNAVAILABLE; |
| 5788 | + return VK_UNSUPPORTED; |
| 5789 | } |
| 5790 | |
| 5791 | VkDeviceSize size = |
| 5792 | @@ -512,13 +524,6 @@ VkResult DestroyImage(VkDevice device, VkImage image_handle) { |
| 5793 | // ----------------------------------------------------------------------------- |
| 5794 | // No-op types |
| 5795 | |
| 5796 | -VkResult CreateAttachmentView(VkDevice device, |
| 5797 | - const VkAttachmentViewCreateInfo*, |
| 5798 | - VkAttachmentView* view) { |
| 5799 | - *view = AllocHandle(device, HandleType::kAttachmentView); |
| 5800 | - return VK_SUCCESS; |
| 5801 | -} |
| 5802 | - |
| 5803 | VkResult CreateBufferView(VkDevice device, |
| 5804 | const VkBufferViewCreateInfo*, |
| 5805 | VkBufferView* view) { |
| 5806 | @@ -534,8 +539,6 @@ VkResult CreateCommandPool(VkDevice device, |
| 5807 | } |
| 5808 | |
| 5809 | VkResult CreateDescriptorPool(VkDevice device, |
| 5810 | - VkDescriptorPoolUsage, |
| 5811 | - uint32_t, |
| 5812 | const VkDescriptorPoolCreateInfo*, |
| 5813 | VkDescriptorPool* pool) { |
| 5814 | *pool = AllocHandle(device, HandleType::kDescriptorPool); |
| 5815 | @@ -562,35 +565,6 @@ VkResult CreateDescriptorSetLayout(VkDevice device, |
| 5816 | return VK_SUCCESS; |
| 5817 | } |
| 5818 | |
| 5819 | -VkResult CreateDynamicColorBlendState(VkDevice device, |
| 5820 | - const VkDynamicColorBlendStateCreateInfo*, |
| 5821 | - VkDynamicColorBlendState* state) { |
| 5822 | - *state = AllocHandle(device, HandleType::kDynamicColorBlendState); |
| 5823 | - return VK_SUCCESS; |
| 5824 | -} |
| 5825 | - |
| 5826 | -VkResult CreateDynamicDepthStencilState( |
| 5827 | - VkDevice device, |
| 5828 | - const VkDynamicDepthStencilStateCreateInfo*, |
| 5829 | - VkDynamicDepthStencilState* state) { |
| 5830 | - *state = AllocHandle(device, HandleType::kDynamicDepthStencilState); |
| 5831 | - return VK_SUCCESS; |
| 5832 | -} |
| 5833 | - |
| 5834 | -VkResult CreateDynamicRasterState(VkDevice device, |
| 5835 | - const VkDynamicRasterStateCreateInfo*, |
| 5836 | - VkDynamicRasterState* state) { |
| 5837 | - *state = AllocHandle(device, HandleType::kDynamicRasterState); |
| 5838 | - return VK_SUCCESS; |
| 5839 | -} |
| 5840 | - |
| 5841 | -VkResult CreateDynamicViewportState(VkDevice device, |
| 5842 | - const VkDynamicViewportStateCreateInfo*, |
| 5843 | - VkDynamicViewportState* state) { |
| 5844 | - *state = AllocHandle(device, HandleType::kDynamicViewportState); |
| 5845 | - return VK_SUCCESS; |
| 5846 | -} |
| 5847 | - |
| 5848 | VkResult CreateEvent(VkDevice device, |
| 5849 | const VkEventCreateInfo*, |
| 5850 | VkEvent* event) { |
| 5851 | @@ -712,16 +686,6 @@ VkResult QueueSignalNativeFenceANDROID(VkQueue, int* fence) { |
| 5852 | #pragma clang diagnostic push |
| 5853 | #pragma clang diagnostic ignored "-Wunused-parameter" |
| 5854 | |
| 5855 | -VkResult GetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount) { |
| 5856 | - ALOGV("TODO: vk%s", __FUNCTION__); |
| 5857 | - return VK_SUCCESS; |
| 5858 | -} |
| 5859 | - |
| 5860 | -VkResult GetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties) { |
| 5861 | - ALOGV("TODO: vk%s", __FUNCTION__); |
| 5862 | - return VK_SUCCESS; |
| 5863 | -} |
| 5864 | - |
| 5865 | VkResult GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { |
| 5866 | ALOGV("TODO: vk%s", __FUNCTION__); |
| 5867 | return VK_SUCCESS; |
| 5868 | @@ -742,17 +706,17 @@ VkResult GetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDevi |
| 5869 | return VK_SUCCESS; |
| 5870 | } |
| 5871 | |
| 5872 | -VkResult GetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { |
| 5873 | +VkResult EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { |
| 5874 | ALOGV("TODO: vk%s", __FUNCTION__); |
| 5875 | return VK_SUCCESS; |
| 5876 | } |
| 5877 | |
| 5878 | -VkResult GetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) { |
| 5879 | +VkResult EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties) { |
| 5880 | ALOGV("TODO: vk%s", __FUNCTION__); |
| 5881 | return VK_SUCCESS; |
| 5882 | } |
| 5883 | |
| 5884 | -VkResult GetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 5885 | +VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties) { |
| 5886 | ALOGV("TODO: vk%s", __FUNCTION__); |
| 5887 | return VK_SUCCESS; |
| 5888 | } |
| 5889 | @@ -894,10 +858,6 @@ VkResult DestroyImageView(VkDevice device, VkImageView imageView) { |
| 5890 | return VK_SUCCESS; |
| 5891 | } |
| 5892 | |
| 5893 | -VkResult DestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) { |
| 5894 | - return VK_SUCCESS; |
| 5895 | -} |
| 5896 | - |
| 5897 | VkResult DestroyShaderModule(VkDevice device, VkShaderModule shaderModule) { |
| 5898 | return VK_SUCCESS; |
| 5899 | } |
| 5900 | @@ -960,22 +920,6 @@ VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, ui |
| 5901 | return VK_SUCCESS; |
| 5902 | } |
| 5903 | |
| 5904 | -VkResult DestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) { |
| 5905 | - return VK_SUCCESS; |
| 5906 | -} |
| 5907 | - |
| 5908 | -VkResult DestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) { |
| 5909 | - return VK_SUCCESS; |
| 5910 | -} |
| 5911 | - |
| 5912 | -VkResult DestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) { |
| 5913 | - return VK_SUCCESS; |
| 5914 | -} |
| 5915 | - |
| 5916 | -VkResult DestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 5917 | - return VK_SUCCESS; |
| 5918 | -} |
| 5919 | - |
| 5920 | VkResult DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) { |
| 5921 | return VK_SUCCESS; |
| 5922 | } |
| 5923 | @@ -1014,16 +958,31 @@ VkResult ResetCommandBuffer(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags) |
| 5924 | void CmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { |
| 5925 | } |
| 5926 | |
| 5927 | -void CmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState) { |
| 5928 | +void CmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports) { |
| 5929 | +} |
| 5930 | + |
| 5931 | +void CmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { |
| 5932 | +} |
| 5933 | + |
| 5934 | +void CmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth) { |
| 5935 | +} |
| 5936 | + |
| 5937 | +void CmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) { |
| 5938 | +} |
| 5939 | + |
| 5940 | +void CmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]) { |
| 5941 | +} |
| 5942 | + |
| 5943 | +void CmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) { |
| 5944 | } |
| 5945 | |
| 5946 | -void CmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState) { |
| 5947 | +void CmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask) { |
| 5948 | } |
| 5949 | |
| 5950 | -void CmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState) { |
| 5951 | +void CmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask) { |
| 5952 | } |
| 5953 | |
| 5954 | -void CmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState) { |
| 5955 | +void CmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference) { |
| 5956 | } |
| 5957 | |
| 5958 | void CmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { |
| 5959 | @@ -1077,13 +1036,13 @@ void CmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize dest |
| 5960 | void CmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 5961 | } |
| 5962 | |
| 5963 | -void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 5964 | +void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 5965 | } |
| 5966 | |
| 5967 | void CmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects) { |
| 5968 | } |
| 5969 | |
| 5970 | -void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) { |
| 5971 | +void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects) { |
| 5972 | } |
| 5973 | |
| 5974 | void CmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) { |
| 5975 | diff --git a/vulkan/nulldrv/null_driver.h b/vulkan/nulldrv/null_driver.h |
| 5976 | index 6bfbda5..9c26f0e 100644 |
| 5977 | --- a/vulkan/nulldrv/null_driver.h |
| 5978 | +++ b/vulkan/nulldrv/null_driver.h |
| 5979 | @@ -31,8 +31,7 @@ VkResult DestroyInstance(VkInstance instance); |
| 5980 | VkResult EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); |
| 5981 | PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName); |
| 5982 | VkResult GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); |
| 5983 | -VkResult GetPhysicalDeviceQueueCount(VkPhysicalDevice physicalDevice, uint32_t* pCount); |
| 5984 | -VkResult GetPhysicalDeviceQueueProperties(VkPhysicalDevice physicalDevice, uint32_t count, VkPhysicalDeviceQueueProperties* pQueueProperties); |
| 5985 | +VkResult GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkQueueFamilyProperties* pQueueFamilyProperties); |
| 5986 | VkResult GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); |
| 5987 | PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName); |
| 5988 | VkResult GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); |
| 5989 | @@ -41,10 +40,10 @@ VkResult GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, |
| 5990 | VkResult GetPhysicalDeviceLimits(VkPhysicalDevice physicalDevice, VkPhysicalDeviceLimits* pLimits); |
| 5991 | VkResult CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice); |
| 5992 | VkResult DestroyDevice(VkDevice device); |
| 5993 | -VkResult GetGlobalExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 5994 | -VkResult GetGlobalLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties); |
| 5995 | -VkResult GetPhysicalDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties); |
| 5996 | -VkResult GetPhysicalDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 5997 | +VkResult EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 5998 | +VkResult EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties); |
| 5999 | +VkResult EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, VkLayerProperties* pProperties); |
| 6000 | +VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); |
| 6001 | VkResult GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); |
| 6002 | VkResult QueueSubmit(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence); |
| 6003 | VkResult QueueWaitIdle(VkQueue queue); |
| 6004 | @@ -91,8 +90,6 @@ VkResult DestroyImage(VkDevice device, VkImage image); |
| 6005 | VkResult GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); |
| 6006 | VkResult CreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView); |
| 6007 | VkResult DestroyImageView(VkDevice device, VkImageView imageView); |
| 6008 | -VkResult CreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView); |
| 6009 | -VkResult DestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView); |
| 6010 | VkResult CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); |
| 6011 | VkResult DestroyShaderModule(VkDevice device, VkShaderModule shaderModule); |
| 6012 | VkResult CreateShader(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); |
| 6013 | @@ -111,20 +108,12 @@ VkResult CreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, |
| 6014 | VkResult DestroySampler(VkDevice device, VkSampler sampler); |
| 6015 | VkResult CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); |
| 6016 | VkResult DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); |
| 6017 | -VkResult CreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); |
| 6018 | +VkResult CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); |
| 6019 | VkResult DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool); |
| 6020 | VkResult ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool); |
| 6021 | VkResult AllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount); |
| 6022 | VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets); |
| 6023 | VkResult UpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); |
| 6024 | -VkResult CreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState); |
| 6025 | -VkResult DestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState); |
| 6026 | -VkResult CreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState); |
| 6027 | -VkResult DestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState); |
| 6028 | -VkResult CreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); |
| 6029 | -VkResult DestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); |
| 6030 | -VkResult CreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); |
| 6031 | -VkResult DestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); |
| 6032 | VkResult CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); |
| 6033 | VkResult DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer); |
| 6034 | VkResult CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); |
| 6035 | @@ -139,10 +128,15 @@ VkResult BeginCommandBuffer(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* p |
| 6036 | VkResult EndCommandBuffer(VkCmdBuffer cmdBuffer); |
| 6037 | VkResult ResetCommandBuffer(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags); |
| 6038 | void CmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); |
| 6039 | -void CmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState dynamicViewportState); |
| 6040 | -void CmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState dynamicRasterState); |
| 6041 | -void CmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState dynamicColorBlendState); |
| 6042 | -void CmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState dynamicDepthStencilState); |
| 6043 | +void CmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports); |
| 6044 | +void CmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors); |
| 6045 | +void CmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth); |
| 6046 | +void CmdSetDepthBias(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias); |
| 6047 | +void CmdSetBlendConstants(VkCmdBuffer cmdBuffer, const float blendConst[4]); |
| 6048 | +void CmdSetDepthBounds(VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds); |
| 6049 | +void CmdSetStencilCompareMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilCompareMask); |
| 6050 | +void CmdSetStencilWriteMask(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilWriteMask); |
| 6051 | +void CmdSetStencilReference(VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, uint32_t stencilReference); |
| 6052 | void CmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); |
| 6053 | void CmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); |
| 6054 | void CmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); |
| 6055 | @@ -160,9 +154,9 @@ void CmdCopyImageToBuffer(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout |
| 6056 | void CmdUpdateBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData); |
| 6057 | void CmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data); |
| 6058 | void CmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 6059 | -void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 6060 | +void CmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); |
| 6061 | void CmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects); |
| 6062 | -void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects); |
| 6063 | +void CmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags aspectMask, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rectCount, const VkRect3D* pRects); |
| 6064 | void CmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); |
| 6065 | void CmdSetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask); |
| 6066 | void CmdResetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask); |
| 6067 | diff --git a/vulkan/nulldrv/null_driver_gen.cpp b/vulkan/nulldrv/null_driver_gen.cpp |
| 6068 | index 56ee49a..879ad32 100644 |
| 6069 | --- a/vulkan/nulldrv/null_driver_gen.cpp |
| 6070 | +++ b/vulkan/nulldrv/null_driver_gen.cpp |
| 6071 | @@ -46,18 +46,16 @@ const NameProcEntry kInstanceProcTbl[] = { |
| 6072 | // clang-format off |
| 6073 | {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(CreateDevice)}, |
| 6074 | {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(DestroyInstance)}, |
| 6075 | + {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(EnumerateDeviceExtensionProperties)}, |
| 6076 | + {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(EnumerateDeviceLayerProperties)}, |
| 6077 | {"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(EnumeratePhysicalDevices)}, |
| 6078 | {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(GetInstanceProcAddr)}, |
| 6079 | - {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceExtensionProperties)}, |
| 6080 | {"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceFeatures)}, |
| 6081 | {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceFormatProperties)}, |
| 6082 | {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceImageFormatProperties)}, |
| 6083 | - {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceLayerProperties)}, |
| 6084 | - {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceLimits)}, |
| 6085 | {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceMemoryProperties)}, |
| 6086 | {"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceProperties)}, |
| 6087 | - {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueCount)}, |
| 6088 | - {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueProperties)}, |
| 6089 | + {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceQueueFamilyProperties)}, |
| 6090 | {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSparseImageFormatProperties)}, |
| 6091 | // clang-format on |
| 6092 | }; |
| 6093 | @@ -72,10 +70,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 6094 | {"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(CmdBeginQuery)}, |
| 6095 | {"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(CmdBeginRenderPass)}, |
| 6096 | {"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDescriptorSets)}, |
| 6097 | - {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicColorBlendState)}, |
| 6098 | - {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicDepthStencilState)}, |
| 6099 | - {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicRasterState)}, |
| 6100 | - {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(CmdBindDynamicViewportState)}, |
| 6101 | {"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(CmdBindIndexBuffer)}, |
| 6102 | {"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(CmdBindPipeline)}, |
| 6103 | {"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(CmdBindVertexBuffers)}, |
| 6104 | @@ -105,11 +99,19 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 6105 | {"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(CmdResetEvent)}, |
| 6106 | {"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(CmdResetQueryPool)}, |
| 6107 | {"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(CmdResolveImage)}, |
| 6108 | + {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(CmdSetBlendConstants)}, |
| 6109 | + {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(CmdSetDepthBias)}, |
| 6110 | + {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(CmdSetDepthBounds)}, |
| 6111 | {"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(CmdSetEvent)}, |
| 6112 | + {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(CmdSetLineWidth)}, |
| 6113 | + {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(CmdSetScissor)}, |
| 6114 | + {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilCompareMask)}, |
| 6115 | + {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilReference)}, |
| 6116 | + {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(CmdSetStencilWriteMask)}, |
| 6117 | + {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(CmdSetViewport)}, |
| 6118 | {"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(CmdUpdateBuffer)}, |
| 6119 | {"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(CmdWaitEvents)}, |
| 6120 | {"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(CmdWriteTimestamp)}, |
| 6121 | - {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(CreateAttachmentView)}, |
| 6122 | {"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateBuffer)}, |
| 6123 | {"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(CreateBufferView)}, |
| 6124 | {"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateCommandBuffer)}, |
| 6125 | @@ -117,10 +119,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 6126 | {"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateComputePipelines)}, |
| 6127 | {"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(CreateDescriptorPool)}, |
| 6128 | {"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(CreateDescriptorSetLayout)}, |
| 6129 | - {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicColorBlendState)}, |
| 6130 | - {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicDepthStencilState)}, |
| 6131 | - {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicRasterState)}, |
| 6132 | - {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(CreateDynamicViewportState)}, |
| 6133 | {"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(CreateEvent)}, |
| 6134 | {"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(CreateFence)}, |
| 6135 | {"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(CreateFramebuffer)}, |
| 6136 | @@ -135,7 +133,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 6137 | {"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(CreateSemaphore)}, |
| 6138 | {"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(CreateShader)}, |
| 6139 | {"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(CreateShaderModule)}, |
| 6140 | - {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(DestroyAttachmentView)}, |
| 6141 | {"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyBuffer)}, |
| 6142 | {"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(DestroyBufferView)}, |
| 6143 | {"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyCommandBuffer)}, |
| 6144 | @@ -143,10 +140,6 @@ const NameProcEntry kDeviceProcTbl[] = { |
| 6145 | {"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(DestroyDescriptorPool)}, |
| 6146 | {"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(DestroyDescriptorSetLayout)}, |
| 6147 | {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice)}, |
| 6148 | - {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicColorBlendState)}, |
| 6149 | - {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicDepthStencilState)}, |
| 6150 | - {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicRasterState)}, |
| 6151 | - {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(DestroyDynamicViewportState)}, |
| 6152 | {"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(DestroyEvent)}, |
| 6153 | {"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(DestroyFence)}, |
| 6154 | {"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(DestroyFramebuffer)}, |
| 6155 | diff --git a/vulkan/tools/Android.mk b/vulkan/tools/Android.mk |
| 6156 | index 9ea5f14..31d6089 100644 |
| 6157 | --- a/vulkan/tools/Android.mk |
| 6158 | +++ b/vulkan/tools/Android.mk |
| 6159 | @@ -17,6 +17,7 @@ include $(CLEAR_VARS) |
| 6160 | |
| 6161 | LOCAL_CLANG := true |
| 6162 | LOCAL_CFLAGS := -std=c99 -fvisibility=hidden -fstrict-aliasing |
| 6163 | +LOCAL_CFLAGS += -DLOG_TAG=\"vkinfo\" |
| 6164 | LOCAL_CFLAGS += -Weverything -Werror -Wno-padded -Wno-undef -Wno-switch-enum |
| 6165 | LOCAL_CPPFLAGS := -std=c++1y \ |
| 6166 | -Wno-c++98-compat-pedantic \ |
| 6167 | diff --git a/vulkan/tools/vkinfo.cpp b/vulkan/tools/vkinfo.cpp |
| 6168 | index e1eb129..583e607 100644 |
| 6169 | --- a/vulkan/tools/vkinfo.cpp |
| 6170 | +++ b/vulkan/tools/vkinfo.cpp |
| 6171 | @@ -38,38 +38,14 @@ namespace { |
| 6172 | case VK_EVENT_SET: result_str = "VK_EVENT_SET"; break; |
| 6173 | case VK_EVENT_RESET: result_str = "VK_EVENT_RESET"; break; |
| 6174 | case VK_INCOMPLETE: result_str = "VK_INCOMPLETE"; break; |
| 6175 | - case VK_ERROR_UNKNOWN: result_str = "VK_ERROR_UNKNOWN"; break; |
| 6176 | - case VK_ERROR_UNAVAILABLE: result_str = "VK_ERROR_UNAVAILABLE"; break; |
| 6177 | - case VK_ERROR_INITIALIZATION_FAILED: result_str = "VK_ERROR_INITIALIZATION_FAILED"; break; |
| 6178 | case VK_ERROR_OUT_OF_HOST_MEMORY: result_str = "VK_ERROR_OUT_OF_HOST_MEMORY"; break; |
| 6179 | case VK_ERROR_OUT_OF_DEVICE_MEMORY: result_str = "VK_ERROR_OUT_OF_DEVICE_MEMORY"; break; |
| 6180 | - case VK_ERROR_DEVICE_ALREADY_CREATED: result_str = "VK_ERROR_DEVICE_ALREADY_CREATED"; break; |
| 6181 | + case VK_ERROR_INITIALIZATION_FAILED: result_str = "VK_ERROR_INITIALIZATION_FAILED"; break; |
| 6182 | case VK_ERROR_DEVICE_LOST: result_str = "VK_ERROR_DEVICE_LOST"; break; |
| 6183 | - case VK_ERROR_INVALID_POINTER: result_str = "VK_ERROR_INVALID_POINTER"; break; |
| 6184 | - case VK_ERROR_INVALID_VALUE: result_str = "VK_ERROR_INVALID_VALUE"; break; |
| 6185 | - case VK_ERROR_INVALID_HANDLE: result_str = "VK_ERROR_INVALID_HANDLE"; break; |
| 6186 | - case VK_ERROR_INVALID_ORDINAL: result_str = "VK_ERROR_INVALID_ORDINAL"; break; |
| 6187 | - case VK_ERROR_INVALID_MEMORY_SIZE: result_str = "VK_ERROR_INVALID_MEMORY_SIZE"; break; |
| 6188 | - case VK_ERROR_INVALID_EXTENSION: result_str = "VK_ERROR_INVALID_EXTENSION"; break; |
| 6189 | - case VK_ERROR_INVALID_FLAGS: result_str = "VK_ERROR_INVALID_FLAGS"; break; |
| 6190 | - case VK_ERROR_INVALID_ALIGNMENT: result_str = "VK_ERROR_INVALID_ALIGNMENT"; break; |
| 6191 | - case VK_ERROR_INVALID_FORMAT: result_str = "VK_ERROR_INVALID_FORMAT"; break; |
| 6192 | - case VK_ERROR_INVALID_IMAGE: result_str = "VK_ERROR_INVALID_IMAGE"; break; |
| 6193 | - case VK_ERROR_INVALID_DESCRIPTOR_SET_DATA: result_str = "VK_ERROR_INVALID_DESCRIPTOR_SET_DATA"; break; |
| 6194 | - case VK_ERROR_INVALID_QUEUE_TYPE: result_str = "VK_ERROR_INVALID_QUEUE_TYPE"; break; |
| 6195 | - case VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION: result_str = "VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION"; break; |
| 6196 | - case VK_ERROR_BAD_SHADER_CODE: result_str = "VK_ERROR_BAD_SHADER_CODE"; break; |
| 6197 | - case VK_ERROR_BAD_PIPELINE_DATA: result_str = "VK_ERROR_BAD_PIPELINE_DATA"; break; |
| 6198 | - case VK_ERROR_NOT_MAPPABLE: result_str = "VK_ERROR_NOT_MAPPABLE"; break; |
| 6199 | case VK_ERROR_MEMORY_MAP_FAILED: result_str = "VK_ERROR_MEMORY_MAP_FAILED"; break; |
| 6200 | - case VK_ERROR_MEMORY_UNMAP_FAILED: result_str = "VK_ERROR_MEMORY_UNMAP_FAILED"; break; |
| 6201 | - case VK_ERROR_INCOMPATIBLE_DEVICE: result_str = "VK_ERROR_INCOMPATIBLE_DEVICE"; break; |
| 6202 | + case VK_ERROR_LAYER_NOT_PRESENT: result_str = "VK_ERROR_LAYER_NOT_PRESENT"; break; |
| 6203 | + case VK_ERROR_EXTENSION_NOT_PRESENT: result_str = "VK_ERROR_EXTENSION_NOT_PRESENT"; break; |
| 6204 | case VK_ERROR_INCOMPATIBLE_DRIVER: result_str = "VK_ERROR_INCOMPATIBLE_DRIVER"; break; |
| 6205 | - case VK_ERROR_INCOMPLETE_COMMAND_BUFFER: result_str = "VK_ERROR_INCOMPLETE_COMMAND_BUFFER"; break; |
| 6206 | - case VK_ERROR_BUILDING_COMMAND_BUFFER: result_str = "VK_ERROR_BUILDING_COMMAND_BUFFER"; break; |
| 6207 | - case VK_ERROR_MEMORY_NOT_BOUND: result_str = "VK_ERROR_MEMORY_NOT_BOUND"; break; |
| 6208 | - case VK_ERROR_INCOMPATIBLE_QUEUE: result_str = "VK_ERROR_INCOMPATIBLE_QUEUE"; break; |
| 6209 | - case VK_ERROR_INVALID_LAYER: result_str = "VK_ERROR_INVALID_LAYER"; break; |
| 6210 | default: result_str = "<unknown VkResult>"; break; |
| 6211 | // clang-format on |
| 6212 | } |
| 6213 | @@ -94,6 +70,21 @@ const char* VkPhysicalDeviceTypeStr(VkPhysicalDeviceType type) { |
| 6214 | } |
| 6215 | } |
| 6216 | |
| 6217 | +const char* VkQueueFlagBitStr(VkQueueFlagBits bit) { |
| 6218 | + switch (bit) { |
| 6219 | + case VK_QUEUE_GRAPHICS_BIT: |
| 6220 | + return "GRAPHICS"; |
| 6221 | + case VK_QUEUE_COMPUTE_BIT: |
| 6222 | + return "COMPUTE"; |
| 6223 | + case VK_QUEUE_DMA_BIT: |
| 6224 | + return "DMA"; |
| 6225 | + case VK_QUEUE_SPARSE_MEMMGR_BIT: |
| 6226 | + return "SPARSE"; |
| 6227 | + case VK_QUEUE_EXTENDED_BIT: |
| 6228 | + return "EXT"; |
| 6229 | + } |
| 6230 | +} |
| 6231 | + |
| 6232 | void DumpPhysicalDevice(uint32_t idx, VkPhysicalDevice pdev) { |
| 6233 | VkResult result; |
| 6234 | std::ostringstream strbuf; |
| 6235 | @@ -113,8 +104,8 @@ void DumpPhysicalDevice(uint32_t idx, VkPhysicalDevice pdev) { |
| 6236 | if (result != VK_SUCCESS) |
| 6237 | die("vkGetPhysicalDeviceMemoryProperties", result); |
| 6238 | for (uint32_t heap = 0; heap < mem_props.memoryHeapCount; heap++) { |
| 6239 | - if ((mem_props.memoryHeaps[heap].flags & VK_MEMORY_HEAP_HOST_LOCAL) != |
| 6240 | - 0) |
| 6241 | + if ((mem_props.memoryHeaps[heap].flags & |
| 6242 | + VK_MEMORY_HEAP_HOST_LOCAL_BIT) != 0) |
| 6243 | strbuf << "HOST_LOCAL"; |
| 6244 | printf(" Heap %u: 0x%" PRIx64 " %s\n", heap, |
| 6245 | mem_props.memoryHeaps[heap].size, strbuf.str().c_str()); |
| 6246 | @@ -137,10 +128,37 @@ void DumpPhysicalDevice(uint32_t idx, VkPhysicalDevice pdev) { |
| 6247 | strbuf << " WRITE_COMBINED"; |
| 6248 | if ((flags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) != 0) |
| 6249 | strbuf << " LAZILY_ALLOCATED"; |
| 6250 | - printf(" Type %u: %s\n", type, strbuf.str().c_str()); |
| 6251 | + printf(" Type %u: %s\n", type, strbuf.str().c_str()); |
| 6252 | strbuf.str(std::string()); |
| 6253 | } |
| 6254 | } |
| 6255 | + |
| 6256 | + uint32_t num_queue_families; |
| 6257 | + result = vkGetPhysicalDeviceQueueFamilyProperties(pdev, &num_queue_families, |
| 6258 | + nullptr); |
| 6259 | + if (result != VK_SUCCESS) |
| 6260 | + die("vkGetPhysicalDeviceQueueFamilyProperties (count)", result); |
| 6261 | + std::vector<VkQueueFamilyProperties> queue_family_properties( |
| 6262 | + num_queue_families); |
| 6263 | + result = vkGetPhysicalDeviceQueueFamilyProperties( |
| 6264 | + pdev, &num_queue_families, queue_family_properties.data()); |
| 6265 | + if (result != VK_SUCCESS) |
| 6266 | + die("vkGetPhysicalDeviceQueueFamilyProperties (values)", result); |
| 6267 | + for (uint32_t family = 0; family < num_queue_families; family++) { |
| 6268 | + const VkQueueFamilyProperties& qprops = queue_family_properties[family]; |
| 6269 | + const char* sep = ""; |
| 6270 | + int bit, queue_flags = static_cast<int>(qprops.queueFlags); |
| 6271 | + while ((bit = __builtin_ffs(queue_flags)) != 0) { |
| 6272 | + VkQueueFlagBits flag = VkQueueFlagBits(1 << (bit - 1)); |
| 6273 | + strbuf << sep << VkQueueFlagBitStr(flag); |
| 6274 | + queue_flags &= ~flag; |
| 6275 | + sep = "+"; |
| 6276 | + } |
| 6277 | + printf(" Queue Family %u: %2ux %s timestamps:%s\n", family, |
| 6278 | + qprops.queueCount, strbuf.str().c_str(), |
| 6279 | + qprops.supportsTimestamps ? "YES" : "NO"); |
| 6280 | + strbuf.str(std::string()); |
| 6281 | + } |
| 6282 | } |
| 6283 | |
| 6284 | } // namespace |
| 6285 | @@ -184,9 +202,7 @@ int main(int /*argc*/, char const* /*argv*/ []) { |
| 6286 | for (uint32_t i = 0; i < physical_devices.size(); i++) |
| 6287 | DumpPhysicalDevice(i, physical_devices[i]); |
| 6288 | |
| 6289 | - result = vkDestroyInstance(instance); |
| 6290 | - if (result != VK_SUCCESS) |
| 6291 | - die("vkDestroyInstance", result); |
| 6292 | + vkDestroyInstance(instance); |
| 6293 | |
| 6294 | return 0; |
| 6295 | } |
| 6296 | -- |
| 6297 | 2.6.0.rc2.230.g3dd15c0 |
| 6298 | |