CLOCK_MONOTONIC_RAW has been around since Linux 2.6.28 and is simply just CLOCK_MONOTONIC without NTP adjustments.

There are no Vulkan drivers for 2009-era kernels so this is a non-issue.

 - Josh 🐸

On Tue, 21 Jul 2020 at 19:24, Alexandre Julliard <julliard@winehq.org> wrote:
Joshua Ashton <joshua@froggi.es> writes:

> @@ -1265,6 +1267,150 @@ VkResult WINAPI wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevi
>      return res;
>  }

> +/* From ntdll/unix/sync.c */
> +#define NANOSECONDS_IN_A_SECOND 1000000000
> +#define TICKSPERSEC             10000000
> +
> +static inline VkTimeDomainEXT get_performance_counter_time_domain(void)
> +{
> +#if !defined(__APPLE__) && defined(HAVE_CLOCK_GETTIME)
> +# ifdef CLOCK_MONOTONIC_RAW
> +    return VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT;
> +# else
> +    return VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT;
> +# endif
> +#else
> +    FIXME("No mapping for VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT on this platform.");
> +    return VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT;
> +#endif
> +}

Do we really need to second-guess what QueryPerformanceCounter() is
using internally?  If so, use of CLOCK_MONOTONIC_RAW is detected at
run-time so #ifdefs are not sufficient.

--
Alexandre Julliard
julliard@winehq.org