From dd0968224ad0b206987f14e2c88a4fad0ae39aaa Mon Sep 17 00:00:00 2001 From: Daniel Rakos Date: Thu, 14 Dec 2023 16:58:29 +0100 Subject: vulkaninfo: API parameterization changes --- scripts/vulkaninfo_generator.py | 45 ++--- vulkaninfo/CMakeLists.txt | 9 +- vulkaninfo/generated/vulkaninfo.hpp | 339 ++++++++++++++++++------------------ vulkaninfo/outputprinter.h | 22 +-- vulkaninfo/vulkaninfo.cpp | 71 ++++---- vulkaninfo/vulkaninfo.h | 77 ++++---- 6 files changed, 286 insertions(+), 277 deletions(-) diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index 7b623cb0..59cd3f37 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -3,6 +3,7 @@ # Copyright (c) 2019-2022 Valve Corporation # Copyright (c) 2019-2022 LunarG, Inc. # Copyright (c) 2019-2022 Google Inc. +# Copyright (c) 2023-2023 RasterGrid Kft. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,6 +32,7 @@ LICENSE_HEADER = ''' * Copyright (c) 2019-2022 The Khronos Group Inc. * Copyright (c) 2019-2022 Valve Corporation * Copyright (c) 2019-2022 LunarG, Inc. + * Copyright (c) 2023-2023 RasterGrid Kft. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -288,13 +290,6 @@ class VulkanInfoGenerator(OutputGenerator): for key, value in self.extension_sets.items(): self.extension_sets[key] = sorted(value) - alias_versions = OrderedDict() - for version in self.vulkan_versions: - for aliases in self.aliases.values(): - for alias in aliases: - if alias in version.names: - alias_versions[alias] = version.minorVersion - self.enums = sorted(self.enums, key=operator.attrgetter('name')) self.flags = sorted(self.flags, key=operator.attrgetter('name')) self.bitmasks = sorted(self.bitmasks, key=operator.attrgetter('name')) @@ -408,7 +403,7 @@ class VulkanInfoGenerator(OutputGenerator): min_val = min(min_val, value) max_val = max(max_val, value) if min_val < 2**32 and max_val > 0: - self.format_ranges.append(VulkanFormatRange(0,None, min_val, max_val)) + self.format_ranges.append(VulkanFormatRange(0, None, min_val, max_val)) for feature in self.registry.reg.findall('feature'): for require in feature.findall('require'): @@ -425,13 +420,13 @@ class VulkanInfoGenerator(OutputGenerator): min_val = min(min_val, value) max_val = max(max_val, value) if min_val < 2**32 and max_val > 0: - self.format_ranges.append(VulkanFormatRange(feature.get('number').split('.')[1],None, min_val, max_val)) + self.format_ranges.append(VulkanFormatRange(feature.get('name').replace('_VERSION_', '_API_VERSION_'), None, min_val, max_val)) # If the formats came from an extension, add a format range for that extension so it'll be printed if the ext is supported but not the core version if original_ext is not None: - self.format_ranges.append(VulkanFormatRange(0,original_ext, min_val, max_val)) + self.format_ranges.append(VulkanFormatRange(0, original_ext, min_val, max_val)) for extension in self.registry.reg.find('extensions').findall('extension'): - if extension.get('supported') in ['disabled', 'vulkansc']: + if not self.genOpts.apiname in extension.get('supported').split(','): continue min_val = 2**32 @@ -766,7 +761,7 @@ def PrintChainStruct(listName, structures, all_structures, chain_details, extTyp out += AddGuardFooter(s) - out += ' std::vector chain_members;\n' + out += ' std::vector chain_members{};\n' for s in structs_to_print: if s.name in STRUCT_BLACKLIST: continue @@ -781,7 +776,7 @@ def PrintChainStruct(listName, structures, all_structures, chain_details, extTyp oldVersionName = None for v in vulkan_versions: if s.name in v.names: - version = v.minorVersion + version = v if s.name in aliases.keys(): for alias in aliases[s.name]: oldVersionName = alias @@ -807,9 +802,9 @@ def PrintChainStruct(listName, structures, all_structures, chain_details, extTyp assert False, 'Should never get here' if has_version: if has_printed_condition: - out += f')\n && {version_desc}.minor < {str(version)}' + out += f')\n && {version_desc} < {version.constant}' else: - out += f'{version_desc}.minor >= {str(version)}' + out += f'{version_desc} >= {version.constant}' out += ')\n ' else: out += ' ' @@ -865,7 +860,7 @@ void setup_{listName}_chain({chain_details['holder_type']}& start, std::unique_p oldVersionName = None for v in vulkan_versions: if s.name in v.names: - version = v.minorVersion + version = v if s.name in aliases.keys(): for alias in aliases[s.name]: oldVersionName = alias @@ -897,15 +892,15 @@ void setup_{listName}_chain({chain_details['holder_type']}& start, std::unique_p assert False, 'Should never get here' if has_version: if has_printed_condition: - out += f') &&\n {version_desc}.minor < {str(version)}' + out += f') &&\n {version_desc} < {version.constant}' else: - out += f'{version_desc}.minor >= {str(version)}' + out += f'{version_desc} >= {version.constant}' out += ')' out += ') {\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}"' + out += f'{version_desc} >= {version.constant} ?"{s.name}":"{oldVersionName}"' else: out += f'"{s.name}"' out += ', *props);\n' @@ -1135,16 +1130,8 @@ class VulkanExtension: self.vkfuncs = [] self.constants = OrderedDict() self.enumValues = OrderedDict() - self.version = 0 self.node = rootNode - promotedto = rootNode.get('promotedto') - if promotedto is not None: - # get last char of VK_VERSION_1_1 or VK_VERSION_1_2 - minorVersion = promotedto[-1:] - if minorVersion.isdigit(): - self.version = minorVersion - for req in rootNode.findall('require'): for ty in req.findall('type'): self.vktypes.append(ty.get('name')) @@ -1179,9 +1166,7 @@ class VulkanExtension: class VulkanVersion: def __init__(self, rootNode): self.name = rootNode.get('name') - version_str = rootNode.get('number').split('.') - self.majorVersion = version_str[0] - self.minorVersion = version_str[1] + self.constant = self.name.replace('_VERSION_', '_API_VERSION_') self.names = set() for req in rootNode.findall('require'): diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt index 47db418c..e0377884 100644 --- a/vulkaninfo/CMakeLists.txt +++ b/vulkaninfo/CMakeLists.txt @@ -1,6 +1,7 @@ # ~~~ # Copyright (c) 2018-2023 Valve Corporation # Copyright (c) 2018-2023 LunarG, Inc. +# Copyright (c) 2023-2023 RasterGrid Kft. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +16,13 @@ # limitations under the License. # ~~~ +# These variables enable downstream users to customize the CMake targets +# based on the target API variant (e.g. Vulkan SC) +set(VULKANINFO_NAME vulkaninfo) +set(GENERATED generated) + add_executable(vulkaninfo) +set_target_properties(vulkaninfo PROPERTIES OUTPUT_NAME ${VULKANINFO_NAME}) target_sources(vulkaninfo PRIVATE vulkaninfo.cpp) @@ -49,7 +56,7 @@ if(WIN32) endif() target_include_directories(vulkaninfo PRIVATE - generated + ${GENERATED} . ) diff --git a/vulkaninfo/generated/vulkaninfo.hpp b/vulkaninfo/generated/vulkaninfo.hpp index c483ea7d..5810bd1f 100644 --- a/vulkaninfo/generated/vulkaninfo.hpp +++ b/vulkaninfo/generated/vulkaninfo.hpp @@ -3,6 +3,7 @@ * Copyright (c) 2019-2022 The Khronos Group Inc. * Copyright (c) 2019-2022 Valve Corporation * Copyright (c) 2019-2022 LunarG, Inc. + * Copyright (c) 2023-2023 RasterGrid Kft. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3386,7 +3387,7 @@ struct phys_device_props2_chain { PhysicalDeviceVulkan11Properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES; 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; + std::vector chain_members{}; 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)) @@ -3398,19 +3399,19 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -3419,7 +3420,7 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -3434,18 +3435,18 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceIDProperties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance3Properties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_4_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Properties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5PropertiesKHR)); @@ -3454,7 +3455,7 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -3467,13 +3468,13 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDevicePointClippingProperties)); #ifdef VK_ENABLE_BETA_EXTENSIONS if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDevicePortabilitySubsetPropertiesKHR)); #endif // VK_ENABLE_BETA_EXTENSIONS - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexPropertiesEXT)); @@ -3486,10 +3487,10 @@ struct phys_device_props2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerFilterMinmaxProperties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -3497,16 +3498,16 @@ struct phys_device_props2_chain { 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) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupProperties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceSubgroupSizeControlProperties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceTexelBufferAlignmentProperties)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceTimelineSemaphoreProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceTransformFeedbackPropertiesEXT)); @@ -3514,11 +3515,11 @@ struct phys_device_props2_chain { chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorPropertiesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorPropertiesKHR)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Properties)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Properties)); - if (gpu.api_version.minor >= 3) + if (gpu.api_version >= VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Properties)); if (!chain_members.empty()) { @@ -3571,9 +3572,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceDepthStencilResolveProperties* props = (VkPhysicalDeviceDepthStencilResolveProperties*)structure; - DumpVkPhysicalDeviceDepthStencilResolveProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceDepthStencilResolveProperties":"VkPhysicalDeviceDepthStencilResolvePropertiesKHR", *props); + DumpVkPhysicalDeviceDepthStencilResolveProperties(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceDepthStencilResolveProperties":"VkPhysicalDeviceDepthStencilResolvePropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT && @@ -3590,9 +3591,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceDescriptorIndexingProperties* props = (VkPhysicalDeviceDescriptorIndexingProperties*)structure; - DumpVkPhysicalDeviceDescriptorIndexingProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceDescriptorIndexingProperties":"VkPhysicalDeviceDescriptorIndexingPropertiesEXT", *props); + DumpVkPhysicalDeviceDescriptorIndexingProperties(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceDescriptorIndexingProperties":"VkPhysicalDeviceDescriptorIndexingPropertiesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT && @@ -3603,9 +3604,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceDriverProperties* props = (VkPhysicalDeviceDriverProperties*)structure; - DumpVkPhysicalDeviceDriverProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceDriverProperties":"VkPhysicalDeviceDriverPropertiesKHR", *props); + DumpVkPhysicalDeviceDriverProperties(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceDriverProperties":"VkPhysicalDeviceDriverPropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT && @@ -3628,9 +3629,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceFloatControlsProperties* props = (VkPhysicalDeviceFloatControlsProperties*)structure; - DumpVkPhysicalDeviceFloatControlsProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceFloatControlsProperties":"VkPhysicalDeviceFloatControlsPropertiesKHR", *props); + DumpVkPhysicalDeviceFloatControlsProperties(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceFloatControlsProperties":"VkPhysicalDeviceFloatControlsPropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT && @@ -3665,16 +3666,16 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES && ((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)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceIDProperties* props = (VkPhysicalDeviceIDProperties*)structure; - DumpVkPhysicalDeviceIDProperties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceIDProperties":"VkPhysicalDeviceIDPropertiesKHR", *props); + DumpVkPhysicalDeviceIDProperties(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceIDProperties":"VkPhysicalDeviceIDPropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceInlineUniformBlockProperties* props = (VkPhysicalDeviceInlineUniformBlockProperties*)structure; - DumpVkPhysicalDeviceInlineUniformBlockProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceInlineUniformBlockProperties":"VkPhysicalDeviceInlineUniformBlockPropertiesEXT", *props); + DumpVkPhysicalDeviceInlineUniformBlockProperties(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceInlineUniformBlockProperties":"VkPhysicalDeviceInlineUniformBlockPropertiesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT && @@ -3685,16 +3686,16 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_3_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceMaintenance3Properties* props = (VkPhysicalDeviceMaintenance3Properties*)structure; - DumpVkPhysicalDeviceMaintenance3Properties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceMaintenance3Properties":"VkPhysicalDeviceMaintenance3PropertiesKHR", *props); + DumpVkPhysicalDeviceMaintenance3Properties(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceMaintenance3Properties":"VkPhysicalDeviceMaintenance3PropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_4_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceMaintenance4Properties* props = (VkPhysicalDeviceMaintenance4Properties*)structure; - DumpVkPhysicalDeviceMaintenance4Properties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceMaintenance4Properties":"VkPhysicalDeviceMaintenance4PropertiesKHR", *props); + DumpVkPhysicalDeviceMaintenance4Properties(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceMaintenance4Properties":"VkPhysicalDeviceMaintenance4PropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR && @@ -3717,9 +3718,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MULTIVIEW_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceMultiviewProperties* props = (VkPhysicalDeviceMultiviewProperties*)structure; - DumpVkPhysicalDeviceMultiviewProperties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceMultiviewProperties":"VkPhysicalDeviceMultiviewPropertiesKHR", *props); + DumpVkPhysicalDeviceMultiviewProperties(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceMultiviewProperties":"VkPhysicalDeviceMultiviewPropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT && @@ -3754,9 +3755,9 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_2_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDevicePointClippingProperties* props = (VkPhysicalDevicePointClippingProperties*)structure; - DumpVkPhysicalDevicePointClippingProperties(p, gpu.api_version.minor >= 1 ?"VkPhysicalDevicePointClippingProperties":"VkPhysicalDevicePointClippingPropertiesKHR", *props); + DumpVkPhysicalDevicePointClippingProperties(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDevicePointClippingProperties":"VkPhysicalDevicePointClippingPropertiesKHR", *props); p.AddNewline(); } #ifdef VK_ENABLE_BETA_EXTENSIONS @@ -3768,7 +3769,7 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } #endif // VK_ENABLE_BETA_EXTENSIONS if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES && - (gpu.api_version.minor >= 1)) { + (gpu.api_version >= VK_API_VERSION_1_1)) { VkPhysicalDeviceProtectedMemoryProperties* props = (VkPhysicalDeviceProtectedMemoryProperties*)structure; DumpVkPhysicalDeviceProtectedMemoryProperties(p, "VkPhysicalDeviceProtectedMemoryProperties", *props); p.AddNewline(); @@ -3805,16 +3806,16 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp } 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)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceSamplerFilterMinmaxProperties* props = (VkPhysicalDeviceSamplerFilterMinmaxProperties*)structure; - DumpVkPhysicalDeviceSamplerFilterMinmaxProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceSamplerFilterMinmaxProperties":"VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT", *props); + DumpVkPhysicalDeviceSamplerFilterMinmaxProperties(p, gpu.api_version >= VK_API_VERSION_1_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)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceShaderIntegerDotProductProperties* props = (VkPhysicalDeviceShaderIntegerDotProductProperties*)structure; - DumpVkPhysicalDeviceShaderIntegerDotProductProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderIntegerDotProductProperties":"VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR", *props); + DumpVkPhysicalDeviceShaderIntegerDotProductProperties(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceShaderIntegerDotProductProperties":"VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT && @@ -3836,30 +3837,30 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES && - (gpu.api_version.minor >= 1)) { + (gpu.api_version >= VK_API_VERSION_1_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)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceSubgroupSizeControlProperties* props = (VkPhysicalDeviceSubgroupSizeControlProperties*)structure; - DumpVkPhysicalDeviceSubgroupSizeControlProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceSubgroupSizeControlProperties":"VkPhysicalDeviceSubgroupSizeControlPropertiesEXT", *props); + DumpVkPhysicalDeviceSubgroupSizeControlProperties(p, gpu.api_version >= VK_API_VERSION_1_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)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceTexelBufferAlignmentProperties* props = (VkPhysicalDeviceTexelBufferAlignmentProperties*)structure; - DumpVkPhysicalDeviceTexelBufferAlignmentProperties(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceTexelBufferAlignmentProperties":"VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT", *props); + DumpVkPhysicalDeviceTexelBufferAlignmentProperties(p, gpu.api_version >= VK_API_VERSION_1_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)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceTimelineSemaphoreProperties* props = (VkPhysicalDeviceTimelineSemaphoreProperties*)structure; - DumpVkPhysicalDeviceTimelineSemaphoreProperties(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceTimelineSemaphoreProperties":"VkPhysicalDeviceTimelineSemaphorePropertiesKHR", *props); + DumpVkPhysicalDeviceTimelineSemaphoreProperties(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceTimelineSemaphoreProperties":"VkPhysicalDeviceTimelineSemaphorePropertiesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT && @@ -3881,19 +3882,19 @@ void chain_iterator_phys_device_props2(Printer &p, AppInstance &inst, AppGpu &gp p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES && - (gpu.api_version.minor >= 2)) { + (gpu.api_version >= VK_API_VERSION_1_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)) { + (gpu.api_version >= VK_API_VERSION_1_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)) { + (gpu.api_version >= VK_API_VERSION_1_3)) { VkPhysicalDeviceVulkan13Properties* props = (VkPhysicalDeviceVulkan13Properties*)structure; DumpVkPhysicalDeviceVulkan13Properties(p, "VkPhysicalDeviceVulkan13Properties", *props); p.AddNewline(); @@ -3911,7 +3912,7 @@ struct phys_device_mem_props2_chain { VkPhysicalDeviceMemoryBudgetPropertiesEXT PhysicalDeviceMemoryBudgetPropertiesEXT{}; void initialize_chain(AppGpu &gpu ) noexcept { PhysicalDeviceMemoryBudgetPropertiesEXT.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; - std::vector chain_members; + std::vector chain_members{}; if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMemoryBudgetPropertiesEXT)); @@ -4186,14 +4187,14 @@ struct phys_device_features2_chain { 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; + std::vector chain_members{}; if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_16BIT_STORAGE_EXTENSION_NAME)) - && gpu.api_version.minor < 1) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4210,7 +4211,7 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4233,12 +4234,12 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4271,7 +4272,7 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4280,26 +4281,26 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance4Features)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceMaintenance5FeaturesKHR)); @@ -4312,7 +4313,7 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)) @@ -4328,7 +4329,7 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4353,9 +4354,9 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDevicePrivateDataFeatures)); - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceProtectedMemoryFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceProvokingVertexFeaturesEXT)); @@ -4375,89 +4376,89 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceSamplerYcbcrConversionFeatures)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceScalarBlockLayoutFeatures)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceShaderDrawParametersFeatures)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceTextureCompressionASTCHDRFeatures)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_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) + && gpu.api_version < VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceUniformBufferStandardLayoutFeatures)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME)) - && gpu.api_version.minor < 1) + && gpu.api_version < VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVariablePointersFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) || gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexAttributeDivisorFeaturesKHR)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan11Features)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan12Features)); - if (gpu.api_version.minor >= 3) + if (gpu.api_version >= VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceVulkan13Features)); if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME)) - && gpu.api_version.minor < 2) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -4466,7 +4467,7 @@ struct phys_device_features2_chain { 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) + && gpu.api_version < VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast(&PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)); if (!chain_members.empty()) { @@ -4489,9 +4490,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) p.SetSubHeader(); if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_16BIT_STORAGE_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDevice16BitStorageFeatures* props = (VkPhysicalDevice16BitStorageFeatures*)structure; - DumpVkPhysicalDevice16BitStorageFeatures(p, gpu.api_version.minor >= 1 ?"VkPhysicalDevice16BitStorageFeatures":"VkPhysicalDevice16BitStorageFeaturesKHR", *props); + DumpVkPhysicalDevice16BitStorageFeatures(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDevice16BitStorageFeatures":"VkPhysicalDevice16BitStorageFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT && @@ -4502,9 +4503,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_8BIT_STORAGE_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDevice8BitStorageFeatures* props = (VkPhysicalDevice8BitStorageFeatures*)structure; - DumpVkPhysicalDevice8BitStorageFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDevice8BitStorageFeatures":"VkPhysicalDevice8BitStorageFeaturesKHR", *props); + DumpVkPhysicalDevice8BitStorageFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDevice8BitStorageFeatures":"VkPhysicalDevice8BitStorageFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT && @@ -4551,9 +4552,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceBufferDeviceAddressFeatures* props = (VkPhysicalDeviceBufferDeviceAddressFeatures*)structure; - DumpVkPhysicalDeviceBufferDeviceAddressFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceBufferDeviceAddressFeatures":"VkPhysicalDeviceBufferDeviceAddressFeaturesKHR", *props); + DumpVkPhysicalDeviceBufferDeviceAddressFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceBufferDeviceAddressFeatures":"VkPhysicalDeviceBufferDeviceAddressFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT && @@ -4618,9 +4619,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceDescriptorIndexingFeatures* props = (VkPhysicalDeviceDescriptorIndexingFeatures*)structure; - DumpVkPhysicalDeviceDescriptorIndexingFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceDescriptorIndexingFeatures":"VkPhysicalDeviceDescriptorIndexingFeaturesEXT", *props); + DumpVkPhysicalDeviceDescriptorIndexingFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceDescriptorIndexingFeatures":"VkPhysicalDeviceDescriptorIndexingFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT && @@ -4631,9 +4632,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceDynamicRenderingFeatures* props = (VkPhysicalDeviceDynamicRenderingFeatures*)structure; - DumpVkPhysicalDeviceDynamicRenderingFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceDynamicRenderingFeatures":"VkPhysicalDeviceDynamicRenderingFeaturesKHR", *props); + DumpVkPhysicalDeviceDynamicRenderingFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceDynamicRenderingFeatures":"VkPhysicalDeviceDynamicRenderingFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT && @@ -4722,9 +4723,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceHostQueryResetFeatures* props = (VkPhysicalDeviceHostQueryResetFeatures*)structure; - DumpVkPhysicalDeviceHostQueryResetFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceHostQueryResetFeatures":"VkPhysicalDeviceHostQueryResetFeaturesEXT", *props); + DumpVkPhysicalDeviceHostQueryResetFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceHostQueryResetFeatures":"VkPhysicalDeviceHostQueryResetFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT && @@ -4747,9 +4748,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceImageRobustnessFeatures* props = (VkPhysicalDeviceImageRobustnessFeatures*)structure; - DumpVkPhysicalDeviceImageRobustnessFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceImageRobustnessFeatures":"VkPhysicalDeviceImageRobustnessFeaturesEXT", *props); + DumpVkPhysicalDeviceImageRobustnessFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceImageRobustnessFeatures":"VkPhysicalDeviceImageRobustnessFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT && @@ -4766,9 +4767,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceImagelessFramebufferFeatures* props = (VkPhysicalDeviceImagelessFramebufferFeatures*)structure; - DumpVkPhysicalDeviceImagelessFramebufferFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceImagelessFramebufferFeatures":"VkPhysicalDeviceImagelessFramebufferFeaturesKHR", *props); + DumpVkPhysicalDeviceImagelessFramebufferFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceImagelessFramebufferFeatures":"VkPhysicalDeviceImagelessFramebufferFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT && @@ -4779,9 +4780,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceInlineUniformBlockFeatures* props = (VkPhysicalDeviceInlineUniformBlockFeatures*)structure; - DumpVkPhysicalDeviceInlineUniformBlockFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceInlineUniformBlockFeatures":"VkPhysicalDeviceInlineUniformBlockFeaturesEXT", *props); + DumpVkPhysicalDeviceInlineUniformBlockFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceInlineUniformBlockFeatures":"VkPhysicalDeviceInlineUniformBlockFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT && @@ -4798,9 +4799,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_4_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceMaintenance4Features* props = (VkPhysicalDeviceMaintenance4Features*)structure; - DumpVkPhysicalDeviceMaintenance4Features(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceMaintenance4Features":"VkPhysicalDeviceMaintenance4FeaturesKHR", *props); + DumpVkPhysicalDeviceMaintenance4Features(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceMaintenance4Features":"VkPhysicalDeviceMaintenance4FeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR && @@ -4835,9 +4836,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MULTIVIEW_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceMultiviewFeatures* props = (VkPhysicalDeviceMultiviewFeatures*)structure; - DumpVkPhysicalDeviceMultiviewFeatures(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceMultiviewFeatures":"VkPhysicalDeviceMultiviewFeaturesKHR", *props); + DumpVkPhysicalDeviceMultiviewFeatures(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceMultiviewFeatures":"VkPhysicalDeviceMultiviewFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT && @@ -4878,9 +4879,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDevicePipelineCreationCacheControlFeatures* props = (VkPhysicalDevicePipelineCreationCacheControlFeatures*)structure; - DumpVkPhysicalDevicePipelineCreationCacheControlFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDevicePipelineCreationCacheControlFeatures":"VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT", *props); + DumpVkPhysicalDevicePipelineCreationCacheControlFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDevicePipelineCreationCacheControlFeatures":"VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR && @@ -4947,13 +4948,13 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PRIVATE_DATA_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDevicePrivateDataFeatures* props = (VkPhysicalDevicePrivateDataFeatures*)structure; - DumpVkPhysicalDevicePrivateDataFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDevicePrivateDataFeatures":"VkPhysicalDevicePrivateDataFeaturesEXT", *props); + DumpVkPhysicalDevicePrivateDataFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDevicePrivateDataFeatures":"VkPhysicalDevicePrivateDataFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES && - (gpu.api_version.minor >= 1)) { + (gpu.api_version >= VK_API_VERSION_1_1)) { VkPhysicalDeviceProtectedMemoryFeatures* props = (VkPhysicalDeviceProtectedMemoryFeatures*)structure; DumpVkPhysicalDeviceProtectedMemoryFeatures(p, "VkPhysicalDeviceProtectedMemoryFeatures", *props); p.AddNewline(); @@ -5008,23 +5009,23 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceSamplerYcbcrConversionFeatures* props = (VkPhysicalDeviceSamplerYcbcrConversionFeatures*)structure; - DumpVkPhysicalDeviceSamplerYcbcrConversionFeatures(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceSamplerYcbcrConversionFeatures":"VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR", *props); + DumpVkPhysicalDeviceSamplerYcbcrConversionFeatures(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceSamplerYcbcrConversionFeatures":"VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceScalarBlockLayoutFeatures* props = (VkPhysicalDeviceScalarBlockLayoutFeatures*)structure; - DumpVkPhysicalDeviceScalarBlockLayoutFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceScalarBlockLayoutFeatures":"VkPhysicalDeviceScalarBlockLayoutFeaturesEXT", *props); + DumpVkPhysicalDeviceScalarBlockLayoutFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceScalarBlockLayoutFeatures":"VkPhysicalDeviceScalarBlockLayoutFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* props = (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*)structure; - DumpVkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures":"VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR", *props); + DumpVkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures":"VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT && @@ -5041,9 +5042,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceShaderAtomicInt64Features* props = (VkPhysicalDeviceShaderAtomicInt64Features*)structure; - DumpVkPhysicalDeviceShaderAtomicInt64Features(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceShaderAtomicInt64Features":"VkPhysicalDeviceShaderAtomicInt64FeaturesKHR", *props); + DumpVkPhysicalDeviceShaderAtomicInt64Features(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceShaderAtomicInt64Features":"VkPhysicalDeviceShaderAtomicInt64FeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR && @@ -5054,22 +5055,22 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures* props = (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures*)structure; - DumpVkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures":"VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT", *props); + DumpVkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures":"VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES && - (gpu.api_version.minor >= 1)) { + (gpu.api_version >= VK_API_VERSION_1_1)) { VkPhysicalDeviceShaderDrawParametersFeatures* props = (VkPhysicalDeviceShaderDrawParametersFeatures*)structure; - DumpVkPhysicalDeviceShaderDrawParametersFeatures(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceShaderDrawParametersFeatures":"VkPhysicalDeviceShaderDrawParameterFeatures", *props); + DumpVkPhysicalDeviceShaderDrawParametersFeatures(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceShaderDrawParametersFeatures":"VkPhysicalDeviceShaderDrawParameterFeatures", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceShaderFloat16Int8Features* props = (VkPhysicalDeviceShaderFloat16Int8Features*)structure; - DumpVkPhysicalDeviceShaderFloat16Int8Features(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceShaderFloat16Int8Features":"VkPhysicalDeviceFloat16Int8FeaturesKHR", *props); + DumpVkPhysicalDeviceShaderFloat16Int8Features(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceShaderFloat16Int8Features":"VkPhysicalDeviceFloat16Int8FeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT && @@ -5080,9 +5081,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceShaderIntegerDotProductFeatures* props = (VkPhysicalDeviceShaderIntegerDotProductFeatures*)structure; - DumpVkPhysicalDeviceShaderIntegerDotProductFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderIntegerDotProductFeatures":"VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR", *props); + DumpVkPhysicalDeviceShaderIntegerDotProductFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceShaderIntegerDotProductFeatures":"VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT && @@ -5099,9 +5100,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* props = (VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*)structure; - DumpVkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures":"VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR", *props); + DumpVkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures":"VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR && @@ -5112,9 +5113,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceShaderTerminateInvocationFeatures* props = (VkPhysicalDeviceShaderTerminateInvocationFeatures*)structure; - DumpVkPhysicalDeviceShaderTerminateInvocationFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceShaderTerminateInvocationFeatures":"VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR", *props); + DumpVkPhysicalDeviceShaderTerminateInvocationFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceShaderTerminateInvocationFeatures":"VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT && @@ -5125,9 +5126,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceSubgroupSizeControlFeatures* props = (VkPhysicalDeviceSubgroupSizeControlFeatures*)structure; - DumpVkPhysicalDeviceSubgroupSizeControlFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceSubgroupSizeControlFeatures":"VkPhysicalDeviceSubgroupSizeControlFeaturesEXT", *props); + DumpVkPhysicalDeviceSubgroupSizeControlFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceSubgroupSizeControlFeatures":"VkPhysicalDeviceSubgroupSizeControlFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT && @@ -5144,9 +5145,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceSynchronization2Features* props = (VkPhysicalDeviceSynchronization2Features*)structure; - DumpVkPhysicalDeviceSynchronization2Features(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceSynchronization2Features":"VkPhysicalDeviceSynchronization2FeaturesKHR", *props); + DumpVkPhysicalDeviceSynchronization2Features(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceSynchronization2Features":"VkPhysicalDeviceSynchronization2FeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT && @@ -5157,16 +5158,16 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceTextureCompressionASTCHDRFeatures* props = (VkPhysicalDeviceTextureCompressionASTCHDRFeatures*)structure; - DumpVkPhysicalDeviceTextureCompressionASTCHDRFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceTextureCompressionASTCHDRFeatures":"VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT", *props); + DumpVkPhysicalDeviceTextureCompressionASTCHDRFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceTextureCompressionASTCHDRFeatures":"VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceTimelineSemaphoreFeatures* props = (VkPhysicalDeviceTimelineSemaphoreFeatures*)structure; - DumpVkPhysicalDeviceTimelineSemaphoreFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceTimelineSemaphoreFeatures":"VkPhysicalDeviceTimelineSemaphoreFeaturesKHR", *props); + DumpVkPhysicalDeviceTimelineSemaphoreFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceTimelineSemaphoreFeatures":"VkPhysicalDeviceTimelineSemaphoreFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT && @@ -5177,16 +5178,16 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceUniformBufferStandardLayoutFeatures* props = (VkPhysicalDeviceUniformBufferStandardLayoutFeatures*)structure; - DumpVkPhysicalDeviceUniformBufferStandardLayoutFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceUniformBufferStandardLayoutFeatures":"VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR", *props); + DumpVkPhysicalDeviceUniformBufferStandardLayoutFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceUniformBufferStandardLayoutFeatures":"VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME)) && - gpu.api_version.minor < 1)) { + gpu.api_version < VK_API_VERSION_1_1)) { VkPhysicalDeviceVariablePointersFeatures* props = (VkPhysicalDeviceVariablePointersFeatures*)structure; - DumpVkPhysicalDeviceVariablePointersFeatures(p, gpu.api_version.minor >= 1 ?"VkPhysicalDeviceVariablePointersFeatures":"VkPhysicalDeviceVariablePointersFeaturesKHR", *props); + DumpVkPhysicalDeviceVariablePointersFeatures(p, gpu.api_version >= VK_API_VERSION_1_1 ?"VkPhysicalDeviceVariablePointersFeatures":"VkPhysicalDeviceVariablePointersFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR && @@ -5202,28 +5203,28 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES && - (gpu.api_version.minor >= 2)) { + (gpu.api_version >= VK_API_VERSION_1_2)) { VkPhysicalDeviceVulkan11Features* props = (VkPhysicalDeviceVulkan11Features*)structure; DumpVkPhysicalDeviceVulkan11Features(p, "VkPhysicalDeviceVulkan11Features", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES && - (gpu.api_version.minor >= 2)) { + (gpu.api_version >= VK_API_VERSION_1_2)) { VkPhysicalDeviceVulkan12Features* props = (VkPhysicalDeviceVulkan12Features*)structure; DumpVkPhysicalDeviceVulkan12Features(p, "VkPhysicalDeviceVulkan12Features", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES && - (gpu.api_version.minor >= 3)) { + (gpu.api_version >= VK_API_VERSION_1_3)) { VkPhysicalDeviceVulkan13Features* props = (VkPhysicalDeviceVulkan13Features*)structure; DumpVkPhysicalDeviceVulkan13Features(p, "VkPhysicalDeviceVulkan13Features", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME)) && - gpu.api_version.minor < 2)) { + gpu.api_version < VK_API_VERSION_1_2)) { VkPhysicalDeviceVulkanMemoryModelFeatures* props = (VkPhysicalDeviceVulkanMemoryModelFeatures*)structure; - DumpVkPhysicalDeviceVulkanMemoryModelFeatures(p, gpu.api_version.minor >= 2 ?"VkPhysicalDeviceVulkanMemoryModelFeatures":"VkPhysicalDeviceVulkanMemoryModelFeaturesKHR", *props); + DumpVkPhysicalDeviceVulkanMemoryModelFeatures(p, gpu.api_version >= VK_API_VERSION_1_2 ?"VkPhysicalDeviceVulkanMemoryModelFeatures":"VkPhysicalDeviceVulkanMemoryModelFeaturesKHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR && @@ -5246,9 +5247,9 @@ void chain_iterator_phys_device_features2(Printer &p, AppGpu &gpu, void * place) } if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures* props = (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures*)structure; - DumpVkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(p, gpu.api_version.minor >= 3 ?"VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures":"VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR", *props); + DumpVkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures":"VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR", *props); p.AddNewline(); } place = structure->pNext; @@ -5272,7 +5273,7 @@ struct surface_capabilities2_chain { 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; + 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 @@ -5335,9 +5336,9 @@ struct format_properties2_chain { 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; + std::vector chain_members{}; if ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME)) - && gpu.api_version.minor < 3) + && gpu.api_version < VK_API_VERSION_1_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)); @@ -5362,9 +5363,9 @@ void chain_iterator_format_properties2(Printer &p, AppGpu &gpu, void * place) { p.SetSubHeader(); if (structure->sType == VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 && ((gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME)) && - gpu.api_version.minor < 3)) { + gpu.api_version < VK_API_VERSION_1_3)) { VkFormatProperties3* props = (VkFormatProperties3*)structure; - DumpVkFormatProperties3(p, gpu.api_version.minor >= 3 ?"VkFormatProperties3":"VkFormatProperties3KHR", *props); + DumpVkFormatProperties3(p, gpu.api_version >= VK_API_VERSION_1_3 ?"VkFormatProperties3":"VkFormatProperties3KHR", *props); p.AddNewline(); } if (structure->sType == VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT && @@ -5390,7 +5391,7 @@ struct queue_properties2_chain { 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; + 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)); @@ -5488,13 +5489,13 @@ std::ostream &operator<<(std::ostream &o, VkExtent3D &obj) { } auto format_ranges = std::array{ FormatRange{0, nullptr, static_cast(0), static_cast(184)}, - FormatRange{1, nullptr, static_cast(1000156000), static_cast(1000156033)}, + FormatRange{VK_API_VERSION_1_1, nullptr, static_cast(1000156000), static_cast(1000156033)}, FormatRange{0, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, static_cast(1000156000), static_cast(1000156033)}, - FormatRange{3, nullptr, static_cast(1000330000), static_cast(1000330003)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast(1000330000), static_cast(1000330003)}, FormatRange{0, VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME, static_cast(1000330000), static_cast(1000330003)}, - FormatRange{3, nullptr, static_cast(1000340000), static_cast(1000340001)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast(1000340000), static_cast(1000340001)}, FormatRange{0, VK_EXT_4444_FORMATS_EXTENSION_NAME, static_cast(1000340000), static_cast(1000340001)}, - FormatRange{3, nullptr, static_cast(1000066000), static_cast(1000066013)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast(1000066000), static_cast(1000066013)}, FormatRange{0, VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME, static_cast(1000066000), static_cast(1000066013)}, FormatRange{0, VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, static_cast(1000054000), static_cast(1000054007)}, FormatRange{0, VK_NV_OPTICAL_FLOW_EXTENSION_NAME, static_cast(1000464000), static_cast(1000464000)}, diff --git a/vulkaninfo/outputprinter.h b/vulkaninfo/outputprinter.h index 35a60c56..68723180 100644 --- a/vulkaninfo/outputprinter.h +++ b/vulkaninfo/outputprinter.h @@ -2,6 +2,7 @@ * Copyright (c) 2019 The Khronos Group Inc. * Copyright (c) 2019 Valve Corporation * Copyright (c) 2019 LunarG, Inc. + * Copyright (c) 2023 RasterGrid Kft. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +31,8 @@ #include +#include "vulkaninfo.h" + std::string insert_quotes(std::string s) { return "\"" + s + "\""; } std::string to_string(const std::array &uid) { @@ -61,30 +64,29 @@ enum class OutputType { text, html, json, vkconfig_output }; struct PrinterCreateDetails { OutputType output_type = OutputType::text; bool print_to_file = false; - std::string file_name = "vulkaninfo.txt"; + std::string file_name = APP_SHORT_NAME ".txt"; std::string start_string = ""; }; class Printer { public: - Printer(const PrinterCreateDetails &details, std::ostream &out, const VulkanVersion vulkan_version) + Printer(const PrinterCreateDetails &details, std::ostream &out, const APIVersion vulkan_version) : output_type(details.output_type), out(out) { StackNode node{}; node.is_first_item = false; node.indents = 0; switch (output_type) { case (OutputType::text): - out << "==========\n"; - out << "VULKANINFO\n"; - out << "==========\n\n"; - out << "Vulkan Instance Version: " << VulkanVersion(vulkan_version) << "\n\n\n"; - + out << std::string(strlen(APP_UPPER_CASE_NAME), '=') << "\n"; + out << APP_UPPER_CASE_NAME "\n"; + out << std::string(strlen(APP_UPPER_CASE_NAME), '=') << "\n\n"; + out << API_NAME " Instance Version: " << APIVersion(vulkan_version) << "\n\n\n"; break; case (OutputType::html): out << "\n"; out << "\n"; out << "\t\n"; - out << "\t\tvulkaninfo\n"; + out << "\t\t" APP_SHORT_NAME "\n"; out << "\t\t