diff --git a/core/dr-gpu/src/adjust.rs b/core/dr-gpu/src/adjust.rs index d842a2d..becc922 100644 --- a/core/dr-gpu/src/adjust.rs +++ b/core/dr-gpu/src/adjust.rs @@ -1501,6 +1501,17 @@ mod tests { ); fused_blocks += usize::from(point); } + + // The count the loop above accumulated, plus framing — which emits a + // stage of its own rather than an operation block and is not in + // `descriptors`. Asserted as well as the per-operation exclusive-or + // because the two catch different faults: the XOR catches an operation + // in the wrong stage, this catches a block in the shader that nothing + // in the chain asked for. + assert_eq!( + shader.source.matches("---- ").count(), + fused_blocks + 1, + "the fused shader carries a block nothing in the chain asked for" ); assert!( shader.source.contains("---- framing ----"), diff --git a/core/dr-pipeline/src/lib.rs b/core/dr-pipeline/src/lib.rs index be7f1bd..2c23fb1 100644 --- a/core/dr-pipeline/src/lib.rs +++ b/core/dr-pipeline/src/lib.rs @@ -148,16 +148,6 @@ mod tests { fused_blocks, "the fused shader carries a block nothing in the chain asked for" ); - - // And each neighbourhood operation is genuinely absent from the fused - // shader rather than merely uncounted — the arithmetic above would be - // satisfied just as well by two errors that cancelled. - for id in &neighbourhood { - assert!( - !shader.source.contains(&format!("---- {id} ----")), - "{id} reads its neighbours and cannot be a fused fragment" - ); - } } #[test]