venus: add vkGetCalibratedTimestampsEXT extension

Allows the extension passthrough and implements the
extension calls.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/747>
macos/master
Igor Torrente 3 years ago committed by Marge Bot
parent 4ba6c8005b
commit 8f7437f05c
  1. 1
      src/venus/vkr_common.c
  2. 16
      src/venus/vkr_device.c
  3. 16
      src/venus/vkr_physical_device.c

@ -94,6 +94,7 @@ static const struct vn_info_extension_table vkr_extension_table = {
.KHR_external_fence_fd = false,
.KHR_external_memory_fd = true,
/* EXT extensions */
.EXT_calibrated_timestamps = true,
.EXT_conservative_rasterization = true,
.EXT_custom_border_color = true,
.EXT_depth_clip_enable = true,

@ -319,6 +319,20 @@ vkr_dispatch_vkDeviceWaitIdle(struct vn_dispatch_context *dispatch,
vkr_cs_decoder_set_fatal(&ctx->decoder);
}
static void
vkr_dispatch_vkGetCalibratedTimestampsEXT(
UNUSED struct vn_dispatch_context *ctx,
struct vn_command_vkGetCalibratedTimestampsEXT *args)
{
struct vkr_device *dev = vkr_device_from_handle(args->device);
struct vn_device_proc_table *vk = &dev->proc_table;
vn_replace_vkGetCalibratedTimestampsEXT_args_handle(args);
args->ret = vk->GetCalibratedTimestampsEXT(args->device, args->timestampCount,
args->pTimestampInfos, args->pTimestamps,
args->pMaxDeviation);
}
void
vkr_context_init_device_dispatch(struct vkr_context *ctx)
{
@ -330,4 +344,6 @@ vkr_context_init_device_dispatch(struct vkr_context *ctx)
dispatch->dispatch_vkGetDeviceGroupPeerMemoryFeatures =
vkr_dispatch_vkGetDeviceGroupPeerMemoryFeatures;
dispatch->dispatch_vkDeviceWaitIdle = vkr_dispatch_vkDeviceWaitIdle;
dispatch->dispatch_vkGetCalibratedTimestampsEXT =
vkr_dispatch_vkGetCalibratedTimestampsEXT;
}

@ -630,6 +630,20 @@ vkr_dispatch_vkGetPhysicalDeviceExternalFenceProperties(
args->physicalDevice, args->pExternalFenceInfo, args->pExternalFenceProperties);
}
static void
vkr_dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
UNUSED struct vn_dispatch_context *ctx,
struct vn_command_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT *args)
{
struct vkr_physical_device *physical_dev =
vkr_physical_device_from_handle(args->physicalDevice);
struct vn_physical_device_proc_table *vk = &physical_dev->proc_table;
vn_replace_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT_args_handle(args);
args->ret = vk->GetPhysicalDeviceCalibrateableTimeDomainsEXT(
args->physicalDevice, args->pTimeDomainCount, args->pTimeDomains);
}
void
vkr_context_init_physical_device_dispatch(struct vkr_context *ctx)
{
@ -679,4 +693,6 @@ vkr_context_init_physical_device_dispatch(struct vkr_context *ctx)
vkr_dispatch_vkGetPhysicalDeviceExternalSemaphoreProperties;
dispatch->dispatch_vkGetPhysicalDeviceExternalFenceProperties =
vkr_dispatch_vkGetPhysicalDeviceExternalFenceProperties;
dispatch->dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT =
vkr_dispatch_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT;
}

Loading…
Cancel
Save