From efb3e3d3da6deb6aa61e2e5efb7ded4af358d233 Mon Sep 17 00:00:00 2001 From: FIocker <4461558+FIocker@users.noreply.github.com> Date: Tue, 24 Nov 2026 03:34:24 +0100 Subject: [PATCH] GPU diagnostics: order tied drop counts consistently --- crates/victory-gpu/src/pipeline.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/victory-gpu/src/pipeline.rs b/crates/victory-gpu/src/pipeline.rs index d488d03..b1dc393 100644 --- a/crates/victory-gpu/src/pipeline.rs +++ b/crates/victory-gpu/src/pipeline.rs @@ -283,7 +283,9 @@ pub(crate) fn note_why(why: String) { pub(crate) fn take_drops() -> Vec<(String, u64)> { let drops = DROPS.lock().unwrap_or_else(|e| e.into_inner()).take(); let mut drops: Vec<(String, u64)> = drops.into_iter().flatten().collect(); - drops.sort_by_key(|d| std::cmp::Reverse(d.1)); + // Frame reports only show the first 40 reasons. Keep ties ordered so + // a HashMap iteration order change cannot change which reasons appear. + drops.sort_unstable_by(|a, b| b.1.cmp(&a.1).then_with(|| a.0.cmp(&b.0))); drops }