aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2024-09-27 14:53:08 -0500
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2024-09-27 14:42:28 -0600
commit1626752592910fc4fdb33a239c93056b29cf7d31 (patch)
tree04049ec759551725b88d67b02ae3d65ae50c4e5b /vulkaninfo/vulkaninfo.cpp
parent961b9e7a9e62bbd688bd85b58541d66a7f2acc55 (diff)
downloadusermoji-1626752592910fc4fdb33a239c93056b29cf7d31.tar.xz
vulkaninfo: Correctly query per-surface queue support
The previous implementation did not differentiate when a single queue supported a specific surface. It will now print 'true' if all surfaces support presentation with a queue, 'false' if none, and otherwise prints each surface type's support if they aren't uniform in value. This makes the info regarding which queue supports presentation on a surface much easier to validate the correctness of.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
-rw-r--r--vulkaninfo/vulkaninfo.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp
index 09030a0d..08eb80bf 100644
--- a/vulkaninfo/vulkaninfo.cpp
+++ b/vulkaninfo/vulkaninfo.cpp
@@ -396,17 +396,19 @@ void GpuDumpQueueProps(Printer &p, AppGpu &gpu, const AppQueueFamilyProperties &
p.PrintKeyString("queueFlags", VkQueueFlagsString(props.queueFlags));
p.PrintKeyValue("timestampValidBits", props.timestampValidBits);
- if (queue.is_present_platform_agnostic) {
- p.PrintKeyString("present support", queue.platforms_support_present ? "true" : "false");
+ if (!queue.can_present) {
+ p.PrintKeyString("present support", "false");
+ } else if (queue.can_always_present) {
+ p.PrintKeyString("present support", "true");
} else {
size_t width = 0;
- for (auto &surface : gpu.inst.surface_extensions) {
- if (surface.name.size() > width) width = surface.name.size();
+ for (const auto &support : queue.present_support) {
+ if (support.first.size() > width) width = support.first.size();
}
ObjectWrapper obj_present_support(p, "present support");
p.SetMinKeyWidth(width);
- for (auto &surface : gpu.inst.surface_extensions) {
- p.PrintKeyString(surface.name, surface.supports_present ? "true" : "false");
+ for (const auto &support : queue.present_support) {
+ p.PrintKeyString(support.first, support.second ? "true" : "false");
}
}
chain_iterator_queue_properties2(p, gpu, queue.pNext);