diff options
author | Brian Paul <[email protected]> | 2011-12-26 14:49:57 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-26 15:22:26 -0700 |
commit | 98dffd9764195be2734579a2b4ae7637b62ea7d8 (patch) | |
tree | 7bb6838b1089ad5aae9a1dee5fd47c43437fceae /src/mesa/swrast/s_texture.c | |
parent | 08a81c8697cae18e118437936456aa36f82ceeed (diff) |
swrast: assert _swrast_map_teximage() x, y is multiple of block size
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index e31cd62679b..ffd78a2b895 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -189,6 +189,9 @@ _swrast_map_teximage(struct gl_context *ctx, stride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width); _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); + assert(x % bw == 0); + assert(y % bh == 0); + if (!swImage->Buffer) { /* probably ran out of memory when allocating tex mem */ *mapOut = NULL; |