1 // Copyright (C) 2018 The Android Open Source Project 2 // Copyright (C) 2018 Google Inc. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 16 // Autogenerated module goldfish_vk_extension_structs_guest 17 // (impl) generated by android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/genvk.py -registry android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/vk.xml cereal -o android/android-emugl/host/libs/libOpenglRender/vulkan/cereal 18 // Please do not modify directly; 19 // re-run android/scripts/generate-vulkan-sources.sh, 20 // or directly from Python by defining: 21 // VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml 22 // CEREAL_OUTPUT_DIR: Where to put the generated sources. 23 // python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR 24 25 #include "goldfish_vk_extension_structs_guest.h" 26 27 28 29 namespace goldfish_vk { 30 31 #ifdef VK_VERSION_1_0 32 #endif 33 #ifdef VK_VERSION_1_1 34 #endif 35 #ifdef VK_KHR_surface 36 #endif 37 #ifdef VK_KHR_swapchain 38 #endif 39 #ifdef VK_KHR_display 40 #endif 41 #ifdef VK_KHR_display_swapchain 42 #endif 43 #ifdef VK_KHR_xlib_surface 44 #endif 45 #ifdef VK_KHR_xcb_surface 46 #endif 47 #ifdef VK_KHR_wayland_surface 48 #endif 49 #ifdef VK_KHR_mir_surface 50 #endif 51 #ifdef VK_KHR_android_surface 52 #endif 53 #ifdef VK_KHR_win32_surface 54 #endif 55 #ifdef VK_KHR_sampler_mirror_clamp_to_edge 56 #endif 57 #ifdef VK_KHR_multiview 58 #endif 59 #ifdef VK_KHR_get_physical_device_properties2 60 #endif 61 #ifdef VK_KHR_device_group 62 #endif 63 #ifdef VK_KHR_shader_draw_parameters 64 #endif 65 #ifdef VK_KHR_maintenance1 66 #endif 67 #ifdef VK_KHR_device_group_creation 68 #endif 69 #ifdef VK_KHR_external_memory_capabilities 70 #endif 71 #ifdef VK_KHR_external_memory 72 #endif 73 #ifdef VK_KHR_external_memory_win32 74 #endif 75 #ifdef VK_KHR_external_memory_fd 76 #endif 77 #ifdef VK_KHR_win32_keyed_mutex 78 #endif 79 #ifdef VK_KHR_external_semaphore_capabilities 80 #endif 81 #ifdef VK_KHR_external_semaphore 82 #endif 83 #ifdef VK_KHR_external_semaphore_win32 84 #endif 85 #ifdef VK_KHR_external_semaphore_fd 86 #endif 87 #ifdef VK_KHR_push_descriptor 88 #endif 89 #ifdef VK_KHR_16bit_storage 90 #endif 91 #ifdef VK_KHR_incremental_present 92 #endif 93 #ifdef VK_KHR_descriptor_update_template 94 #endif 95 #ifdef VK_KHR_create_renderpass2 96 #endif 97 #ifdef VK_KHR_shared_presentable_image 98 #endif 99 #ifdef VK_KHR_external_fence_capabilities 100 #endif 101 #ifdef VK_KHR_external_fence 102 #endif 103 #ifdef VK_KHR_external_fence_win32 104 #endif 105 #ifdef VK_KHR_external_fence_fd 106 #endif 107 #ifdef VK_KHR_maintenance2 108 #endif 109 #ifdef VK_KHR_get_surface_capabilities2 110 #endif 111 #ifdef VK_KHR_variable_pointers 112 #endif 113 #ifdef VK_KHR_get_display_properties2 114 #endif 115 #ifdef VK_KHR_dedicated_allocation 116 #endif 117 #ifdef VK_KHR_storage_buffer_storage_class 118 #endif 119 #ifdef VK_KHR_relaxed_block_layout 120 #endif 121 #ifdef VK_KHR_get_memory_requirements2 122 #endif 123 #ifdef VK_KHR_image_format_list 124 #endif 125 #ifdef VK_KHR_sampler_ycbcr_conversion 126 #endif 127 #ifdef VK_KHR_bind_memory2 128 #endif 129 #ifdef VK_KHR_maintenance3 130 #endif 131 #ifdef VK_KHR_draw_indirect_count 132 #endif 133 #ifdef VK_KHR_8bit_storage 134 #endif 135 #ifdef VK_KHR_shader_float16_int8 136 #endif 137 #ifdef VK_ANDROID_native_buffer 138 #endif 139 #ifdef VK_EXT_debug_report 140 #endif 141 #ifdef VK_NV_glsl_shader 142 #endif 143 #ifdef VK_EXT_depth_range_unrestricted 144 #endif 145 #ifdef VK_IMG_filter_cubic 146 #endif 147 #ifdef VK_AMD_rasterization_order 148 #endif 149 #ifdef VK_AMD_shader_trinary_minmax 150 #endif 151 #ifdef VK_AMD_shader_explicit_vertex_parameter 152 #endif 153 #ifdef VK_EXT_debug_marker 154 #endif 155 #ifdef VK_AMD_gcn_shader 156 #endif 157 #ifdef VK_NV_dedicated_allocation 158 #endif 159 #ifdef VK_AMD_draw_indirect_count 160 #endif 161 #ifdef VK_AMD_negative_viewport_height 162 #endif 163 #ifdef VK_AMD_gpu_shader_half_float 164 #endif 165 #ifdef VK_AMD_shader_ballot 166 #endif 167 #ifdef VK_AMD_texture_gather_bias_lod 168 #endif 169 #ifdef VK_AMD_shader_info 170 #endif 171 #ifdef VK_AMD_shader_image_load_store_lod 172 #endif 173 #ifdef VK_IMG_format_pvrtc 174 #endif 175 #ifdef VK_NV_external_memory_capabilities 176 #endif 177 #ifdef VK_NV_external_memory 178 #endif 179 #ifdef VK_NV_external_memory_win32 180 #endif 181 #ifdef VK_NV_win32_keyed_mutex 182 #endif 183 #ifdef VK_EXT_validation_flags 184 #endif 185 #ifdef VK_NN_vi_surface 186 #endif 187 #ifdef VK_EXT_shader_subgroup_ballot 188 #endif 189 #ifdef VK_EXT_shader_subgroup_vote 190 #endif 191 #ifdef VK_EXT_conditional_rendering 192 #endif 193 #ifdef VK_NVX_device_generated_commands 194 #endif 195 #ifdef VK_NV_clip_space_w_scaling 196 #endif 197 #ifdef VK_EXT_direct_mode_display 198 #endif 199 #ifdef VK_EXT_acquire_xlib_display 200 #endif 201 #ifdef VK_EXT_display_surface_counter 202 #endif 203 #ifdef VK_EXT_display_control 204 #endif 205 #ifdef VK_GOOGLE_display_timing 206 #endif 207 #ifdef VK_NV_sample_mask_override_coverage 208 #endif 209 #ifdef VK_NV_geometry_shader_passthrough 210 #endif 211 #ifdef VK_NV_viewport_array2 212 #endif 213 #ifdef VK_NVX_multiview_per_view_attributes 214 #endif 215 #ifdef VK_NV_viewport_swizzle 216 #endif 217 #ifdef VK_EXT_discard_rectangles 218 #endif 219 #ifdef VK_EXT_conservative_rasterization 220 #endif 221 #ifdef VK_EXT_swapchain_colorspace 222 #endif 223 #ifdef VK_EXT_hdr_metadata 224 #endif 225 #ifdef VK_MVK_ios_surface 226 #endif 227 #ifdef VK_MVK_macos_surface 228 #endif 229 #ifdef VK_EXT_external_memory_dma_buf 230 #endif 231 #ifdef VK_EXT_queue_family_foreign 232 #endif 233 #ifdef VK_EXT_debug_utils 234 #endif 235 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 236 #endif 237 #ifdef VK_EXT_sampler_filter_minmax 238 #endif 239 #ifdef VK_AMD_gpu_shader_int16 240 #endif 241 #ifdef VK_AMD_mixed_attachment_samples 242 #endif 243 #ifdef VK_AMD_shader_fragment_mask 244 #endif 245 #ifdef VK_EXT_shader_stencil_export 246 #endif 247 #ifdef VK_EXT_sample_locations 248 #endif 249 #ifdef VK_EXT_blend_operation_advanced 250 #endif 251 #ifdef VK_NV_fragment_coverage_to_color 252 #endif 253 #ifdef VK_NV_framebuffer_mixed_samples 254 #endif 255 #ifdef VK_NV_fill_rectangle 256 #endif 257 #ifdef VK_EXT_post_depth_coverage 258 #endif 259 #ifdef VK_EXT_validation_cache 260 #endif 261 #ifdef VK_EXT_descriptor_indexing 262 #endif 263 #ifdef VK_EXT_shader_viewport_index_layer 264 #endif 265 #ifdef VK_EXT_global_priority 266 #endif 267 #ifdef VK_EXT_external_memory_host 268 #endif 269 #ifdef VK_AMD_buffer_marker 270 #endif 271 #ifdef VK_AMD_shader_core_properties 272 #endif 273 #ifdef VK_EXT_vertex_attribute_divisor 274 #endif 275 #ifdef VK_NV_shader_subgroup_partitioned 276 #endif 277 #ifdef VK_NV_device_diagnostic_checkpoints 278 #endif 279 #ifdef VK_GOOGLE_address_space 280 #endif 281 #ifdef VK_GOOGLE_color_buffer 282 #endif 283 #ifdef VK_GOOGLE_sized_descriptor_update_template 284 #endif 285 #ifdef VK_GOOGLE_async_command_buffers 286 #endif 287 #ifdef VK_GOOGLE_create_resources_with_requirements 288 #endif 289 #ifdef VK_GOOGLE_address_space_info 290 #endif 291 #ifdef VK_GOOGLE_free_memory_sync 292 #endif 293 #ifdef VK_GOOGLE_async_queue_submit 294 #endif goldfish_vk_struct_type(const void * structExtension)295uint32_t goldfish_vk_struct_type( 296 const void* structExtension) 297 { 298 const uint32_t asStructType = *(reinterpret_cast<const uint32_t*>(structExtension)); 299 return asStructType; 300 } 301 goldfish_vk_extension_struct_size(const void * structExtension)302size_t goldfish_vk_extension_struct_size( 303 const void* structExtension) 304 { 305 if (!structExtension) 306 { 307 return (size_t)0; 308 } 309 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension); 310 switch(structType) 311 { 312 #ifdef VK_VERSION_1_1 313 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: 314 { 315 return sizeof(VkPhysicalDeviceSubgroupProperties); 316 } 317 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: 318 { 319 return sizeof(VkPhysicalDevice16BitStorageFeatures); 320 } 321 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: 322 { 323 return sizeof(VkMemoryDedicatedRequirements); 324 } 325 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: 326 { 327 return sizeof(VkMemoryDedicatedAllocateInfo); 328 } 329 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: 330 { 331 return sizeof(VkMemoryAllocateFlagsInfo); 332 } 333 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 334 { 335 return sizeof(VkDeviceGroupRenderPassBeginInfo); 336 } 337 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 338 { 339 return sizeof(VkDeviceGroupCommandBufferBeginInfo); 340 } 341 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: 342 { 343 return sizeof(VkDeviceGroupSubmitInfo); 344 } 345 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: 346 { 347 return sizeof(VkDeviceGroupBindSparseInfo); 348 } 349 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: 350 { 351 return sizeof(VkBindBufferMemoryDeviceGroupInfo); 352 } 353 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: 354 { 355 return sizeof(VkBindImageMemoryDeviceGroupInfo); 356 } 357 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: 358 { 359 return sizeof(VkDeviceGroupDeviceCreateInfo); 360 } 361 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: 362 { 363 return sizeof(VkPhysicalDeviceFeatures2); 364 } 365 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: 366 { 367 return sizeof(VkPhysicalDevicePointClippingProperties); 368 } 369 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: 370 { 371 return sizeof(VkRenderPassInputAttachmentAspectCreateInfo); 372 } 373 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: 374 { 375 return sizeof(VkImageViewUsageCreateInfo); 376 } 377 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: 378 { 379 return sizeof(VkPipelineTessellationDomainOriginStateCreateInfo); 380 } 381 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: 382 { 383 return sizeof(VkRenderPassMultiviewCreateInfo); 384 } 385 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: 386 { 387 return sizeof(VkPhysicalDeviceMultiviewFeatures); 388 } 389 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: 390 { 391 return sizeof(VkPhysicalDeviceMultiviewProperties); 392 } 393 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: 394 { 395 return sizeof(VkPhysicalDeviceVariablePointerFeatures); 396 } 397 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: 398 { 399 return sizeof(VkPhysicalDeviceProtectedMemoryFeatures); 400 } 401 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: 402 { 403 return sizeof(VkPhysicalDeviceProtectedMemoryProperties); 404 } 405 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: 406 { 407 return sizeof(VkProtectedSubmitInfo); 408 } 409 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: 410 { 411 return sizeof(VkSamplerYcbcrConversionInfo); 412 } 413 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: 414 { 415 return sizeof(VkBindImagePlaneMemoryInfo); 416 } 417 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: 418 { 419 return sizeof(VkImagePlaneMemoryRequirementsInfo); 420 } 421 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: 422 { 423 return sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures); 424 } 425 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: 426 { 427 return sizeof(VkSamplerYcbcrConversionImageFormatProperties); 428 } 429 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: 430 { 431 return sizeof(VkPhysicalDeviceExternalImageFormatInfo); 432 } 433 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: 434 { 435 return sizeof(VkExternalImageFormatProperties); 436 } 437 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: 438 { 439 return sizeof(VkPhysicalDeviceIDProperties); 440 } 441 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: 442 { 443 return sizeof(VkExternalMemoryImageCreateInfo); 444 } 445 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: 446 { 447 return sizeof(VkExternalMemoryBufferCreateInfo); 448 } 449 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: 450 { 451 return sizeof(VkExportMemoryAllocateInfo); 452 } 453 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: 454 { 455 return sizeof(VkExportFenceCreateInfo); 456 } 457 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: 458 { 459 return sizeof(VkExportSemaphoreCreateInfo); 460 } 461 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: 462 { 463 return sizeof(VkPhysicalDeviceMaintenance3Properties); 464 } 465 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES: 466 { 467 return sizeof(VkPhysicalDeviceShaderDrawParameterFeatures); 468 } 469 #endif 470 #ifdef VK_KHR_swapchain 471 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: 472 { 473 return sizeof(VkImageSwapchainCreateInfoKHR); 474 } 475 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: 476 { 477 return sizeof(VkBindImageMemorySwapchainInfoKHR); 478 } 479 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: 480 { 481 return sizeof(VkDeviceGroupPresentInfoKHR); 482 } 483 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: 484 { 485 return sizeof(VkDeviceGroupSwapchainCreateInfoKHR); 486 } 487 #endif 488 #ifdef VK_KHR_display_swapchain 489 case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: 490 { 491 return sizeof(VkDisplayPresentInfoKHR); 492 } 493 #endif 494 #ifdef VK_KHR_external_memory_win32 495 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 496 { 497 return sizeof(VkImportMemoryWin32HandleInfoKHR); 498 } 499 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 500 { 501 return sizeof(VkExportMemoryWin32HandleInfoKHR); 502 } 503 #endif 504 #ifdef VK_KHR_external_memory_fd 505 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: 506 { 507 return sizeof(VkImportMemoryFdInfoKHR); 508 } 509 #endif 510 #ifdef VK_KHR_win32_keyed_mutex 511 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: 512 { 513 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR); 514 } 515 #endif 516 #ifdef VK_KHR_external_semaphore_win32 517 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: 518 { 519 return sizeof(VkExportSemaphoreWin32HandleInfoKHR); 520 } 521 case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: 522 { 523 return sizeof(VkD3D12FenceSubmitInfoKHR); 524 } 525 #endif 526 #ifdef VK_KHR_push_descriptor 527 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: 528 { 529 return sizeof(VkPhysicalDevicePushDescriptorPropertiesKHR); 530 } 531 #endif 532 #ifdef VK_KHR_incremental_present 533 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: 534 { 535 return sizeof(VkPresentRegionsKHR); 536 } 537 #endif 538 #ifdef VK_KHR_shared_presentable_image 539 case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: 540 { 541 return sizeof(VkSharedPresentSurfaceCapabilitiesKHR); 542 } 543 #endif 544 #ifdef VK_KHR_external_fence_win32 545 case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: 546 { 547 return sizeof(VkExportFenceWin32HandleInfoKHR); 548 } 549 #endif 550 #ifdef VK_KHR_image_format_list 551 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: 552 { 553 return sizeof(VkImageFormatListCreateInfoKHR); 554 } 555 #endif 556 #ifdef VK_KHR_8bit_storage 557 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: 558 { 559 return sizeof(VkPhysicalDevice8BitStorageFeaturesKHR); 560 } 561 #endif 562 #ifdef VK_KHR_shader_float16_int8 563 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: 564 { 565 return sizeof(VkPhysicalDeviceShaderFloat16Int8Features); 566 } 567 #endif 568 #ifdef VK_ANDROID_native_buffer 569 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: 570 { 571 return sizeof(VkNativeBufferANDROID); 572 } 573 #endif 574 #ifdef VK_EXT_debug_report 575 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: 576 { 577 return sizeof(VkDebugReportCallbackCreateInfoEXT); 578 } 579 #endif 580 #ifdef VK_AMD_rasterization_order 581 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: 582 { 583 return sizeof(VkPipelineRasterizationStateRasterizationOrderAMD); 584 } 585 #endif 586 #ifdef VK_NV_dedicated_allocation 587 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: 588 { 589 return sizeof(VkDedicatedAllocationImageCreateInfoNV); 590 } 591 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: 592 { 593 return sizeof(VkDedicatedAllocationBufferCreateInfoNV); 594 } 595 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: 596 { 597 return sizeof(VkDedicatedAllocationMemoryAllocateInfoNV); 598 } 599 #endif 600 #ifdef VK_AMD_texture_gather_bias_lod 601 case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: 602 { 603 return sizeof(VkTextureLODGatherFormatPropertiesAMD); 604 } 605 #endif 606 #ifdef VK_NV_external_memory 607 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: 608 { 609 return sizeof(VkExternalMemoryImageCreateInfoNV); 610 } 611 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: 612 { 613 return sizeof(VkExportMemoryAllocateInfoNV); 614 } 615 #endif 616 #ifdef VK_NV_external_memory_win32 617 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: 618 { 619 return sizeof(VkImportMemoryWin32HandleInfoNV); 620 } 621 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: 622 { 623 return sizeof(VkExportMemoryWin32HandleInfoNV); 624 } 625 #endif 626 #ifdef VK_NV_win32_keyed_mutex 627 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: 628 { 629 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoNV); 630 } 631 #endif 632 #ifdef VK_EXT_validation_flags 633 case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: 634 { 635 return sizeof(VkValidationFlagsEXT); 636 } 637 #endif 638 #ifdef VK_EXT_conditional_rendering 639 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: 640 { 641 return sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT); 642 } 643 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: 644 { 645 return sizeof(VkCommandBufferInheritanceConditionalRenderingInfoEXT); 646 } 647 #endif 648 #ifdef VK_NV_clip_space_w_scaling 649 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: 650 { 651 return sizeof(VkPipelineViewportWScalingStateCreateInfoNV); 652 } 653 #endif 654 #ifdef VK_EXT_display_control 655 case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: 656 { 657 return sizeof(VkSwapchainCounterCreateInfoEXT); 658 } 659 #endif 660 #ifdef VK_GOOGLE_display_timing 661 case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: 662 { 663 return sizeof(VkPresentTimesInfoGOOGLE); 664 } 665 #endif 666 #ifdef VK_NVX_multiview_per_view_attributes 667 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: 668 { 669 return sizeof(VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX); 670 } 671 #endif 672 #ifdef VK_NV_viewport_swizzle 673 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: 674 { 675 return sizeof(VkPipelineViewportSwizzleStateCreateInfoNV); 676 } 677 #endif 678 #ifdef VK_EXT_discard_rectangles 679 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: 680 { 681 return sizeof(VkPhysicalDeviceDiscardRectanglePropertiesEXT); 682 } 683 case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: 684 { 685 return sizeof(VkPipelineDiscardRectangleStateCreateInfoEXT); 686 } 687 #endif 688 #ifdef VK_EXT_conservative_rasterization 689 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: 690 { 691 return sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); 692 } 693 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: 694 { 695 return sizeof(VkPipelineRasterizationConservativeStateCreateInfoEXT); 696 } 697 #endif 698 #ifdef VK_EXT_debug_utils 699 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: 700 { 701 return sizeof(VkDebugUtilsMessengerCreateInfoEXT); 702 } 703 #endif 704 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 705 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: 706 { 707 return sizeof(VkAndroidHardwareBufferUsageANDROID); 708 } 709 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: 710 { 711 return sizeof(VkAndroidHardwareBufferFormatPropertiesANDROID); 712 } 713 case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: 714 { 715 return sizeof(VkImportAndroidHardwareBufferInfoANDROID); 716 } 717 case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: 718 { 719 return sizeof(VkExternalFormatANDROID); 720 } 721 #endif 722 #ifdef VK_EXT_sampler_filter_minmax 723 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: 724 { 725 return sizeof(VkSamplerReductionModeCreateInfoEXT); 726 } 727 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: 728 { 729 return sizeof(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); 730 } 731 #endif 732 #ifdef VK_EXT_sample_locations 733 case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: 734 { 735 return sizeof(VkSampleLocationsInfoEXT); 736 } 737 case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: 738 { 739 return sizeof(VkRenderPassSampleLocationsBeginInfoEXT); 740 } 741 case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: 742 { 743 return sizeof(VkPipelineSampleLocationsStateCreateInfoEXT); 744 } 745 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: 746 { 747 return sizeof(VkPhysicalDeviceSampleLocationsPropertiesEXT); 748 } 749 #endif 750 #ifdef VK_EXT_blend_operation_advanced 751 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: 752 { 753 return sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT); 754 } 755 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: 756 { 757 return sizeof(VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT); 758 } 759 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: 760 { 761 return sizeof(VkPipelineColorBlendAdvancedStateCreateInfoEXT); 762 } 763 #endif 764 #ifdef VK_NV_fragment_coverage_to_color 765 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: 766 { 767 return sizeof(VkPipelineCoverageToColorStateCreateInfoNV); 768 } 769 #endif 770 #ifdef VK_NV_framebuffer_mixed_samples 771 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: 772 { 773 return sizeof(VkPipelineCoverageModulationStateCreateInfoNV); 774 } 775 #endif 776 #ifdef VK_EXT_validation_cache 777 case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: 778 { 779 return sizeof(VkShaderModuleValidationCacheCreateInfoEXT); 780 } 781 #endif 782 #ifdef VK_EXT_descriptor_indexing 783 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: 784 { 785 return sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfoEXT); 786 } 787 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: 788 { 789 return sizeof(VkPhysicalDeviceDescriptorIndexingFeaturesEXT); 790 } 791 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: 792 { 793 return sizeof(VkPhysicalDeviceDescriptorIndexingPropertiesEXT); 794 } 795 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: 796 { 797 return sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfoEXT); 798 } 799 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: 800 { 801 return sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupportEXT); 802 } 803 #endif 804 #ifdef VK_EXT_global_priority 805 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: 806 { 807 return sizeof(VkDeviceQueueGlobalPriorityCreateInfoEXT); 808 } 809 #endif 810 #ifdef VK_EXT_external_memory_host 811 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: 812 { 813 return sizeof(VkImportMemoryHostPointerInfoEXT); 814 } 815 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: 816 { 817 return sizeof(VkPhysicalDeviceExternalMemoryHostPropertiesEXT); 818 } 819 #endif 820 #ifdef VK_AMD_shader_core_properties 821 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: 822 { 823 return sizeof(VkPhysicalDeviceShaderCorePropertiesAMD); 824 } 825 #endif 826 #ifdef VK_EXT_vertex_attribute_divisor 827 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: 828 { 829 return sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); 830 } 831 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: 832 { 833 return sizeof(VkPipelineVertexInputDivisorStateCreateInfoEXT); 834 } 835 #endif 836 #ifdef VK_NV_device_diagnostic_checkpoints 837 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: 838 { 839 return sizeof(VkQueueFamilyCheckpointPropertiesNV); 840 } 841 #endif 842 #ifdef VK_GOOGLE_color_buffer 843 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: 844 { 845 return sizeof(VkImportColorBufferGOOGLE); 846 } 847 case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE: 848 { 849 return sizeof(VkImportBufferGOOGLE); 850 } 851 case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE: 852 { 853 return sizeof(VkImportPhysicalAddressGOOGLE); 854 } 855 #endif 856 default: 857 { 858 return (size_t)0; 859 } 860 } 861 } 862 goldfish_vk_extension_struct_size_with_stream_features(uint32_t streamFeatures,const void * structExtension)863size_t goldfish_vk_extension_struct_size_with_stream_features( 864 uint32_t streamFeatures, 865 const void* structExtension) 866 { 867 if (!structExtension) 868 { 869 return (size_t)0; 870 } 871 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension); 872 switch(structType) 873 { 874 #ifdef VK_VERSION_1_1 875 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: 876 { 877 return sizeof(VkPhysicalDeviceSubgroupProperties); 878 } 879 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: 880 { 881 return sizeof(VkPhysicalDevice16BitStorageFeatures); 882 } 883 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: 884 { 885 return sizeof(VkMemoryDedicatedRequirements); 886 } 887 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: 888 { 889 return sizeof(VkMemoryDedicatedAllocateInfo); 890 } 891 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: 892 { 893 return sizeof(VkMemoryAllocateFlagsInfo); 894 } 895 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 896 { 897 return sizeof(VkDeviceGroupRenderPassBeginInfo); 898 } 899 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 900 { 901 return sizeof(VkDeviceGroupCommandBufferBeginInfo); 902 } 903 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: 904 { 905 return sizeof(VkDeviceGroupSubmitInfo); 906 } 907 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: 908 { 909 return sizeof(VkDeviceGroupBindSparseInfo); 910 } 911 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: 912 { 913 return sizeof(VkBindBufferMemoryDeviceGroupInfo); 914 } 915 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: 916 { 917 return sizeof(VkBindImageMemoryDeviceGroupInfo); 918 } 919 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: 920 { 921 return sizeof(VkDeviceGroupDeviceCreateInfo); 922 } 923 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: 924 { 925 return sizeof(VkPhysicalDeviceFeatures2); 926 } 927 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: 928 { 929 return sizeof(VkPhysicalDevicePointClippingProperties); 930 } 931 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: 932 { 933 return sizeof(VkRenderPassInputAttachmentAspectCreateInfo); 934 } 935 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: 936 { 937 return sizeof(VkImageViewUsageCreateInfo); 938 } 939 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: 940 { 941 return sizeof(VkPipelineTessellationDomainOriginStateCreateInfo); 942 } 943 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: 944 { 945 return sizeof(VkRenderPassMultiviewCreateInfo); 946 } 947 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: 948 { 949 return sizeof(VkPhysicalDeviceMultiviewFeatures); 950 } 951 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: 952 { 953 return sizeof(VkPhysicalDeviceMultiviewProperties); 954 } 955 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: 956 { 957 return sizeof(VkPhysicalDeviceVariablePointerFeatures); 958 } 959 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: 960 { 961 return sizeof(VkPhysicalDeviceProtectedMemoryFeatures); 962 } 963 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: 964 { 965 return sizeof(VkPhysicalDeviceProtectedMemoryProperties); 966 } 967 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: 968 { 969 return sizeof(VkProtectedSubmitInfo); 970 } 971 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: 972 { 973 return sizeof(VkSamplerYcbcrConversionInfo); 974 } 975 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: 976 { 977 return sizeof(VkBindImagePlaneMemoryInfo); 978 } 979 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: 980 { 981 return sizeof(VkImagePlaneMemoryRequirementsInfo); 982 } 983 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: 984 { 985 return sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures); 986 } 987 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: 988 { 989 return sizeof(VkSamplerYcbcrConversionImageFormatProperties); 990 } 991 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: 992 { 993 return sizeof(VkPhysicalDeviceExternalImageFormatInfo); 994 } 995 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: 996 { 997 return sizeof(VkExternalImageFormatProperties); 998 } 999 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: 1000 { 1001 return sizeof(VkPhysicalDeviceIDProperties); 1002 } 1003 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: 1004 { 1005 return sizeof(VkExternalMemoryImageCreateInfo); 1006 } 1007 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: 1008 { 1009 return sizeof(VkExternalMemoryBufferCreateInfo); 1010 } 1011 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: 1012 { 1013 return sizeof(VkExportMemoryAllocateInfo); 1014 } 1015 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: 1016 { 1017 return sizeof(VkExportFenceCreateInfo); 1018 } 1019 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: 1020 { 1021 return sizeof(VkExportSemaphoreCreateInfo); 1022 } 1023 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: 1024 { 1025 return sizeof(VkPhysicalDeviceMaintenance3Properties); 1026 } 1027 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES: 1028 { 1029 return sizeof(VkPhysicalDeviceShaderDrawParameterFeatures); 1030 } 1031 #endif 1032 #ifdef VK_KHR_swapchain 1033 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: 1034 { 1035 return sizeof(VkImageSwapchainCreateInfoKHR); 1036 } 1037 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: 1038 { 1039 return sizeof(VkBindImageMemorySwapchainInfoKHR); 1040 } 1041 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: 1042 { 1043 return sizeof(VkDeviceGroupPresentInfoKHR); 1044 } 1045 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: 1046 { 1047 return sizeof(VkDeviceGroupSwapchainCreateInfoKHR); 1048 } 1049 #endif 1050 #ifdef VK_KHR_display_swapchain 1051 case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: 1052 { 1053 return sizeof(VkDisplayPresentInfoKHR); 1054 } 1055 #endif 1056 #ifdef VK_KHR_external_memory_win32 1057 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 1058 { 1059 return sizeof(VkImportMemoryWin32HandleInfoKHR); 1060 } 1061 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 1062 { 1063 return sizeof(VkExportMemoryWin32HandleInfoKHR); 1064 } 1065 #endif 1066 #ifdef VK_KHR_external_memory_fd 1067 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: 1068 { 1069 return sizeof(VkImportMemoryFdInfoKHR); 1070 } 1071 #endif 1072 #ifdef VK_KHR_win32_keyed_mutex 1073 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: 1074 { 1075 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR); 1076 } 1077 #endif 1078 #ifdef VK_KHR_external_semaphore_win32 1079 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: 1080 { 1081 return sizeof(VkExportSemaphoreWin32HandleInfoKHR); 1082 } 1083 case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: 1084 { 1085 return sizeof(VkD3D12FenceSubmitInfoKHR); 1086 } 1087 #endif 1088 #ifdef VK_KHR_push_descriptor 1089 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: 1090 { 1091 return sizeof(VkPhysicalDevicePushDescriptorPropertiesKHR); 1092 } 1093 #endif 1094 #ifdef VK_KHR_incremental_present 1095 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: 1096 { 1097 return sizeof(VkPresentRegionsKHR); 1098 } 1099 #endif 1100 #ifdef VK_KHR_shared_presentable_image 1101 case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: 1102 { 1103 return sizeof(VkSharedPresentSurfaceCapabilitiesKHR); 1104 } 1105 #endif 1106 #ifdef VK_KHR_external_fence_win32 1107 case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: 1108 { 1109 return sizeof(VkExportFenceWin32HandleInfoKHR); 1110 } 1111 #endif 1112 #ifdef VK_KHR_image_format_list 1113 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: 1114 { 1115 return sizeof(VkImageFormatListCreateInfoKHR); 1116 } 1117 #endif 1118 #ifdef VK_KHR_8bit_storage 1119 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: 1120 { 1121 return sizeof(VkPhysicalDevice8BitStorageFeaturesKHR); 1122 } 1123 #endif 1124 #ifdef VK_KHR_shader_float16_int8 1125 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: 1126 { 1127 if (streamFeatures & VULKAN_STREAM_FEATURE_SHADER_FLOAT16_INT8_BIT) 1128 { 1129 return sizeof(VkPhysicalDeviceShaderFloat16Int8Features); 1130 } 1131 else 1132 { 1133 return 0; 1134 } 1135 } 1136 #endif 1137 #ifdef VK_ANDROID_native_buffer 1138 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: 1139 { 1140 return sizeof(VkNativeBufferANDROID); 1141 } 1142 #endif 1143 #ifdef VK_EXT_debug_report 1144 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: 1145 { 1146 return sizeof(VkDebugReportCallbackCreateInfoEXT); 1147 } 1148 #endif 1149 #ifdef VK_AMD_rasterization_order 1150 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: 1151 { 1152 return sizeof(VkPipelineRasterizationStateRasterizationOrderAMD); 1153 } 1154 #endif 1155 #ifdef VK_NV_dedicated_allocation 1156 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: 1157 { 1158 return sizeof(VkDedicatedAllocationImageCreateInfoNV); 1159 } 1160 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: 1161 { 1162 return sizeof(VkDedicatedAllocationBufferCreateInfoNV); 1163 } 1164 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: 1165 { 1166 return sizeof(VkDedicatedAllocationMemoryAllocateInfoNV); 1167 } 1168 #endif 1169 #ifdef VK_AMD_texture_gather_bias_lod 1170 case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: 1171 { 1172 return sizeof(VkTextureLODGatherFormatPropertiesAMD); 1173 } 1174 #endif 1175 #ifdef VK_NV_external_memory 1176 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: 1177 { 1178 return sizeof(VkExternalMemoryImageCreateInfoNV); 1179 } 1180 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: 1181 { 1182 return sizeof(VkExportMemoryAllocateInfoNV); 1183 } 1184 #endif 1185 #ifdef VK_NV_external_memory_win32 1186 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: 1187 { 1188 return sizeof(VkImportMemoryWin32HandleInfoNV); 1189 } 1190 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: 1191 { 1192 return sizeof(VkExportMemoryWin32HandleInfoNV); 1193 } 1194 #endif 1195 #ifdef VK_NV_win32_keyed_mutex 1196 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: 1197 { 1198 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoNV); 1199 } 1200 #endif 1201 #ifdef VK_EXT_validation_flags 1202 case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: 1203 { 1204 return sizeof(VkValidationFlagsEXT); 1205 } 1206 #endif 1207 #ifdef VK_EXT_conditional_rendering 1208 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: 1209 { 1210 return sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT); 1211 } 1212 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: 1213 { 1214 return sizeof(VkCommandBufferInheritanceConditionalRenderingInfoEXT); 1215 } 1216 #endif 1217 #ifdef VK_NV_clip_space_w_scaling 1218 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: 1219 { 1220 return sizeof(VkPipelineViewportWScalingStateCreateInfoNV); 1221 } 1222 #endif 1223 #ifdef VK_EXT_display_control 1224 case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: 1225 { 1226 return sizeof(VkSwapchainCounterCreateInfoEXT); 1227 } 1228 #endif 1229 #ifdef VK_GOOGLE_display_timing 1230 case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: 1231 { 1232 return sizeof(VkPresentTimesInfoGOOGLE); 1233 } 1234 #endif 1235 #ifdef VK_NVX_multiview_per_view_attributes 1236 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: 1237 { 1238 return sizeof(VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX); 1239 } 1240 #endif 1241 #ifdef VK_NV_viewport_swizzle 1242 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: 1243 { 1244 return sizeof(VkPipelineViewportSwizzleStateCreateInfoNV); 1245 } 1246 #endif 1247 #ifdef VK_EXT_discard_rectangles 1248 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: 1249 { 1250 return sizeof(VkPhysicalDeviceDiscardRectanglePropertiesEXT); 1251 } 1252 case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: 1253 { 1254 return sizeof(VkPipelineDiscardRectangleStateCreateInfoEXT); 1255 } 1256 #endif 1257 #ifdef VK_EXT_conservative_rasterization 1258 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: 1259 { 1260 return sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); 1261 } 1262 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: 1263 { 1264 return sizeof(VkPipelineRasterizationConservativeStateCreateInfoEXT); 1265 } 1266 #endif 1267 #ifdef VK_EXT_debug_utils 1268 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: 1269 { 1270 return sizeof(VkDebugUtilsMessengerCreateInfoEXT); 1271 } 1272 #endif 1273 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 1274 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: 1275 { 1276 return sizeof(VkAndroidHardwareBufferUsageANDROID); 1277 } 1278 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: 1279 { 1280 return sizeof(VkAndroidHardwareBufferFormatPropertiesANDROID); 1281 } 1282 case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: 1283 { 1284 return sizeof(VkImportAndroidHardwareBufferInfoANDROID); 1285 } 1286 case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: 1287 { 1288 return sizeof(VkExternalFormatANDROID); 1289 } 1290 #endif 1291 #ifdef VK_EXT_sampler_filter_minmax 1292 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: 1293 { 1294 return sizeof(VkSamplerReductionModeCreateInfoEXT); 1295 } 1296 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: 1297 { 1298 return sizeof(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); 1299 } 1300 #endif 1301 #ifdef VK_EXT_sample_locations 1302 case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: 1303 { 1304 return sizeof(VkSampleLocationsInfoEXT); 1305 } 1306 case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: 1307 { 1308 return sizeof(VkRenderPassSampleLocationsBeginInfoEXT); 1309 } 1310 case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: 1311 { 1312 return sizeof(VkPipelineSampleLocationsStateCreateInfoEXT); 1313 } 1314 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: 1315 { 1316 return sizeof(VkPhysicalDeviceSampleLocationsPropertiesEXT); 1317 } 1318 #endif 1319 #ifdef VK_EXT_blend_operation_advanced 1320 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: 1321 { 1322 return sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT); 1323 } 1324 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: 1325 { 1326 return sizeof(VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT); 1327 } 1328 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: 1329 { 1330 return sizeof(VkPipelineColorBlendAdvancedStateCreateInfoEXT); 1331 } 1332 #endif 1333 #ifdef VK_NV_fragment_coverage_to_color 1334 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: 1335 { 1336 return sizeof(VkPipelineCoverageToColorStateCreateInfoNV); 1337 } 1338 #endif 1339 #ifdef VK_NV_framebuffer_mixed_samples 1340 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: 1341 { 1342 return sizeof(VkPipelineCoverageModulationStateCreateInfoNV); 1343 } 1344 #endif 1345 #ifdef VK_EXT_validation_cache 1346 case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: 1347 { 1348 return sizeof(VkShaderModuleValidationCacheCreateInfoEXT); 1349 } 1350 #endif 1351 #ifdef VK_EXT_descriptor_indexing 1352 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: 1353 { 1354 return sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfoEXT); 1355 } 1356 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: 1357 { 1358 return sizeof(VkPhysicalDeviceDescriptorIndexingFeaturesEXT); 1359 } 1360 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: 1361 { 1362 return sizeof(VkPhysicalDeviceDescriptorIndexingPropertiesEXT); 1363 } 1364 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: 1365 { 1366 return sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfoEXT); 1367 } 1368 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: 1369 { 1370 return sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupportEXT); 1371 } 1372 #endif 1373 #ifdef VK_EXT_global_priority 1374 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: 1375 { 1376 return sizeof(VkDeviceQueueGlobalPriorityCreateInfoEXT); 1377 } 1378 #endif 1379 #ifdef VK_EXT_external_memory_host 1380 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: 1381 { 1382 return sizeof(VkImportMemoryHostPointerInfoEXT); 1383 } 1384 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: 1385 { 1386 return sizeof(VkPhysicalDeviceExternalMemoryHostPropertiesEXT); 1387 } 1388 #endif 1389 #ifdef VK_AMD_shader_core_properties 1390 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: 1391 { 1392 return sizeof(VkPhysicalDeviceShaderCorePropertiesAMD); 1393 } 1394 #endif 1395 #ifdef VK_EXT_vertex_attribute_divisor 1396 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: 1397 { 1398 return sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); 1399 } 1400 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: 1401 { 1402 return sizeof(VkPipelineVertexInputDivisorStateCreateInfoEXT); 1403 } 1404 #endif 1405 #ifdef VK_NV_device_diagnostic_checkpoints 1406 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: 1407 { 1408 return sizeof(VkQueueFamilyCheckpointPropertiesNV); 1409 } 1410 #endif 1411 #ifdef VK_GOOGLE_color_buffer 1412 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: 1413 { 1414 return sizeof(VkImportColorBufferGOOGLE); 1415 } 1416 case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE: 1417 { 1418 return sizeof(VkImportBufferGOOGLE); 1419 } 1420 case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE: 1421 { 1422 return sizeof(VkImportPhysicalAddressGOOGLE); 1423 } 1424 #endif 1425 default: 1426 { 1427 return (size_t)0; 1428 } 1429 } 1430 } 1431 1432 1433 } // namespace goldfish_vk 1434