From 5e862cf5f78cc78baeb9ce43dc3188f77ae38e9f Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 18 Jan 2023 20:11:57 +0000 Subject: [PATCH] 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. --- .../skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp index 56f49c02..20c9478c 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp @@ -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;