From d84aeeffdba388aec7a781c35973bf404d37fe80 Mon Sep 17 00:00:00 2001 From: Gangzheng Tong Date: Fri, 25 Apr 2025 10:39:45 -0700 Subject: 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 Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- source/slang/slang.cpp | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'source/slang/slang.cpp') 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 = new Linkage(this, astBuilder, getBuiltinLinkage()); + if (desc.skipSPIRVValidation) + { + linkage->m_optionSet.set(CompilerOptionName::SkipSPIRVValidation, true); + } + { std::lock_guard 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 } } -- cgit v1.2.3