summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-shader.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-06-30 14:32:50 -0700
committerGitHub <noreply@github.com>2025-06-30 21:32:50 +0000
commitf28f67d988158d6c46f7ffe967152f98d32a37b2 (patch)
tree2aa620986a87ec69cf1f210c714312e42b62ac9e /source/slang/slang-check-shader.cpp
parenta55ff722cae338a8fcf5402858c47cf0650a8e5e (diff)
Add MLP training examples. (#7550)
* Add MLP training examples. * Formatting fix. * Fix. * Improve documentation on coopvector. * Improve doc. * Update doc. * Fix typo. * Cleanup shader. * Cleanup. * Fix test. * Fix type check recursion. * Fix. * Fix. * Fix override check.
Diffstat (limited to 'source/slang/slang-check-shader.cpp')
-rw-r--r--source/slang/slang-check-shader.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-check-shader.cpp b/source/slang/slang-check-shader.cpp
index e6744071b..a360361f7 100644
--- a/source/slang/slang-check-shader.cpp
+++ b/source/slang/slang-check-shader.cpp
@@ -553,6 +553,16 @@ void validateEntryPoint(EntryPoint* entryPoint, DiagnosticSink* sink)
targetOptionSet.hasOption(CompilerOptionName::Capability) &&
(targetOptionSet.getIntOption(CompilerOptionName::Capability) !=
SLANG_CAPABILITY_UNKNOWN);
+
+ if (auto declaredCapsMod =
+ entryPointFuncDecl->findModifier<ExplicitlyDeclaredCapabilityModifier>())
+ {
+ // If the entry point has an explicitly declared capability, then we
+ // will merge that with the target capability set before checking if
+ // there is an implicit upgrade.
+ targetCaps.nonDestructiveJoin(declaredCapsMod->declaredCapabilityRequirements);
+ }
+
// Only attempt to error if a specific profile or capability is requested
if ((specificCapabilityRequested || specificProfileRequested) &&
targetCaps.atLeastOneSetImpliedInOther(