From 4cf18420820194b7725a19981ada2b31c2e9fe05 Mon Sep 17 00:00:00 2001 From: Jeremy Kniager Date: Wed, 27 Mar 2019 15:09:56 -0600 Subject: vulkaninfo: Add VK_KHR_depth_stencil_resolve Added output for the following structure from extension VK_KHR_depth_stencil_resolve: VkPhysicalDeviceDepthStencilResolvePropertiesKHR Change-Id: Ib997c0c8d8f35be14cd611e6b6473accc28a2985 --- vulkaninfo/vulkaninfo.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/vulkaninfo/vulkaninfo.c b/vulkaninfo/vulkaninfo.c index 61085cb5..c71331e0 100644 --- a/vulkaninfo/vulkaninfo.c +++ b/vulkaninfo/vulkaninfo.c @@ -974,7 +974,9 @@ static void AppGpuInit(struct AppGpu *gpu, struct AppInstance *inst, uint32_t id {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, .mem_size = sizeof(VkPhysicalDeviceTransformFeedbackPropertiesEXT)}, {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT, - .mem_size = sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT)}}; + .mem_size = sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT)}, + {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR, + .mem_size = sizeof(VkPhysicalDeviceDepthStencilResolvePropertiesKHR)}}; uint32_t chain_info_len = ARRAY_SIZE(chain_info); @@ -4567,6 +4569,80 @@ static void AppGpuDumpProps(const struct AppGpu *gpu, FILE *out) { printf("\tfragmentDensityInvocations = %" PRIuLEAST32 "\n", fragment_density_map_properties->fragmentDensityInvocations); } + } else if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR && + CheckPhysicalDeviceExtensionIncluded(VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME, gpu->device_extensions, + gpu->device_extension_count)) { + VkPhysicalDeviceDepthStencilResolvePropertiesKHR *depth_stencil_resolve_properties = + (VkPhysicalDeviceDepthStencilResolvePropertiesKHR *)structure; + if (html_output) { + fprintf(out, "\n\t\t\t\t\t
VkPhysicalDeviceDepthStencilResolveProperties\n"); + fprintf(out, + "\t\t\t\t\t\t
supportedDepthResolveModes
\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes == 0) { + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_NONE_KHR
\n"); + } else { + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_AVERAGE_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_AVERAGE_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_MIN_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_MIN_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_MAX_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_MAX_BIT_KHR
\n"); + } + fprintf(out, + "\t\t\t\t\t\t
supportedStencilResolveModes
\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes == 0) { + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_NONE_KHR
\n"); + } else { + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_AVERAGE_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_AVERAGE_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_MIN_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_MIN_BIT_KHR
\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_MAX_BIT_KHR) + printf("\t\t\t\t\t\t
VK_RESOLVE_MODE_MAX_BIT_KHR
\n"); + } + fprintf(out, + "\t\t\t\t\t\t
independentResolveNone = %" PRIuLEAST32 "
\n", + depth_stencil_resolve_properties->independentResolveNone); + fprintf(out, + "\t\t\t\t\t\t
independentResolve = %" PRIuLEAST32 + "
\n", + depth_stencil_resolve_properties->independentResolve); + } else if (human_readable_output) { + printf("\nVkPhysicalDeviceDepthStencilResolveProperties\n"); + printf("============================================\n"); + printf("\t\tsupportedDepthResolveModes:\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes == 0) { + printf("\t\t\tVK_RESOLVE_MODE_NONE_KHR\n"); + } else { + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_AVERAGE_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_AVERAGE_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_MIN_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_MIN_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedDepthResolveModes & VK_RESOLVE_MODE_MAX_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_MAX_BIT_KHR\n"); + } + printf("\t\tsupportedStencilResolveModes:\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes == 0) { + printf("\t\t\tVK_RESOLVE_MODE_NONE_KHR\n"); + } else { + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_AVERAGE_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_AVERAGE_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_MIN_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_MIN_BIT_KHR\n"); + if (depth_stencil_resolve_properties->supportedStencilResolveModes & VK_RESOLVE_MODE_MAX_BIT_KHR) + printf("\t\t\tVK_RESOLVE_MODE_MAX_BIT_KHR\n"); + } + printf("\t\tindependentResolveNone = %" PRIuLEAST32 "\n", depth_stencil_resolve_properties->independentResolveNone); + printf("\t\tindependentResolve = %" PRIuLEAST32 "\n", depth_stencil_resolve_properties->independentResolve); + } } place = structure->pNext; -- cgit v1.2.3