aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2024-02-09 09:46:57 -0600
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2024-02-12 13:22:34 -0600
commitd7db171ca5e201d931a3fa94626f3d8d6bc099fe (patch)
tree5b2ad86afb5679ec1de94c8ec264677aae170e48 /vulkaninfo/vulkaninfo.cpp
parentf24bab1ea1c521cd77991260cad1b11384eec5f0 (diff)
downloadusermoji-d7db171ca5e201d931a3fa94626f3d8d6bc099fe.tar.xz
vulkaninfo: Fix text output for HostImageCopyPropertiesEXT
Was missing a new line & underline of the title. Also forgot to check if the extension was supported.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
-rw-r--r--vulkaninfo/vulkaninfo.cpp7
1 files changed, 6 insertions, 1 deletions
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<VkImageLayout> 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);
}
}