From 68c7d5cda2d6f2eb7bfb3a7e15860eb3ded25424 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 4 Apr 2023 18:00:16 -0400 Subject: Preliminary support for realtime clock (#2772) * #include an absolute path didn't work - because paths were taken to always be relative. * Initial support for realtime clock. * Add realtime-clock render feature where seems appropriate. * Fixes to make NVAPI compile properly. Change realtime-clock.slang check to use maths that can't overflow. --- tools/gfx/cuda/cuda-device.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/gfx/cuda/cuda-device.cpp') diff --git a/tools/gfx/cuda/cuda-device.cpp b/tools/gfx/cuda/cuda-device.cpp index f81bcfe99..4aeecb606 100644 --- a/tools/gfx/cuda/cuda-device.cpp +++ b/tools/gfx/cuda/cuda-device.cpp @@ -179,9 +179,12 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) SLANG_CUDA_RETURN_WITH_REPORT_ON_FAIL( cuCtxCreate(&m_context->m_context, 0, m_device), reportType); - // Not clear how to detect half support on CUDA. For now we'll assume we have it { + // Not clear how to detect half support on CUDA. For now we'll assume we have it m_features.add("half"); + + // CUDA has support for realtime clock + m_features.add("realtime-clock"); } cudaDeviceProp deviceProps; -- cgit v1.2.3