diff options
| author | Gangzheng Tong <tonggangzheng@gmail.com> | 2025-04-25 10:39:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-25 10:39:45 -0700 |
| commit | d84aeeffdba388aec7a781c35973bf404d37fe80 (patch) | |
| tree | c3f3f05a5e1b6bb08967113e7276669e9e39e5fa /source/slang/slang.cpp | |
| parent | ba75ae14e714c8bd7558f625ff45fb9cfc2292b3 (diff) | |
Update spirv-tools to for SDK v2025.2 (#6893)
* Update spirv-tools to for SDK v2025.2
Fixes: #6850
* bump spirv version to 1.4 for op linkage
* skip-spirv-validation for coop mat
* add skip-spirv-validation option to slang session desc
* use SPV_ENV_UNIVERSAL_1_6 for spirv-tool env target
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 99457647d..df07a7637 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -873,6 +873,11 @@ Session::createSession(slang::SessionDesc const& inDesc, slang::ISession** outSe RefPtr<Linkage> linkage = new Linkage(this, astBuilder, getBuiltinLinkage()); + if (desc.skipSPIRVValidation) + { + linkage->m_optionSet.set(CompilerOptionName::SkipSPIRVValidation, true); + } + { std::lock_guard<std::mutex> lock(m_typeCheckingCacheMutex); if (m_typeCheckingCache) @@ -1468,17 +1473,17 @@ void Linkage::addTarget(slang::TargetDesc const& desc) } #if 0 -SLANG_NO_THROW SlangInt SLANG_MCALL Linkage::getTargetCount() -{ - return targets.getCount(); -} + SLANG_NO_THROW SlangInt SLANG_MCALL Linkage::getTargetCount() + { + return targets.getCount(); + } -SLANG_NO_THROW slang::ITarget* SLANG_MCALL Linkage::getTargetByIndex(SlangInt index) -{ - if(index < 0) return nullptr; - if(index >= targets.getCount()) return nullptr; - return asExternal(targets[index]); -} + SLANG_NO_THROW slang::ITarget* SLANG_MCALL Linkage::getTargetByIndex(SlangInt index) + { + if (index < 0) return nullptr; + if (index >= targets.getCount()) return nullptr; + return asExternal(targets[index]); + } #endif static void outputExceptionDiagnostic( @@ -3476,10 +3481,10 @@ void FrontEndCompileRequest::parseTranslationUnit(TranslationUnitRequest* transl } #if 0 - // Test serialization - { - ASTSerialTestUtil::testSerialize(translationUnit->getModuleDecl(), getSession()->getRootNamePool(), getLinkage()->getASTBuilder()->getSharedASTBuilder(), getSourceManager()); - } + // Test serialization + { + ASTSerialTestUtil::testSerialize(translationUnit->getModuleDecl(), getSession()->getRootNamePool(), getLinkage()->getASTBuilder()->getSharedASTBuilder(), getSourceManager()); + } #endif } } |
