diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-04-04 18:00:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-04 18:00:16 -0400 |
| commit | 68c7d5cda2d6f2eb7bfb3a7e15860eb3ded25424 (patch) | |
| tree | ac4e8384108e70109b084782b414296d015f92b8 /docs/target-compatibility.md | |
| parent | 7bb2de1bc40e535fae93940113db97b5ea44a6f2 (diff) | |
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.
Diffstat (limited to 'docs/target-compatibility.md')
| -rw-r--r-- | docs/target-compatibility.md | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/docs/target-compatibility.md b/docs/target-compatibility.md index 96d1353a9..0fdeeca8d 100644 --- a/docs/target-compatibility.md +++ b/docs/target-compatibility.md @@ -44,6 +44,7 @@ Items with ^ means there is some discussion about support later in the document | [RWByteAddressBuffer Atomic](#byte-address-atomic) | No | Yes ^ | Yes ^ | Yes | No + | [Shader Execution Reordering](#ser) | No | Yes ^ | Yes ^ | No | No | [debugBreak](#debug-break) | No | No | Yes | Yes | Yes +| [realtime clock](#realtime-clock) | No | Yes ^ | Yes | Yes | No <a id="half"></a> ## Half Type @@ -275,4 +276,24 @@ On C++ targets debugBreak is implemented using SLANG_BREAKPOINT defined in "slan Some additional details: * If [slang-llvm](cpu-target.md#slang-llvm) is being used as the downstream compiler (as is typical with `host-callable`), it will crash into the debugger, but may not produce a usable stack trace. -* For "normal" C++ downstream compilers such as Clang/Gcc/Visual Studio, to break into readable source code, debug information is typically necessary. Disabling optimizations may be useful to break on the appropriate specific line, and have variables inspectable.
\ No newline at end of file +* For "normal" C++ downstream compilers such as Clang/Gcc/Visual Studio, to break into readable source code, debug information is typically necessary. Disabling optimizations may be useful to break on the appropriate specific line, and have variables inspectable. + +<a id="realtime-clock"></a> +## Realtime Clock + +Realtime clock support is available via the API + +``` +// Get low 32 bits of realtime clock +uint getRealtimeClockLow(); +// Get 64 bit realtime clock, with low bits in .x and high bits in .y +uint2 getRealtimeClock(); +``` + +On D3D this is supported through NVAPI via `NvGetSpecial`. + +On Vulkan this is supported via [VK_KHR_shader_clock extension](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_shader_clock.html) + +On CUDA this is supported via [clock](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#time-function). + +Currently this is not supported on CPU, although this will potentially be added in the future.
\ No newline at end of file |
