diff --git a/core/dr-pipeline/src/tiles.rs b/core/dr-pipeline/src/tiles.rs index 391cac8..15ec0f1 100644 --- a/core/dr-pipeline/src/tiles.rs +++ b/core/dr-pipeline/src/tiles.rs @@ -139,11 +139,12 @@ mod tests { assert!(gw <= max && gh <= max, "{t:?} does not fit"); assert_eq!(gx % TILE_ALIGN, 0, "{t:?} starts off the grid"); assert_eq!(gy % TILE_ALIGN, 0, "{t:?} starts off the grid"); - // The halo is there on every side the frame does not end. - assert!(kx == 0 || kx - gx >= halo); - assert!(ky == 0 || ky - gy >= halo); - assert!(kx + kw == frame.0 || gx + gw - (kx + kw) >= halo); - assert!(ky + kh == frame.1 || gy + gh - (ky + kh) >= halo); + // The halo is there on every side, or the frame ends first — in + // which case the untiled render stops at the same edge. + assert!(gx == 0 || kx - gx >= halo); + assert!(gy == 0 || ky - gy >= halo); + assert!(gx + gw == frame.0 || gx + gw - (kx + kw) >= halo); + assert!(gy + gh == frame.1 || gy + gh - (ky + kh) >= halo); } }