diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/render-test/slang-support.cpp | 16 | ||||
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 6 |
2 files changed, 16 insertions, 6 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); diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index a5f5ee316..c22b6dbf6 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -5047,12 +5047,6 @@ SlangResult innerMain(int argc, char** argv) options.includeCategories.add(fullTestCategory, fullTestCategory); } - // Don't include OptiX tests unless the client has explicit opted into them. - if (!options.includeCategories.containsKey(optixTestCategory)) - { - options.excludeCategories.add(optixTestCategory, optixTestCategory); - } - // Exclude rendering tests when building under AppVeyor. // // TODO: this is very ad hoc, and we should do something cleaner. |
