From 3e72539dc2a77be52f2bd57f34da43ea144d6ed6 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 11 Aug 2023 01:44:15 +0800 Subject: [PATCH] radv: Fixes mingw linkage error undefined reference to `radv_GetCalibratedTimestampsEXT' message: ../../src/amd/vulkan/radv_sqtt.c:812: undefined reference to `radv_GetCalibratedTimestampsEXT' Signed-off-by: Yonggang Luo Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index a6a1c6db31b..dadfa1baa7c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -2111,12 +2111,12 @@ radv_GetMemoryFdPropertiesKHR(VkDevice _device, VkExternalMemoryHandleTypeFlagBi } } -#ifndef _WIN32 VKAPI_ATTR VkResult VKAPI_CALL radv_GetCalibratedTimestampsEXT(VkDevice _device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT *pTimestampInfos, uint64_t *pTimestamps, uint64_t *pMaxDeviation) { +#ifndef _WIN32 RADV_FROM_HANDLE(radv_device, device, _device); uint32_t clock_crystal_freq = device->physical_device->rad_info.clock_crystal_freq; int d; @@ -2161,8 +2161,10 @@ radv_GetCalibratedTimestampsEXT(VkDevice _device, uint32_t timestampCount, *pMaxDeviation = vk_time_max_deviation(begin, end, max_clock_period); return VK_SUCCESS; -} +#else + return VK_ERROR_FEATURE_NOT_PRESENT; #endif +} bool radv_device_set_pstate(struct radv_device *device, bool enable)