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_ANDROID_native_buffer 136 #endif 137 #ifdef VK_EXT_debug_report 138 #endif 139 #ifdef VK_NV_glsl_shader 140 #endif 141 #ifdef VK_EXT_depth_range_unrestricted 142 #endif 143 #ifdef VK_IMG_filter_cubic 144 #endif 145 #ifdef VK_AMD_rasterization_order 146 #endif 147 #ifdef VK_AMD_shader_trinary_minmax 148 #endif 149 #ifdef VK_AMD_shader_explicit_vertex_parameter 150 #endif 151 #ifdef VK_EXT_debug_marker 152 #endif 153 #ifdef VK_AMD_gcn_shader 154 #endif 155 #ifdef VK_NV_dedicated_allocation 156 #endif 157 #ifdef VK_AMD_draw_indirect_count 158 #endif 159 #ifdef VK_AMD_negative_viewport_height 160 #endif 161 #ifdef VK_AMD_gpu_shader_half_float 162 #endif 163 #ifdef VK_AMD_shader_ballot 164 #endif 165 #ifdef VK_AMD_texture_gather_bias_lod 166 #endif 167 #ifdef VK_AMD_shader_info 168 #endif 169 #ifdef VK_AMD_shader_image_load_store_lod 170 #endif 171 #ifdef VK_IMG_format_pvrtc 172 #endif 173 #ifdef VK_NV_external_memory_capabilities 174 #endif 175 #ifdef VK_NV_external_memory 176 #endif 177 #ifdef VK_NV_external_memory_win32 178 #endif 179 #ifdef VK_NV_win32_keyed_mutex 180 #endif 181 #ifdef VK_EXT_validation_flags 182 #endif 183 #ifdef VK_NN_vi_surface 184 #endif 185 #ifdef VK_EXT_shader_subgroup_ballot 186 #endif 187 #ifdef VK_EXT_shader_subgroup_vote 188 #endif 189 #ifdef VK_EXT_conditional_rendering 190 #endif 191 #ifdef VK_NVX_device_generated_commands 192 #endif 193 #ifdef VK_NV_clip_space_w_scaling 194 #endif 195 #ifdef VK_EXT_direct_mode_display 196 #endif 197 #ifdef VK_EXT_acquire_xlib_display 198 #endif 199 #ifdef VK_EXT_display_surface_counter 200 #endif 201 #ifdef VK_EXT_display_control 202 #endif 203 #ifdef VK_GOOGLE_display_timing 204 #endif 205 #ifdef VK_NV_sample_mask_override_coverage 206 #endif 207 #ifdef VK_NV_geometry_shader_passthrough 208 #endif 209 #ifdef VK_NV_viewport_array2 210 #endif 211 #ifdef VK_NVX_multiview_per_view_attributes 212 #endif 213 #ifdef VK_NV_viewport_swizzle 214 #endif 215 #ifdef VK_EXT_discard_rectangles 216 #endif 217 #ifdef VK_EXT_conservative_rasterization 218 #endif 219 #ifdef VK_EXT_swapchain_colorspace 220 #endif 221 #ifdef VK_EXT_hdr_metadata 222 #endif 223 #ifdef VK_MVK_ios_surface 224 #endif 225 #ifdef VK_MVK_macos_surface 226 #endif 227 #ifdef VK_EXT_external_memory_dma_buf 228 #endif 229 #ifdef VK_EXT_queue_family_foreign 230 #endif 231 #ifdef VK_EXT_debug_utils 232 #endif 233 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 234 #endif 235 #ifdef VK_EXT_sampler_filter_minmax 236 #endif 237 #ifdef VK_AMD_gpu_shader_int16 238 #endif 239 #ifdef VK_AMD_mixed_attachment_samples 240 #endif 241 #ifdef VK_AMD_shader_fragment_mask 242 #endif 243 #ifdef VK_EXT_shader_stencil_export 244 #endif 245 #ifdef VK_EXT_sample_locations 246 #endif 247 #ifdef VK_EXT_blend_operation_advanced 248 #endif 249 #ifdef VK_NV_fragment_coverage_to_color 250 #endif 251 #ifdef VK_NV_framebuffer_mixed_samples 252 #endif 253 #ifdef VK_NV_fill_rectangle 254 #endif 255 #ifdef VK_EXT_post_depth_coverage 256 #endif 257 #ifdef VK_EXT_validation_cache 258 #endif 259 #ifdef VK_EXT_descriptor_indexing 260 #endif 261 #ifdef VK_EXT_shader_viewport_index_layer 262 #endif 263 #ifdef VK_EXT_global_priority 264 #endif 265 #ifdef VK_EXT_external_memory_host 266 #endif 267 #ifdef VK_AMD_buffer_marker 268 #endif 269 #ifdef VK_AMD_shader_core_properties 270 #endif 271 #ifdef VK_EXT_vertex_attribute_divisor 272 #endif 273 #ifdef VK_NV_shader_subgroup_partitioned 274 #endif 275 #ifdef VK_NV_device_diagnostic_checkpoints 276 #endif 277 #ifdef VK_GOOGLE_address_space 278 #endif 279 #ifdef VK_GOOGLE_color_buffer 280 #endif 281 #ifdef VK_GOOGLE_sized_descriptor_update_template 282 #endif 283 #ifdef VK_GOOGLE_async_command_buffers 284 #endif goldfish_vk_struct_type(const void * structExtension)285uint32_t goldfish_vk_struct_type( 286 const void* structExtension) 287 { 288 const uint32_t asStructType = *(reinterpret_cast<const uint32_t*>(structExtension)); 289 return asStructType; 290 } 291 goldfish_vk_extension_struct_size(const void * structExtension)292size_t goldfish_vk_extension_struct_size( 293 const void* structExtension) 294 { 295 if (!structExtension) 296 { 297 return (size_t)0; 298 } 299 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension); 300 switch(structType) 301 { 302 #ifdef VK_VERSION_1_1 303 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: 304 { 305 return sizeof(VkPhysicalDeviceSubgroupProperties); 306 } 307 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: 308 { 309 return sizeof(VkPhysicalDevice16BitStorageFeatures); 310 } 311 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: 312 { 313 return sizeof(VkMemoryDedicatedRequirements); 314 } 315 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: 316 { 317 return sizeof(VkMemoryDedicatedAllocateInfo); 318 } 319 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: 320 { 321 return sizeof(VkMemoryAllocateFlagsInfo); 322 } 323 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 324 { 325 return sizeof(VkDeviceGroupRenderPassBeginInfo); 326 } 327 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 328 { 329 return sizeof(VkDeviceGroupCommandBufferBeginInfo); 330 } 331 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: 332 { 333 return sizeof(VkDeviceGroupSubmitInfo); 334 } 335 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: 336 { 337 return sizeof(VkDeviceGroupBindSparseInfo); 338 } 339 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: 340 { 341 return sizeof(VkBindBufferMemoryDeviceGroupInfo); 342 } 343 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: 344 { 345 return sizeof(VkBindImageMemoryDeviceGroupInfo); 346 } 347 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: 348 { 349 return sizeof(VkDeviceGroupDeviceCreateInfo); 350 } 351 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: 352 { 353 return sizeof(VkPhysicalDeviceFeatures2); 354 } 355 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: 356 { 357 return sizeof(VkPhysicalDevicePointClippingProperties); 358 } 359 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: 360 { 361 return sizeof(VkRenderPassInputAttachmentAspectCreateInfo); 362 } 363 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: 364 { 365 return sizeof(VkImageViewUsageCreateInfo); 366 } 367 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: 368 { 369 return sizeof(VkPipelineTessellationDomainOriginStateCreateInfo); 370 } 371 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: 372 { 373 return sizeof(VkRenderPassMultiviewCreateInfo); 374 } 375 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: 376 { 377 return sizeof(VkPhysicalDeviceMultiviewFeatures); 378 } 379 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: 380 { 381 return sizeof(VkPhysicalDeviceMultiviewProperties); 382 } 383 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: 384 { 385 return sizeof(VkPhysicalDeviceVariablePointerFeatures); 386 } 387 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: 388 { 389 return sizeof(VkPhysicalDeviceProtectedMemoryFeatures); 390 } 391 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: 392 { 393 return sizeof(VkPhysicalDeviceProtectedMemoryProperties); 394 } 395 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: 396 { 397 return sizeof(VkProtectedSubmitInfo); 398 } 399 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: 400 { 401 return sizeof(VkSamplerYcbcrConversionInfo); 402 } 403 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: 404 { 405 return sizeof(VkBindImagePlaneMemoryInfo); 406 } 407 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: 408 { 409 return sizeof(VkImagePlaneMemoryRequirementsInfo); 410 } 411 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: 412 { 413 return sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures); 414 } 415 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: 416 { 417 return sizeof(VkSamplerYcbcrConversionImageFormatProperties); 418 } 419 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: 420 { 421 return sizeof(VkPhysicalDeviceExternalImageFormatInfo); 422 } 423 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: 424 { 425 return sizeof(VkExternalImageFormatProperties); 426 } 427 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: 428 { 429 return sizeof(VkPhysicalDeviceIDProperties); 430 } 431 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: 432 { 433 return sizeof(VkExternalMemoryImageCreateInfo); 434 } 435 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: 436 { 437 return sizeof(VkExternalMemoryBufferCreateInfo); 438 } 439 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: 440 { 441 return sizeof(VkExportMemoryAllocateInfo); 442 } 443 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: 444 { 445 return sizeof(VkExportFenceCreateInfo); 446 } 447 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: 448 { 449 return sizeof(VkExportSemaphoreCreateInfo); 450 } 451 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: 452 { 453 return sizeof(VkPhysicalDeviceMaintenance3Properties); 454 } 455 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES: 456 { 457 return sizeof(VkPhysicalDeviceShaderDrawParameterFeatures); 458 } 459 #endif 460 #ifdef VK_KHR_swapchain 461 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: 462 { 463 return sizeof(VkImageSwapchainCreateInfoKHR); 464 } 465 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: 466 { 467 return sizeof(VkBindImageMemorySwapchainInfoKHR); 468 } 469 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: 470 { 471 return sizeof(VkDeviceGroupPresentInfoKHR); 472 } 473 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: 474 { 475 return sizeof(VkDeviceGroupSwapchainCreateInfoKHR); 476 } 477 #endif 478 #ifdef VK_KHR_display_swapchain 479 case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: 480 { 481 return sizeof(VkDisplayPresentInfoKHR); 482 } 483 #endif 484 #ifdef VK_KHR_external_memory_win32 485 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 486 { 487 return sizeof(VkImportMemoryWin32HandleInfoKHR); 488 } 489 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 490 { 491 return sizeof(VkExportMemoryWin32HandleInfoKHR); 492 } 493 #endif 494 #ifdef VK_KHR_external_memory_fd 495 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: 496 { 497 return sizeof(VkImportMemoryFdInfoKHR); 498 } 499 #endif 500 #ifdef VK_KHR_win32_keyed_mutex 501 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: 502 { 503 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR); 504 } 505 #endif 506 #ifdef VK_KHR_external_semaphore_win32 507 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: 508 { 509 return sizeof(VkExportSemaphoreWin32HandleInfoKHR); 510 } 511 case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: 512 { 513 return sizeof(VkD3D12FenceSubmitInfoKHR); 514 } 515 #endif 516 #ifdef VK_KHR_push_descriptor 517 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: 518 { 519 return sizeof(VkPhysicalDevicePushDescriptorPropertiesKHR); 520 } 521 #endif 522 #ifdef VK_KHR_incremental_present 523 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: 524 { 525 return sizeof(VkPresentRegionsKHR); 526 } 527 #endif 528 #ifdef VK_KHR_shared_presentable_image 529 case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: 530 { 531 return sizeof(VkSharedPresentSurfaceCapabilitiesKHR); 532 } 533 #endif 534 #ifdef VK_KHR_external_fence_win32 535 case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: 536 { 537 return sizeof(VkExportFenceWin32HandleInfoKHR); 538 } 539 #endif 540 #ifdef VK_KHR_image_format_list 541 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: 542 { 543 return sizeof(VkImageFormatListCreateInfoKHR); 544 } 545 #endif 546 #ifdef VK_KHR_8bit_storage 547 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: 548 { 549 return sizeof(VkPhysicalDevice8BitStorageFeaturesKHR); 550 } 551 #endif 552 #ifdef VK_ANDROID_native_buffer 553 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: 554 { 555 return sizeof(VkNativeBufferANDROID); 556 } 557 #endif 558 #ifdef VK_EXT_debug_report 559 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: 560 { 561 return sizeof(VkDebugReportCallbackCreateInfoEXT); 562 } 563 #endif 564 #ifdef VK_AMD_rasterization_order 565 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: 566 { 567 return sizeof(VkPipelineRasterizationStateRasterizationOrderAMD); 568 } 569 #endif 570 #ifdef VK_NV_dedicated_allocation 571 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: 572 { 573 return sizeof(VkDedicatedAllocationImageCreateInfoNV); 574 } 575 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: 576 { 577 return sizeof(VkDedicatedAllocationBufferCreateInfoNV); 578 } 579 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: 580 { 581 return sizeof(VkDedicatedAllocationMemoryAllocateInfoNV); 582 } 583 #endif 584 #ifdef VK_AMD_texture_gather_bias_lod 585 case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: 586 { 587 return sizeof(VkTextureLODGatherFormatPropertiesAMD); 588 } 589 #endif 590 #ifdef VK_NV_external_memory 591 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: 592 { 593 return sizeof(VkExternalMemoryImageCreateInfoNV); 594 } 595 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: 596 { 597 return sizeof(VkExportMemoryAllocateInfoNV); 598 } 599 #endif 600 #ifdef VK_NV_external_memory_win32 601 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: 602 { 603 return sizeof(VkImportMemoryWin32HandleInfoNV); 604 } 605 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: 606 { 607 return sizeof(VkExportMemoryWin32HandleInfoNV); 608 } 609 #endif 610 #ifdef VK_NV_win32_keyed_mutex 611 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: 612 { 613 return sizeof(VkWin32KeyedMutexAcquireReleaseInfoNV); 614 } 615 #endif 616 #ifdef VK_EXT_validation_flags 617 case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: 618 { 619 return sizeof(VkValidationFlagsEXT); 620 } 621 #endif 622 #ifdef VK_EXT_conditional_rendering 623 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: 624 { 625 return sizeof(VkPhysicalDeviceConditionalRenderingFeaturesEXT); 626 } 627 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: 628 { 629 return sizeof(VkCommandBufferInheritanceConditionalRenderingInfoEXT); 630 } 631 #endif 632 #ifdef VK_NV_clip_space_w_scaling 633 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: 634 { 635 return sizeof(VkPipelineViewportWScalingStateCreateInfoNV); 636 } 637 #endif 638 #ifdef VK_EXT_display_control 639 case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: 640 { 641 return sizeof(VkSwapchainCounterCreateInfoEXT); 642 } 643 #endif 644 #ifdef VK_GOOGLE_display_timing 645 case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: 646 { 647 return sizeof(VkPresentTimesInfoGOOGLE); 648 } 649 #endif 650 #ifdef VK_NVX_multiview_per_view_attributes 651 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: 652 { 653 return sizeof(VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX); 654 } 655 #endif 656 #ifdef VK_NV_viewport_swizzle 657 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: 658 { 659 return sizeof(VkPipelineViewportSwizzleStateCreateInfoNV); 660 } 661 #endif 662 #ifdef VK_EXT_discard_rectangles 663 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: 664 { 665 return sizeof(VkPhysicalDeviceDiscardRectanglePropertiesEXT); 666 } 667 case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: 668 { 669 return sizeof(VkPipelineDiscardRectangleStateCreateInfoEXT); 670 } 671 #endif 672 #ifdef VK_EXT_conservative_rasterization 673 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: 674 { 675 return sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); 676 } 677 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: 678 { 679 return sizeof(VkPipelineRasterizationConservativeStateCreateInfoEXT); 680 } 681 #endif 682 #ifdef VK_EXT_debug_utils 683 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: 684 { 685 return sizeof(VkDebugUtilsMessengerCreateInfoEXT); 686 } 687 #endif 688 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 689 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: 690 { 691 return sizeof(VkAndroidHardwareBufferUsageANDROID); 692 } 693 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: 694 { 695 return sizeof(VkAndroidHardwareBufferFormatPropertiesANDROID); 696 } 697 case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: 698 { 699 return sizeof(VkImportAndroidHardwareBufferInfoANDROID); 700 } 701 case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: 702 { 703 return sizeof(VkExternalFormatANDROID); 704 } 705 #endif 706 #ifdef VK_EXT_sampler_filter_minmax 707 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: 708 { 709 return sizeof(VkSamplerReductionModeCreateInfoEXT); 710 } 711 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: 712 { 713 return sizeof(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); 714 } 715 #endif 716 #ifdef VK_EXT_sample_locations 717 case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: 718 { 719 return sizeof(VkSampleLocationsInfoEXT); 720 } 721 case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: 722 { 723 return sizeof(VkRenderPassSampleLocationsBeginInfoEXT); 724 } 725 case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: 726 { 727 return sizeof(VkPipelineSampleLocationsStateCreateInfoEXT); 728 } 729 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: 730 { 731 return sizeof(VkPhysicalDeviceSampleLocationsPropertiesEXT); 732 } 733 #endif 734 #ifdef VK_EXT_blend_operation_advanced 735 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: 736 { 737 return sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT); 738 } 739 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: 740 { 741 return sizeof(VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT); 742 } 743 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: 744 { 745 return sizeof(VkPipelineColorBlendAdvancedStateCreateInfoEXT); 746 } 747 #endif 748 #ifdef VK_NV_fragment_coverage_to_color 749 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: 750 { 751 return sizeof(VkPipelineCoverageToColorStateCreateInfoNV); 752 } 753 #endif 754 #ifdef VK_NV_framebuffer_mixed_samples 755 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: 756 { 757 return sizeof(VkPipelineCoverageModulationStateCreateInfoNV); 758 } 759 #endif 760 #ifdef VK_EXT_validation_cache 761 case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: 762 { 763 return sizeof(VkShaderModuleValidationCacheCreateInfoEXT); 764 } 765 #endif 766 #ifdef VK_EXT_descriptor_indexing 767 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: 768 { 769 return sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfoEXT); 770 } 771 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: 772 { 773 return sizeof(VkPhysicalDeviceDescriptorIndexingFeaturesEXT); 774 } 775 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: 776 { 777 return sizeof(VkPhysicalDeviceDescriptorIndexingPropertiesEXT); 778 } 779 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: 780 { 781 return sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfoEXT); 782 } 783 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: 784 { 785 return sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupportEXT); 786 } 787 #endif 788 #ifdef VK_EXT_global_priority 789 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: 790 { 791 return sizeof(VkDeviceQueueGlobalPriorityCreateInfoEXT); 792 } 793 #endif 794 #ifdef VK_EXT_external_memory_host 795 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: 796 { 797 return sizeof(VkImportMemoryHostPointerInfoEXT); 798 } 799 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: 800 { 801 return sizeof(VkPhysicalDeviceExternalMemoryHostPropertiesEXT); 802 } 803 #endif 804 #ifdef VK_AMD_shader_core_properties 805 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: 806 { 807 return sizeof(VkPhysicalDeviceShaderCorePropertiesAMD); 808 } 809 #endif 810 #ifdef VK_EXT_vertex_attribute_divisor 811 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: 812 { 813 return sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); 814 } 815 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: 816 { 817 return sizeof(VkPipelineVertexInputDivisorStateCreateInfoEXT); 818 } 819 #endif 820 #ifdef VK_NV_device_diagnostic_checkpoints 821 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: 822 { 823 return sizeof(VkQueueFamilyCheckpointPropertiesNV); 824 } 825 #endif 826 #ifdef VK_GOOGLE_color_buffer 827 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: 828 { 829 return sizeof(VkImportColorBufferGOOGLE); 830 } 831 case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE: 832 { 833 return sizeof(VkImportPhysicalAddressGOOGLE); 834 } 835 #endif 836 default: 837 { 838 return (size_t)0; 839 } 840 } 841 } 842 843 844 } // namespace goldfish_vk 845