summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-capability.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-capability.cpp')
-rw-r--r--source/slang/slang-capability.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/slang/slang-capability.cpp b/source/slang/slang-capability.cpp
index 00a3b6001..bae5a1c72 100644
--- a/source/slang/slang-capability.cpp
+++ b/source/slang/slang-capability.cpp
@@ -568,6 +568,25 @@ void CapabilitySet::nonDestructiveJoin(const CapabilitySet& other)
}
}
+bool CapabilitySet::operator==(CapabilitySet const& that) const
+{
+ for (auto set : this->m_targetSets)
+ {
+ auto thatSet = that.m_targetSets.tryGetValue(set.first);
+ if (!thatSet)
+ return false;
+ for (auto stageSet : set.second.shaderStageSets)
+ {
+ auto thatStageSet = thatSet->shaderStageSets.tryGetValue(stageSet.first);
+ if (!thatStageSet)
+ return false;
+ if (stageSet.second.atomSet != thatStageSet->atomSet)
+ return false;
+ }
+ }
+ return true;
+}
+
CapabilitySet CapabilitySet::getTargetsThisHasButOtherDoesNot(const CapabilitySet& other)
{
CapabilitySet newSet{};