radv: Fixes mingw linkage error undefined reference to `radv_GetCalibratedTimestampsEXT'
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 10 Aug 2023 17:44:15 +0000 (01:44 +0800)
committerYonggang Luo <luoyonggang@gmail.com>
Mon, 14 Aug 2023 07:00:56 +0000 (15:00 +0800)
message:
../../src/amd/vulkan/radv_sqtt.c:812: undefined reference to `radv_GetCalibratedTimestampsEXT'

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24664>

src/amd/vulkan/radv_device.c

index a6a1c6d..dadfa1b 100644 (file)
@@ -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)