diff options
| author | Yong He <yonghe@outlook.com> | 2022-01-31 16:26:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 16:26:03 -0800 |
| commit | e59516fa8c3a16eb7b99a928c5b85b97bf44fd72 (patch) | |
| tree | 869c2b8df0cc0d368af928324d53079a9f7999e0 /source/slang/slang-lower-to-ir.cpp | |
| parent | 2bb43bbe4709533e0c6e53df1c62d368132dcd73 (diff) | |
Revise entrypoint renaming interface. (#2113)
Changed the interface from `IEntryPoint::getRenamedEntryPoint` to `IComponentType::renameEntryPoint`.
The underlying implementation creates a `RenamedEntryPointComponentType` wrapper object around the base entry-point.
This new implementation allows the user to specify entry point renaming on an IComponentType that isn't just a `EntryPoint`, but also on `SpecializedComponentType` or `CompositeComponentType` as long as the component defines a single entry point.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index b47448ae1..d4b069dca 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -8242,6 +8242,13 @@ struct SpecializedComponentTypeIRGenContext : ComponentTypeVisitor lowerProgramEntryPointToIR(context, entryPoint, specializationInfo); } + void visitRenamedEntryPoint( + RenamedEntryPointComponentType* entryPoint, + EntryPoint::EntryPointSpecializationInfo* specializationInfo) SLANG_OVERRIDE + { + entryPoint->getBase()->acceptVisitor(this, specializationInfo); + } + void visitModule(Module* module, Module::ModuleSpecializationInfo* specializationInfo) SLANG_OVERRIDE { // We've hit a leaf module, so we should be able to bind any global |
