From 3fa382505271834514d47612efee8e51a06204c5 Mon Sep 17 00:00:00 2001 From: jarcherNV Date: Tue, 10 Jun 2025 09:44:08 -0700 Subject: Allow checking capabilities in specific stages (#7375) This allows checking capabilities in any stage, needed specifically for the hlsl_2018 capability which is defined for sm_5_1 and above. Stage specific capabilities such as cs_5_1 would not find this in any stage other than compute, so we need to restrict the check to only desired stages. --- source/slang/slang-capability.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-capability.cpp') diff --git a/source/slang/slang-capability.cpp b/source/slang/slang-capability.cpp index 1eb0cae31..a2fef9f8a 100644 --- a/source/slang/slang-capability.cpp +++ b/source/slang/slang-capability.cpp @@ -718,17 +718,17 @@ bool CapabilityTargetSet::tryJoin(const CapabilityTargetSets& other) return true; } -void CapabilitySet::join(const CapabilitySet& other) +CapabilitySet& CapabilitySet::join(const CapabilitySet& other) { if (this->isEmpty() || other.isInvalid()) { *this = other; - return; + return *this; } if (this->isInvalid()) - return; + return *this; if (other.isEmpty()) - return; + return *this; List destroySet; destroySet.reserve(this->m_targetSets.getCount()); @@ -746,6 +746,7 @@ void CapabilitySet::join(const CapabilitySet& other) // join made a invalid CapabilitySet if (this->m_targetSets.getCount() == 0) this->m_targetSets[CapabilityAtom::Invalid].target = CapabilityAtom::Invalid; + return *this; } static uint32_t _calcAtomListDifferenceScore( -- cgit v1.2.3