From 38ae55dc1328535c18890cf8edf5563d79e39c78 Mon Sep 17 00:00:00 2001 From: FIocker <4461558+FIocker@users.noreply.github.com> Date: Tue, 24 Nov 2026 01:22:49 +0100 Subject: [PATCH] Keep the diagnostic skip outside indirect argument validation --- crates/victory-gpu/src/draw.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs index 5f1f034..b6e043b 100644 --- a/crates/victory-gpu/src/draw.rs +++ b/crates/victory-gpu/src/draw.rs @@ -937,6 +937,12 @@ impl State { arguments: u64, count: Option, ) -> bool { + // Skip before the argument clamp can mutate the indirect buffer. + #[cfg(feature = "diagnostics")] + if crate::pipeline::is_skipped(self.pipeline as This) { + crate::pipeline::note_drop(self.pipeline as This); + return false; + } const DRAW: u32 = 0; const INDEXED: u32 = 1; const DISPATCH: u32 = 2; @@ -945,12 +951,6 @@ impl State { let why = |what: &str| crate::pipeline::note_why(format!("indirect kind {kind}: {what}")); #[cfg(not(feature = "diagnostics"))] let why = |_: &str| {}; - // Skip before the argument clamp can mutate the indirect buffer. - #[cfg(feature = "diagnostics")] - if crate::pipeline::is_skipped(self.pipeline as This) { - crate::pipeline::note_drop(self.pipeline as This); - return false; - } let len = u64::from(stride) * u64::from(max.max(1)); let Some(args) = crate::shadow::find(arguments, len) else { why("arguments outside title buffers");