vulkan: Add support for render timer using timestamp queries

This commit is contained in:
Kenny Levinsen 2026-04-06 15:30:40 +00:00
parent 8a9e3a84b5
commit 35c35530a3
4 changed files with 105 additions and 0 deletions

View file

@ -488,10 +488,15 @@ struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
graphics_found = queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT;
if (graphics_found) {
dev->queue_family = i;
dev->timestamp_valid_bits = queue_props[i].timestampValidBits;
break;
}
}
assert(graphics_found);
VkPhysicalDeviceProperties phdev_props;
vkGetPhysicalDeviceProperties(phdev, &phdev_props);
dev->timestamp_period = phdev_props.limits.timestampPeriod;
}
bool exportable_semaphore = false, importable_semaphore = false;