diff options
| author | Daniel Rakos <daniel.rakos@rastergrid.com> | 2023-12-14 16:58:29 +0100 |
|---|---|---|
| committer | Spencer Fricke <115671160+spencer-lunarg@users.noreply.github.com> | 2023-12-15 09:15:30 +0900 |
| commit | dd0968224ad0b206987f14e2c88a4fad0ae39aaa (patch) | |
| tree | a977ca32f16e9dfdbc126c20889aeeb480ab41d3 | |
| parent | 8f6c0e51dcfb0a08f14d28ace577445a87c391c4 (diff) | |
| download | usermoji-dd0968224ad0b206987f14e2c88a4fad0ae39aaa.tar.xz | |
vulkaninfo: API parameterization changes
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 45 | ||||
| -rw-r--r-- | vulkaninfo/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | vulkaninfo/generated/vulkaninfo.hpp | 339 | ||||
| -rw-r--r-- | vulkaninfo/outputprinter.h | 22 | ||||
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 71 | ||||
| -rw-r--r-- | 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<VkBaseOutStructure*> chain_members;\n' + out += ' std::vector<VkBaseOutStructure*> 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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> chain_members{}; if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceDepthStencilResolveProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceDescriptorIndexingProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceDriverProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceFloatControlsProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceInlineUniformBlockProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceMaintenance4Properties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceMultiviewProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDevicePointClippingProperties)); #ifdef VK_ENABLE_BETA_EXTENSIONS if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceProtectedMemoryProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderIntegerDotProductProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceShaderModuleIdentifierPropertiesEXT)); @@ -3497,16 +3498,16 @@ struct phys_device_props2_chain { chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceShaderObjectPropertiesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceShaderTileImagePropertiesEXT)); - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceTimelineSemaphoreProperties)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceTransformFeedbackPropertiesEXT)); @@ -3514,11 +3515,11 @@ struct phys_device_props2_chain { chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVertexAttributeDivisorPropertiesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVertexAttributeDivisorPropertiesKHR)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVulkan11Properties)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVulkan12Properties)); - if (gpu.api_version.minor >= 3) + if (gpu.api_version >= VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> chain_members{}; if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> 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<VkBaseOutStructure*>(&PhysicalDevice16BitStorageFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_4444_FORMATS_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDevice8BitStorageFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceBufferDeviceAddressFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceDescriptorIndexingFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceDynamicRenderingFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceHostQueryResetFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceImageRobustnessFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceImageSlicedViewOf3DFeaturesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceImagelessFramebufferFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceInlineUniformBlockFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LEGACY_DITHERING_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceLegacyDitheringFeaturesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceMaintenance4Features)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_MAINTENANCE_5_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDevicePipelineCreationCacheControlFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDevicePrivateDataFeatures)); - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceProtectedMemoryFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceSeparateDepthStencilLayoutsFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceShaderAtomicFloat2FeaturesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderAtomicInt64Features)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_CLOCK_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderDemoteToHelperInvocationFeatures)); - if (gpu.api_version.minor >= 1) + if (gpu.api_version >= VK_API_VERSION_1_1) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderFloat16Int8Features)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderIntegerDotProductFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceShaderModuleIdentifierFeaturesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_OBJECT_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderSubgroupExtendedTypesFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceShaderTerminateInvocationFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceSubgroupSizeControlFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceSubpassMergeFeedbackFeaturesEXT)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceSynchronization2Features)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceTimelineSemaphoreFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceVertexAttributeDivisorFeaturesKHR)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVertexInputDynamicStateFeaturesEXT)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVulkan11Features)); - if (gpu.api_version.minor >= 2) + if (gpu.api_version >= VK_API_VERSION_1_2) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&PhysicalDeviceVulkan12Features)); - if (gpu.api_version.minor >= 3) + if (gpu.api_version >= VK_API_VERSION_1_3) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&PhysicalDeviceVulkanMemoryModelFeatures)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*>(&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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> chain_members{}; if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> 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<VkBaseOutStructure*>(&FormatProperties3)); if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME)) chain_members.push_back(reinterpret_cast<VkBaseOutStructure*>(&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<VkBaseOutStructure*> chain_members; + std::vector<VkBaseOutStructure*> 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<VkBaseOutStructure*>(&QueueFamilyGlobalPriorityPropertiesKHR)); @@ -5488,13 +5489,13 @@ std::ostream &operator<<(std::ostream &o, VkExtent3D &obj) { } auto format_ranges = std::array{ FormatRange{0, nullptr, static_cast<VkFormat>(0), static_cast<VkFormat>(184)}, - FormatRange{1, nullptr, static_cast<VkFormat>(1000156000), static_cast<VkFormat>(1000156033)}, + FormatRange{VK_API_VERSION_1_1, nullptr, static_cast<VkFormat>(1000156000), static_cast<VkFormat>(1000156033)}, FormatRange{0, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, static_cast<VkFormat>(1000156000), static_cast<VkFormat>(1000156033)}, - FormatRange{3, nullptr, static_cast<VkFormat>(1000330000), static_cast<VkFormat>(1000330003)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast<VkFormat>(1000330000), static_cast<VkFormat>(1000330003)}, FormatRange{0, VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME, static_cast<VkFormat>(1000330000), static_cast<VkFormat>(1000330003)}, - FormatRange{3, nullptr, static_cast<VkFormat>(1000340000), static_cast<VkFormat>(1000340001)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast<VkFormat>(1000340000), static_cast<VkFormat>(1000340001)}, FormatRange{0, VK_EXT_4444_FORMATS_EXTENSION_NAME, static_cast<VkFormat>(1000340000), static_cast<VkFormat>(1000340001)}, - FormatRange{3, nullptr, static_cast<VkFormat>(1000066000), static_cast<VkFormat>(1000066013)}, + FormatRange{VK_API_VERSION_1_3, nullptr, static_cast<VkFormat>(1000066000), static_cast<VkFormat>(1000066013)}, FormatRange{0, VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME, static_cast<VkFormat>(1000066000), static_cast<VkFormat>(1000066013)}, FormatRange{0, VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, static_cast<VkFormat>(1000054000), static_cast<VkFormat>(1000054007)}, FormatRange{0, VK_NV_OPTICAL_FLOW_EXTENSION_NAME, static_cast<VkFormat>(1000464000), static_cast<VkFormat>(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 <assert.h> +#include "vulkaninfo.h" + std::string insert_quotes(std::string s) { return "\"" + s + "\""; } std::string to_string(const std::array<uint8_t, 16> &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 << "<!doctype html>\n"; out << "<html lang='en'>\n"; out << "\t<head>\n"; - out << "\t\t<title>vulkaninfo</title>\n"; + out << "\t\t<title>" APP_SHORT_NAME "</title>\n"; out << "\t\t<style>\n"; out << "\t\thtml {\n"; out << "\t\t\tbackground-color: #0b1e48;\n"; @@ -166,10 +168,10 @@ class Printer { out << "\t</head>\n"; out << "\t<body>\n"; out << "\t\t<div id='header'>\n"; - out << "\t\t\t<h1>vulkaninfo</h1>\n"; + out << "\t\t\t<h1>" APP_SHORT_NAME "</h1>\n"; out << "\t\t</div>\n"; out << "\t\t<div id='wrapper'>\n"; - out << "\t\t\t<details><summary>Vulkan Instance Version: <span class='val'>" << VulkanVersion(vulkan_version) + out << "\t\t\t<details><summary>" API_NAME " Instance Version: <span class='val'>" << APIVersion(vulkan_version) << "</span></summary></details>\n\t\t\t<br />\n"; node.indents = 3; break; diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 6f8ca787..2c83c4c9 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -2,6 +2,7 @@ * Copyright (c) 2015-2021 The Khronos Group Inc. * Copyright (c) 2015-2021 Valve Corporation * Copyright (c) 2015-2021 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. @@ -83,10 +84,10 @@ void DumpLayers(Printer &p, std::vector<LayerExtensionList> layers, const std::v IndentWrapper indent(p); for (auto &layer : layers) { - std::string v_str = VulkanVersion(layer.layer_properties.specVersion); + std::string v_str = APIVersion(layer.layer_properties.specVersion); auto props = layer.layer_properties; - std::string header = p.DecorateAsType(props.layerName) + " (" + props.description + ") Vulkan version " + + std::string header = p.DecorateAsType(props.layerName) + " (" + props.description + ") " API_NAME " version " + p.DecorateAsValue(v_str) + ", layer version " + p.DecorateAsValue(std::to_string(props.implementationVersion)); ObjectWrapper obj(p, header); @@ -113,7 +114,7 @@ void DumpLayers(Printer &p, std::vector<LayerExtensionList> layers, const std::v ObjectWrapper obj_name(p, layer.layer_properties.layerName); p.SetMinKeyWidth(21); p.PrintKeyString("layerName", layer.layer_properties.layerName); - p.PrintKeyString("version", VulkanVersion(layer.layer_properties.specVersion).str()); + p.PrintKeyString("version", APIVersion(layer.layer_properties.specVersion).str()); p.PrintKeyValue("implementation version", layer.layer_properties.implementationVersion); p.PrintKeyString("description", layer.layer_properties.description); DumpExtensions(p, "Layer Extensions", layer.extension_properties); @@ -373,7 +374,7 @@ void GpuDumpProps(Printer &p, AppGpu &gpu) { p.PrintKeyValue("apiVersion", props.apiVersion); p.PrintKeyValue("driverVersion", props.driverVersion); } else { - p.SetValueDescription(std::to_string(props.apiVersion)).PrintKeyString("apiVersion", VulkanVersion(props.apiVersion)); + p.SetValueDescription(std::to_string(props.apiVersion)).PrintKeyString("apiVersion", APIVersion(props.apiVersion)); p.SetValueDescription(std::to_string(props.driverVersion)) .PrintKeyString("driverVersion", gpu.GetDriverVersionString()); } @@ -749,7 +750,7 @@ void DumpGpuProfileCapabilities(Printer &p, AppGpu &gpu) { // Print portability subset extension, features, and properties if available if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME) || - gpu.inst.instance_version >= VK_API_VERSION_1_1)) { + gpu.inst.api_version >= VK_API_VERSION_1_1)) { ObjectWrapper macos_obj(p, "macos-specific"); { ObjectWrapper ext_obj(p, "extensions"); @@ -793,9 +794,9 @@ void PrintProfileBaseInfo(Printer &p, const std::string &device_name, uint32_t a const std::vector<std::string> &capabilities) { ObjectWrapper vk_info(p, device_name); p.PrintKeyValue("version", 1); - p.PrintKeyString("api-version", VulkanVersion(apiVersion).str()); + p.PrintKeyString("api-version", APIVersion(apiVersion).str()); p.PrintKeyString("label", device_label); - p.PrintKeyString("description", "Exported from vulkaninfo"); + p.PrintKeyString("description", std::string("Exported from ") + APP_SHORT_NAME); { ObjectWrapper contributors(p, "contributors"); } { ArrayWrapper contributors(p, "history"); @@ -806,7 +807,7 @@ void PrintProfileBaseInfo(Printer &p, const std::string &device_name, uint32_t a std::string date = std::to_string(now->tm_year + 1900) + '-' + std::to_string(now->tm_mon + 1) + '-' + std::to_string(now->tm_mday); p.PrintKeyString("date", date); - p.PrintKeyString("author", "Automated export from vulkaninfo"); + p.PrintKeyString("author", std::string("Automated export from ") + APP_SHORT_NAME); p.PrintKeyString("comment", ""); } ArrayWrapper contributors(p, "capabilities"); @@ -819,7 +820,7 @@ void DumpGpuProfileInfo(Printer &p, AppGpu &gpu) { std::string device_label = std::string(gpu.props.deviceName) + " driver " + gpu.GetDriverVersionString(); std::string device_name = - std::string("VP_VULKANINFO_") + std::string(gpu.props.deviceName) + "_" + gpu.GetDriverVersionString(); + std::string("VP_" APP_UPPER_CASE_NAME "_") + std::string(gpu.props.deviceName) + "_" + gpu.GetDriverVersionString(); ; for (auto &c : device_name) { if (c == ' ' || c == '.') c = '_'; @@ -828,7 +829,7 @@ void DumpGpuProfileInfo(Printer &p, AppGpu &gpu) { #if defined(VK_ENABLE_BETA_EXTENSIONS) if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME) || - gpu.inst.instance_version >= VK_API_VERSION_1_1)) { + gpu.inst.api_version >= VK_API_VERSION_1_1)) { PrintProfileBaseInfo(p, device_name + "_portability_subset", gpu.props.apiVersion, device_label + " subset", {"device", "macos-specific"}); } @@ -856,10 +857,10 @@ void DumpSummaryInstance(Printer &p, AppInstance &inst) { auto props = layer.layer_properties; layer_name_max = std::max(layer_name_max, strlen(props.layerName)); layer_desc_max = std::max(layer_desc_max, strlen(props.description)); - layer_version_max = std::max(layer_version_max, VulkanVersion(layer.layer_properties.specVersion).str().size()); + layer_version_max = std::max(layer_version_max, APIVersion(layer.layer_properties.specVersion).str().size()); } for (auto &layer : inst.global_layers) { - auto v_str = VulkanVersion(layer.layer_properties.specVersion).str(); + auto v_str = APIVersion(layer.layer_properties.specVersion).str(); auto props = layer.layer_properties; auto name_padding = std::string(layer_name_max - strlen(props.layerName), ' '); @@ -875,7 +876,7 @@ void DumpSummaryGPU(Printer &p, AppGpu &gpu) { ObjectWrapper obj(p, "GPU" + std::to_string(gpu.id)); p.SetMinKeyWidth(18); auto props = gpu.GetDeviceProperties(); - p.PrintKeyValue("apiVersion", VulkanVersion(props.apiVersion)); + p.PrintKeyValue("apiVersion", APIVersion(props.apiVersion)); if (gpu.found_driver_props) { p.PrintKeyString("driverVersion", gpu.GetDriverVersionString()); } else { @@ -921,7 +922,7 @@ static void ConsoleEnlarge() { SetConsoleWindowInfo(console_handle, true, &r); // change the console window title - SetConsoleTitle(TEXT(app_short_name)); + SetConsoleTitle(TEXT(APP_SHORT_NAME)); } #endif @@ -934,26 +935,26 @@ const char *help_message_body = "[-o <filename>, --output <filename>]\n" " Print output to a new file whose name is specified by filename.\n" " File will be written to the current working directory.\n" - "[--text] Produce a text version of vulkaninfo output to stdout. This is\n" + "[--text] Produce a text version of " APP_SHORT_NAME " output to stdout. This is\n" " the default output.\n" - "[--html] Produce an html version of vulkaninfo output, saved as\n" - " \"vulkaninfo.html\" in the directory in which the command\n" + "[--html] Produce an html version of " APP_SHORT_NAME " output, saved as\n" + " \"" APP_SHORT_NAME ".html\" in the directory in which the command\n" " is run.\n" - "[-j, --json] Produce a json version of vulkaninfo output conforming to the Vulkan\n" + "[-j, --json] Produce a json version of " APP_SHORT_NAME " output conforming to the Vulkan\n" " Profiles schema, saved as \n" - " \"VP_VULKANINFO_[DEVICE_NAME]_[DRIVER_VERSION].json\"\n" + " \"VP_" APP_UPPER_CASE_NAME "_[DEVICE_NAME]_[DRIVER_VERSION].json\"\n" " of the first gpu in the system.\n" "[-j=<gpu-number>, --json=<gpu-number>]\n" " For a multi-gpu system, a single gpu can be targetted by\n" " specifying the gpu-number associated with the gpu of \n" " interest. This number can be determined by running\n" - " vulkaninfo without any options specified.\n" - "[--show-tool-props] Show the active VkPhysicalDeviceToolPropertiesEXT that vulkaninfo finds.\n" + " " APP_SHORT_NAME " without any options specified.\n" + "[--show-tool-props] Show the active VkPhysicalDeviceToolPropertiesEXT that " APP_SHORT_NAME " finds.\n" "[--show-formats] Display the format properties of each physical device.\n" " Note: This only affects text output.\n"; void print_usage(const std::string &executable_name) { - std::cout << "\nvulkaninfo - Summarize Vulkan information in relation to the current environment.\n\n"; + std::cout << "\n" APP_SHORT_NAME " - Summarize " API_NAME " information in relation to the current environment.\n\n"; std::cout << "USAGE: \n"; std::cout << " " << executable_name << " --summary\n"; std::cout << " " << executable_name << " -o <filename> | --output <filename>\n"; @@ -979,7 +980,7 @@ struct ParsedResults { util::vulkaninfo_optional<ParsedResults> parse_arguments(int argc, char **argv, std::string executable_name) { ParsedResults results{}; // default it to zero init everything results.output_category = OutputCategory::text; // default output category - results.default_filename = "vulkaninfo.txt"; + results.default_filename = APP_SHORT_NAME ".txt"; for (int i = 1; i < argc; ++i) { // A internal-use-only format for communication with the Vulkan Configurator tool // Usage "--vkconfig_output <path>" @@ -987,12 +988,12 @@ util::vulkaninfo_optional<ParsedResults> parse_arguments(int argc, char **argv, if (0 == strcmp("--vkconfig_output", argv[i])) { results.output_category = OutputCategory::vkconfig_output; results.print_to_file = true; - results.default_filename = "vulkaninfo.json"; + results.default_filename = APP_SHORT_NAME ".json"; if (argc > (i + 1) && argv[i + 1][0] != '-') { #ifdef WIN32 - results.filename = (std::string(argv[i + 1]) + "\\vulkaninfo.json"); + results.filename = (std::string(argv[i + 1]) + "\\" APP_SHORT_NAME ".json"); #else - results.filename = (std::string(argv[i + 1]) + "/vulkaninfo.json"); + results.filename = (std::string(argv[i + 1]) + "/" APP_SHORT_NAME ".json"); #endif ++i; } @@ -1006,17 +1007,17 @@ util::vulkaninfo_optional<ParsedResults> parse_arguments(int argc, char **argv, results.has_selected_gpu = true; } results.output_category = OutputCategory::profile_json; - results.default_filename = "vulkaninfo.json"; + results.default_filename = APP_SHORT_NAME ".json"; results.print_to_file = true; } else if (strcmp(argv[i], "--summary") == 0) { results.output_category = OutputCategory::summary; } else if (strcmp(argv[i], "--text") == 0) { results.output_category = OutputCategory::text; - results.default_filename = "vulkaninfo.txt"; + results.default_filename = APP_SHORT_NAME ".txt"; } else if (strcmp(argv[i], "--html") == 0) { results.output_category = OutputCategory::html; results.print_to_file = true; - results.default_filename = "vulkaninfo.html"; + results.default_filename = APP_SHORT_NAME ".html"; } else if (strcmp(argv[i], "--show-tool-props") == 0) { results.show_tool_props = true; } else if (strcmp(argv[i], "--show-formats") == 0) { @@ -1058,7 +1059,7 @@ PrinterCreateDetails get_printer_create_details(ParsedResults &parse_data, AppIn create.start_string = std::string("{\n\t\"$schema\": ") + "\"https://schema.khronos.org/vulkan/profiles-0.8-latest.json\""; if (parse_data.filename.empty()) { - create.file_name = std::string("VP_VULKANINFO_") + std::string(selected_gpu.props.deviceName) + "_" + + create.file_name = std::string("VP_" APP_UPPER_CASE_NAME "_") + std::string(selected_gpu.props.deviceName) + "_" + selected_gpu.GetDriverVersionString(); for (auto &c : create.file_name) { if (c == ' ' || c == '.') c = '_'; @@ -1068,7 +1069,7 @@ PrinterCreateDetails get_printer_create_details(ParsedResults &parse_data, AppIn break; case (OutputCategory::vkconfig_output): create.output_type = OutputType::vkconfig_output; - create.start_string = "{\n\t\"Vulkan Instance Version\": \"" + VulkanVersion(inst.vk_version).str() + "\""; + create.start_string = "{\n\t\"" API_NAME " Instance Version\": \"" + inst.api_version.str() + "\""; break; } return create; @@ -1122,7 +1123,7 @@ int main(int argc, char **argv) { // Figure out the name of the executable, pull out the name if given a path // Default is `vulkaninfo` - std::string executable_name = "vulkaninfo"; + std::string executable_name = APP_SHORT_NAME; if (argc >= 1) { const auto argv_0 = std::string(argv[0]); // don't include path separator @@ -1208,7 +1209,7 @@ int main(int argc, char **argv) { if (parse_data.has_selected_gpu) { std::cout << "The selected gpu (" << parse_data.selected_gpu << ") is not a valid GPU index. "; if (gpus.size() == 0) { - std::cout << "vulkaninfo could not find any GPU's.\n"; + std::cout << APP_SHORT_NAME " could not find any GPU's.\n"; return 1; } else { if (gpus.size() == 1) { @@ -1219,7 +1220,7 @@ int main(int argc, char **argv) { return 1; } } else if (parse_data.output_category == OutputCategory::profile_json) { - std::cout << "vulkaninfo could not find any GPU's.\n"; + std::cout << APP_SHORT_NAME " could not find any GPU's.\n"; } } @@ -1228,7 +1229,7 @@ int main(int argc, char **argv) { file_out = std::ofstream(printer_data.file_name); out = &file_out; } - printer = std::unique_ptr<Printer>(new Printer(printer_data, *out, instance.vk_version)); + printer = std::unique_ptr<Printer>(new Printer(printer_data, *out, instance.api_version)); RunPrinter(*(printer.get()), parse_data, instance, gpus, surfaces); diff --git a/vulkaninfo/vulkaninfo.h b/vulkaninfo/vulkaninfo.h index c998b295..b1d3e530 100644 --- a/vulkaninfo/vulkaninfo.h +++ b/vulkaninfo/vulkaninfo.h @@ -2,6 +2,7 @@ * Copyright (c) 2015-2021 The Khronos Group Inc. * Copyright (c) 2015-2021 Valve Corporation * Copyright (c) 2015-2021 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. @@ -25,6 +26,7 @@ * Author: Charles Giessen <charles@lunarg.com> * */ +#pragma once #include <algorithm> #include <array> @@ -191,7 +193,9 @@ struct User32Handles { User32Handles *user32_handles; #endif // _WIN32 -const char *app_short_name = "vulkaninfo"; +#define APP_SHORT_NAME "vulkaninfo" +#define APP_UPPER_CASE_NAME "VULKANINFO" +#define API_NAME "Vulkan" std::vector<const char *> get_c_str_array(std::vector<std::string> const &vec) { std::vector<const char *> ret; @@ -549,24 +553,34 @@ struct SurfaceExtension { } }; -struct VulkanVersion { - uint32_t major = 1; - uint32_t minor = 0; - uint32_t patch = 0; - VulkanVersion() = default; - VulkanVersion(uint32_t version) noexcept - : major{VK_VERSION_MAJOR(version)}, minor{VK_VERSION_MINOR(version)}, patch{VK_VERSION_PATCH(version)} {} - std::string str() { return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch); } +class APIVersion { + public: + APIVersion() : api_version_(VK_API_VERSION_1_0) {} + APIVersion(uint32_t api_version) : api_version_(api_version) {} + void SetPatch(uint32_t patch) { api_version_ = api_version_ - Patch() + VK_API_VERSION_PATCH(patch); } + uint32_t Major() const { return VK_API_VERSION_MAJOR(api_version_); } + uint32_t Minor() const { return VK_API_VERSION_MINOR(api_version_); } + uint32_t Patch() const { return VK_API_VERSION_PATCH(api_version_); } + bool operator<(APIVersion api_version) const { return api_version_ < api_version.api_version_; } + bool operator<=(APIVersion api_version) const { return api_version_ <= api_version.api_version_; } + bool operator>(APIVersion api_version) const { return api_version_ > api_version.api_version_; } + bool operator>=(APIVersion api_version) const { return api_version_ >= api_version.api_version_; } + bool operator==(APIVersion api_version) const { return api_version_ == api_version.api_version_; } + bool operator!=(APIVersion api_version) const { return api_version_ != api_version.api_version_; } + std::string str() { return std::to_string(Major()) + "." + std::to_string(Minor()) + "." + std::to_string(Patch()); } operator std::string() { return str(); } + + private: + uint32_t api_version_; }; -std::ostream &operator<<(std::ostream &out, const VulkanVersion &v) { return out << v.major << "." << v.minor << "." << v.patch; } + +std::ostream &operator<<(std::ostream &out, const APIVersion &v) { return out << v.Major() << "." << v.Minor() << "." << v.Patch(); } struct AppInstance { VkDll dll; VkInstance instance; - uint32_t instance_version; - VulkanVersion vk_version; + APIVersion api_version; VkDebugReportCallbackEXT debug_callback = VK_NULL_HANDLE; @@ -621,20 +635,19 @@ struct AppInstance { AppInstance() { VkResult dllErr = dll.Initialize(); if (dllErr != VK_SUCCESS) { - THROW_ERR("Failed to initialize: Vulkan loader is not installed, not found, or failed to load."); + THROW_ERR("Failed to initialize: " API_NAME " loader is not installed, not found, or failed to load."); } dll.InitializeDispatchPointers(); - if (!dll.fp_vkEnumerateInstanceVersion) { - instance_version = VK_API_VERSION_1_0; - } else { + uint32_t instance_version = VK_API_VERSION_1_0; + if (dll.fp_vkEnumerateInstanceVersion) { const VkResult err = dll.fp_vkEnumerateInstanceVersion(&instance_version); if (err) THROW_VK_ERR("vkEnumerateInstanceVersion", err); } - vk_version = VulkanVersion(instance_version); + api_version = APIVersion(instance_version); // fallback to baked header version if loader returns 0 for the patch version - if (VK_VERSION_PATCH(instance_version) == 0) vk_version.patch = VK_VERSION_PATCH(VK_HEADER_VERSION); + if (api_version.Patch() == 0) api_version.SetPatch(VK_HEADER_VERSION); AppGetInstanceExtensions(); @@ -643,7 +656,7 @@ struct AppInstance { DbgCallback}; const VkApplicationInfo app_info = { - VK_STRUCTURE_TYPE_APPLICATION_INFO, nullptr, app_short_name, 1, nullptr, 0, instance_version}; + VK_STRUCTURE_TYPE_APPLICATION_INFO, nullptr, APP_SHORT_NAME, 1, nullptr, 0, instance_version}; AppCompileInstanceExtensionsToEnable(); @@ -666,9 +679,9 @@ struct AppInstance { VkResult err = dll.fp_vkCreateInstance(&inst_info, nullptr, &instance); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { - std::cerr << "Cannot create Vulkan instance.\n"; - std::cerr << "This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU " - "that does not support Vulkan.\n"; + std::cerr << "Cannot create " API_NAME " instance.\n"; + std::cerr << "This problem is often caused by a faulty installation of the " API_NAME " driver or attempting to use a GPU " + "that does not support " API_NAME ".\n"; THROW_VK_ERR("vkCreateInstance", err); } else if (err) { THROW_VK_ERR("vkCreateInstance", err); @@ -861,7 +874,7 @@ static void AppCreateWin32Window(AppInstance &inst) { win_class.hCursor = LoadCursor(nullptr, IDC_ARROW); win_class.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); win_class.lpszMenuName = nullptr; - win_class.lpszClassName = app_short_name; + win_class.lpszClassName = APP_SHORT_NAME; win_class.hInstance = inst.h_instance; win_class.hIconSm = user32_handles->pfnLoadIconA(nullptr, IDI_WINLOGO); // Register window class: @@ -873,8 +886,8 @@ static void AppCreateWin32Window(AppInstance &inst) { RECT wr = {0, 0, inst.width, inst.height}; user32_handles->pfnAdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE); inst.h_wnd = user32_handles->pfnCreateWindowExA(0, - app_short_name, // class name - app_short_name, // app name + APP_SHORT_NAME, // class name + APP_SHORT_NAME, // app name // WS_VISIBLE | WS_SYSMENU | WS_OVERLAPPEDWINDOW, // window style 100, 100, // x/y coords @@ -1589,7 +1602,7 @@ util::vulkaninfo_optional<ImageTypeSupport> FillImageTypeSupport(AppInstance &in struct FormatRange { // the Vulkan standard version that supports this format range, or 0 if non-standard - uint32_t minimum_instance_version; + APIVersion minimum_instance_version; // The name of the extension that supports this format range, or NULL if the range // is only part of the standard @@ -1627,7 +1640,7 @@ struct AppGpu { AppInstance &inst; uint32_t id{}; VkPhysicalDevice phys_device = VK_NULL_HANDLE; - VulkanVersion api_version; + APIVersion api_version; VkPhysicalDeviceProperties props{}; VkPhysicalDeviceProperties2KHR props2{}; @@ -1676,7 +1689,7 @@ struct AppGpu { inst.dll.fp_vkGetPhysicalDeviceProperties(phys_device, &props); // needs to find the minimum of the instance and device version, and use that to print the device info - api_version = VulkanVersion(props.apiVersion); + api_version = APIVersion(props.apiVersion); device_extensions = inst.AppGetPhysicalDeviceLayerExtensions(phys_device, nullptr); @@ -1719,7 +1732,7 @@ struct AppGpu { } inst.ext_funcs.vkGetPhysicalDeviceQueueFamilyProperties2KHR(phys_device, &queue_prop2_count, queue_props2.data()); - if (CheckPhysicalDeviceExtensionIncluded(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME) || api_version.minor >= 2) { + if (CheckPhysicalDeviceExtensionIncluded(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME) || api_version >= VK_API_VERSION_1_2) { void *place = props2.pNext; while (place) { VkBaseOutStructure *structure = static_cast<VkBaseOutStructure *>(place); @@ -1916,8 +1929,8 @@ struct AppGpu { } // True if standard and supported by both this instance and this GPU - if (inst.instance_version >= VK_MAKE_API_VERSION(0, 1, format_range.minimum_instance_version, 0) && - props.apiVersion >= VK_MAKE_API_VERSION(0, 1, format_range.minimum_instance_version, 0)) { + if (inst.api_version >= format_range.minimum_instance_version && + APIVersion(props.apiVersion) >= format_range.minimum_instance_version) { return true; } @@ -1949,7 +1962,7 @@ struct AppGpu { return std::to_string(v >> 14) + "." + std::to_string(v & 0x3fff); } else { // AMD uses the standard vulkan scheme - return VulkanVersion(v).str(); + return APIVersion(v).str(); } } }; |
