diff options
| author | Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> | 2025-01-13 14:27:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-13 14:27:44 +0100 |
| commit | 7bcc1a817ece5e708bd0fe2fd846cfe54c55ba64 (patch) | |
| tree | 8cac2024eaa59f953850b7145ccce11316d6a1f0 /docs/cuda-target.md | |
| parent | a985e240a6d9edb1545e357d20805bf81fba975a (diff) | |
Find OptiX headers (#6071)
* add support for finding OptiX headers
* add documentation
* fix linux path
Diffstat (limited to 'docs/cuda-target.md')
| -rw-r--r-- | docs/cuda-target.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/cuda-target.md b/docs/cuda-target.md index a80dc59f9..241f253fb 100644 --- a/docs/cuda-target.md +++ b/docs/cuda-target.md @@ -301,6 +301,17 @@ There is potential to calculate the lane id using the [numthreads] markup in Sla * Intrinsics which only work in pixel shaders + QuadXXXX intrinsics +OptiX Support +============= + +Slang supports OptiX for raytracing. To compile raytracing programs, NVRTC must have access to the `optix.h` and dependent files that are typically distributed as part of the OptiX SDK. When Slang detects the use of raytracing in source, it will define `SLANG_CUDA_ENABLE_OPTIX` when `slang-cuda-prelude.h` is included. This will in turn try to include `optix.h`. + +Slang tries several mechanisms to locate `optix.h` when NVRTC is initiated. The first mechanism is to look in the include paths that are passed to Slang. If `optix.h` can be found in one of these paths, no more searching will be performed. + +If this fails, the default OptiX SDK install locations are searched. On Windows this is `%{PROGRAMDATA}\NVIDIA Corporation\OptiX SDK X.X.X\include`. On Linux this is `${HOME}/NVIDIA-OptiX-SDK-X.X.X-suffix`. + +If OptiX headers cannot be found, compilation will fail. + Limitations =========== |
