Bail out early if the new pipeline key matches that of the current one

Prevents the transition cache of some pipelines from getting full of copies of itself in cases where an update happens redundantly.
This commit is contained in:
Billy Laws 2023-01-18 20:11:57 +00:00
parent 3e971d4043
commit 5e862cf5f7

View File

@ -667,6 +667,9 @@ namespace skyline::gpu::interconnect::maxwell3d {
}
Pipeline *Pipeline::LookupNext(const PackedPipelineState &packedState) {
if (packedState == sourcePackedState)
return this;
auto it{std::find_if(transitionCache.begin(), transitionCache.end(), [&packedState](auto pipeline) {
if (pipeline && pipeline->sourcePackedState == packedState)
return true;