diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-02-27 15:17:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-27 15:17:13 -0500 |
| commit | eee68205636f26ac8060dbb2b1725fd3c80e54a8 (patch) | |
| tree | b07d0be17046a763d80b04b211dd6869bff2bd9d /source/slang/slang.cpp | |
| parent | 8ac4452754292b74fa6bf2713dd9f1458ce5243d (diff) | |
Hotfix/fix stdlib error reporting (#866)
* * Add 'identity' version of bit casts (asint, asuint, asfloat) for scalar and vector
* Added identity bit casts for matrix (cos no op). We don't support matrix asint on glsl targets
* Added tests in bit-cast.slang
* Use kIRPseudoOp_Pos for identity asuint/asint/asfloat casts.
* * Stop crash if error in stdlib
* Use the buildin source manager when compiling stdlib - fixes that line numbers are displayed
* Typo fix
* Output line directives for 'meta' slang souce files into stdlib
* Improve comments and function names.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 45834c31d..0bba68aa6 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1488,6 +1488,14 @@ void Session::addBuiltinSource( m_builtinLinkage, &sink); + SourceManager* sourceManager = getBuiltinSourceManager(); + + // Set the source manager on the sink + sink.sourceManager = sourceManager; + // Make the linkage use the builtin source manager + Linkage* linkage = compileRequest->getLinkage(); + linkage->setSourceManager(sourceManager); + Name* moduleName = getNamePool()->getName(path); auto translationUnitIndex = compileRequest->addTranslationUnit(SourceLanguage::Slang, moduleName); |
