diff options
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 0a9853012..507e12fa6 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -14268,7 +14268,11 @@ static void _propagateRequirement( ensureDecl(visitor, referencedDecl, DeclCheckState::CapabilityChecked); } - if (resultCaps.implies(nodeCaps)) + // If we do not have the same target+stage, we need to `join` to remove excess target+stage. + // + // If we have the same target+stage but current capabilities do not imply incoming capabilities, + // we need to `join`. + if (!resultCaps.joinWithOtherWillChangeThis(nodeCaps)) return; auto oldCaps = resultCaps; |
