summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-04-25 10:39:45 -0700
committerGitHub <noreply@github.com>2025-04-25 10:39:45 -0700
commitd84aeeffdba388aec7a781c35973bf404d37fe80 (patch)
treec3f3f05a5e1b6bb08967113e7276669e9e39e5fa /source/slang
parentba75ae14e714c8bd7558f625ff45fb9cfc2292b3 (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')
-rw-r--r--source/slang/slang-compiler-options.cpp1
-rw-r--r--source/slang/slang.cpp33
2 files changed, 20 insertions, 14 deletions
diff --git a/source/slang/slang-compiler-options.cpp b/source/slang/slang-compiler-options.cpp
index 84b0b4a6d..ca8397f3e 100644
--- a/source/slang/slang-compiler-options.cpp
+++ b/source/slang/slang-compiler-options.cpp
@@ -155,6 +155,7 @@ void CompilerOptionSet::writeCommandLineArgs(Session* globalSession, StringBuild
case CompilerOptionName::DisableDynamicDispatch:
case CompilerOptionName::DisableSpecialization:
case CompilerOptionName::DumpIntermediates:
+ case CompilerOptionName::SkipSPIRVValidation:
if (option.value.getCount() && option.value[0].intValue != 0)
sb << " " << name;
break;
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
}
}