summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/vulkan/vk-device.cpp')
-rw-r--r--tools/gfx/vulkan/vk-device.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp
index b5eec0b72..488f39be6 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -424,6 +424,10 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
extendedFeatures.robustness2Features.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.robustness2Features;
+ // clock features
+ extendedFeatures.clockFeatures.pNext = deviceFeatures2.pNext;
+ deviceFeatures2.pNext = &extendedFeatures.clockFeatures;
+
// Atomic Float
// To detect atomic float we need
// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.html
@@ -575,6 +579,16 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
m_features.add("robustness2");
}
+ if (extendedFeatures.clockFeatures.shaderDeviceClock)
+ {
+ deviceExtensions.add(VK_KHR_SHADER_CLOCK_EXTENSION_NAME);
+
+ extendedFeatures.clockFeatures.pNext = (void*)deviceCreateInfo.pNext;
+ deviceCreateInfo.pNext = &extendedFeatures.clockFeatures;
+
+ m_features.add("realtime-clock");
+ }
+
VkPhysicalDeviceProperties2 extendedProps = {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 };
VkPhysicalDeviceRayTracingPipelinePropertiesKHR rtProps = {