1 // 2 // Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved. 3 // 4 // Permission is hereby granted, free of charge, to any person obtaining a copy 5 // of this software and associated documentation files (the "Software"), to deal 6 // in the Software without restriction, including without limitation the rights 7 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 // copies of the Software, and to permit persons to whom the Software is 9 // furnished to do so, subject to the following conditions: 10 // 11 // The above copyright notice and this permission notice shall be included in 12 // all copies or substantial portions of the Software. 13 // 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 // THE SOFTWARE. 21 // 22 23 #include "Common.h" 24 #include "Constants.h" 25 26 const int RESULT_EXCEPTION = -1000; 27 const int RESULT_ERROR_COMMAND_LINE = -1; 28 const int RESULT_ERROR_SOURCE_FILE = -2; 29 const int RESULT_ERROR_FORMAT = -3; 30 const int RESULT_ERROR_VULKAN = -4; 31 32 const char* VMA_FUNCTION_NAMES[] = { 33 "vmaCreatePool", 34 "vmaDestroyPool", 35 "vmaSetAllocationUserData", 36 "vmaCreateBuffer", 37 "vmaDestroyBuffer", 38 "vmaCreateImage", 39 "vmaDestroyImage", 40 "vmaFreeMemory", 41 "vmaFreeMemoryPages", 42 "vmaCreateLostAllocation", 43 "vmaAllocateMemory", 44 "vmaAllocateMemoryPages", 45 "vmaAllocateMemoryForBuffer", 46 "vmaAllocateMemoryForImage", 47 "vmaMapMemory", 48 "vmaUnmapMemory", 49 "vmaFlushAllocation", 50 "vmaInvalidateAllocation", 51 "vmaTouchAllocation", 52 "vmaGetAllocationInfo", 53 "vmaMakePoolAllocationsLost", 54 "vmaResizeAllocation", 55 "vmaDefragmentationBegin", 56 "vmaDefragmentationEnd", 57 "vmaSetPoolName", 58 }; 59 static_assert( 60 _countof(VMA_FUNCTION_NAMES) == (size_t)VMA_FUNCTION::Count, 61 "VMA_FUNCTION_NAMES array doesn't match VMA_FUNCTION enum."); 62 63 const char* VMA_POOL_CREATE_FLAG_NAMES[] = { 64 "VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT", 65 "VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT", 66 "VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT", 67 }; 68 const uint32_t VMA_POOL_CREATE_FLAG_VALUES[] = { 69 VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT, 70 VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT, 71 VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT, 72 }; 73 const size_t VMA_POOL_CREATE_FLAG_COUNT = _countof(VMA_POOL_CREATE_FLAG_NAMES); 74 static_assert( 75 _countof(VMA_POOL_CREATE_FLAG_NAMES) == _countof(VMA_POOL_CREATE_FLAG_VALUES), 76 "VMA_POOL_CREATE_FLAG_NAMES array doesn't match VMA_POOL_CREATE_FLAG_VALUES."); 77 78 const char* VK_BUFFER_CREATE_FLAG_NAMES[] = { 79 "VK_BUFFER_CREATE_SPARSE_BINDING_BIT", 80 "VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT", 81 "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT", 82 "VK_BUFFER_CREATE_PROTECTED_BIT", 83 }; 84 const uint32_t VK_BUFFER_CREATE_FLAG_VALUES[] = { 85 VK_BUFFER_CREATE_SPARSE_BINDING_BIT, 86 VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, 87 VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, 88 VK_BUFFER_CREATE_PROTECTED_BIT, 89 }; 90 const size_t VK_BUFFER_CREATE_FLAG_COUNT = _countof(VK_BUFFER_CREATE_FLAG_NAMES); 91 static_assert( 92 _countof(VK_BUFFER_CREATE_FLAG_NAMES) == _countof(VK_BUFFER_CREATE_FLAG_VALUES), 93 "VK_BUFFER_CREATE_FLAG_NAMES array doesn't match VK_BUFFER_CREATE_FLAG_VALUES."); 94 95 const char* VK_BUFFER_USAGE_FLAG_NAMES[] = { 96 "VK_BUFFER_USAGE_TRANSFER_SRC_BIT", 97 "VK_BUFFER_USAGE_TRANSFER_DST_BIT", 98 "VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT", 99 "VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT", 100 "VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT", 101 "VK_BUFFER_USAGE_STORAGE_BUFFER_BIT", 102 "VK_BUFFER_USAGE_INDEX_BUFFER_BIT", 103 "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT", 104 "VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT", 105 "VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT", 106 //"VK_BUFFER_USAGE_RAYTRACING_BIT_NVX", 107 }; 108 const uint32_t VK_BUFFER_USAGE_FLAG_VALUES[] = { 109 VK_BUFFER_USAGE_TRANSFER_SRC_BIT, 110 VK_BUFFER_USAGE_TRANSFER_DST_BIT, 111 VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, 112 VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, 113 VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, 114 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, 115 VK_BUFFER_USAGE_INDEX_BUFFER_BIT, 116 VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, 117 VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, 118 VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT, 119 //VK_BUFFER_USAGE_RAYTRACING_BIT_NVX, 120 }; 121 const size_t VK_BUFFER_USAGE_FLAG_COUNT = _countof(VK_BUFFER_USAGE_FLAG_NAMES); 122 static_assert( 123 _countof(VK_BUFFER_USAGE_FLAG_NAMES) == _countof(VK_BUFFER_USAGE_FLAG_VALUES), 124 "VK_BUFFER_USAGE_FLAG_NAMES array doesn't match VK_BUFFER_USAGE_FLAG_VALUES."); 125 126 const char* VK_SHARING_MODE_NAMES[] = { 127 "VK_SHARING_MODE_EXCLUSIVE", 128 "VK_SHARING_MODE_CONCURRENT", 129 }; 130 const size_t VK_SHARING_MODE_COUNT = _countof(VK_SHARING_MODE_NAMES); 131 132 const char* VK_IMAGE_CREATE_FLAG_NAMES[] = { 133 "VK_IMAGE_CREATE_SPARSE_BINDING_BIT", 134 "VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT", 135 "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT", 136 "VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT", 137 "VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT", 138 "VK_IMAGE_CREATE_ALIAS_BIT", 139 "VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT", 140 "VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT", 141 "VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT", 142 "VK_IMAGE_CREATE_EXTENDED_USAGE_BIT", 143 "VK_IMAGE_CREATE_PROTECTED_BIT", 144 "VK_IMAGE_CREATE_DISJOINT_BIT", 145 //"VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV", 146 "VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT", 147 }; 148 const uint32_t VK_IMAGE_CREATE_FLAG_VALUES[] = { 149 VK_IMAGE_CREATE_SPARSE_BINDING_BIT, 150 VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, 151 VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, 152 VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, 153 VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, 154 VK_IMAGE_CREATE_ALIAS_BIT, 155 VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, 156 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, 157 VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, 158 VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, 159 VK_IMAGE_CREATE_PROTECTED_BIT, 160 VK_IMAGE_CREATE_DISJOINT_BIT, 161 //VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, 162 VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, 163 }; 164 const size_t VK_IMAGE_CREATE_FLAG_COUNT = _countof(VK_IMAGE_CREATE_FLAG_NAMES); 165 static_assert( 166 _countof(VK_IMAGE_CREATE_FLAG_NAMES) == _countof(VK_IMAGE_CREATE_FLAG_VALUES), 167 "VK_IMAGE_CREATE_FLAG_NAMES array doesn't match VK_IMAGE_CREATE_FLAG_VALUES."); 168 169 const char* VK_IMAGE_TYPE_NAMES[] = { 170 "VK_IMAGE_TYPE_1D", 171 "VK_IMAGE_TYPE_2D", 172 "VK_IMAGE_TYPE_3D", 173 }; 174 const size_t VK_IMAGE_TYPE_COUNT = _countof(VK_IMAGE_TYPE_NAMES); 175 176 const char* VK_FORMAT_NAMES[] = { 177 "VK_FORMAT_UNDEFINED", 178 "VK_FORMAT_R4G4_UNORM_PACK8", 179 "VK_FORMAT_R4G4B4A4_UNORM_PACK16", 180 "VK_FORMAT_B4G4R4A4_UNORM_PACK16", 181 "VK_FORMAT_R5G6B5_UNORM_PACK16", 182 "VK_FORMAT_B5G6R5_UNORM_PACK16", 183 "VK_FORMAT_R5G5B5A1_UNORM_PACK16", 184 "VK_FORMAT_B5G5R5A1_UNORM_PACK16", 185 "VK_FORMAT_A1R5G5B5_UNORM_PACK16", 186 "VK_FORMAT_R8_UNORM", 187 "VK_FORMAT_R8_SNORM", 188 "VK_FORMAT_R8_USCALED", 189 "VK_FORMAT_R8_SSCALED", 190 "VK_FORMAT_R8_UINT", 191 "VK_FORMAT_R8_SINT", 192 "VK_FORMAT_R8_SRGB", 193 "VK_FORMAT_R8G8_UNORM", 194 "VK_FORMAT_R8G8_SNORM", 195 "VK_FORMAT_R8G8_USCALED", 196 "VK_FORMAT_R8G8_SSCALED", 197 "VK_FORMAT_R8G8_UINT", 198 "VK_FORMAT_R8G8_SINT", 199 "VK_FORMAT_R8G8_SRGB", 200 "VK_FORMAT_R8G8B8_UNORM", 201 "VK_FORMAT_R8G8B8_SNORM", 202 "VK_FORMAT_R8G8B8_USCALED", 203 "VK_FORMAT_R8G8B8_SSCALED", 204 "VK_FORMAT_R8G8B8_UINT", 205 "VK_FORMAT_R8G8B8_SINT", 206 "VK_FORMAT_R8G8B8_SRGB", 207 "VK_FORMAT_B8G8R8_UNORM", 208 "VK_FORMAT_B8G8R8_SNORM", 209 "VK_FORMAT_B8G8R8_USCALED", 210 "VK_FORMAT_B8G8R8_SSCALED", 211 "VK_FORMAT_B8G8R8_UINT", 212 "VK_FORMAT_B8G8R8_SINT", 213 "VK_FORMAT_B8G8R8_SRGB", 214 "VK_FORMAT_R8G8B8A8_UNORM", 215 "VK_FORMAT_R8G8B8A8_SNORM", 216 "VK_FORMAT_R8G8B8A8_USCALED", 217 "VK_FORMAT_R8G8B8A8_SSCALED", 218 "VK_FORMAT_R8G8B8A8_UINT", 219 "VK_FORMAT_R8G8B8A8_SINT", 220 "VK_FORMAT_R8G8B8A8_SRGB", 221 "VK_FORMAT_B8G8R8A8_UNORM", 222 "VK_FORMAT_B8G8R8A8_SNORM", 223 "VK_FORMAT_B8G8R8A8_USCALED", 224 "VK_FORMAT_B8G8R8A8_SSCALED", 225 "VK_FORMAT_B8G8R8A8_UINT", 226 "VK_FORMAT_B8G8R8A8_SINT", 227 "VK_FORMAT_B8G8R8A8_SRGB", 228 "VK_FORMAT_A8B8G8R8_UNORM_PACK32", 229 "VK_FORMAT_A8B8G8R8_SNORM_PACK32", 230 "VK_FORMAT_A8B8G8R8_USCALED_PACK32", 231 "VK_FORMAT_A8B8G8R8_SSCALED_PACK32", 232 "VK_FORMAT_A8B8G8R8_UINT_PACK32", 233 "VK_FORMAT_A8B8G8R8_SINT_PACK32", 234 "VK_FORMAT_A8B8G8R8_SRGB_PACK32", 235 "VK_FORMAT_A2R10G10B10_UNORM_PACK32", 236 "VK_FORMAT_A2R10G10B10_SNORM_PACK32", 237 "VK_FORMAT_A2R10G10B10_USCALED_PACK32", 238 "VK_FORMAT_A2R10G10B10_SSCALED_PACK32", 239 "VK_FORMAT_A2R10G10B10_UINT_PACK32", 240 "VK_FORMAT_A2R10G10B10_SINT_PACK32", 241 "VK_FORMAT_A2B10G10R10_UNORM_PACK32", 242 "VK_FORMAT_A2B10G10R10_SNORM_PACK32", 243 "VK_FORMAT_A2B10G10R10_USCALED_PACK32", 244 "VK_FORMAT_A2B10G10R10_SSCALED_PACK32", 245 "VK_FORMAT_A2B10G10R10_UINT_PACK32", 246 "VK_FORMAT_A2B10G10R10_SINT_PACK32", 247 "VK_FORMAT_R16_UNORM", 248 "VK_FORMAT_R16_SNORM", 249 "VK_FORMAT_R16_USCALED", 250 "VK_FORMAT_R16_SSCALED", 251 "VK_FORMAT_R16_UINT", 252 "VK_FORMAT_R16_SINT", 253 "VK_FORMAT_R16_SFLOAT", 254 "VK_FORMAT_R16G16_UNORM", 255 "VK_FORMAT_R16G16_SNORM", 256 "VK_FORMAT_R16G16_USCALED", 257 "VK_FORMAT_R16G16_SSCALED", 258 "VK_FORMAT_R16G16_UINT", 259 "VK_FORMAT_R16G16_SINT", 260 "VK_FORMAT_R16G16_SFLOAT", 261 "VK_FORMAT_R16G16B16_UNORM", 262 "VK_FORMAT_R16G16B16_SNORM", 263 "VK_FORMAT_R16G16B16_USCALED", 264 "VK_FORMAT_R16G16B16_SSCALED", 265 "VK_FORMAT_R16G16B16_UINT", 266 "VK_FORMAT_R16G16B16_SINT", 267 "VK_FORMAT_R16G16B16_SFLOAT", 268 "VK_FORMAT_R16G16B16A16_UNORM", 269 "VK_FORMAT_R16G16B16A16_SNORM", 270 "VK_FORMAT_R16G16B16A16_USCALED", 271 "VK_FORMAT_R16G16B16A16_SSCALED", 272 "VK_FORMAT_R16G16B16A16_UINT", 273 "VK_FORMAT_R16G16B16A16_SINT", 274 "VK_FORMAT_R16G16B16A16_SFLOAT", 275 "VK_FORMAT_R32_UINT", 276 "VK_FORMAT_R32_SINT", 277 "VK_FORMAT_R32_SFLOAT", 278 "VK_FORMAT_R32G32_UINT", 279 "VK_FORMAT_R32G32_SINT", 280 "VK_FORMAT_R32G32_SFLOAT", 281 "VK_FORMAT_R32G32B32_UINT", 282 "VK_FORMAT_R32G32B32_SINT", 283 "VK_FORMAT_R32G32B32_SFLOAT", 284 "VK_FORMAT_R32G32B32A32_UINT", 285 "VK_FORMAT_R32G32B32A32_SINT", 286 "VK_FORMAT_R32G32B32A32_SFLOAT", 287 "VK_FORMAT_R64_UINT", 288 "VK_FORMAT_R64_SINT", 289 "VK_FORMAT_R64_SFLOAT", 290 "VK_FORMAT_R64G64_UINT", 291 "VK_FORMAT_R64G64_SINT", 292 "VK_FORMAT_R64G64_SFLOAT", 293 "VK_FORMAT_R64G64B64_UINT", 294 "VK_FORMAT_R64G64B64_SINT", 295 "VK_FORMAT_R64G64B64_SFLOAT", 296 "VK_FORMAT_R64G64B64A64_UINT", 297 "VK_FORMAT_R64G64B64A64_SINT", 298 "VK_FORMAT_R64G64B64A64_SFLOAT", 299 "VK_FORMAT_B10G11R11_UFLOAT_PACK32", 300 "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32", 301 "VK_FORMAT_D16_UNORM", 302 "VK_FORMAT_X8_D24_UNORM_PACK32", 303 "VK_FORMAT_D32_SFLOAT", 304 "VK_FORMAT_S8_UINT", 305 "VK_FORMAT_D16_UNORM_S8_UINT", 306 "VK_FORMAT_D24_UNORM_S8_UINT", 307 "VK_FORMAT_D32_SFLOAT_S8_UINT", 308 "VK_FORMAT_BC1_RGB_UNORM_BLOCK", 309 "VK_FORMAT_BC1_RGB_SRGB_BLOCK", 310 "VK_FORMAT_BC1_RGBA_UNORM_BLOCK", 311 "VK_FORMAT_BC1_RGBA_SRGB_BLOCK", 312 "VK_FORMAT_BC2_UNORM_BLOCK", 313 "VK_FORMAT_BC2_SRGB_BLOCK", 314 "VK_FORMAT_BC3_UNORM_BLOCK", 315 "VK_FORMAT_BC3_SRGB_BLOCK", 316 "VK_FORMAT_BC4_UNORM_BLOCK", 317 "VK_FORMAT_BC4_SNORM_BLOCK", 318 "VK_FORMAT_BC5_UNORM_BLOCK", 319 "VK_FORMAT_BC5_SNORM_BLOCK", 320 "VK_FORMAT_BC6H_UFLOAT_BLOCK", 321 "VK_FORMAT_BC6H_SFLOAT_BLOCK", 322 "VK_FORMAT_BC7_UNORM_BLOCK", 323 "VK_FORMAT_BC7_SRGB_BLOCK", 324 "VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK", 325 "VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK", 326 "VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK", 327 "VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK", 328 "VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK", 329 "VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK", 330 "VK_FORMAT_EAC_R11_UNORM_BLOCK", 331 "VK_FORMAT_EAC_R11_SNORM_BLOCK", 332 "VK_FORMAT_EAC_R11G11_UNORM_BLOCK", 333 "VK_FORMAT_EAC_R11G11_SNORM_BLOCK", 334 "VK_FORMAT_ASTC_4x4_UNORM_BLOCK", 335 "VK_FORMAT_ASTC_4x4_SRGB_BLOCK", 336 "VK_FORMAT_ASTC_5x4_UNORM_BLOCK", 337 "VK_FORMAT_ASTC_5x4_SRGB_BLOCK", 338 "VK_FORMAT_ASTC_5x5_UNORM_BLOCK", 339 "VK_FORMAT_ASTC_5x5_SRGB_BLOCK", 340 "VK_FORMAT_ASTC_6x5_UNORM_BLOCK", 341 "VK_FORMAT_ASTC_6x5_SRGB_BLOCK", 342 "VK_FORMAT_ASTC_6x6_UNORM_BLOCK", 343 "VK_FORMAT_ASTC_6x6_SRGB_BLOCK", 344 "VK_FORMAT_ASTC_8x5_UNORM_BLOCK", 345 "VK_FORMAT_ASTC_8x5_SRGB_BLOCK", 346 "VK_FORMAT_ASTC_8x6_UNORM_BLOCK", 347 "VK_FORMAT_ASTC_8x6_SRGB_BLOCK", 348 "VK_FORMAT_ASTC_8x8_UNORM_BLOCK", 349 "VK_FORMAT_ASTC_8x8_SRGB_BLOCK", 350 "VK_FORMAT_ASTC_10x5_UNORM_BLOCK", 351 "VK_FORMAT_ASTC_10x5_SRGB_BLOCK", 352 "VK_FORMAT_ASTC_10x6_UNORM_BLOCK", 353 "VK_FORMAT_ASTC_10x6_SRGB_BLOCK", 354 "VK_FORMAT_ASTC_10x8_UNORM_BLOCK", 355 "VK_FORMAT_ASTC_10x8_SRGB_BLOCK", 356 "VK_FORMAT_ASTC_10x10_UNORM_BLOCK", 357 "VK_FORMAT_ASTC_10x10_SRGB_BLOCK", 358 "VK_FORMAT_ASTC_12x10_UNORM_BLOCK", 359 "VK_FORMAT_ASTC_12x10_SRGB_BLOCK", 360 "VK_FORMAT_ASTC_12x12_UNORM_BLOCK", 361 "VK_FORMAT_ASTC_12x12_SRGB_BLOCK", 362 "VK_FORMAT_G8B8G8R8_422_UNORM", 363 "VK_FORMAT_B8G8R8G8_422_UNORM", 364 "VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM", 365 "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM", 366 "VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM", 367 "VK_FORMAT_G8_B8R8_2PLANE_422_UNORM", 368 "VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM", 369 "VK_FORMAT_R10X6_UNORM_PACK16", 370 "VK_FORMAT_R10X6G10X6_UNORM_2PACK16", 371 "VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16", 372 "VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16", 373 "VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16", 374 "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16", 375 "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16", 376 "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16", 377 "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16", 378 "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16", 379 "VK_FORMAT_R12X4_UNORM_PACK16", 380 "VK_FORMAT_R12X4G12X4_UNORM_2PACK16", 381 "VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16", 382 "VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16", 383 "VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16", 384 "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16", 385 "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16", 386 "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16", 387 "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16", 388 "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16", 389 "VK_FORMAT_G16B16G16R16_422_UNORM", 390 "VK_FORMAT_B16G16R16G16_422_UNORM", 391 "VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM", 392 "VK_FORMAT_G16_B16R16_2PLANE_420_UNORM", 393 "VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM", 394 "VK_FORMAT_G16_B16R16_2PLANE_422_UNORM", 395 "VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM", 396 "VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG", 397 "VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG", 398 "VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG", 399 "VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG", 400 "VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG", 401 "VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG", 402 "VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG", 403 "VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG", 404 }; 405 const uint32_t VK_FORMAT_VALUES[] = { 406 VK_FORMAT_UNDEFINED, 407 VK_FORMAT_R4G4_UNORM_PACK8, 408 VK_FORMAT_R4G4B4A4_UNORM_PACK16, 409 VK_FORMAT_B4G4R4A4_UNORM_PACK16, 410 VK_FORMAT_R5G6B5_UNORM_PACK16, 411 VK_FORMAT_B5G6R5_UNORM_PACK16, 412 VK_FORMAT_R5G5B5A1_UNORM_PACK16, 413 VK_FORMAT_B5G5R5A1_UNORM_PACK16, 414 VK_FORMAT_A1R5G5B5_UNORM_PACK16, 415 VK_FORMAT_R8_UNORM, 416 VK_FORMAT_R8_SNORM, 417 VK_FORMAT_R8_USCALED, 418 VK_FORMAT_R8_SSCALED, 419 VK_FORMAT_R8_UINT, 420 VK_FORMAT_R8_SINT, 421 VK_FORMAT_R8_SRGB, 422 VK_FORMAT_R8G8_UNORM, 423 VK_FORMAT_R8G8_SNORM, 424 VK_FORMAT_R8G8_USCALED, 425 VK_FORMAT_R8G8_SSCALED, 426 VK_FORMAT_R8G8_UINT, 427 VK_FORMAT_R8G8_SINT, 428 VK_FORMAT_R8G8_SRGB, 429 VK_FORMAT_R8G8B8_UNORM, 430 VK_FORMAT_R8G8B8_SNORM, 431 VK_FORMAT_R8G8B8_USCALED, 432 VK_FORMAT_R8G8B8_SSCALED, 433 VK_FORMAT_R8G8B8_UINT, 434 VK_FORMAT_R8G8B8_SINT, 435 VK_FORMAT_R8G8B8_SRGB, 436 VK_FORMAT_B8G8R8_UNORM, 437 VK_FORMAT_B8G8R8_SNORM, 438 VK_FORMAT_B8G8R8_USCALED, 439 VK_FORMAT_B8G8R8_SSCALED, 440 VK_FORMAT_B8G8R8_UINT, 441 VK_FORMAT_B8G8R8_SINT, 442 VK_FORMAT_B8G8R8_SRGB, 443 VK_FORMAT_R8G8B8A8_UNORM, 444 VK_FORMAT_R8G8B8A8_SNORM, 445 VK_FORMAT_R8G8B8A8_USCALED, 446 VK_FORMAT_R8G8B8A8_SSCALED, 447 VK_FORMAT_R8G8B8A8_UINT, 448 VK_FORMAT_R8G8B8A8_SINT, 449 VK_FORMAT_R8G8B8A8_SRGB, 450 VK_FORMAT_B8G8R8A8_UNORM, 451 VK_FORMAT_B8G8R8A8_SNORM, 452 VK_FORMAT_B8G8R8A8_USCALED, 453 VK_FORMAT_B8G8R8A8_SSCALED, 454 VK_FORMAT_B8G8R8A8_UINT, 455 VK_FORMAT_B8G8R8A8_SINT, 456 VK_FORMAT_B8G8R8A8_SRGB, 457 VK_FORMAT_A8B8G8R8_UNORM_PACK32, 458 VK_FORMAT_A8B8G8R8_SNORM_PACK32, 459 VK_FORMAT_A8B8G8R8_USCALED_PACK32, 460 VK_FORMAT_A8B8G8R8_SSCALED_PACK32, 461 VK_FORMAT_A8B8G8R8_UINT_PACK32, 462 VK_FORMAT_A8B8G8R8_SINT_PACK32, 463 VK_FORMAT_A8B8G8R8_SRGB_PACK32, 464 VK_FORMAT_A2R10G10B10_UNORM_PACK32, 465 VK_FORMAT_A2R10G10B10_SNORM_PACK32, 466 VK_FORMAT_A2R10G10B10_USCALED_PACK32, 467 VK_FORMAT_A2R10G10B10_SSCALED_PACK32, 468 VK_FORMAT_A2R10G10B10_UINT_PACK32, 469 VK_FORMAT_A2R10G10B10_SINT_PACK32, 470 VK_FORMAT_A2B10G10R10_UNORM_PACK32, 471 VK_FORMAT_A2B10G10R10_SNORM_PACK32, 472 VK_FORMAT_A2B10G10R10_USCALED_PACK32, 473 VK_FORMAT_A2B10G10R10_SSCALED_PACK32, 474 VK_FORMAT_A2B10G10R10_UINT_PACK32, 475 VK_FORMAT_A2B10G10R10_SINT_PACK32, 476 VK_FORMAT_R16_UNORM, 477 VK_FORMAT_R16_SNORM, 478 VK_FORMAT_R16_USCALED, 479 VK_FORMAT_R16_SSCALED, 480 VK_FORMAT_R16_UINT, 481 VK_FORMAT_R16_SINT, 482 VK_FORMAT_R16_SFLOAT, 483 VK_FORMAT_R16G16_UNORM, 484 VK_FORMAT_R16G16_SNORM, 485 VK_FORMAT_R16G16_USCALED, 486 VK_FORMAT_R16G16_SSCALED, 487 VK_FORMAT_R16G16_UINT, 488 VK_FORMAT_R16G16_SINT, 489 VK_FORMAT_R16G16_SFLOAT, 490 VK_FORMAT_R16G16B16_UNORM, 491 VK_FORMAT_R16G16B16_SNORM, 492 VK_FORMAT_R16G16B16_USCALED, 493 VK_FORMAT_R16G16B16_SSCALED, 494 VK_FORMAT_R16G16B16_UINT, 495 VK_FORMAT_R16G16B16_SINT, 496 VK_FORMAT_R16G16B16_SFLOAT, 497 VK_FORMAT_R16G16B16A16_UNORM, 498 VK_FORMAT_R16G16B16A16_SNORM, 499 VK_FORMAT_R16G16B16A16_USCALED, 500 VK_FORMAT_R16G16B16A16_SSCALED, 501 VK_FORMAT_R16G16B16A16_UINT, 502 VK_FORMAT_R16G16B16A16_SINT, 503 VK_FORMAT_R16G16B16A16_SFLOAT, 504 VK_FORMAT_R32_UINT, 505 VK_FORMAT_R32_SINT, 506 VK_FORMAT_R32_SFLOAT, 507 VK_FORMAT_R32G32_UINT, 508 VK_FORMAT_R32G32_SINT, 509 VK_FORMAT_R32G32_SFLOAT, 510 VK_FORMAT_R32G32B32_UINT, 511 VK_FORMAT_R32G32B32_SINT, 512 VK_FORMAT_R32G32B32_SFLOAT, 513 VK_FORMAT_R32G32B32A32_UINT, 514 VK_FORMAT_R32G32B32A32_SINT, 515 VK_FORMAT_R32G32B32A32_SFLOAT, 516 VK_FORMAT_R64_UINT, 517 VK_FORMAT_R64_SINT, 518 VK_FORMAT_R64_SFLOAT, 519 VK_FORMAT_R64G64_UINT, 520 VK_FORMAT_R64G64_SINT, 521 VK_FORMAT_R64G64_SFLOAT, 522 VK_FORMAT_R64G64B64_UINT, 523 VK_FORMAT_R64G64B64_SINT, 524 VK_FORMAT_R64G64B64_SFLOAT, 525 VK_FORMAT_R64G64B64A64_UINT, 526 VK_FORMAT_R64G64B64A64_SINT, 527 VK_FORMAT_R64G64B64A64_SFLOAT, 528 VK_FORMAT_B10G11R11_UFLOAT_PACK32, 529 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, 530 VK_FORMAT_D16_UNORM, 531 VK_FORMAT_X8_D24_UNORM_PACK32, 532 VK_FORMAT_D32_SFLOAT, 533 VK_FORMAT_S8_UINT, 534 VK_FORMAT_D16_UNORM_S8_UINT, 535 VK_FORMAT_D24_UNORM_S8_UINT, 536 VK_FORMAT_D32_SFLOAT_S8_UINT, 537 VK_FORMAT_BC1_RGB_UNORM_BLOCK, 538 VK_FORMAT_BC1_RGB_SRGB_BLOCK, 539 VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 540 VK_FORMAT_BC1_RGBA_SRGB_BLOCK, 541 VK_FORMAT_BC2_UNORM_BLOCK, 542 VK_FORMAT_BC2_SRGB_BLOCK, 543 VK_FORMAT_BC3_UNORM_BLOCK, 544 VK_FORMAT_BC3_SRGB_BLOCK, 545 VK_FORMAT_BC4_UNORM_BLOCK, 546 VK_FORMAT_BC4_SNORM_BLOCK, 547 VK_FORMAT_BC5_UNORM_BLOCK, 548 VK_FORMAT_BC5_SNORM_BLOCK, 549 VK_FORMAT_BC6H_UFLOAT_BLOCK, 550 VK_FORMAT_BC6H_SFLOAT_BLOCK, 551 VK_FORMAT_BC7_UNORM_BLOCK, 552 VK_FORMAT_BC7_SRGB_BLOCK, 553 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, 554 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, 555 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, 556 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, 557 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, 558 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, 559 VK_FORMAT_EAC_R11_UNORM_BLOCK, 560 VK_FORMAT_EAC_R11_SNORM_BLOCK, 561 VK_FORMAT_EAC_R11G11_UNORM_BLOCK, 562 VK_FORMAT_EAC_R11G11_SNORM_BLOCK, 563 VK_FORMAT_ASTC_4x4_UNORM_BLOCK, 564 VK_FORMAT_ASTC_4x4_SRGB_BLOCK, 565 VK_FORMAT_ASTC_5x4_UNORM_BLOCK, 566 VK_FORMAT_ASTC_5x4_SRGB_BLOCK, 567 VK_FORMAT_ASTC_5x5_UNORM_BLOCK, 568 VK_FORMAT_ASTC_5x5_SRGB_BLOCK, 569 VK_FORMAT_ASTC_6x5_UNORM_BLOCK, 570 VK_FORMAT_ASTC_6x5_SRGB_BLOCK, 571 VK_FORMAT_ASTC_6x6_UNORM_BLOCK, 572 VK_FORMAT_ASTC_6x6_SRGB_BLOCK, 573 VK_FORMAT_ASTC_8x5_UNORM_BLOCK, 574 VK_FORMAT_ASTC_8x5_SRGB_BLOCK, 575 VK_FORMAT_ASTC_8x6_UNORM_BLOCK, 576 VK_FORMAT_ASTC_8x6_SRGB_BLOCK, 577 VK_FORMAT_ASTC_8x8_UNORM_BLOCK, 578 VK_FORMAT_ASTC_8x8_SRGB_BLOCK, 579 VK_FORMAT_ASTC_10x5_UNORM_BLOCK, 580 VK_FORMAT_ASTC_10x5_SRGB_BLOCK, 581 VK_FORMAT_ASTC_10x6_UNORM_BLOCK, 582 VK_FORMAT_ASTC_10x6_SRGB_BLOCK, 583 VK_FORMAT_ASTC_10x8_UNORM_BLOCK, 584 VK_FORMAT_ASTC_10x8_SRGB_BLOCK, 585 VK_FORMAT_ASTC_10x10_UNORM_BLOCK, 586 VK_FORMAT_ASTC_10x10_SRGB_BLOCK, 587 VK_FORMAT_ASTC_12x10_UNORM_BLOCK, 588 VK_FORMAT_ASTC_12x10_SRGB_BLOCK, 589 VK_FORMAT_ASTC_12x12_UNORM_BLOCK, 590 VK_FORMAT_ASTC_12x12_SRGB_BLOCK, 591 VK_FORMAT_G8B8G8R8_422_UNORM, 592 VK_FORMAT_B8G8R8G8_422_UNORM, 593 VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, 594 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, 595 VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, 596 VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, 597 VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, 598 VK_FORMAT_R10X6_UNORM_PACK16, 599 VK_FORMAT_R10X6G10X6_UNORM_2PACK16, 600 VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, 601 VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, 602 VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, 603 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, 604 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, 605 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, 606 VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, 607 VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, 608 VK_FORMAT_R12X4_UNORM_PACK16, 609 VK_FORMAT_R12X4G12X4_UNORM_2PACK16, 610 VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, 611 VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, 612 VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, 613 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, 614 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, 615 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, 616 VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, 617 VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, 618 VK_FORMAT_G16B16G16R16_422_UNORM, 619 VK_FORMAT_B16G16R16G16_422_UNORM, 620 VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, 621 VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, 622 VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, 623 VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, 624 VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, 625 VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, 626 VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, 627 VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, 628 VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, 629 VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, 630 VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, 631 VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, 632 VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, 633 }; 634 const size_t VK_FORMAT_COUNT = _countof(VK_FORMAT_NAMES); 635 static_assert( 636 _countof(VK_FORMAT_NAMES) == _countof(VK_FORMAT_VALUES), 637 "VK_FORMAT_NAMES array doesn't match VK_FORMAT_VALUES."); 638 639 const char* VK_SAMPLE_COUNT_NAMES[] = { 640 "VK_SAMPLE_COUNT_1_BIT", 641 "VK_SAMPLE_COUNT_2_BIT", 642 "VK_SAMPLE_COUNT_4_BIT", 643 "VK_SAMPLE_COUNT_8_BIT", 644 "VK_SAMPLE_COUNT_16_BIT", 645 "VK_SAMPLE_COUNT_32_BIT", 646 "VK_SAMPLE_COUNT_64_BIT", 647 }; 648 const uint32_t VK_SAMPLE_COUNT_VALUES[] = { 649 VK_SAMPLE_COUNT_1_BIT, 650 VK_SAMPLE_COUNT_2_BIT, 651 VK_SAMPLE_COUNT_4_BIT, 652 VK_SAMPLE_COUNT_8_BIT, 653 VK_SAMPLE_COUNT_16_BIT, 654 VK_SAMPLE_COUNT_32_BIT, 655 VK_SAMPLE_COUNT_64_BIT, 656 }; 657 const size_t VK_SAMPLE_COUNT_COUNT = _countof(VK_SAMPLE_COUNT_NAMES); 658 static_assert( 659 _countof(VK_SAMPLE_COUNT_NAMES) == _countof(VK_SAMPLE_COUNT_VALUES), 660 "VK_SAMPLE_COUNT_NAMES array doesn't match VK_SAMPLE_COUNT_VALUES."); 661 662 const char* VK_IMAGE_TILING_NAMES[] = { 663 "VK_IMAGE_TILING_OPTIMAL", 664 "VK_IMAGE_TILING_LINEAR", 665 }; 666 const size_t VK_IMAGE_TILING_COUNT = _countof(VK_IMAGE_TILING_NAMES); 667 668 const char* VK_IMAGE_USAGE_FLAG_NAMES[] = { 669 "VK_IMAGE_USAGE_TRANSFER_SRC_BIT", 670 "VK_IMAGE_USAGE_TRANSFER_DST_BIT", 671 "VK_IMAGE_USAGE_SAMPLED_BIT", 672 "VK_IMAGE_USAGE_STORAGE_BIT", 673 "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT", 674 "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT", 675 "VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT", 676 "VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT", 677 //"VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV", 678 }; 679 const uint32_t VK_IMAGE_USAGE_FLAG_VALUES[] = { 680 VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 681 VK_IMAGE_USAGE_TRANSFER_DST_BIT, 682 VK_IMAGE_USAGE_SAMPLED_BIT, 683 VK_IMAGE_USAGE_STORAGE_BIT, 684 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, 685 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 686 VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, 687 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, 688 //VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, 689 }; 690 const size_t VK_IMAGE_USAGE_FLAG_COUNT = _countof(VK_IMAGE_USAGE_FLAG_NAMES); 691 static_assert( 692 _countof(VK_IMAGE_USAGE_FLAG_NAMES) == _countof(VK_IMAGE_USAGE_FLAG_VALUES), 693 "VK_IMAGE_USAGE_FLAG_NAMES array doesn't match VK_IMAGE_USAGE_FLAG_VALUES."); 694 695 const char* VK_IMAGE_LAYOUT_NAMES[] = { 696 "VK_IMAGE_LAYOUT_UNDEFINED", 697 "VK_IMAGE_LAYOUT_GENERAL", 698 "VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL", 699 "VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL", 700 "VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL", 701 "VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL", 702 "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL", 703 "VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL", 704 "VK_IMAGE_LAYOUT_PREINITIALIZED", 705 "VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL", 706 "VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL", 707 "VK_IMAGE_LAYOUT_PRESENT_SRC_KHR", 708 "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR", 709 //"VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV", 710 }; 711 const uint32_t VK_IMAGE_LAYOUT_VALUES[] = { 712 VK_IMAGE_LAYOUT_UNDEFINED, 713 VK_IMAGE_LAYOUT_GENERAL, 714 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, 715 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, 716 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, 717 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 718 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 719 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 720 VK_IMAGE_LAYOUT_PREINITIALIZED, 721 VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, 722 VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, 723 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 724 VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, 725 //VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV, 726 }; 727 const size_t VK_IMAGE_LAYOUT_COUNT = _countof(VK_IMAGE_LAYOUT_NAMES); 728 static_assert( 729 _countof(VK_IMAGE_LAYOUT_NAMES) == _countof(VK_IMAGE_LAYOUT_VALUES), 730 "VK_IMAGE_LAYOUT_NAMES array doesn't match VK_IMAGE_LAYOUT_VALUES."); 731 732 const char* VMA_ALLOCATION_CREATE_FLAG_NAMES[] = { 733 "VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT", 734 "VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT", 735 "VMA_ALLOCATION_CREATE_MAPPED_BIT", 736 "VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT", 737 "VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT", 738 "VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT", 739 "VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT", 740 "VMA_ALLOCATION_CREATE_DONT_BIND_BIT", 741 "VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT", 742 "VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT", 743 "VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT", 744 "VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT", 745 }; 746 const uint32_t VMA_ALLOCATION_CREATE_FLAG_VALUES[] = { 747 VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT, 748 VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT, 749 VMA_ALLOCATION_CREATE_MAPPED_BIT, 750 VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT, 751 VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT, 752 VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT, 753 VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT, 754 VMA_ALLOCATION_CREATE_DONT_BIND_BIT, 755 VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT, 756 VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT, 757 VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT, 758 VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT, 759 }; 760 const size_t VMA_ALLOCATION_CREATE_FLAG_COUNT = _countof(VMA_ALLOCATION_CREATE_FLAG_NAMES); 761 static_assert( 762 _countof(VMA_ALLOCATION_CREATE_FLAG_NAMES) == _countof(VMA_ALLOCATION_CREATE_FLAG_VALUES), 763 "VMA_ALLOCATION_CREATE_FLAG_NAMES array doesn't match VMA_ALLOCATION_CREATE_FLAG_VALUES."); 764 765 const char* VMA_MEMORY_USAGE_NAMES[] = { 766 "VMA_MEMORY_USAGE_UNKNOWN", 767 "VMA_MEMORY_USAGE_GPU_ONLY", 768 "VMA_MEMORY_USAGE_CPU_ONLY", 769 "VMA_MEMORY_USAGE_CPU_TO_GPU", 770 "VMA_MEMORY_USAGE_GPU_TO_CPU", 771 "VMA_MEMORY_USAGE_CPU_COPY", 772 "VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED", 773 }; 774 const size_t VMA_MEMORY_USAGE_COUNT = _countof(VMA_MEMORY_USAGE_NAMES); 775 776 const char* VK_MEMORY_PROPERTY_FLAG_NAMES[] = { 777 "VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT", 778 "VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT", 779 "VK_MEMORY_PROPERTY_HOST_COHERENT_BIT", 780 "VK_MEMORY_PROPERTY_HOST_CACHED_BIT", 781 "VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT", 782 "VK_MEMORY_PROPERTY_PROTECTED_BIT", 783 }; 784 const uint32_t VK_MEMORY_PROPERTY_FLAG_VALUES[] = { 785 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, 786 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, 787 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, 788 VK_MEMORY_PROPERTY_HOST_CACHED_BIT, 789 VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT, 790 VK_MEMORY_PROPERTY_PROTECTED_BIT, 791 }; 792 const size_t VK_MEMORY_PROPERTY_FLAG_COUNT = _countof(VK_MEMORY_PROPERTY_FLAG_NAMES); 793 static_assert( 794 _countof(VK_MEMORY_PROPERTY_FLAG_NAMES) == _countof(VK_MEMORY_PROPERTY_FLAG_VALUES), 795 "VK_MEMORY_PROPERTY_FLAG_NAMES array doesn't match VK_MEMORY_PROPERTY_FLAG_VALUES."); 796