From e217b3093c0d43be7e171628913e0f79f1a884b2 Mon Sep 17 00:00:00 2001 From: Juston Li Date: Wed, 7 Jun 2023 14:49:39 -0700 Subject: [PATCH] venus: enable VK_KHR_shader_clock Signed-off-by: Juston Li Part-of: --- src/virtio/vulkan/vn_physical_device.c | 7 +++++++ src/virtio/vulkan/vn_physical_device.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index 53587ae..7f69aba 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -187,6 +187,9 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VN_ADD_PNEXT_EXT(feats2, TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT, feats->texel_buffer_alignment, exts->EXT_texel_buffer_alignment); VN_ADD_PNEXT_EXT(feats2, YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, feats->ycbcr_2plane_444_formats, exts->EXT_ycbcr_2plane_444_formats); + /* KHR */ + VN_ADD_PNEXT_EXT(feats2, SHADER_CLOCK_FEATURES_KHR, feats->shader_clock, exts->KHR_shader_clock); + /* EXT */ VN_ADD_PNEXT_EXT(feats2, CONDITIONAL_RENDERING_FEATURES_EXT, feats->conditional_rendering, exts->EXT_conditional_rendering); VN_ADD_PNEXT_EXT(feats2, CUSTOM_BORDER_COLOR_FEATURES_EXT, feats->custom_border_color, exts->EXT_custom_border_color); @@ -1143,6 +1146,7 @@ vn_physical_device_get_passthrough_extensions( /* KHR */ .KHR_push_descriptor = true, + .KHR_shader_clock = true, /* EXT */ .EXT_calibrated_timestamps = true, @@ -1791,6 +1795,9 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, CASE(TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT, texel_buffer_alignment); CASE(YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, ycbcr_2plane_444_formats); + /* KHR */ + CASE(SHADER_CLOCK_FEATURES_KHR, shader_clock); + /* EXT */ CASE(CONDITIONAL_RENDERING_FEATURES_EXT, conditional_rendering); CASE(CUSTOM_BORDER_COLOR_FEATURES_EXT, custom_border_color); diff --git a/src/virtio/vulkan/vn_physical_device.h b/src/virtio/vulkan/vn_physical_device.h index 50ebcd1..837196e 100644 --- a/src/virtio/vulkan/vn_physical_device.h +++ b/src/virtio/vulkan/vn_physical_device.h @@ -32,6 +32,9 @@ struct vn_physical_device_features { VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT texel_buffer_alignment; VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ycbcr_2plane_444_formats; + /* KHR */ + VkPhysicalDeviceShaderClockFeaturesKHR shader_clock; + /* EXT */ VkPhysicalDeviceConditionalRenderingFeaturesEXT conditional_rendering; VkPhysicalDeviceCustomBorderColorFeaturesEXT custom_border_color; -- 2.7.4