diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-17 16:42:32 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-17 16:42:32 -0700 |
| commit | ac2d419d41f5ebff22480a9e43398022113073d6 (patch) | |
| tree | f8e3e5cd4a8e283749cc0b59dc4e173699074cb9 /source/slang | |
| parent | 400e347ce9ad7aec38450398e0f563a9d59414cf (diff) | |
Make sure to treat imported modules as Slang
- When generating parameter binding/reflection info, treated imported modules as Slang code, instead of the source language of the outer translation unit
- This fixes an issue where global-scope shader parameters in a `.slang` file were getting ignored for binding-generation purposes when imported by a GLSL file
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/parameter-binding.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp index 8a8a993cd..fbafdd555 100644 --- a/source/slang/parameter-binding.cpp +++ b/source/slang/parameter-binding.cpp @@ -1177,6 +1177,9 @@ static void collectModuleParameters( context->stage = Stage::Unknown; + // All imported modules are implicitly Slang code + context->sourceLanguage = SourceLanguage::Slang; + // A loaded module cannot define entry points that // we'll expose (for now), so we just need to // consider global-scope parameters. |
