From 4a801cfbf2bf4c2278bc79c7a3c809ad7eb07ffd Mon Sep 17 00:00:00 2001 From: Shannon McPherson Date: Wed, 25 Jul 2018 16:15:50 -0600 Subject: vulkaninfo: Fix html output for multiple gpus This change addresses erroneous indentation and nesting of html output when multiple gpus are present --- vulkaninfo/vulkaninfo.c | 183 +++++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 87 deletions(-) diff --git a/vulkaninfo/vulkaninfo.c b/vulkaninfo/vulkaninfo.c index 1eb75800..fd3dae4e 100644 --- a/vulkaninfo/vulkaninfo.c +++ b/vulkaninfo/vulkaninfo.c @@ -1259,7 +1259,7 @@ static int AppDumpSurfaceFormats(struct AppInstance *inst, struct AppGpu *gpu, F assert(!err); if (html_output) { - fprintf(out, "\t\t\t\t
Formats: count =
%d
", format_count); + fprintf(out, "\t\t\t\t\t
Formats: count =
%d
", format_count); if (format_count > 0) { fprintf(out, "\n"); } else { @@ -1270,14 +1270,14 @@ static int AppDumpSurfaceFormats(struct AppInstance *inst, struct AppGpu *gpu, F } for (uint32_t i = 0; i < format_count; ++i) { if (html_output) { - fprintf(out, "\t\t\t\t\t
%s
\n", + fprintf(out, "\t\t\t\t\t\t
%s
\n", VkFormatString(surf_formats[i].format)); } else if (human_readable_output) { printf("\t%s\n", VkFormatString(surf_formats[i].format)); } } if (format_count > 0 && html_output) { - fprintf(out, "\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t
\n"); } fflush(out); @@ -1301,7 +1301,7 @@ static int AppDumpSurfacePresentModes(struct AppInstance *inst, struct AppGpu *g assert(!err); if (html_output) { - fprintf(out, "\t\t\t\t
Present Modes: count =
%d
", present_mode_count); + fprintf(out, "\t\t\t\t\t
Present Modes: count =
%d
", present_mode_count); if (present_mode_count > 0) { fprintf(out, "\n"); } else { @@ -1312,14 +1312,14 @@ static int AppDumpSurfacePresentModes(struct AppInstance *inst, struct AppGpu *g } for (uint32_t i = 0; i < present_mode_count; ++i) { if (html_output) { - fprintf(out, "\t\t\t\t\t
%s
\n", + fprintf(out, "\t\t\t\t\t\t
%s
\n", VkPresentModeString(surf_present_modes[i])); } else if (human_readable_output) { printf("\t%s\n", VkPresentModeString(surf_present_modes[i])); } } if (present_mode_count > 0 && html_output) { - fprintf(out, "\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t
\n"); } fflush(out); @@ -1334,124 +1334,124 @@ static void AppDumpSurfaceCapabilities(struct AppInstance *inst, struct AppGpu * inst->vkGetPhysicalDeviceSurfaceCapabilitiesKHR(gpu->obj, inst->surface, &inst->surface_capabilities); if (html_output) { - fprintf(out, "\t\t\t\t
VkSurfaceCapabilitiesKHR\n"); - fprintf(out, "\t\t\t\t\t
minImageCount =
%u
\n", inst->surface_capabilities.minImageCount); - fprintf(out, "\t\t\t\t\t
maxImageCount =
%u
\n", inst->surface_capabilities.maxImageCount); - fprintf(out, "\t\t\t\t\t
currentExtent\n"); - fprintf(out, "\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.currentExtent.width); - fprintf(out, "\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.currentExtent.height); - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
minImageExtent\n"); - fprintf(out, "\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.minImageExtent.width); - fprintf(out, "\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.minImageExtent.height); - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
maxImageExtent\n"); - fprintf(out, "\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.maxImageExtent.width); - fprintf(out, "\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.maxImageExtent.height); - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
maxImageArrayLayers =
%u
\n", inst->surface_capabilities.maxImageArrayLayers); - fprintf(out, "\t\t\t\t\t
supportedTransform\n"); + fprintf(out, "\t\t\t\t\t
VkSurfaceCapabilitiesKHR\n"); + fprintf(out, "\t\t\t\t\t\t
minImageCount =
%u
\n", inst->surface_capabilities.minImageCount); + fprintf(out, "\t\t\t\t\t\t
maxImageCount =
%u
\n", inst->surface_capabilities.maxImageCount); + fprintf(out, "\t\t\t\t\t\t
currentExtent\n"); + fprintf(out, "\t\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.currentExtent.width); + fprintf(out, "\t\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.currentExtent.height); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
minImageExtent\n"); + fprintf(out, "\t\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.minImageExtent.width); + fprintf(out, "\t\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.minImageExtent.height); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
maxImageExtent\n"); + fprintf(out, "\t\t\t\t\t\t\t
width =
%u
\n", inst->surface_capabilities.maxImageExtent.width); + fprintf(out, "\t\t\t\t\t\t\t
height =
%u
\n", inst->surface_capabilities.maxImageExtent.height); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
maxImageArrayLayers =
%u
\n", inst->surface_capabilities.maxImageArrayLayers); + fprintf(out, "\t\t\t\t\t\t
supportedTransform\n"); if (inst->surface_capabilities.supportedTransforms == 0) { - fprintf(out, "\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t
None
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedTransforms & VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR
\n"); } - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
currentTransform\n"); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
currentTransform\n"); if (inst->surface_capabilities.currentTransform == 0) { - fprintf(out, "\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t
None
\n"); } if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR) { - fprintf(out, "\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
\n"); } else if (inst->surface_capabilities.currentTransform & VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR
\n"); } - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
supportedCompositeAlpha\n"); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
supportedCompositeAlpha\n"); if (inst->surface_capabilities.supportedCompositeAlpha == 0) { - fprintf(out, "\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t
None
\n"); } if (inst->surface_capabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
\n"); } if (inst->surface_capabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR) { - fprintf(out, "\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
\n"); } - fprintf(out, "\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
supportedUsageFlags\n"); + fprintf(out, "\t\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
supportedUsageFlags\n"); if (inst->surface_capabilities.supportedUsageFlags == 0) { - fprintf(out, "\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t
None
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_DST_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_DST_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_DST_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_SAMPLED_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_SAMPLED_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_SAMPLED_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_STORAGE_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_STORAGE_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_STORAGE_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
\n"); } if (inst->surface_capabilities.supportedUsageFlags & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
\n"); } - fprintf(out, "\t\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t\t
\n"); } else if (human_readable_output) { printf("\nVkSurfaceCapabilitiesKHR:\n"); printf("=========================\n"); @@ -1516,16 +1516,16 @@ static void AppDumpSurfaceCapabilities(struct AppInstance *inst, struct AppGpu * inst->vkGetPhysicalDeviceSurfaceCapabilities2EXT(gpu->obj, inst->surface, &inst->surface_capabilities2_ext); if (html_output) { - fprintf(out, "\t\t\t\t\t
VkSurfaceCapabilities2EXT\n"); - fprintf(out, "\t\t\t\t\t\t
supportedSurfaceCounters\n"); + fprintf(out, "\t\t\t\t\t\t
VkSurfaceCapabilities2EXT\n"); + fprintf(out, "\t\t\t\t\t\t\t
supportedSurfaceCounters\n"); if (inst->surface_capabilities2_ext.supportedSurfaceCounters == 0) { - fprintf(out, "\t\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
None
\n"); } if (inst->surface_capabilities2_ext.supportedSurfaceCounters & VK_SURFACE_COUNTER_VBLANK_EXT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_SURFACE_COUNTER_VBLANK_EXT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_SURFACE_COUNTER_VBLANK_EXT
\n"); } + fprintf(out, "\t\t\t\t\t\t\t
\n"); fprintf(out, "\t\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
\n"); } else if (human_readable_output) { printf("\nVkSurfaceCapabilities2EXT:\n"); printf("==========================\n"); @@ -1564,37 +1564,37 @@ static void AppDumpSurfaceCapabilities(struct AppInstance *inst, struct AppGpu * if (work->sType == VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR) { VkSharedPresentSurfaceCapabilitiesKHR* shared_surface_capabilities = (VkSharedPresentSurfaceCapabilitiesKHR*)place; if (html_output) { - fprintf(out, "\t\t\t\t\t
VkSharedPresentSurfaceCapabilitiesKHR\n"); - fprintf(out, "\t\t\t\t\t\t
sharedPresentSupportedUsageFlags\n"); + fprintf(out, "\t\t\t\t\t\t
VkSharedPresentSurfaceCapabilitiesKHR\n"); + fprintf(out, "\t\t\t\t\t\t\t
sharedPresentSupportedUsageFlags\n"); if (shared_surface_capabilities->sharedPresentSupportedUsageFlags == 0) { - fprintf(out, "\t\t\t\t\t\t\t
None
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
None
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_DST_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_DST_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSFER_DST_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_SAMPLED_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_SAMPLED_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_SAMPLED_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_STORAGE_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_STORAGE_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_STORAGE_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
\n"); } if (shared_surface_capabilities->sharedPresentSupportedUsageFlags & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) { - fprintf(out, "\t\t\t\t\t\t\t
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
\n"); + fprintf(out, "\t\t\t\t\t\t\t\t
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
\n"); } + fprintf(out, "\t\t\t\t\t\t\t
\n"); fprintf(out, "\t\t\t\t\t\t
\n"); - fprintf(out, "\t\t\t\t\t
\n"); } else if (human_readable_output) { printf("\nVkSharedPresentSurfaceCapabilitiesKHR:\n"); printf("========================================\n"); @@ -1614,7 +1614,7 @@ static void AppDumpSurfaceCapabilities(struct AppInstance *inst, struct AppGpu * } } if (html_output) { - fprintf(out, "\t\t\t\t
\n"); + fprintf(out, "\t\t\t\t\t
\n"); } } } @@ -3024,7 +3024,6 @@ static void AppGpuDumpMemoryProps(const struct AppGpu *gpu, FILE *out) { static void AppGpuDump(const struct AppGpu *gpu, FILE *out) { if (html_output) { - fprintf(out, "\t\t\t
Device Properties and Extensions\n"); fprintf(out, "\t\t\t\t
GPU%u\n", gpu->id); } else if (human_readable_output) { printf("\nDevice Properties and Extensions :\n"); @@ -3077,7 +3076,6 @@ static void AppGpuDump(const struct AppGpu *gpu, FILE *out) { AppDevDump(gpu, out); if (html_output) { fprintf(out, "\t\t\t\t
\n"); - fprintf(out, "\t\t\t
\n"); } } @@ -3449,7 +3447,6 @@ int main(int argc, char **argv) { AppGetPhysicalDeviceLayerExtensions(&gpus[j], layer_name, &count, &props); if (html_output) { AppDumpExtensions("\t\t\t", "Layer-Device", count, props, out); - fprintf(out, "\t\t\t\t\t
\n"); } else if (human_readable_output) { AppDumpExtensions("\t\t", "Layer-Device", count, props, out); } @@ -3457,6 +3454,7 @@ int main(int argc, char **argv) { } if (html_output) { + fprintf(out, "\t\t\t\t\t
\n"); fprintf(out, "\t\t\t\t\n"); } else if (human_readable_output) { printf("\n"); @@ -3507,9 +3505,9 @@ int main(int argc, char **argv) { for (uint32_t i = 0; i < gpu_count; ++i) { AppCreateWin32Surface(&inst); if (html_output) { - fprintf(out, "\t\t\t\t
GPU id :
%u
(%s)
\n", i, + fprintf(out, "\t\t\t\t
GPU id :
%u
(%s)
\n", i, gpus[i].props.deviceName); - fprintf(out, "\t\t\t\t
Surface type :
%s
\n", + fprintf(out, "\t\t\t\t\t
Surface type :
%s
\n", VK_KHR_WIN32_SURFACE_EXTENSION_NAME); } else if (human_readable_output) { printf("GPU id : %u (%s)\n", i, gpus[i].props.deviceName); @@ -3519,6 +3517,9 @@ int main(int argc, char **argv) { present_mode_count += AppDumpSurfacePresentModes(&inst, &gpus[i], out); AppDumpSurfaceCapabilities(&inst, &gpus[i], out); AppDestroySurface(&inst); + if (html_output) { + fprintf(out, "\t\t\t\t
\n"); + } } AppDestroyWin32Window(&inst); } @@ -3648,6 +3649,10 @@ int main(int argc, char **argv) { free(groups); } + if (html_output) { + fprintf(out, "\t\t\t
Device Properties and Extensions\n"); + } + for (uint32_t i = 0; i < gpu_count; ++i) { if (json_output && selected_gpu != i) { // Toggle json_output to allow html output without json output @@ -3662,6 +3667,10 @@ int main(int argc, char **argv) { } } + if (html_output) { + fprintf(out, "\t\t\t
\n"); + } + for (uint32_t i = 0; i < gpu_count; ++i) { AppGpuDestroy(&gpus[i]); } -- cgit v1.2.3