Merge pull request #10976 from slick-daddy/perf/redundant-sort-hotpath

chore(shader): skip redundant sort/unique on single-element otherReads
This commit is contained in:
Dean authored and GitHub committed 2026-10-27 14:27:18 +13:00
commit 82358b124e
1 file changed
+4 -2
+4 -2
View File
@@ -1912,8 +1912,10 @@ void materializeCapture(ResourceCapture& capture, const SrtRuntime& runtime) {
traced.readTrace = &capture.readTrace;
ResourceMaterializer{}.Materialize(plan, traced, capture.snapshot);
auto& other = capture.readTrace.otherReads;
std::sort(other.begin(), other.end());
other.erase(std::unique(other.begin(), other.end()), other.end());
if (other.size() > 1) {
std::sort(other.begin(), other.end());
other.erase(std::unique(other.begin(), other.end()), other.end());
}
}
}