venus: add VK_EXT_calibrated_timestamps extension

Implements all the necessary code in the device initialization
and extension functions.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15389>
This commit is contained in:
Igor Torrente
2022-02-11 07:25:43 -03:00
committed by Marge Bot
parent 88638ceb2d
commit 6d7f04e5de
2 changed files with 29 additions and 0 deletions

View File

@@ -432,3 +432,18 @@ vn_DeviceWaitIdle(VkDevice device)
return VK_SUCCESS;
}
VkResult
vn_GetCalibratedTimestampsEXT(
VkDevice device,
uint32_t timestampCount,
const VkCalibratedTimestampInfoEXT *pTimestampInfos,
uint64_t *pTimestamps,
uint64_t *pMaxDeviation)
{
struct vn_device *dev = vn_device_from_handle(device);
return vn_call_vkGetCalibratedTimestampsEXT(
dev->instance, device, timestampCount, pTimestampInfos, pTimestamps,
pMaxDeviation);
}

View File

@@ -944,6 +944,7 @@ vn_physical_device_get_passthrough_extensions(
.EXT_shader_demote_to_helper_invocation = true,
/* EXT */
.EXT_calibrated_timestamps = true,
.EXT_conservative_rasterization = true,
.EXT_custom_border_color = true,
.EXT_depth_clip_enable = true,
@@ -2551,3 +2552,16 @@ vn_GetPhysicalDeviceExternalSemaphoreProperties(
pExternalSemaphoreProperties->externalSemaphoreFeatures = 0;
}
}
VkResult
vn_GetPhysicalDeviceCalibrateableTimeDomainsEXT(
VkPhysicalDevice physicalDevice,
uint32_t *pTimeDomainCount,
VkTimeDomainEXT *pTimeDomains)
{
struct vn_physical_device *physical_dev =
vn_physical_device_from_handle(physicalDevice);
return vn_call_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
physical_dev->instance, physicalDevice, pTimeDomainCount, pTimeDomains);
}