diff options
| author | jarcherNV <jarcher@nvidia.com> | 2025-06-10 09:44:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 09:44:08 -0700 |
| commit | 3fa382505271834514d47612efee8e51a06204c5 (patch) | |
| tree | a76ff3a3969ed229bfbe4452326335d1db62418a /source/slang/slang-capability.cpp | |
| parent | e37202002276b679c5241b2678af612552b06d2c (diff) | |
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.
Diffstat (limited to 'source/slang/slang-capability.cpp')
| -rw-r--r-- | source/slang/slang-capability.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<CapabilityAtom> 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( |
