From b436ce9c614f89465b459e7c59ba7dc56a2de38d Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 31 Mar 2022 15:44:53 -0600 Subject: vulkaninfo: Check requirements when adding to pNext chains Only include structures in pNext chains whose corresponding extensions or versions are supported. --- scripts/vulkaninfo_generator.py | 231 +++-- vulkaninfo/generated/vulkaninfo.hpp | 1697 ++++++++++++++++++++--------------- vulkaninfo/vulkaninfo.cpp | 30 +- vulkaninfo/vulkaninfo.h | 33 +- 4 files changed, 1152 insertions(+), 839 deletions(-) diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index 71a2aed2..5839c639 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -329,12 +329,7 @@ class VulkanInfoGenerator(OutputGenerator): out += PrintStructure(s, types_to_gen, names_of_structures_to_gen, self.aliases) for key, value in EXTENSION_CATEGORIES.items(): - out += PrintChainStruct(key, self.extension_sets[key], self.all_structures, value) - - for key, value in EXTENSION_CATEGORIES.items(): - if value.get('print_iterator'): - out += PrintChainIterator(key, - self.extension_sets[key], self.all_structures, value.get('type'), self.extTypes, self.aliases, self.vulkan_versions) + out += PrintChainStruct(key, self.extension_sets[key], self.all_structures, value, self.extTypes, self.aliases, self.vulkan_versions) for s in (x for x in self.all_structures if x.name in structs_to_comp): out += PrintStructComparisonForwardDecl(s) @@ -723,11 +718,17 @@ def PrintStructShort(struct): out += AddGuardFooter(struct) return out - -def PrintChainStruct(listName, structures, all_structures, chain_details): - out = '' +def PrintChainStruct(listName, structures, all_structures, chain_details, extTypes, aliases, vulkan_versions): sorted_structures = sorted( all_structures, key=operator.attrgetter('name')) + + version_desc = '' + if chain_details.get('type') in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: + version_desc = "gpu.api_version" + else: + version_desc = "inst.instance_version" + + out = '' structs_to_print = [] for s in sorted_structures: if s.name in structures: @@ -756,7 +757,12 @@ def PrintChainStruct(listName, structures, all_structures, chain_details): if s.name in ['VkPhysicalDeviceShaderIntegerDotProductFeatures', 'VkPhysicalDeviceHostImageCopyFeaturesEXT']: out += f" char {s.name}_padding[64];\n" out += AddGuardFooter(s) - out += f" void initialize_chain() noexcept {{\n" + out += f" void initialize_chain(" + if chain_details.get('type') in [EXTENSION_TYPE_INSTANCE, EXTENSION_TYPE_BOTH]: + out += f"AppInstance &inst, " + if chain_details.get('type') in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: + out += f"AppGpu &gpu " + out += f") noexcept {{\n" for s in structs_to_print: if s.name in struct_blacklist: continue @@ -770,49 +776,6 @@ def PrintChainStruct(listName, structures, all_structures, chain_details): if s.name in struct_blacklist: continue out += AddGuardHeader(s) - out += f" chain_members.push_back(reinterpret_cast(&{s.name[2:]}));\n" - out += AddGuardFooter(s) - - out += f""" - for(size_t i = 0; i < chain_members.size() - 1; i++){{ - chain_members[i]->pNext = chain_members[i + 1]; - }} - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }}; -}}; -void setup_{listName}_chain({chain_details['holder_type']}& start, std::unique_ptr<{listName}_chain>& chain){{ - chain = std::unique_ptr<{listName}_chain>(new {listName}_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}}; -""" - return out - - -def PrintChainIterator(listName, structures, all_structures, checkExtLoc, extTypes, aliases, vulkan_versions): - out = '' - out += f"void chain_iterator_{listName}(Printer &p, " - if checkExtLoc in [EXTENSION_TYPE_INSTANCE, EXTENSION_TYPE_BOTH]: - out += f"AppInstance &inst, " - if checkExtLoc in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: - out += f"AppGpu &gpu, " - out += f"void * place) {{\n" - out += f" while (place) {{\n" - out += f" struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place;\n" - out += f" p.SetSubHeader();\n" - sorted_structures = sorted( - all_structures, key=operator.attrgetter('name')) - - version_desc = '' - if checkExtLoc in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: - version_desc = "gpu.api_version" - else: - version_desc = "inst.instance_version" - - for s in sorted_structures: - if s.sTypeName is None or s.name in struct_blacklist: - continue - extEnables = {} for k, elem in extTypes.items(): if k == s.name or (s.name in aliases.keys() and k in aliases[s.name]): @@ -828,49 +791,131 @@ def PrintChainIterator(listName, structures, all_structures, checkExtLoc, extTyp for alias in aliases[s.name]: oldVersionName = alias - if s.name in structures: - out += AddGuardHeader(s) - out += f" if (structure->sType == {s.sTypeName}" - if s.name in portability_structs: - out += f" && p.Type() != OutputType::json" - has_version = version is not None - has_extNameStr = len(extEnables) > 0 or s.name in aliases.keys() - - if has_version or has_extNameStr: - out += f" &&\n (" - has_printed_condition = False - if has_extNameStr: - for key, value in extEnables.items(): - if has_printed_condition: - out += f' || ' - has_printed_condition = True - if value == EXTENSION_TYPE_DEVICE: - out += f"gpu.CheckPhysicalDeviceExtensionIncluded({key})" - elif value == EXTENSION_TYPE_INSTANCE: - out += f"inst.CheckExtensionEnabled({key})" - else: - assert False, "Should never get here" - if has_version: + has_version = version is not None + has_extNameStr = len(extEnables) > 0 or s.name in aliases.keys() + if has_version or has_extNameStr: + out += f" if (" + has_printed_condition = False + if has_extNameStr: + for key, value in extEnables.items(): if has_printed_condition: - out += f' ||\n ' - out += f"{version_desc}.minor >= {str(version)}" - out += f")" - out += f") {{\n" - out += f" {s.name}* props = ({s.name}*)structure;\n" - out += f" Dump{s.name}(p, " - if s.name in aliases.keys() and version is not None: - out += f'{version_desc}.minor >= {version} ?"{s.name}":"{oldVersionName}"' - else: - out += f'"{s.name}"' - out += f", *props);\n" - out += f" p.AddNewline();\n" - out += f" }}\n" - out += AddGuardFooter(s) - out += f" place = structure->pNext;\n" - out += f" }}\n" - out += f"}}\n" + out += f'\n || ' + has_printed_condition = True + if value == EXTENSION_TYPE_DEVICE: + out += f"gpu.CheckPhysicalDeviceExtensionIncluded({key})" + elif value == EXTENSION_TYPE_INSTANCE: + out += f"inst.CheckExtensionEnabled({key})" + else: + assert False, "Should never get here" + if has_version: + if has_printed_condition: + out += f'\n || ' + out += f"{version_desc}.minor >= {str(version)}" + out += f")\n " + else: + out += " " + out += f"chain_members.push_back(reinterpret_cast(&{s.name[2:]}));\n" + out += AddGuardFooter(s) + chain_param_list = [] + chain_arg_list = [] + if chain_details.get('type') in [EXTENSION_TYPE_INSTANCE, EXTENSION_TYPE_BOTH]: + chain_param_list.append('AppInstance &inst') + chain_arg_list.append('inst') + if chain_details.get('type') in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: + chain_param_list.append('AppGpu &gpu') + chain_arg_list.append('gpu') + + out += f""" + if (!chain_members.empty()) {{ + for(size_t i = 0; i < chain_members.size() - 1; i++){{ + chain_members[i]->pNext = chain_members[i + 1]; + }} + start_of_chain = chain_members[0]; + }} + }} +}}; +void setup_{listName}_chain({chain_details['holder_type']}& start, std::unique_ptr<{listName}_chain>& chain, {','.join(chain_param_list)}){{ + chain = std::unique_ptr<{listName}_chain>(new {listName}_chain()); + chain->initialize_chain({','.join(chain_arg_list)}); + start.pNext = chain->start_of_chain; +}}; +""" + if chain_details.get('print_iterator'): + out += '\n' + out += f"void chain_iterator_{listName}(Printer &p, " + if chain_details.get('type') in [EXTENSION_TYPE_INSTANCE, EXTENSION_TYPE_BOTH]: + out += f"AppInstance &inst, " + if chain_details.get('type') in [EXTENSION_TYPE_DEVICE, EXTENSION_TYPE_BOTH]: + out += f"AppGpu &gpu, " + out += f"void * place) {{\n" + out += f" while (place) {{\n" + out += f" struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place;\n" + out += f" p.SetSubHeader();\n" + + for s in sorted_structures: + if s.sTypeName is None or s.name in struct_blacklist: + continue + + extEnables = {} + for k, elem in extTypes.items(): + if k == s.name or (s.name in aliases.keys() and k in aliases[s.name]): + for e in elem: + extEnables[e.extNameStr] = e.type + + version = None + oldVersionName = None + for v in vulkan_versions: + if s.name in v.names: + version = v.minorVersion + if s.name in aliases.keys(): + for alias in aliases[s.name]: + oldVersionName = alias + + if s.name in structures: + out += AddGuardHeader(s) + out += f" if (structure->sType == {s.sTypeName}" + if s.name in portability_structs: + out += f" && p.Type() != OutputType::json" + has_version = version is not None + has_extNameStr = len(extEnables) > 0 or s.name in aliases.keys() + + if has_version or has_extNameStr: + out += f" &&\n (" + has_printed_condition = False + if has_extNameStr: + for key, value in extEnables.items(): + if has_printed_condition: + out += f' || ' + has_printed_condition = True + if value == EXTENSION_TYPE_DEVICE: + out += f"gpu.CheckPhysicalDeviceExtensionIncluded({key})" + elif value == EXTENSION_TYPE_INSTANCE: + out += f"inst.CheckExtensionEnabled({key})" + else: + assert False, "Should never get here" + if has_version: + if has_printed_condition: + out += f' ||\n ' + out += f"{version_desc}.minor >= {str(version)}" + out += f")" + out += f") {{\n" + out += f" {s.name}* props = ({s.name}*)structure;\n" + out += f" Dump{s.name}(p, " + if s.name in aliases.keys() and version is not None: + out += f'{version_desc}.minor >= {version} ?"{s.name}":"{oldVersionName}"' + else: + out += f'"{s.name}"' + out += f", *props);\n" + out += f" p.AddNewline();\n" + out += f" }}\n" + out += AddGuardFooter(s) + out += f" place = structure->pNext;\n" + out += f" }}\n" + out += f"}}\n" + return out + def PrintStructComparisonForwardDecl(structure): out = '' out += f"bool operator==(const {structure.name} & a, const {structure.name} b);\n" diff --git a/vulkaninfo/generated/vulkaninfo.hpp b/vulkaninfo/generated/vulkaninfo.hpp index cb2ec147..620c5367 100644 --- a/vulkaninfo/generated/vulkaninfo.hpp +++ b/vulkaninfo/generated/vulkaninfo.hpp @@ -3319,7 +3319,7 @@ struct phys_device_props2_chain { VkPhysicalDeviceVulkan11Properties PhysicalDeviceVulkan11Properties{}; VkPhysicalDeviceVulkan12Properties PhysicalDeviceVulkan12Properties{}; VkPhysicalDeviceVulkan13Properties PhysicalDeviceVulkan13Properties{}; - void initialize_chain() noexcept { + void initialize_chain(AppInstance &inst, AppGpu &gpu ) noexcept { PhysicalDeviceAccelerationStructurePropertiesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR; PhysicalDeviceBlendOperationAdvancedPropertiesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT; PhysicalDeviceConservativeRasterizationPropertiesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; @@ -3379,588 +3379,152 @@ struct phys_device_props2_chain { PhysicalDeviceVulkan12Properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES; PhysicalDeviceVulkan13Properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES; std::vector chain_members; - chain_members.push_back(reinterpret_cast(&PhysicalDeviceAccelerationStructurePropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceBlendOperationAdvancedPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceConservativeRasterizationPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceCooperativeMatrixPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceCustomBorderColorPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthStencilResolveProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorIndexingProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDiscardRectanglePropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDriverProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDrmPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState3PropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceExternalMemoryHostPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFloatControlsProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMap2PropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMapPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderBarycentricPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShadingRatePropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceIDProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceInlineUniformBlockProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceLineRasterizationPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance3Properties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Properties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5PropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMeshShaderPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiDrawPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiviewProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceNestedCommandBufferPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceOpacityMicromapPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePCIBusInfoPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePerformanceQueryPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineRobustnessPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePointClippingProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceAccelerationStructurePropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceBlendOperationAdvancedPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceConservativeRasterizationPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceCooperativeMatrixPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceCustomBorderColorPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthStencilResolveProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorIndexingProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDiscardRectanglePropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDriverProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDrmPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState3PropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceExternalMemoryHostPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFloatControlsProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMap2PropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMapPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderBarycentricPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShadingRatePropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT)); + if (inst.CheckExtensionEnabled(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME) + || inst.CheckExtensionEnabled(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME) + || inst.CheckExtensionEnabled(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceIDProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceInlineUniformBlockProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceLineRasterizationPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_3_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance3Properties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_4_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Properties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5PropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MESH_SHADER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMeshShaderPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MULTI_DRAW_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiDrawPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MULTIVIEW_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiviewProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceNestedCommandBufferPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceOpacityMicromapPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PCI_BUS_INFO_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePCIBusInfoPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePerformanceQueryPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineRobustnessPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_2_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePointClippingProperties)); #ifdef VK_ENABLE_BETA_EXTENSIONS - chain_members.push_back(reinterpret_cast(&PhysicalDevicePortabilitySubsetPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePortabilitySubsetPropertiesKHR)); #endif // VK_ENABLE_BETA_EXTENSIONS - chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePushDescriptorPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPipelinePropertiesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRobustness2PropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSampleLocationsPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerFilterMinmaxProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderIntegerDotProductProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderModuleIdentifierPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderObjectPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTileImagePropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupSizeControlProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTexelBufferAlignmentProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTimelineSemaphoreProperties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTransformFeedbackPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorPropertiesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Properties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Properties)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Properties)); + if (gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePushDescriptorPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPipelinePropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRobustness2PropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSampleLocationsPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerFilterMinmaxProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderIntegerDotProductProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderModuleIdentifierPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_OBJECT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderObjectPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTileImagePropertiesEXT)); + if (gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupSizeControlProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTexelBufferAlignmentProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTimelineSemaphoreProperties)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTransformFeedbackPropertiesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorPropertiesEXT)); + if (gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Properties)); + if (gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Properties)); + if (gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Properties)); - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; + } }; -void setup_phys_device_props2_chain(VkPhysicalDeviceProperties2& start, std::unique_ptr& chain){ +void setup_phys_device_props2_chain(VkPhysicalDeviceProperties2& start, std::unique_ptr& chain, AppInstance &inst,AppGpu &gpu){ chain = std::unique_ptr(new phys_device_props2_chain()); - chain->initialize_chain(); + chain->initialize_chain(inst,gpu); start.pNext = chain->start_of_chain; }; -struct phys_device_mem_props2_chain { - phys_device_mem_props2_chain() = default; - phys_device_mem_props2_chain(const phys_device_mem_props2_chain &) = delete; - phys_device_mem_props2_chain& operator=(const phys_device_mem_props2_chain &) = delete; - phys_device_mem_props2_chain(phys_device_mem_props2_chain &&) = delete; - phys_device_mem_props2_chain& operator=(phys_device_mem_props2_chain &&) = delete; - void* start_of_chain = nullptr; - VkPhysicalDeviceMemoryBudgetPropertiesEXT PhysicalDeviceMemoryBudgetPropertiesEXT{}; - void initialize_chain() noexcept { - PhysicalDeviceMemoryBudgetPropertiesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; - std::vector chain_members; - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMemoryBudgetPropertiesEXT)); - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; - } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; -}; -void setup_phys_device_mem_props2_chain(VkPhysicalDeviceMemoryProperties2& start, std::unique_ptr& chain){ - chain = std::unique_ptr(new phys_device_mem_props2_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}; -struct phys_device_features2_chain { - phys_device_features2_chain() = default; - phys_device_features2_chain(const phys_device_features2_chain &) = delete; - phys_device_features2_chain& operator=(const phys_device_features2_chain &) = delete; - phys_device_features2_chain(phys_device_features2_chain &&) = delete; - phys_device_features2_chain& operator=(phys_device_features2_chain &&) = delete; - void* start_of_chain = nullptr; - VkPhysicalDevice16BitStorageFeatures PhysicalDevice16BitStorageFeatures{}; - VkPhysicalDevice4444FormatsFeaturesEXT PhysicalDevice4444FormatsFeaturesEXT{}; - VkPhysicalDevice8BitStorageFeatures PhysicalDevice8BitStorageFeatures{}; - VkPhysicalDeviceASTCDecodeFeaturesEXT PhysicalDeviceASTCDecodeFeaturesEXT{}; - VkPhysicalDeviceAccelerationStructureFeaturesKHR PhysicalDeviceAccelerationStructureFeaturesKHR{}; - VkPhysicalDeviceAddressBindingReportFeaturesEXT PhysicalDeviceAddressBindingReportFeaturesEXT{}; - VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT{}; - VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT{}; - VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT PhysicalDeviceBlendOperationAdvancedFeaturesEXT{}; - VkPhysicalDeviceBorderColorSwizzleFeaturesEXT PhysicalDeviceBorderColorSwizzleFeaturesEXT{}; - VkPhysicalDeviceBufferDeviceAddressFeatures PhysicalDeviceBufferDeviceAddressFeatures{}; - VkPhysicalDeviceBufferDeviceAddressFeaturesEXT PhysicalDeviceBufferDeviceAddressFeaturesEXT{}; - VkPhysicalDeviceColorWriteEnableFeaturesEXT PhysicalDeviceColorWriteEnableFeaturesEXT{}; - VkPhysicalDeviceConditionalRenderingFeaturesEXT PhysicalDeviceConditionalRenderingFeaturesEXT{}; - VkPhysicalDeviceCooperativeMatrixFeaturesKHR PhysicalDeviceCooperativeMatrixFeaturesKHR{}; - VkPhysicalDeviceCustomBorderColorFeaturesEXT PhysicalDeviceCustomBorderColorFeaturesEXT{}; - VkPhysicalDeviceDepthBiasControlFeaturesEXT PhysicalDeviceDepthBiasControlFeaturesEXT{}; - VkPhysicalDeviceDepthClampZeroOneFeaturesEXT PhysicalDeviceDepthClampZeroOneFeaturesEXT{}; - VkPhysicalDeviceDepthClipControlFeaturesEXT PhysicalDeviceDepthClipControlFeaturesEXT{}; - VkPhysicalDeviceDepthClipEnableFeaturesEXT PhysicalDeviceDepthClipEnableFeaturesEXT{}; - VkPhysicalDeviceDescriptorBufferFeaturesEXT PhysicalDeviceDescriptorBufferFeaturesEXT{}; - VkPhysicalDeviceDescriptorIndexingFeatures PhysicalDeviceDescriptorIndexingFeatures{}; - VkPhysicalDeviceDeviceMemoryReportFeaturesEXT PhysicalDeviceDeviceMemoryReportFeaturesEXT{}; - VkPhysicalDeviceDynamicRenderingFeatures PhysicalDeviceDynamicRenderingFeatures{}; - VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT{}; - VkPhysicalDeviceExtendedDynamicState2FeaturesEXT PhysicalDeviceExtendedDynamicState2FeaturesEXT{}; - VkPhysicalDeviceExtendedDynamicState3FeaturesEXT PhysicalDeviceExtendedDynamicState3FeaturesEXT{}; - VkPhysicalDeviceExtendedDynamicStateFeaturesEXT PhysicalDeviceExtendedDynamicStateFeaturesEXT{}; - VkPhysicalDeviceFaultFeaturesEXT PhysicalDeviceFaultFeaturesEXT{}; - VkPhysicalDeviceFragmentDensityMap2FeaturesEXT PhysicalDeviceFragmentDensityMap2FeaturesEXT{}; - VkPhysicalDeviceFragmentDensityMapFeaturesEXT PhysicalDeviceFragmentDensityMapFeaturesEXT{}; - VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR PhysicalDeviceFragmentShaderBarycentricFeaturesKHR{}; - VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT PhysicalDeviceFragmentShaderInterlockFeaturesEXT{}; - VkPhysicalDeviceFragmentShadingRateFeaturesKHR PhysicalDeviceFragmentShadingRateFeaturesKHR{}; - VkPhysicalDeviceFrameBoundaryFeaturesEXT PhysicalDeviceFrameBoundaryFeaturesEXT{}; - VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR PhysicalDeviceGlobalPriorityQueryFeaturesKHR{}; - VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT{}; - VkPhysicalDeviceHostImageCopyFeaturesEXT PhysicalDeviceHostImageCopyFeaturesEXT{}; - char VkPhysicalDeviceHostImageCopyFeaturesEXT_padding[64]; - VkPhysicalDeviceHostQueryResetFeatures PhysicalDeviceHostQueryResetFeatures{}; - VkPhysicalDeviceImage2DViewOf3DFeaturesEXT PhysicalDeviceImage2DViewOf3DFeaturesEXT{}; - VkPhysicalDeviceImageCompressionControlFeaturesEXT PhysicalDeviceImageCompressionControlFeaturesEXT{}; - VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT{}; - VkPhysicalDeviceImageRobustnessFeatures PhysicalDeviceImageRobustnessFeatures{}; - VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT PhysicalDeviceImageSlicedViewOf3DFeaturesEXT{}; - VkPhysicalDeviceImageViewMinLodFeaturesEXT PhysicalDeviceImageViewMinLodFeaturesEXT{}; - VkPhysicalDeviceImagelessFramebufferFeatures PhysicalDeviceImagelessFramebufferFeatures{}; - VkPhysicalDeviceIndexTypeUint8FeaturesEXT PhysicalDeviceIndexTypeUint8FeaturesEXT{}; - VkPhysicalDeviceInlineUniformBlockFeatures PhysicalDeviceInlineUniformBlockFeatures{}; - VkPhysicalDeviceLegacyDitheringFeaturesEXT PhysicalDeviceLegacyDitheringFeaturesEXT{}; - VkPhysicalDeviceLineRasterizationFeaturesEXT PhysicalDeviceLineRasterizationFeaturesEXT{}; - VkPhysicalDeviceMaintenance4Features PhysicalDeviceMaintenance4Features{}; - VkPhysicalDeviceMaintenance5FeaturesKHR PhysicalDeviceMaintenance5FeaturesKHR{}; - VkPhysicalDeviceMemoryPriorityFeaturesEXT PhysicalDeviceMemoryPriorityFeaturesEXT{}; - VkPhysicalDeviceMeshShaderFeaturesEXT PhysicalDeviceMeshShaderFeaturesEXT{}; - VkPhysicalDeviceMultiDrawFeaturesEXT PhysicalDeviceMultiDrawFeaturesEXT{}; - VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT{}; - VkPhysicalDeviceMultiviewFeatures PhysicalDeviceMultiviewFeatures{}; - VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT PhysicalDeviceMutableDescriptorTypeFeaturesEXT{}; - VkPhysicalDeviceNestedCommandBufferFeaturesEXT PhysicalDeviceNestedCommandBufferFeaturesEXT{}; - VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT PhysicalDeviceNonSeamlessCubeMapFeaturesEXT{}; - VkPhysicalDeviceOpacityMicromapFeaturesEXT PhysicalDeviceOpacityMicromapFeaturesEXT{}; - VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT{}; - VkPhysicalDevicePerformanceQueryFeaturesKHR PhysicalDevicePerformanceQueryFeaturesKHR{}; - VkPhysicalDevicePipelineCreationCacheControlFeatures PhysicalDevicePipelineCreationCacheControlFeatures{}; - VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR{}; - VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT{}; - VkPhysicalDevicePipelinePropertiesFeaturesEXT PhysicalDevicePipelinePropertiesFeaturesEXT{}; - VkPhysicalDevicePipelineProtectedAccessFeaturesEXT PhysicalDevicePipelineProtectedAccessFeaturesEXT{}; - VkPhysicalDevicePipelineRobustnessFeaturesEXT PhysicalDevicePipelineRobustnessFeaturesEXT{}; -#ifdef VK_ENABLE_BETA_EXTENSIONS - VkPhysicalDevicePortabilitySubsetFeaturesKHR PhysicalDevicePortabilitySubsetFeaturesKHR{}; -#endif // VK_ENABLE_BETA_EXTENSIONS - VkPhysicalDevicePresentIdFeaturesKHR PhysicalDevicePresentIdFeaturesKHR{}; - VkPhysicalDevicePresentWaitFeaturesKHR PhysicalDevicePresentWaitFeaturesKHR{}; - VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT{}; - VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT{}; - VkPhysicalDevicePrivateDataFeatures PhysicalDevicePrivateDataFeatures{}; - VkPhysicalDeviceProtectedMemoryFeatures PhysicalDeviceProtectedMemoryFeatures{}; - VkPhysicalDeviceProvokingVertexFeaturesEXT PhysicalDeviceProvokingVertexFeaturesEXT{}; - VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT PhysicalDeviceRGBA10X6FormatsFeaturesEXT{}; - VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT{}; - VkPhysicalDeviceRayQueryFeaturesKHR PhysicalDeviceRayQueryFeaturesKHR{}; - VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR PhysicalDeviceRayTracingMaintenance1FeaturesKHR{}; - VkPhysicalDeviceRayTracingPipelineFeaturesKHR PhysicalDeviceRayTracingPipelineFeaturesKHR{}; - VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR PhysicalDeviceRayTracingPositionFetchFeaturesKHR{}; - VkPhysicalDeviceRobustness2FeaturesEXT PhysicalDeviceRobustness2FeaturesEXT{}; - VkPhysicalDeviceSamplerYcbcrConversionFeatures PhysicalDeviceSamplerYcbcrConversionFeatures{}; - VkPhysicalDeviceScalarBlockLayoutFeatures PhysicalDeviceScalarBlockLayoutFeatures{}; - VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures PhysicalDeviceSeparateDepthStencilLayoutsFeatures{}; - VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT PhysicalDeviceShaderAtomicFloat2FeaturesEXT{}; - VkPhysicalDeviceShaderAtomicFloatFeaturesEXT PhysicalDeviceShaderAtomicFloatFeaturesEXT{}; - VkPhysicalDeviceShaderAtomicInt64Features PhysicalDeviceShaderAtomicInt64Features{}; - VkPhysicalDeviceShaderClockFeaturesKHR PhysicalDeviceShaderClockFeaturesKHR{}; - VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures PhysicalDeviceShaderDemoteToHelperInvocationFeatures{}; - VkPhysicalDeviceShaderDrawParametersFeatures PhysicalDeviceShaderDrawParametersFeatures{}; - VkPhysicalDeviceShaderFloat16Int8Features PhysicalDeviceShaderFloat16Int8Features{}; - VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT PhysicalDeviceShaderImageAtomicInt64FeaturesEXT{}; - VkPhysicalDeviceShaderIntegerDotProductFeatures PhysicalDeviceShaderIntegerDotProductFeatures{}; - char VkPhysicalDeviceShaderIntegerDotProductFeatures_padding[64]; - VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT PhysicalDeviceShaderModuleIdentifierFeaturesEXT{}; - VkPhysicalDeviceShaderObjectFeaturesEXT PhysicalDeviceShaderObjectFeaturesEXT{}; - VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures PhysicalDeviceShaderSubgroupExtendedTypesFeatures{}; - VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR{}; - VkPhysicalDeviceShaderTerminateInvocationFeatures PhysicalDeviceShaderTerminateInvocationFeatures{}; - VkPhysicalDeviceShaderTileImageFeaturesEXT PhysicalDeviceShaderTileImageFeaturesEXT{}; - VkPhysicalDeviceSubgroupSizeControlFeatures PhysicalDeviceSubgroupSizeControlFeatures{}; - VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT PhysicalDeviceSubpassMergeFeedbackFeaturesEXT{}; - VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT PhysicalDeviceSwapchainMaintenance1FeaturesEXT{}; - VkPhysicalDeviceSynchronization2Features PhysicalDeviceSynchronization2Features{}; - VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT PhysicalDeviceTexelBufferAlignmentFeaturesEXT{}; - VkPhysicalDeviceTextureCompressionASTCHDRFeatures PhysicalDeviceTextureCompressionASTCHDRFeatures{}; - VkPhysicalDeviceTimelineSemaphoreFeatures PhysicalDeviceTimelineSemaphoreFeatures{}; - VkPhysicalDeviceTransformFeedbackFeaturesEXT PhysicalDeviceTransformFeedbackFeaturesEXT{}; - VkPhysicalDeviceUniformBufferStandardLayoutFeatures PhysicalDeviceUniformBufferStandardLayoutFeatures{}; - VkPhysicalDeviceVariablePointersFeatures PhysicalDeviceVariablePointersFeatures{}; - VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT PhysicalDeviceVertexAttributeDivisorFeaturesEXT{}; - VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT PhysicalDeviceVertexInputDynamicStateFeaturesEXT{}; - VkPhysicalDeviceVulkan11Features PhysicalDeviceVulkan11Features{}; - VkPhysicalDeviceVulkan12Features PhysicalDeviceVulkan12Features{}; - VkPhysicalDeviceVulkan13Features PhysicalDeviceVulkan13Features{}; - VkPhysicalDeviceVulkanMemoryModelFeatures PhysicalDeviceVulkanMemoryModelFeatures{}; - VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR{}; - VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT{}; - VkPhysicalDeviceYcbcrImageArraysFeaturesEXT PhysicalDeviceYcbcrImageArraysFeaturesEXT{}; - VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures{}; - void initialize_chain() noexcept { - PhysicalDevice16BitStorageFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; - PhysicalDevice4444FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; - PhysicalDevice8BitStorageFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; - PhysicalDeviceASTCDecodeFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT; - PhysicalDeviceAccelerationStructureFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; - PhysicalDeviceAddressBindingReportFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT; - PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT; - PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT; - PhysicalDeviceBlendOperationAdvancedFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; - PhysicalDeviceBorderColorSwizzleFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT; - PhysicalDeviceBufferDeviceAddressFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; - PhysicalDeviceBufferDeviceAddressFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; - PhysicalDeviceColorWriteEnableFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT; - PhysicalDeviceConditionalRenderingFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT; - PhysicalDeviceCooperativeMatrixFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR; - PhysicalDeviceCustomBorderColorFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; - PhysicalDeviceDepthBiasControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT; - PhysicalDeviceDepthClampZeroOneFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT; - PhysicalDeviceDepthClipControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT; - PhysicalDeviceDepthClipEnableFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; - PhysicalDeviceDescriptorBufferFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; - PhysicalDeviceDescriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; - PhysicalDeviceDeviceMemoryReportFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT; - PhysicalDeviceDynamicRenderingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; - PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT; - PhysicalDeviceExtendedDynamicState2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; - PhysicalDeviceExtendedDynamicState3FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; - PhysicalDeviceExtendedDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; - PhysicalDeviceFaultFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT; - PhysicalDeviceFragmentDensityMap2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT; - PhysicalDeviceFragmentDensityMapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT; - PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; - PhysicalDeviceFragmentShaderInterlockFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; - PhysicalDeviceFragmentShadingRateFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR; - PhysicalDeviceFrameBoundaryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT; - PhysicalDeviceGlobalPriorityQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR; - PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT; - PhysicalDeviceHostImageCopyFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT; - PhysicalDeviceHostQueryResetFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; - PhysicalDeviceImage2DViewOf3DFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT; - PhysicalDeviceImageCompressionControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT; - PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT; - PhysicalDeviceImageRobustnessFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; - PhysicalDeviceImageSlicedViewOf3DFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT; - PhysicalDeviceImageViewMinLodFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT; - PhysicalDeviceImagelessFramebufferFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; - PhysicalDeviceIndexTypeUint8FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT; - PhysicalDeviceInlineUniformBlockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; - PhysicalDeviceLegacyDitheringFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT; - PhysicalDeviceLineRasterizationFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; - PhysicalDeviceMaintenance4Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; - PhysicalDeviceMaintenance5FeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR; - PhysicalDeviceMemoryPriorityFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT; - PhysicalDeviceMeshShaderFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; - PhysicalDeviceMultiDrawFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT; - PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT; - PhysicalDeviceMultiviewFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES; - PhysicalDeviceMutableDescriptorTypeFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; - PhysicalDeviceNestedCommandBufferFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT; - PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT; - PhysicalDeviceOpacityMicromapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT; - PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT; - PhysicalDevicePerformanceQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR; - PhysicalDevicePipelineCreationCacheControlFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; - PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; - PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT; - PhysicalDevicePipelinePropertiesFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT; - PhysicalDevicePipelineProtectedAccessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT; - PhysicalDevicePipelineRobustnessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT; -#ifdef VK_ENABLE_BETA_EXTENSIONS - PhysicalDevicePortabilitySubsetFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; -#endif // VK_ENABLE_BETA_EXTENSIONS - PhysicalDevicePresentIdFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR; - PhysicalDevicePresentWaitFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR; - PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; - PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT; - PhysicalDevicePrivateDataFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; - PhysicalDeviceProtectedMemoryFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES; - PhysicalDeviceProvokingVertexFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; - PhysicalDeviceRGBA10X6FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT; - PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; - PhysicalDeviceRayQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR; - PhysicalDeviceRayTracingMaintenance1FeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR; - PhysicalDeviceRayTracingPipelineFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; - PhysicalDeviceRayTracingPositionFetchFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR; - PhysicalDeviceRobustness2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; - PhysicalDeviceSamplerYcbcrConversionFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; - PhysicalDeviceScalarBlockLayoutFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; - PhysicalDeviceSeparateDepthStencilLayoutsFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; - PhysicalDeviceShaderAtomicFloat2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT; - PhysicalDeviceShaderAtomicFloatFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; - PhysicalDeviceShaderAtomicInt64Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; - PhysicalDeviceShaderClockFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; - PhysicalDeviceShaderDemoteToHelperInvocationFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; - PhysicalDeviceShaderDrawParametersFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - PhysicalDeviceShaderFloat16Int8Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; - PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT; - PhysicalDeviceShaderIntegerDotProductFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; - PhysicalDeviceShaderModuleIdentifierFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT; - PhysicalDeviceShaderObjectFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT; - PhysicalDeviceShaderSubgroupExtendedTypesFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; - PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR; - PhysicalDeviceShaderTerminateInvocationFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; - PhysicalDeviceShaderTileImageFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT; - PhysicalDeviceSubgroupSizeControlFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; - PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT; - PhysicalDeviceSwapchainMaintenance1FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT; - PhysicalDeviceSynchronization2Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; - PhysicalDeviceTexelBufferAlignmentFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT; - PhysicalDeviceTextureCompressionASTCHDRFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; - PhysicalDeviceTimelineSemaphoreFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; - PhysicalDeviceTransformFeedbackFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; - PhysicalDeviceUniformBufferStandardLayoutFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; - PhysicalDeviceVariablePointersFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; - PhysicalDeviceVertexAttributeDivisorFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; - PhysicalDeviceVertexInputDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; - PhysicalDeviceVulkan11Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; - PhysicalDeviceVulkan12Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; - PhysicalDeviceVulkan13Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; - PhysicalDeviceVulkanMemoryModelFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; - PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; - PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT; - PhysicalDeviceYcbcrImageArraysFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT; - PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; - std::vector chain_members; - chain_members.push_back(reinterpret_cast(&PhysicalDevice16BitStorageFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDevice4444FormatsFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevice8BitStorageFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceASTCDecodeFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceAccelerationStructureFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceAddressBindingReportFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceBlendOperationAdvancedFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceBorderColorSwizzleFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceBufferDeviceAddressFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceBufferDeviceAddressFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceColorWriteEnableFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceConditionalRenderingFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceCooperativeMatrixFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceCustomBorderColorFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthBiasControlFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClampZeroOneFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClipControlFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClipEnableFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorIndexingFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDeviceMemoryReportFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDynamicRenderingFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState2FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState3FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicStateFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFaultFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMap2FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMapFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderBarycentricFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderInterlockFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShadingRateFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceFrameBoundaryFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceGlobalPriorityQueryFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceHostImageCopyFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceHostQueryResetFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImage2DViewOf3DFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageCompressionControlFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageRobustnessFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageViewMinLodFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceImagelessFramebufferFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceIndexTypeUint8FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceInlineUniformBlockFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceLegacyDitheringFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceLineRasterizationFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5FeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMemoryPriorityFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMeshShaderFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiDrawFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiviewFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceMutableDescriptorTypeFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceNestedCommandBufferFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceNonSeamlessCubeMapFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceOpacityMicromapFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePerformanceQueryFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineCreationCacheControlFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineExecutablePropertiesFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelinePropertiesFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineProtectedAccessFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineRobustnessFeaturesEXT)); -#ifdef VK_ENABLE_BETA_EXTENSIONS - chain_members.push_back(reinterpret_cast(&PhysicalDevicePortabilitySubsetFeaturesKHR)); -#endif // VK_ENABLE_BETA_EXTENSIONS - chain_members.push_back(reinterpret_cast(&PhysicalDevicePresentIdFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePresentWaitFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDevicePrivateDataFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRGBA10X6FormatsFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayQueryFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingMaintenance1FeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPipelineFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPositionFetchFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceRobustness2FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerYcbcrConversionFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceScalarBlockLayoutFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSeparateDepthStencilLayoutsFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicFloat2FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicFloatFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicInt64Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderClockFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDrawParametersFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderFloat16Int8Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderImageAtomicInt64FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderIntegerDotProductFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderModuleIdentifierFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderObjectFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderSubgroupExtendedTypesFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTerminateInvocationFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTileImageFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupSizeControlFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubpassMergeFeedbackFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSwapchainMaintenance1FeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceSynchronization2Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTexelBufferAlignmentFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTextureCompressionASTCHDRFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTimelineSemaphoreFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceTransformFeedbackFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceUniformBufferStandardLayoutFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVariablePointersFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Features)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkanMemoryModelFeatures)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceYcbcrImageArraysFeaturesEXT)); - chain_members.push_back(reinterpret_cast(&PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); - - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; - } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; -}; -void setup_phys_device_features2_chain(VkPhysicalDeviceFeatures2& start, std::unique_ptr& chain){ - chain = std::unique_ptr(new phys_device_features2_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}; -struct surface_capabilities2_chain { - surface_capabilities2_chain() = default; - surface_capabilities2_chain(const surface_capabilities2_chain &) = delete; - surface_capabilities2_chain& operator=(const surface_capabilities2_chain &) = delete; - surface_capabilities2_chain(surface_capabilities2_chain &&) = delete; - surface_capabilities2_chain& operator=(surface_capabilities2_chain &&) = delete; - void* start_of_chain = nullptr; - VkSharedPresentSurfaceCapabilitiesKHR SharedPresentSurfaceCapabilitiesKHR{}; -#ifdef VK_USE_PLATFORM_WIN32_KHR - VkSurfaceCapabilitiesFullScreenExclusiveEXT SurfaceCapabilitiesFullScreenExclusiveEXT{}; -#endif // VK_USE_PLATFORM_WIN32_KHR - VkSurfaceProtectedCapabilitiesKHR SurfaceProtectedCapabilitiesKHR{}; - void initialize_chain() noexcept { - SharedPresentSurfaceCapabilitiesKHR.sType = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; -#ifdef VK_USE_PLATFORM_WIN32_KHR - SurfaceCapabilitiesFullScreenExclusiveEXT.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; -#endif // VK_USE_PLATFORM_WIN32_KHR - SurfaceProtectedCapabilitiesKHR.sType = VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR; - std::vector chain_members; - chain_members.push_back(reinterpret_cast(&SharedPresentSurfaceCapabilitiesKHR)); -#ifdef VK_USE_PLATFORM_WIN32_KHR - chain_members.push_back(reinterpret_cast(&SurfaceCapabilitiesFullScreenExclusiveEXT)); -#endif // VK_USE_PLATFORM_WIN32_KHR - chain_members.push_back(reinterpret_cast(&SurfaceProtectedCapabilitiesKHR)); - - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; - } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; -}; -void setup_surface_capabilities2_chain(VkSurfaceCapabilities2KHR& start, std::unique_ptr& chain){ - chain = std::unique_ptr(new surface_capabilities2_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}; -struct format_properties2_chain { - format_properties2_chain() = default; - format_properties2_chain(const format_properties2_chain &) = delete; - format_properties2_chain& operator=(const format_properties2_chain &) = delete; - format_properties2_chain(format_properties2_chain &&) = delete; - format_properties2_chain& operator=(format_properties2_chain &&) = delete; - void* start_of_chain = nullptr; - VkFormatProperties3 FormatProperties3{}; - VkSubpassResolvePerformanceQueryEXT SubpassResolvePerformanceQueryEXT{}; - void initialize_chain() noexcept { - FormatProperties3.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3; - SubpassResolvePerformanceQueryEXT.sType = VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT; - std::vector chain_members; - chain_members.push_back(reinterpret_cast(&FormatProperties3)); - chain_members.push_back(reinterpret_cast(&SubpassResolvePerformanceQueryEXT)); - - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; - } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; -}; -void setup_format_properties2_chain(VkFormatProperties2& start, std::unique_ptr& chain){ - chain = std::unique_ptr(new format_properties2_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}; -struct queue_properties2_chain { - queue_properties2_chain() = default; - queue_properties2_chain(const queue_properties2_chain &) = delete; - queue_properties2_chain& operator=(const queue_properties2_chain &) = delete; - queue_properties2_chain(queue_properties2_chain &&) = delete; - queue_properties2_chain& operator=(queue_properties2_chain &&) = delete; - void* start_of_chain = nullptr; - VkQueueFamilyGlobalPriorityPropertiesKHR QueueFamilyGlobalPriorityPropertiesKHR{}; - VkQueueFamilyQueryResultStatusPropertiesKHR QueueFamilyQueryResultStatusPropertiesKHR{}; - VkQueueFamilyVideoPropertiesKHR QueueFamilyVideoPropertiesKHR{}; - void initialize_chain() noexcept { - QueueFamilyGlobalPriorityPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR; - QueueFamilyQueryResultStatusPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; - QueueFamilyVideoPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; - std::vector chain_members; - chain_members.push_back(reinterpret_cast(&QueueFamilyGlobalPriorityPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&QueueFamilyQueryResultStatusPropertiesKHR)); - chain_members.push_back(reinterpret_cast(&QueueFamilyVideoPropertiesKHR)); - - for(size_t i = 0; i < chain_members.size() - 1; i++){ - chain_members[i]->pNext = chain_members[i + 1]; - } - if (chain_members.size() > 0) start_of_chain = chain_members[0]; - }; -}; -void setup_queue_properties2_chain(VkQueueFamilyProperties2& start, std::unique_ptr& chain){ - chain = std::unique_ptr(new queue_properties2_chain()); - chain->initialize_chain(); - start.pNext = chain->start_of_chain; -}; void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gpu, void * place) { while (place) { struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place; @@ -4166,161 +3730,742 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp DumpVkPhysicalDevicePCIBusInfoPropertiesEXT(p, "VkPhysicalDevicePCIBusInfoPropertiesEXT", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))) { - VkPhysicalDevicePerformanceQueryPropertiesKHR* props = (VkPhysicalDevicePerformanceQueryPropertiesKHR*)structure; - DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(p, "VkPhysicalDevicePerformanceQueryPropertiesKHR", *props); + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME))) { + VkPhysicalDevicePerformanceQueryPropertiesKHR* props = (VkPhysicalDevicePerformanceQueryPropertiesKHR*)structure; + DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(p, "VkPhysicalDevicePerformanceQueryPropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME))) { + VkPhysicalDevicePipelineRobustnessPropertiesEXT* props = (VkPhysicalDevicePipelineRobustnessPropertiesEXT*)structure; + DumpVkPhysicalDevicePipelineRobustnessPropertiesEXT(p, "VkPhysicalDevicePipelineRobustnessPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_2_EXTENSION_NAME) || + gpu.api_version.minor >= 1)) { + VkPhysicalDevicePointClippingProperties* props = (VkPhysicalDevicePointClippingProperties*)structure; + DumpVkPhysicalDevicePointClippingProperties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDevicePointClippingProperties":"VkPhysicalDevicePointClippingPropertiesKHR", *props); + p.AddNewline(); + } +#ifdef VK_ENABLE_BETA_EXTENSIONS + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR && p.Type() != OutputType::json && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))) { + VkPhysicalDevicePortabilitySubsetPropertiesKHR* props = (VkPhysicalDevicePortabilitySubsetPropertiesKHR*)structure; + DumpVkPhysicalDevicePortabilitySubsetPropertiesKHR(p, "VkPhysicalDevicePortabilitySubsetPropertiesKHR", *props); + p.AddNewline(); + } +#endif // VK_ENABLE_BETA_EXTENSIONS + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES && + (gpu.api_version.minor >= 1)) { + VkPhysicalDeviceProtectedMemoryProperties* props = (VkPhysicalDeviceProtectedMemoryProperties*)structure; + DumpVkPhysicalDeviceProtectedMemoryProperties(p, "VkPhysicalDeviceProtectedMemoryProperties", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME))) { + VkPhysicalDeviceProvokingVertexPropertiesEXT* props = (VkPhysicalDeviceProvokingVertexPropertiesEXT*)structure; + DumpVkPhysicalDeviceProvokingVertexPropertiesEXT(p, "VkPhysicalDeviceProvokingVertexPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))) { + VkPhysicalDevicePushDescriptorPropertiesKHR* props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)structure; + DumpVkPhysicalDevicePushDescriptorPropertiesKHR(p, "VkPhysicalDevicePushDescriptorPropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME))) { + VkPhysicalDeviceRayTracingPipelinePropertiesKHR* props = (VkPhysicalDeviceRayTracingPipelinePropertiesKHR*)structure; + DumpVkPhysicalDeviceRayTracingPipelinePropertiesKHR(p, "VkPhysicalDeviceRayTracingPipelinePropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME))) { + VkPhysicalDeviceRobustness2PropertiesEXT* props = (VkPhysicalDeviceRobustness2PropertiesEXT*)structure; + DumpVkPhysicalDeviceRobustness2PropertiesEXT(p, "VkPhysicalDeviceRobustness2PropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME))) { + VkPhysicalDeviceSampleLocationsPropertiesEXT* props = (VkPhysicalDeviceSampleLocationsPropertiesEXT*)structure; + DumpVkPhysicalDeviceSampleLocationsPropertiesEXT(p, "VkPhysicalDeviceSampleLocationsPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME) || + gpu.api_version.minor >= 2)) { + VkPhysicalDeviceSamplerFilterMinmaxProperties* props = (VkPhysicalDeviceSamplerFilterMinmaxProperties*)structure; + DumpVkPhysicalDeviceSamplerFilterMinmaxProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceSamplerFilterMinmaxProperties":"VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME) || + gpu.api_version.minor >= 3)) { + VkPhysicalDeviceShaderIntegerDotProductProperties* props = (VkPhysicalDeviceShaderIntegerDotProductProperties*)structure; + DumpVkPhysicalDeviceShaderIntegerDotProductProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderIntegerDotProductProperties":"VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME))) { + VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT* props = (VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT*)structure; + DumpVkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(p, "VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_OBJECT_EXTENSION_NAME))) { + VkPhysicalDeviceShaderObjectPropertiesEXT* props = (VkPhysicalDeviceShaderObjectPropertiesEXT*)structure; + DumpVkPhysicalDeviceShaderObjectPropertiesEXT(p, "VkPhysicalDeviceShaderObjectPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME))) { + VkPhysicalDeviceShaderTileImagePropertiesEXT* props = (VkPhysicalDeviceShaderTileImagePropertiesEXT*)structure; + DumpVkPhysicalDeviceShaderTileImagePropertiesEXT(p, "VkPhysicalDeviceShaderTileImagePropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES && + (gpu.api_version.minor >= 1)) { + VkPhysicalDeviceSubgroupProperties* props = (VkPhysicalDeviceSubgroupProperties*)structure; + DumpVkPhysicalDeviceSubgroupProperties(p, "VkPhysicalDeviceSubgroupProperties", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME) || + gpu.api_version.minor >= 3)) { + VkPhysicalDeviceSubgroupSizeControlProperties* props = (VkPhysicalDeviceSubgroupSizeControlProperties*)structure; + DumpVkPhysicalDeviceSubgroupSizeControlProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceSubgroupSizeControlProperties":"VkPhysicalDeviceSubgroupSizeControlPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME) || + gpu.api_version.minor >= 3)) { + VkPhysicalDeviceTexelBufferAlignmentProperties* props = (VkPhysicalDeviceTexelBufferAlignmentProperties*)structure; + DumpVkPhysicalDeviceTexelBufferAlignmentProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceTexelBufferAlignmentProperties":"VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) || + gpu.api_version.minor >= 2)) { + VkPhysicalDeviceTimelineSemaphoreProperties* props = (VkPhysicalDeviceTimelineSemaphoreProperties*)structure; + DumpVkPhysicalDeviceTimelineSemaphoreProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceTimelineSemaphoreProperties":"VkPhysicalDeviceTimelineSemaphorePropertiesKHR", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { + VkPhysicalDeviceTransformFeedbackPropertiesEXT* props = (VkPhysicalDeviceTransformFeedbackPropertiesEXT*)structure; + DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(p, "VkPhysicalDeviceTransformFeedbackPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT && + (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME))) { + VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* props = (VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*)structure; + DumpVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(p, "VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES && + (gpu.api_version.minor >= 2)) { + VkPhysicalDeviceVulkan11Properties* props = (VkPhysicalDeviceVulkan11Properties*)structure; + DumpVkPhysicalDeviceVulkan11Properties(p, "VkPhysicalDeviceVulkan11Properties", *props); + p.AddNewline(); + } + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES && + (gpu.api_version.minor >= 2)) { + VkPhysicalDeviceVulkan12Properties* props = (VkPhysicalDeviceVulkan12Properties*)structure; + DumpVkPhysicalDeviceVulkan12Properties(p, "VkPhysicalDeviceVulkan12Properties", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME))) { - VkPhysicalDevicePipelineRobustnessPropertiesEXT* props = (VkPhysicalDevicePipelineRobustnessPropertiesEXT*)structure; - DumpVkPhysicalDevicePipelineRobustnessPropertiesEXT(p, "VkPhysicalDevicePipelineRobustnessPropertiesEXT", *props); + if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES && + (gpu.api_version.minor >= 3)) { + VkPhysicalDeviceVulkan13Properties* props = (VkPhysicalDeviceVulkan13Properties*)structure; + DumpVkPhysicalDeviceVulkan13Properties(p, "VkPhysicalDeviceVulkan13Properties", *props); p.AddNewline(); } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_2_EXTENSION_NAME) || - gpu.api_version.minor >= 1)) { - VkPhysicalDevicePointClippingProperties* props = (VkPhysicalDevicePointClippingProperties*)structure; - DumpVkPhysicalDevicePointClippingProperties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDevicePointClippingProperties":"VkPhysicalDevicePointClippingPropertiesKHR", *props); - p.AddNewline(); + place = structure->pNext; + } +} +struct phys_device_mem_props2_chain { + phys_device_mem_props2_chain() = default; + phys_device_mem_props2_chain(const phys_device_mem_props2_chain &) = delete; + phys_device_mem_props2_chain& operator=(const phys_device_mem_props2_chain &) = delete; + phys_device_mem_props2_chain(phys_device_mem_props2_chain &&) = delete; + phys_device_mem_props2_chain& operator=(phys_device_mem_props2_chain &&) = delete; + void* start_of_chain = nullptr; + VkPhysicalDeviceMemoryBudgetPropertiesEXT PhysicalDeviceMemoryBudgetPropertiesEXT{}; + void initialize_chain(AppGpu &gpu ) noexcept { + PhysicalDeviceMemoryBudgetPropertiesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; + std::vector chain_members; + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMemoryBudgetPropertiesEXT)); + + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; } + } +}; +void setup_phys_device_mem_props2_chain(VkPhysicalDeviceMemoryProperties2& start, std::unique_ptr& chain, AppGpu &gpu){ + chain = std::unique_ptr(new phys_device_mem_props2_chain()); + chain->initialize_chain(gpu); + start.pNext = chain->start_of_chain; +}; +struct phys_device_features2_chain { + phys_device_features2_chain() = default; + phys_device_features2_chain(const phys_device_features2_chain &) = delete; + phys_device_features2_chain& operator=(const phys_device_features2_chain &) = delete; + phys_device_features2_chain(phys_device_features2_chain &&) = delete; + phys_device_features2_chain& operator=(phys_device_features2_chain &&) = delete; + void* start_of_chain = nullptr; + VkPhysicalDevice16BitStorageFeatures PhysicalDevice16BitStorageFeatures{}; + VkPhysicalDevice4444FormatsFeaturesEXT PhysicalDevice4444FormatsFeaturesEXT{}; + VkPhysicalDevice8BitStorageFeatures PhysicalDevice8BitStorageFeatures{}; + VkPhysicalDeviceASTCDecodeFeaturesEXT PhysicalDeviceASTCDecodeFeaturesEXT{}; + VkPhysicalDeviceAccelerationStructureFeaturesKHR PhysicalDeviceAccelerationStructureFeaturesKHR{}; + VkPhysicalDeviceAddressBindingReportFeaturesEXT PhysicalDeviceAddressBindingReportFeaturesEXT{}; + VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT{}; + VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT{}; + VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT PhysicalDeviceBlendOperationAdvancedFeaturesEXT{}; + VkPhysicalDeviceBorderColorSwizzleFeaturesEXT PhysicalDeviceBorderColorSwizzleFeaturesEXT{}; + VkPhysicalDeviceBufferDeviceAddressFeatures PhysicalDeviceBufferDeviceAddressFeatures{}; + VkPhysicalDeviceBufferDeviceAddressFeaturesEXT PhysicalDeviceBufferDeviceAddressFeaturesEXT{}; + VkPhysicalDeviceColorWriteEnableFeaturesEXT PhysicalDeviceColorWriteEnableFeaturesEXT{}; + VkPhysicalDeviceConditionalRenderingFeaturesEXT PhysicalDeviceConditionalRenderingFeaturesEXT{}; + VkPhysicalDeviceCooperativeMatrixFeaturesKHR PhysicalDeviceCooperativeMatrixFeaturesKHR{}; + VkPhysicalDeviceCustomBorderColorFeaturesEXT PhysicalDeviceCustomBorderColorFeaturesEXT{}; + VkPhysicalDeviceDepthBiasControlFeaturesEXT PhysicalDeviceDepthBiasControlFeaturesEXT{}; + VkPhysicalDeviceDepthClampZeroOneFeaturesEXT PhysicalDeviceDepthClampZeroOneFeaturesEXT{}; + VkPhysicalDeviceDepthClipControlFeaturesEXT PhysicalDeviceDepthClipControlFeaturesEXT{}; + VkPhysicalDeviceDepthClipEnableFeaturesEXT PhysicalDeviceDepthClipEnableFeaturesEXT{}; + VkPhysicalDeviceDescriptorBufferFeaturesEXT PhysicalDeviceDescriptorBufferFeaturesEXT{}; + VkPhysicalDeviceDescriptorIndexingFeatures PhysicalDeviceDescriptorIndexingFeatures{}; + VkPhysicalDeviceDeviceMemoryReportFeaturesEXT PhysicalDeviceDeviceMemoryReportFeaturesEXT{}; + VkPhysicalDeviceDynamicRenderingFeatures PhysicalDeviceDynamicRenderingFeatures{}; + VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT{}; + VkPhysicalDeviceExtendedDynamicState2FeaturesEXT PhysicalDeviceExtendedDynamicState2FeaturesEXT{}; + VkPhysicalDeviceExtendedDynamicState3FeaturesEXT PhysicalDeviceExtendedDynamicState3FeaturesEXT{}; + VkPhysicalDeviceExtendedDynamicStateFeaturesEXT PhysicalDeviceExtendedDynamicStateFeaturesEXT{}; + VkPhysicalDeviceFaultFeaturesEXT PhysicalDeviceFaultFeaturesEXT{}; + VkPhysicalDeviceFragmentDensityMap2FeaturesEXT PhysicalDeviceFragmentDensityMap2FeaturesEXT{}; + VkPhysicalDeviceFragmentDensityMapFeaturesEXT PhysicalDeviceFragmentDensityMapFeaturesEXT{}; + VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR PhysicalDeviceFragmentShaderBarycentricFeaturesKHR{}; + VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT PhysicalDeviceFragmentShaderInterlockFeaturesEXT{}; + VkPhysicalDeviceFragmentShadingRateFeaturesKHR PhysicalDeviceFragmentShadingRateFeaturesKHR{}; + VkPhysicalDeviceFrameBoundaryFeaturesEXT PhysicalDeviceFrameBoundaryFeaturesEXT{}; + VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR PhysicalDeviceGlobalPriorityQueryFeaturesKHR{}; + VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT{}; + VkPhysicalDeviceHostImageCopyFeaturesEXT PhysicalDeviceHostImageCopyFeaturesEXT{}; + char VkPhysicalDeviceHostImageCopyFeaturesEXT_padding[64]; + VkPhysicalDeviceHostQueryResetFeatures PhysicalDeviceHostQueryResetFeatures{}; + VkPhysicalDeviceImage2DViewOf3DFeaturesEXT PhysicalDeviceImage2DViewOf3DFeaturesEXT{}; + VkPhysicalDeviceImageCompressionControlFeaturesEXT PhysicalDeviceImageCompressionControlFeaturesEXT{}; + VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT{}; + VkPhysicalDeviceImageRobustnessFeatures PhysicalDeviceImageRobustnessFeatures{}; + VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT PhysicalDeviceImageSlicedViewOf3DFeaturesEXT{}; + VkPhysicalDeviceImageViewMinLodFeaturesEXT PhysicalDeviceImageViewMinLodFeaturesEXT{}; + VkPhysicalDeviceImagelessFramebufferFeatures PhysicalDeviceImagelessFramebufferFeatures{}; + VkPhysicalDeviceIndexTypeUint8FeaturesEXT PhysicalDeviceIndexTypeUint8FeaturesEXT{}; + VkPhysicalDeviceInlineUniformBlockFeatures PhysicalDeviceInlineUniformBlockFeatures{}; + VkPhysicalDeviceLegacyDitheringFeaturesEXT PhysicalDeviceLegacyDitheringFeaturesEXT{}; + VkPhysicalDeviceLineRasterizationFeaturesEXT PhysicalDeviceLineRasterizationFeaturesEXT{}; + VkPhysicalDeviceMaintenance4Features PhysicalDeviceMaintenance4Features{}; + VkPhysicalDeviceMaintenance5FeaturesKHR PhysicalDeviceMaintenance5FeaturesKHR{}; + VkPhysicalDeviceMemoryPriorityFeaturesEXT PhysicalDeviceMemoryPriorityFeaturesEXT{}; + VkPhysicalDeviceMeshShaderFeaturesEXT PhysicalDeviceMeshShaderFeaturesEXT{}; + VkPhysicalDeviceMultiDrawFeaturesEXT PhysicalDeviceMultiDrawFeaturesEXT{}; + VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT{}; + VkPhysicalDeviceMultiviewFeatures PhysicalDeviceMultiviewFeatures{}; + VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT PhysicalDeviceMutableDescriptorTypeFeaturesEXT{}; + VkPhysicalDeviceNestedCommandBufferFeaturesEXT PhysicalDeviceNestedCommandBufferFeaturesEXT{}; + VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT PhysicalDeviceNonSeamlessCubeMapFeaturesEXT{}; + VkPhysicalDeviceOpacityMicromapFeaturesEXT PhysicalDeviceOpacityMicromapFeaturesEXT{}; + VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT{}; + VkPhysicalDevicePerformanceQueryFeaturesKHR PhysicalDevicePerformanceQueryFeaturesKHR{}; + VkPhysicalDevicePipelineCreationCacheControlFeatures PhysicalDevicePipelineCreationCacheControlFeatures{}; + VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR{}; + VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT{}; + VkPhysicalDevicePipelinePropertiesFeaturesEXT PhysicalDevicePipelinePropertiesFeaturesEXT{}; + VkPhysicalDevicePipelineProtectedAccessFeaturesEXT PhysicalDevicePipelineProtectedAccessFeaturesEXT{}; + VkPhysicalDevicePipelineRobustnessFeaturesEXT PhysicalDevicePipelineRobustnessFeaturesEXT{}; +#ifdef VK_ENABLE_BETA_EXTENSIONS + VkPhysicalDevicePortabilitySubsetFeaturesKHR PhysicalDevicePortabilitySubsetFeaturesKHR{}; +#endif // VK_ENABLE_BETA_EXTENSIONS + VkPhysicalDevicePresentIdFeaturesKHR PhysicalDevicePresentIdFeaturesKHR{}; + VkPhysicalDevicePresentWaitFeaturesKHR PhysicalDevicePresentWaitFeaturesKHR{}; + VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT{}; + VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT{}; + VkPhysicalDevicePrivateDataFeatures PhysicalDevicePrivateDataFeatures{}; + VkPhysicalDeviceProtectedMemoryFeatures PhysicalDeviceProtectedMemoryFeatures{}; + VkPhysicalDeviceProvokingVertexFeaturesEXT PhysicalDeviceProvokingVertexFeaturesEXT{}; + VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT PhysicalDeviceRGBA10X6FormatsFeaturesEXT{}; + VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT{}; + VkPhysicalDeviceRayQueryFeaturesKHR PhysicalDeviceRayQueryFeaturesKHR{}; + VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR PhysicalDeviceRayTracingMaintenance1FeaturesKHR{}; + VkPhysicalDeviceRayTracingPipelineFeaturesKHR PhysicalDeviceRayTracingPipelineFeaturesKHR{}; + VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR PhysicalDeviceRayTracingPositionFetchFeaturesKHR{}; + VkPhysicalDeviceRobustness2FeaturesEXT PhysicalDeviceRobustness2FeaturesEXT{}; + VkPhysicalDeviceSamplerYcbcrConversionFeatures PhysicalDeviceSamplerYcbcrConversionFeatures{}; + VkPhysicalDeviceScalarBlockLayoutFeatures PhysicalDeviceScalarBlockLayoutFeatures{}; + VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures PhysicalDeviceSeparateDepthStencilLayoutsFeatures{}; + VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT PhysicalDeviceShaderAtomicFloat2FeaturesEXT{}; + VkPhysicalDeviceShaderAtomicFloatFeaturesEXT PhysicalDeviceShaderAtomicFloatFeaturesEXT{}; + VkPhysicalDeviceShaderAtomicInt64Features PhysicalDeviceShaderAtomicInt64Features{}; + VkPhysicalDeviceShaderClockFeaturesKHR PhysicalDeviceShaderClockFeaturesKHR{}; + VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures PhysicalDeviceShaderDemoteToHelperInvocationFeatures{}; + VkPhysicalDeviceShaderDrawParametersFeatures PhysicalDeviceShaderDrawParametersFeatures{}; + VkPhysicalDeviceShaderFloat16Int8Features PhysicalDeviceShaderFloat16Int8Features{}; + VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT PhysicalDeviceShaderImageAtomicInt64FeaturesEXT{}; + VkPhysicalDeviceShaderIntegerDotProductFeatures PhysicalDeviceShaderIntegerDotProductFeatures{}; + char VkPhysicalDeviceShaderIntegerDotProductFeatures_padding[64]; + VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT PhysicalDeviceShaderModuleIdentifierFeaturesEXT{}; + VkPhysicalDeviceShaderObjectFeaturesEXT PhysicalDeviceShaderObjectFeaturesEXT{}; + VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures PhysicalDeviceShaderSubgroupExtendedTypesFeatures{}; + VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR{}; + VkPhysicalDeviceShaderTerminateInvocationFeatures PhysicalDeviceShaderTerminateInvocationFeatures{}; + VkPhysicalDeviceShaderTileImageFeaturesEXT PhysicalDeviceShaderTileImageFeaturesEXT{}; + VkPhysicalDeviceSubgroupSizeControlFeatures PhysicalDeviceSubgroupSizeControlFeatures{}; + VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT PhysicalDeviceSubpassMergeFeedbackFeaturesEXT{}; + VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT PhysicalDeviceSwapchainMaintenance1FeaturesEXT{}; + VkPhysicalDeviceSynchronization2Features PhysicalDeviceSynchronization2Features{}; + VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT PhysicalDeviceTexelBufferAlignmentFeaturesEXT{}; + VkPhysicalDeviceTextureCompressionASTCHDRFeatures PhysicalDeviceTextureCompressionASTCHDRFeatures{}; + VkPhysicalDeviceTimelineSemaphoreFeatures PhysicalDeviceTimelineSemaphoreFeatures{}; + VkPhysicalDeviceTransformFeedbackFeaturesEXT PhysicalDeviceTransformFeedbackFeaturesEXT{}; + VkPhysicalDeviceUniformBufferStandardLayoutFeatures PhysicalDeviceUniformBufferStandardLayoutFeatures{}; + VkPhysicalDeviceVariablePointersFeatures PhysicalDeviceVariablePointersFeatures{}; + VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT PhysicalDeviceVertexAttributeDivisorFeaturesEXT{}; + VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT PhysicalDeviceVertexInputDynamicStateFeaturesEXT{}; + VkPhysicalDeviceVulkan11Features PhysicalDeviceVulkan11Features{}; + VkPhysicalDeviceVulkan12Features PhysicalDeviceVulkan12Features{}; + VkPhysicalDeviceVulkan13Features PhysicalDeviceVulkan13Features{}; + VkPhysicalDeviceVulkanMemoryModelFeatures PhysicalDeviceVulkanMemoryModelFeatures{}; + VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR{}; + VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT{}; + VkPhysicalDeviceYcbcrImageArraysFeaturesEXT PhysicalDeviceYcbcrImageArraysFeaturesEXT{}; + VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures{}; + void initialize_chain(AppGpu &gpu ) noexcept { + PhysicalDevice16BitStorageFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; + PhysicalDevice4444FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; + PhysicalDevice8BitStorageFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; + PhysicalDeviceASTCDecodeFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT; + PhysicalDeviceAccelerationStructureFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; + PhysicalDeviceAddressBindingReportFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT; + PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT; + PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT; + PhysicalDeviceBlendOperationAdvancedFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; + PhysicalDeviceBorderColorSwizzleFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT; + PhysicalDeviceBufferDeviceAddressFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; + PhysicalDeviceBufferDeviceAddressFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; + PhysicalDeviceColorWriteEnableFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT; + PhysicalDeviceConditionalRenderingFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT; + PhysicalDeviceCooperativeMatrixFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR; + PhysicalDeviceCustomBorderColorFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; + PhysicalDeviceDepthBiasControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT; + PhysicalDeviceDepthClampZeroOneFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT; + PhysicalDeviceDepthClipControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT; + PhysicalDeviceDepthClipEnableFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; + PhysicalDeviceDescriptorBufferFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; + PhysicalDeviceDescriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; + PhysicalDeviceDeviceMemoryReportFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT; + PhysicalDeviceDynamicRenderingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; + PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT; + PhysicalDeviceExtendedDynamicState2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; + PhysicalDeviceExtendedDynamicState3FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; + PhysicalDeviceExtendedDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; + PhysicalDeviceFaultFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT; + PhysicalDeviceFragmentDensityMap2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT; + PhysicalDeviceFragmentDensityMapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT; + PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; + PhysicalDeviceFragmentShaderInterlockFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; + PhysicalDeviceFragmentShadingRateFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR; + PhysicalDeviceFrameBoundaryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT; + PhysicalDeviceGlobalPriorityQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR; + PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT; + PhysicalDeviceHostImageCopyFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT; + PhysicalDeviceHostQueryResetFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; + PhysicalDeviceImage2DViewOf3DFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT; + PhysicalDeviceImageCompressionControlFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT; + PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT; + PhysicalDeviceImageRobustnessFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; + PhysicalDeviceImageSlicedViewOf3DFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT; + PhysicalDeviceImageViewMinLodFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT; + PhysicalDeviceImagelessFramebufferFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; + PhysicalDeviceIndexTypeUint8FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT; + PhysicalDeviceInlineUniformBlockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; + PhysicalDeviceLegacyDitheringFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT; + PhysicalDeviceLineRasterizationFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; + PhysicalDeviceMaintenance4Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; + PhysicalDeviceMaintenance5FeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR; + PhysicalDeviceMemoryPriorityFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT; + PhysicalDeviceMeshShaderFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; + PhysicalDeviceMultiDrawFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT; + PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT; + PhysicalDeviceMultiviewFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES; + PhysicalDeviceMutableDescriptorTypeFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; + PhysicalDeviceNestedCommandBufferFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT; + PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT; + PhysicalDeviceOpacityMicromapFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT; + PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT; + PhysicalDevicePerformanceQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR; + PhysicalDevicePipelineCreationCacheControlFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; + PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; + PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT; + PhysicalDevicePipelinePropertiesFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT; + PhysicalDevicePipelineProtectedAccessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT; + PhysicalDevicePipelineRobustnessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT; +#ifdef VK_ENABLE_BETA_EXTENSIONS + PhysicalDevicePortabilitySubsetFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; +#endif // VK_ENABLE_BETA_EXTENSIONS + PhysicalDevicePresentIdFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR; + PhysicalDevicePresentWaitFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR; + PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; + PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT; + PhysicalDevicePrivateDataFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; + PhysicalDeviceProtectedMemoryFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES; + PhysicalDeviceProvokingVertexFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; + PhysicalDeviceRGBA10X6FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT; + PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; + PhysicalDeviceRayQueryFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR; + PhysicalDeviceRayTracingMaintenance1FeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR; + PhysicalDeviceRayTracingPipelineFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; + PhysicalDeviceRayTracingPositionFetchFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR; + PhysicalDeviceRobustness2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; + PhysicalDeviceSamplerYcbcrConversionFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; + PhysicalDeviceScalarBlockLayoutFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; + PhysicalDeviceSeparateDepthStencilLayoutsFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; + PhysicalDeviceShaderAtomicFloat2FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT; + PhysicalDeviceShaderAtomicFloatFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; + PhysicalDeviceShaderAtomicInt64Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; + PhysicalDeviceShaderClockFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; + PhysicalDeviceShaderDemoteToHelperInvocationFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; + PhysicalDeviceShaderDrawParametersFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; + PhysicalDeviceShaderFloat16Int8Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; + PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT; + PhysicalDeviceShaderIntegerDotProductFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; + PhysicalDeviceShaderModuleIdentifierFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT; + PhysicalDeviceShaderObjectFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT; + PhysicalDeviceShaderSubgroupExtendedTypesFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; + PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR; + PhysicalDeviceShaderTerminateInvocationFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; + PhysicalDeviceShaderTileImageFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT; + PhysicalDeviceSubgroupSizeControlFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; + PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT; + PhysicalDeviceSwapchainMaintenance1FeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT; + PhysicalDeviceSynchronization2Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; + PhysicalDeviceTexelBufferAlignmentFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT; + PhysicalDeviceTextureCompressionASTCHDRFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; + PhysicalDeviceTimelineSemaphoreFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; + PhysicalDeviceTransformFeedbackFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; + PhysicalDeviceUniformBufferStandardLayoutFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; + PhysicalDeviceVariablePointersFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; + PhysicalDeviceVertexAttributeDivisorFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; + PhysicalDeviceVertexInputDynamicStateFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; + PhysicalDeviceVulkan11Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; + PhysicalDeviceVulkan12Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; + PhysicalDeviceVulkan13Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; + PhysicalDeviceVulkanMemoryModelFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; + PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; + PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT; + PhysicalDeviceYcbcrImageArraysFeaturesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT; + PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; + std::vector chain_members; + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_16BIT_STORAGE_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDevice16BitStorageFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_4444_FORMATS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevice4444FormatsFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_8BIT_STORAGE_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDevice8BitStorageFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceASTCDecodeFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceAccelerationStructureFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceAddressBindingReportFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceBlendOperationAdvancedFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceBorderColorSwizzleFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceBufferDeviceAddressFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceBufferDeviceAddressFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceColorWriteEnableFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceConditionalRenderingFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceCooperativeMatrixFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceCustomBorderColorFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthBiasControlFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClampZeroOneFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClipControlFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDepthClipEnableFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorBufferFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDescriptorIndexingFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDeviceMemoryReportFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDynamicRenderingFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState2FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicState3FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceExtendedDynamicStateFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEVICE_FAULT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFaultFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMap2FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentDensityMapFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME) + || gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderBarycentricFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShaderInterlockFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFragmentShadingRateFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAME_BOUNDARY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceFrameBoundaryFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME) + || gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceGlobalPriorityQueryFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceHostImageCopyFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceHostQueryResetFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImage2DViewOf3DFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageCompressionControlFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageRobustnessFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImageViewMinLodFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceImagelessFramebufferFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceIndexTypeUint8FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceInlineUniformBlockFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LEGACY_DITHERING_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceLegacyDitheringFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceLineRasterizationFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_4_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Features)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5FeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMemoryPriorityFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MESH_SHADER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMeshShaderFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MULTI_DRAW_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiDrawFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MULTIVIEW_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMultiviewFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME) + || gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceMutableDescriptorTypeFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceNestedCommandBufferFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceNonSeamlessCubeMapFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceOpacityMicromapFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePerformanceQueryFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineCreationCacheControlFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineExecutablePropertiesFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelinePropertiesFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineProtectedAccessFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePipelineRobustnessFeaturesEXT)); #ifdef VK_ENABLE_BETA_EXTENSIONS - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR && p.Type() != OutputType::json && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))) { - VkPhysicalDevicePortabilitySubsetPropertiesKHR* props = (VkPhysicalDevicePortabilitySubsetPropertiesKHR*)structure; - DumpVkPhysicalDevicePortabilitySubsetPropertiesKHR(p, "VkPhysicalDevicePortabilitySubsetPropertiesKHR", *props); - p.AddNewline(); - } + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePortabilitySubsetFeaturesKHR)); #endif // VK_ENABLE_BETA_EXTENSIONS - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES && - (gpu.api_version.minor >= 1)) { - VkPhysicalDeviceProtectedMemoryProperties* props = (VkPhysicalDeviceProtectedMemoryProperties*)structure; - DumpVkPhysicalDeviceProtectedMemoryProperties(p, "VkPhysicalDeviceProtectedMemoryProperties", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME))) { - VkPhysicalDeviceProvokingVertexPropertiesEXT* props = (VkPhysicalDeviceProvokingVertexPropertiesEXT*)structure; - DumpVkPhysicalDeviceProvokingVertexPropertiesEXT(p, "VkPhysicalDeviceProvokingVertexPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))) { - VkPhysicalDevicePushDescriptorPropertiesKHR* props = (VkPhysicalDevicePushDescriptorPropertiesKHR*)structure; - DumpVkPhysicalDevicePushDescriptorPropertiesKHR(p, "VkPhysicalDevicePushDescriptorPropertiesKHR", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME))) { - VkPhysicalDeviceRayTracingPipelinePropertiesKHR* props = (VkPhysicalDeviceRayTracingPipelinePropertiesKHR*)structure; - DumpVkPhysicalDeviceRayTracingPipelinePropertiesKHR(p, "VkPhysicalDeviceRayTracingPipelinePropertiesKHR", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME))) { - VkPhysicalDeviceRobustness2PropertiesEXT* props = (VkPhysicalDeviceRobustness2PropertiesEXT*)structure; - DumpVkPhysicalDeviceRobustness2PropertiesEXT(p, "VkPhysicalDeviceRobustness2PropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME))) { - VkPhysicalDeviceSampleLocationsPropertiesEXT* props = (VkPhysicalDeviceSampleLocationsPropertiesEXT*)structure; - DumpVkPhysicalDeviceSampleLocationsPropertiesEXT(p, "VkPhysicalDeviceSampleLocationsPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME) || - gpu.api_version.minor >= 2)) { - VkPhysicalDeviceSamplerFilterMinmaxProperties* props = (VkPhysicalDeviceSamplerFilterMinmaxProperties*)structure; - DumpVkPhysicalDeviceSamplerFilterMinmaxProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceSamplerFilterMinmaxProperties":"VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME) || - gpu.api_version.minor >= 3)) { - VkPhysicalDeviceShaderIntegerDotProductProperties* props = (VkPhysicalDeviceShaderIntegerDotProductProperties*)structure; - DumpVkPhysicalDeviceShaderIntegerDotProductProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderIntegerDotProductProperties":"VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME))) { - VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT* props = (VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT*)structure; - DumpVkPhysicalDeviceShaderModuleIdentifierPropertiesEXT(p, "VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_OBJECT_EXTENSION_NAME))) { - VkPhysicalDeviceShaderObjectPropertiesEXT* props = (VkPhysicalDeviceShaderObjectPropertiesEXT*)structure; - DumpVkPhysicalDeviceShaderObjectPropertiesEXT(p, "VkPhysicalDeviceShaderObjectPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME))) { - VkPhysicalDeviceShaderTileImagePropertiesEXT* props = (VkPhysicalDeviceShaderTileImagePropertiesEXT*)structure; - DumpVkPhysicalDeviceShaderTileImagePropertiesEXT(p, "VkPhysicalDeviceShaderTileImagePropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES && - (gpu.api_version.minor >= 1)) { - VkPhysicalDeviceSubgroupProperties* props = (VkPhysicalDeviceSubgroupProperties*)structure; - DumpVkPhysicalDeviceSubgroupProperties(p, "VkPhysicalDeviceSubgroupProperties", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME) || - gpu.api_version.minor >= 3)) { - VkPhysicalDeviceSubgroupSizeControlProperties* props = (VkPhysicalDeviceSubgroupSizeControlProperties*)structure; - DumpVkPhysicalDeviceSubgroupSizeControlProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceSubgroupSizeControlProperties":"VkPhysicalDeviceSubgroupSizeControlPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME) || - gpu.api_version.minor >= 3)) { - VkPhysicalDeviceTexelBufferAlignmentProperties* props = (VkPhysicalDeviceTexelBufferAlignmentProperties*)structure; - DumpVkPhysicalDeviceTexelBufferAlignmentProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceTexelBufferAlignmentProperties":"VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) || - gpu.api_version.minor >= 2)) { - VkPhysicalDeviceTimelineSemaphoreProperties* props = (VkPhysicalDeviceTimelineSemaphoreProperties*)structure; - DumpVkPhysicalDeviceTimelineSemaphoreProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceTimelineSemaphoreProperties":"VkPhysicalDeviceTimelineSemaphorePropertiesKHR", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME))) { - VkPhysicalDeviceTransformFeedbackPropertiesEXT* props = (VkPhysicalDeviceTransformFeedbackPropertiesEXT*)structure; - DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(p, "VkPhysicalDeviceTransformFeedbackPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT && - (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME))) { - VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* props = (VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*)structure; - DumpVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(p, "VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES && - (gpu.api_version.minor >= 2)) { - VkPhysicalDeviceVulkan11Properties* props = (VkPhysicalDeviceVulkan11Properties*)structure; - DumpVkPhysicalDeviceVulkan11Properties(p, "VkPhysicalDeviceVulkan11Properties", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES && - (gpu.api_version.minor >= 2)) { - VkPhysicalDeviceVulkan12Properties* props = (VkPhysicalDeviceVulkan12Properties*)structure; - DumpVkPhysicalDeviceVulkan12Properties(p, "VkPhysicalDeviceVulkan12Properties", *props); - p.AddNewline(); - } - if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES && - (gpu.api_version.minor >= 3)) { - VkPhysicalDeviceVulkan13Properties* props = (VkPhysicalDeviceVulkan13Properties*)structure; - DumpVkPhysicalDeviceVulkan13Properties(p, "VkPhysicalDeviceVulkan13Properties", *props); - p.AddNewline(); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PRESENT_ID_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePresentIdFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PRESENT_WAIT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePresentWaitFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PRIVATE_DATA_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDevicePrivateDataFeatures)); + if (gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRGBA10X6FormatsFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME) + || gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayQueryFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingMaintenance1FeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPipelineFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRayTracingPositionFetchFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceRobustness2FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerYcbcrConversionFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceScalarBlockLayoutFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSeparateDepthStencilLayoutsFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicFloat2FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicFloatFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderAtomicInt64Features)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_CLOCK_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderClockFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDemoteToHelperInvocationFeatures)); + if (gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDrawParametersFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderFloat16Int8Features)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderImageAtomicInt64FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderIntegerDotProductFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderModuleIdentifierFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_OBJECT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderObjectFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderSubgroupExtendedTypesFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTerminateInvocationFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderTileImageFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupSizeControlFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubpassMergeFeedbackFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSwapchainMaintenance1FeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceSynchronization2Features)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTexelBufferAlignmentFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTextureCompressionASTCHDRFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTimelineSemaphoreFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceTransformFeedbackFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceUniformBufferStandardLayoutFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME) + || gpu.api_version.minor >= 1) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVariablePointersFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexInputDynamicStateFeaturesEXT)); + if (gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Features)); + if (gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Features)); + if (gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Features)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME) + || gpu.api_version.minor >= 2) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkanMemoryModelFeatures)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceYcbcrImageArraysFeaturesEXT)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); + + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; } - place = structure->pNext; } -} +}; +void setup_phys_device_features2_chain(VkPhysicalDeviceFeatures2& start, std::unique_ptr& chain, AppGpu &gpu){ + chain = std::unique_ptr(new phys_device_features2_chain()); + chain->initialize_chain(gpu); + start.pNext = chain->start_of_chain; +}; + void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) { while (place) { struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place; @@ -5092,6 +5237,48 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) place = structure->pNext; } } +struct surface_capabilities2_chain { + surface_capabilities2_chain() = default; + surface_capabilities2_chain(const surface_capabilities2_chain &) = delete; + surface_capabilities2_chain& operator=(const surface_capabilities2_chain &) = delete; + surface_capabilities2_chain(surface_capabilities2_chain &&) = delete; + surface_capabilities2_chain& operator=(surface_capabilities2_chain &&) = delete; + void* start_of_chain = nullptr; + VkSharedPresentSurfaceCapabilitiesKHR SharedPresentSurfaceCapabilitiesKHR{}; +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkSurfaceCapabilitiesFullScreenExclusiveEXT SurfaceCapabilitiesFullScreenExclusiveEXT{}; +#endif // VK_USE_PLATFORM_WIN32_KHR + VkSurfaceProtectedCapabilitiesKHR SurfaceProtectedCapabilitiesKHR{}; + void initialize_chain(AppInstance &inst, AppGpu &gpu ) noexcept { + SharedPresentSurfaceCapabilitiesKHR.sType = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; +#ifdef VK_USE_PLATFORM_WIN32_KHR + SurfaceCapabilitiesFullScreenExclusiveEXT.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; +#endif // VK_USE_PLATFORM_WIN32_KHR + SurfaceProtectedCapabilitiesKHR.sType = VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR; + std::vector chain_members; + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&SharedPresentSurfaceCapabilitiesKHR)); +#ifdef VK_USE_PLATFORM_WIN32_KHR + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&SurfaceCapabilitiesFullScreenExclusiveEXT)); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (inst.CheckExtensionEnabled(VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&SurfaceProtectedCapabilitiesKHR)); + + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; + } + } +}; +void setup_surface_capabilities2_chain(VkSurfaceCapabilities2KHR& start, std::unique_ptr& chain, AppInstance &inst,AppGpu &gpu){ + chain = std::unique_ptr(new surface_capabilities2_chain()); + chain->initialize_chain(inst,gpu); + start.pNext = chain->start_of_chain; +}; + void chain_iterator_surface_capabilities2(Printer &p, AppInstance &inst, AppGpu &gpu, void * place) { while (place) { struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place; @@ -5119,6 +5306,39 @@ void chain_iterator_surface_capabilities2(Printer &p, AppInstance &inst, AppGpu place = structure->pNext; } } +struct format_properties2_chain { + format_properties2_chain() = default; + format_properties2_chain(const format_properties2_chain &) = delete; + format_properties2_chain& operator=(const format_properties2_chain &) = delete; + format_properties2_chain(format_properties2_chain &&) = delete; + format_properties2_chain& operator=(format_properties2_chain &&) = delete; + void* start_of_chain = nullptr; + VkFormatProperties3 FormatProperties3{}; + VkSubpassResolvePerformanceQueryEXT SubpassResolvePerformanceQueryEXT{}; + void initialize_chain(AppGpu &gpu ) noexcept { + FormatProperties3.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3; + SubpassResolvePerformanceQueryEXT.sType = VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT; + std::vector chain_members; + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME) + || gpu.api_version.minor >= 3) + chain_members.push_back(reinterpret_cast(&FormatProperties3)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&SubpassResolvePerformanceQueryEXT)); + + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; + } + } +}; +void setup_format_properties2_chain(VkFormatProperties2& start, std::unique_ptr& chain, AppGpu &gpu){ + chain = std::unique_ptr(new format_properties2_chain()); + chain->initialize_chain(gpu); + start.pNext = chain->start_of_chain; +}; + void chain_iterator_format_properties2(Printer &p, AppGpu &gpu, void * place) { while (place) { struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place; @@ -5139,6 +5359,43 @@ void chain_iterator_format_properties2(Printer &p, AppGpu &gpu, void * place) { place = structure->pNext; } } +struct queue_properties2_chain { + queue_properties2_chain() = default; + queue_properties2_chain(const queue_properties2_chain &) = delete; + queue_properties2_chain& operator=(const queue_properties2_chain &) = delete; + queue_properties2_chain(queue_properties2_chain &&) = delete; + queue_properties2_chain& operator=(queue_properties2_chain &&) = delete; + void* start_of_chain = nullptr; + VkQueueFamilyGlobalPriorityPropertiesKHR QueueFamilyGlobalPriorityPropertiesKHR{}; + VkQueueFamilyQueryResultStatusPropertiesKHR QueueFamilyQueryResultStatusPropertiesKHR{}; + VkQueueFamilyVideoPropertiesKHR QueueFamilyVideoPropertiesKHR{}; + void initialize_chain(AppGpu &gpu ) noexcept { + QueueFamilyGlobalPriorityPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR; + QueueFamilyQueryResultStatusPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; + QueueFamilyVideoPropertiesKHR.sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; + std::vector chain_members; + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME) + || gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&QueueFamilyGlobalPriorityPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VIDEO_QUEUE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&QueueFamilyQueryResultStatusPropertiesKHR)); + if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VIDEO_QUEUE_EXTENSION_NAME)) + chain_members.push_back(reinterpret_cast(&QueueFamilyVideoPropertiesKHR)); + + if (!chain_members.empty()) { + for(size_t i = 0; i < chain_members.size() - 1; i++){ + chain_members[i]->pNext = chain_members[i + 1]; + } + start_of_chain = chain_members[0]; + } + } +}; +void setup_queue_properties2_chain(VkQueueFamilyProperties2& start, std::unique_ptr& chain, AppGpu &gpu){ + chain = std::unique_ptr(new queue_properties2_chain()); + chain->initialize_chain(gpu); + start.pNext = chain->start_of_chain; +}; + void chain_iterator_queue_properties2(Printer &p, AppGpu &gpu, void * place) { while (place) { struct VkBaseOutStructure *structure = (struct VkBaseOutStructure *)place; diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 4ebe3514..dadbf1b5 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -720,7 +720,7 @@ void DumpGpuProfileCapabilities(Printer &p, AppGpu &gpu) { format_props2.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; format_props2.formatProperties = formats.props; std::unique_ptr chain_for_format_props2; - setup_format_properties2_chain(format_props2, chain_for_format_props2); + setup_format_properties2_chain(format_props2, chain_for_format_props2, gpu); gpu.inst.ext_funcs.vkGetPhysicalDeviceFormatProperties2KHR(gpu.phys_device, fmt, &format_props2); chain_iterator_format_properties2(p, gpu, format_props2.pNext); } @@ -1169,20 +1169,33 @@ int main(int argc, char **argv) { auto phys_devices = instance.FindPhysicalDevices(); - std::vector> surfaces; #if defined(VULKANINFO_WSI_ENABLED) for (auto &surface_extension : instance.surface_extensions) { surface_extension.create_window(instance); surface_extension.surface = surface_extension.create_surface(instance); - for (auto &phys_device : phys_devices) { + } +#endif // defined(VULKANINFO_WSI_ENABLED) + + std::vector> gpus; + + uint32_t gpu_counter = 0; + for (auto &phys_device : phys_devices) { + gpus.push_back(std::unique_ptr(new AppGpu(instance, gpu_counter++, phys_device))); + } + + std::vector> surfaces; +#if defined(VULKANINFO_WSI_ENABLED) + for (auto &surface_extension : instance.surface_extensions) { + for (auto &gpu : gpus) { try { // check if the surface is supported by the physical device before adding it to the list VkBool32 supported = VK_FALSE; - VkResult err = instance.ext_funcs.vkGetPhysicalDeviceSurfaceSupportKHR(phys_device, 0, + VkResult err = instance.ext_funcs.vkGetPhysicalDeviceSurfaceSupportKHR(gpu->phys_device, 0, surface_extension.surface, &supported); if (err != VK_SUCCESS || supported == VK_FALSE) continue; - surfaces.push_back(std::unique_ptr(new AppSurface(instance, phys_device, surface_extension))); + surfaces.push_back( + std::unique_ptr(new AppSurface(instance, *gpu.get(), gpu->phys_device, surface_extension))); } catch (std::exception &e) { std::cerr << "ERROR while creating surface for extension " << surface_extension.name << " : " << e.what() << "\n"; @@ -1191,13 +1204,6 @@ int main(int argc, char **argv) { } #endif // defined(VULKANINFO_WSI_ENABLED) - std::vector> gpus; - - uint32_t gpu_counter = 0; - for (auto &phys_device : phys_devices) { - gpus.push_back(std::unique_ptr(new AppGpu(instance, gpu_counter++, phys_device))); - } - if (parse_data.selected_gpu >= gpus.size()) { if (parse_data.has_selected_gpu) { std::cout << "The selected gpu (" << parse_data.selected_gpu << ") is not a valid GPU index. "; diff --git a/vulkaninfo/vulkaninfo.h b/vulkaninfo/vulkaninfo.h index f0d942e4..a2651be7 100644 --- a/vulkaninfo/vulkaninfo.h +++ b/vulkaninfo/vulkaninfo.h @@ -483,14 +483,19 @@ struct phys_device_features2_chain; struct surface_capabilities2_chain; struct format_properties2_chain; struct queue_properties2_chain; +struct AppInstance; +struct AppGpu; -void setup_phys_device_props2_chain(VkPhysicalDeviceProperties2 &start, std::unique_ptr &chain); +void setup_phys_device_props2_chain(VkPhysicalDeviceProperties2 &start, std::unique_ptr &chain, + AppInstance &inst, AppGpu &gpu); void setup_phys_device_mem_props2_chain(VkPhysicalDeviceMemoryProperties2 &start, - std::unique_ptr &chain); -void setup_phys_device_features2_chain(VkPhysicalDeviceFeatures2 &start, std::unique_ptr &chain); -void setup_surface_capabilities2_chain(VkSurfaceCapabilities2KHR &start, std::unique_ptr &chain); -void setup_format_properties2_chain(VkFormatProperties2 &start, std::unique_ptr &chain); -void setup_queue_properties2_chain(VkQueueFamilyProperties2 &start, std::unique_ptr &chain); + std::unique_ptr &chain, AppGpu &gpu); +void setup_phys_device_features2_chain(VkPhysicalDeviceFeatures2 &start, std::unique_ptr &chain, + AppGpu &gpu); +void setup_surface_capabilities2_chain(VkSurfaceCapabilities2KHR &start, std::unique_ptr &chain, + AppInstance &inst, AppGpu &gpu); +void setup_format_properties2_chain(VkFormatProperties2 &start, std::unique_ptr &chain, AppGpu &gpu); +void setup_queue_properties2_chain(VkQueueFamilyProperties2 &start, std::unique_ptr &chain, AppGpu &gpu); /* An ptional contains either a value or nothing. The optional asserts if a value is trying to be gotten but none exist. * The interface is taken from C++17's with many aspects removed. @@ -1390,7 +1395,7 @@ class AppSurface { std::unique_ptr chain_for_surface_capabilities2; - AppSurface(AppInstance &inst, VkPhysicalDevice phys_device, SurfaceExtension surface_extension) + AppSurface(AppInstance &inst, AppGpu &gpu, VkPhysicalDevice phys_device, SurfaceExtension surface_extension) : inst(inst), phys_device(phys_device), surface_extension(surface_extension) { surf_present_modes = GetVector("vkGetPhysicalDeviceSurfacePresentModesKHR", inst.ext_funcs.vkGetPhysicalDeviceSurfacePresentModesKHR, phys_device, @@ -1418,7 +1423,7 @@ class AppSurface { if (inst.CheckExtensionEnabled(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME)) { surface_capabilities2_khr.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR; - setup_surface_capabilities2_chain(surface_capabilities2_khr, chain_for_surface_capabilities2); + setup_surface_capabilities2_chain(surface_capabilities2_khr, chain_for_surface_capabilities2, inst, gpu); VkPhysicalDeviceSurfaceInfo2KHR surface_info{}; surface_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR; @@ -1663,6 +1668,8 @@ struct AppGpu { // needs to find the minimum of the instance and device version, and use that to print the device info api_version = VulkanVersion(props.apiVersion); + device_extensions = inst.AppGetPhysicalDeviceLayerExtensions(phys_device, nullptr); + inst.dll.fp_vkGetPhysicalDeviceMemoryProperties(phys_device, &memory_props); inst.dll.fp_vkGetPhysicalDeviceFeatures(phys_device, &features); @@ -1675,19 +1682,19 @@ struct AppGpu { if (inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { // VkPhysicalDeviceProperties2 props2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; - setup_phys_device_props2_chain(props2, chain_for_phys_device_props2); + setup_phys_device_props2_chain(props2, chain_for_phys_device_props2, inst, *this); inst.ext_funcs.vkGetPhysicalDeviceProperties2KHR(phys_device, &props2); // VkPhysicalDeviceMemoryProperties2 memory_props2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR; - setup_phys_device_mem_props2_chain(memory_props2, chain_for_phys_device_mem_props2); + setup_phys_device_mem_props2_chain(memory_props2, chain_for_phys_device_mem_props2, *this); inst.ext_funcs.vkGetPhysicalDeviceMemoryProperties2KHR(phys_device, &memory_props2); // VkPhysicalDeviceFeatures2 features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; - setup_phys_device_features2_chain(features2, chain_for_phys_device_features2); + setup_phys_device_features2_chain(features2, chain_for_phys_device_features2, *this); inst.ext_funcs.vkGetPhysicalDeviceFeatures2KHR(phys_device, &features2); @@ -1698,7 +1705,7 @@ struct AppGpu { chain_for_queue_props2.resize(queue_prop2_count); for (size_t i = 0; i < queue_props2.size(); i++) { queue_props2[i].sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR; - setup_queue_properties2_chain(queue_props2[i], chain_for_queue_props2[i]); + setup_queue_properties2_chain(queue_props2[i], chain_for_queue_props2[i], *this); } inst.ext_funcs.vkGetPhysicalDeviceQueueFamilyProperties2KHR(phys_device, &queue_prop2_count, queue_props2.data()); @@ -1732,8 +1739,6 @@ struct AppGpu { } } - device_extensions = inst.AppGetPhysicalDeviceLayerExtensions(phys_device, nullptr); - if (features.sparseBinding) { enabled_features.sparseBinding = VK_TRUE; } -- cgit v1.2.3