[PATCH vkd3d 3/3] vkd3d: Implement ID3D12CommandQueue_GetClockCalibration().
Henri Verbeet
hverbeet at gmail.com
Fri Jan 14 11:12:02 CST 2022
On Fri, 14 Jan 2022 at 16:18, Conor McCarthy <cmccarthy at codeweavers.com> wrote:
> + if (infos[1].timeDomain == VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT
> + || infos[1].timeDomain == VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT)
> + {
> + /* Convert monotonic clock to match Wine's RtlQueryPerformanceFrequency(). */
> + timestamps[1] /= 1000000000 / TICKSPERSEC;
> + }
> +
Is TICKSPERSEC something we should allow to be specified by
vkd3d_create_instance() or vkd3d_create_device()? It seems like
something that may be subject to future change.
> +static void vkd3d_time_domains_init(struct d3d12_device *device)
> +{
> + const struct vkd3d_vk_instance_procs *vk_procs = &device->vkd3d_instance->vk_procs;
> + VkTimeDomainEXT domains[8];
> + uint32_t count;
> + VkResult vr;
> +
> + device->vk_host_time_domain = VK_TIME_DOMAIN_MAX_ENUM_EXT;
> +
It may be best to avoid VK_TIME_DOMAIN_MAX_ENUM_EXT; I'm not sure it's
considered part of the API by Khronos. Note that e.g.
VK_PIPELINE_BIND_POINT_RANGE_SIZE was simply removed at some point,
and that the Wine Vulkan headers don't have
VK_TIME_DOMAIN_MAX_ENUM_EXT. They do have VK_TIME_DOMAIN_EXT_MAX_ENUM
instead, which may be a bug, but regardless.
More information about the wine-devel
mailing list