mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
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:
1 file changed
+4
-2
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user