diff options
| author | Harsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com> | 2025-06-19 15:31:25 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-19 10:01:25 +0000 |
| commit | 23dcea810a79e19051e70ff2aa0b8953429c6461 (patch) | |
| tree | 2143cbc00288bbb1f2791aef0547f3eb53f801d4 /tools/render-test/slang-support.cpp | |
| parent | 5da7301d19e0a293bc2187520b471361beaefe92 (diff) | |
Enabling optix ci pipeline (#7311)
* Revert "Disable OptiX tests by default. (#1331)"
This reverts commit e45f8c1f49855cebe90b6722324ec24146ff5a3d.
* Enable optix submodule to build
Add support for default entry points in compilation
Implemented logic to check for defined entry points in the module
when no explicit entry points are provided. If found, these entry points
are added to the `specializedEntryPoints` list, with the assumption that
no specialization is needed for them at this time.
* Disable optix if cuda is not enabled
* Add submodule OptixSDK path in search
* Distinguish user-explicit vs auto-detected SLANG_ENABLE_OPTIX
When SLANG_ENABLE_OPTIX is explicitly set by user and CUDA is not available,
show SEND_ERROR to maintain strict validation. When OptiX is auto-detected
(e.g., local submodule present) but CUDA unavailable, gracefully disable
with STATUS message to allow builds to continue.
This addresses review feedback to keep error for explicit requests while
handling auto-detection gracefully.
* Apply CMake formatting to SLANG_ENABLE_OPTIX validation logic
* revert: slang-rhi changes
as those are merged independently as in PR # slang-rhi#400
Diffstat (limited to 'tools/render-test/slang-support.cpp')
| -rw-r--r-- | tools/render-test/slang-support.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp index f98372330..b40473d41 100644 --- a/tools/render-test/slang-support.cpp +++ b/tools/render-test/slang-support.cpp @@ -451,6 +451,22 @@ static SlangResult _compileProgramImpl( specializedEntryPoints.add(specializedEntryPoint); } + // If no explicit entry points were provided, check if the module has any + // defined entry points (e.g., functions marked with [shader(...)] attributes) + if (explicitEntryPointCount == 0 && !options.dontAddDefaultEntryPoints) + { + SlangInt32 definedEntryPointCount = module->getDefinedEntryPointCount(); + for (SlangInt32 ee = 0; ee < definedEntryPointCount; ++ee) + { + ComPtr<slang::IEntryPoint> entryPoint; + SLANG_RETURN_ON_FAIL(module->getDefinedEntryPoint(ee, entryPoint.writeRef())); + + // For now, we'll assume no specialization is needed for discovered entry points + // If specialization is needed, this would need to be updated + specializedEntryPoints.add(entryPoint); + } + } + if (input.passThrough == SLANG_PASS_THROUGH_NONE) { componentsRawPtr.add(specializedModule); |
