mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-10 08:21:24 -04:00
vulkan: Add support for render timer using timestamp queries
This commit is contained in:
parent
8a9e3a84b5
commit
35c35530a3
4 changed files with 105 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue