Anything of less than (bw, bh) size is possible when you consider
rectangular textures, and this code is (now) safe for those. Even for
power-of-two textures, width could be 4 for FXT1 while not being
aligned to block size.
Fixes piglit compressedteximage GL_COMPRESSED_RGB_FXT1_3DFX
Reviewed-by: Brian Paul <brianp@vmware.com>
_mesa_get_format_block_size(texFormat, &bw, &bh);
/* these should have been caught sooner */
- ASSERT((width % bw) == 0 || width == 2 || width == 1);
- ASSERT((height % bh) == 0 || height == 2 || height == 1);
+ ASSERT((width % bw) == 0 || width < bw);
+ ASSERT((height % bh) == 0 || height < bh);
ASSERT((xoffset % bw) == 0);
ASSERT((yoffset % bh) == 0);