From 82cb66e80fbd36681b23f27e69dd4b9bbfb39cf7 Mon Sep 17 00:00:00 2001 From: katherinebytes Date: Tue, 24 Nov 2026 19:23:26 +0000 Subject: [PATCH] Document the BC1 tile row bounds Signed-off-by: katherinebytes --- crates/texture/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/texture/src/lib.rs b/crates/texture/src/lib.rs index 4479b429..9aa44b67 100644 --- a/crates/texture/src/lib.rs +++ b/crates/texture/src/lib.rs @@ -106,6 +106,7 @@ impl<'a> TiledBc1<'a> { blocks .try_reserve_exact(width * height * BLOCK_BYTES) .map_err(|_| TextureError::AllocationFailed)?; + // Construction requires the exact padded length, so each selected tile row is in bounds. for y in 0..height { let row_start = base + (y / TILE_BLOCKS) * tile_row_stride + (y % TILE_BLOCKS) * TILE_ROW_BYTES;