From d7db171ca5e201d931a3fa94626f3d8d6bc099fe Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Fri, 9 Feb 2024 09:46:57 -0600 Subject: vulkaninfo: Fix text output for HostImageCopyPropertiesEXT Was missing a new line & underline of the title. Also forgot to check if the extension was supported. --- vulkaninfo/vulkaninfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vulkaninfo/vulkaninfo.cpp') diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 3d57f634..591db557 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -348,6 +348,10 @@ void DumpGroups(Printer &p, AppInstance &inst) { } void GetAndDumpHostImageCopyPropertiesEXT(Printer &p, AppGpu &gpu) { + if (!gpu.CheckPhysicalDeviceExtensionIncluded("VK_EXT_host_image_copy")) { + return; + } + // Manually implement VkPhysicalDeviceHostImageCopyPropertiesEXT due to it needing to be called twice VkPhysicalDeviceHostImageCopyPropertiesEXT host_image_copy_properties_ext{}; host_image_copy_properties_ext.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT; @@ -360,7 +364,9 @@ void GetAndDumpHostImageCopyPropertiesEXT(Printer &p, AppGpu &gpu) { std::vector dst_layouts(host_image_copy_properties_ext.copyDstLayoutCount); host_image_copy_properties_ext.pCopyDstLayouts = dst_layouts.data(); vkGetPhysicalDeviceProperties2KHR(gpu.phys_device, &props2); + p.SetSubHeader(); DumpVkPhysicalDeviceHostImageCopyPropertiesEXT(p, "VkPhysicalDeviceHostImageCopyPropertiesEXT", host_image_copy_properties_ext); + p.AddNewline(); } void GpuDumpProps(Printer &p, AppGpu &gpu) { @@ -391,7 +397,6 @@ void GpuDumpProps(Printer &p, AppGpu &gpu) { if (gpu.inst.CheckExtensionEnabled(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { void *place = gpu.props2.pNext; chain_iterator_phys_device_props2(p, gpu.inst, gpu, place); - p.AddNewline(); GetAndDumpHostImageCopyPropertiesEXT(p, gpu); } } -- cgit v1.2.3