diff options
| author | cheneym2 <acheney@nvidia.com> | 2024-10-09 14:42:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-09 14:42:13 -0400 |
| commit | 1bbc421a663bd494cc1a4dd097852553049cc1d5 (patch) | |
| tree | 1cfc71191af7d75b440c45334dfb904e78bd75dc /source | |
| parent | 8b2bd3c8ac1d365b872d02db6b03d082f132646b (diff) | |
Fix precompiled glsl modules (#5230)
When precompiling modules defined
with glsl, it's necessary to link in the
glsl definition module.
Reuse the public fillRequirements declaration
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-check-impl.h | 4 | ||||
| -rw-r--r-- | source/slang/slang-compiler-tu.cpp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-check-impl.h b/source/slang/slang-check-impl.h index 63c16e6d2..2f3eae0c5 100644 --- a/source/slang/slang-check-impl.h +++ b/source/slang/slang-check-impl.h @@ -38,6 +38,10 @@ namespace Slang bool isUniformParameterType(Type* type); + /// Create a new component type based on `inComponentType`, but with all its requiremetns filled. + RefPtr<ComponentType> fillRequirements( + ComponentType* inComponentType); + Type* checkProperType( Linkage* linkage, TypeExp typeExp, diff --git a/source/slang/slang-compiler-tu.cpp b/source/slang/slang-compiler-tu.cpp index 8ae06a419..49595117d 100644 --- a/source/slang/slang-compiler-tu.cpp +++ b/source/slang/slang-compiler-tu.cpp @@ -6,6 +6,7 @@ #include "slang-ir-insts.h" #include "slang-ir-util.h" #include "slang-capability.h" +#include "slang-check-impl.h" namespace Slang { @@ -117,6 +118,8 @@ namespace Slang linkage, allComponentTypes); + composite = fillRequirements(composite); + TargetProgram tp(composite, targetReq); tp.getOrCreateLayout(&sink); Slang::Index const entryPointCount = m_entryPoints.getCount(); |
