GPU diagnostics: skip pipelines by shader hash

Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
FIockerandClaude Opus 5.5 committed 2026-11-24 01:12:41 +01:00
1 parent 62b737a69b
commit 3c96ef4734
3 files changed
+77 -5

No files matched your search

+16
View File
@@ -333,6 +333,10 @@ impl State {
/// As [`State::prepare`], for draws (`mesh` false) or mesh dispatches.
fn prepare_for(&mut self, list: &HostList, indexed: bool, mesh: bool) -> bool {
#[cfg(feature = "diagnostics")]
if crate::pipeline::is_skipped(self.pipeline as This) {
return false;
}
let Some(p) = crate::pipeline::host_pipeline(self.pipeline as This) else {
return false;
};
@@ -489,6 +493,12 @@ impl State {
/// Runs a dispatch on the host.
pub(crate) fn dispatch(&mut self, list: &HostList, x: u32, y: u32, z: u32) {
#[cfg(feature = "diagnostics")]
if crate::pipeline::is_skipped(self.pipeline as This) {
DROPPED.fetch_add(1, Ordering::Relaxed);
crate::pipeline::note_drop(self.pipeline as This);
return;
}
let Some(p) = crate::pipeline::host_pipeline(self.pipeline as This) else {
once!(
pipeline = format_args!("{:#x}", self.pipeline),
@@ -935,6 +945,12 @@ 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");