From f28f67d988158d6c46f7ffe967152f98d32a37b2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 30 Jun 2025 14:32:50 -0700 Subject: 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. --- source/slang/slang-check-shader.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/slang/slang-check-shader.cpp') 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()) + { + // 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( -- cgit v1.2.3