diff options
author | Aapo Tahkola <[email protected]> | 2005-11-18 20:53:50 +0000 |
---|---|---|
committer | Aapo Tahkola <[email protected]> | 2005-11-18 20:53:50 +0000 |
commit | ddf61bfec94bcc869da0ccbee2effb4d05f906d9 (patch) | |
tree | 2b6f8260d65d1276b590b1b338edc41ad3da40c7 /src/mesa/drivers | |
parent | f31448f3c86697275bffe5363d473dd128cbd2ac (diff) |
Try to detect when native support to given texture width is not available.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texstate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index ec1adfebc98..c06fadaa5e2 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -353,6 +353,14 @@ static void r300SetTexImages(r300ContextPtr rmesa, (log2Width << R200_FACE_WIDTH_4_SHIFT) | (log2Height << R200_FACE_HEIGHT_4_SHIFT)); } + + if (!baseImage->IsCompressed) { + int vv; + vv = (tObj->Image[0][t->base.firstLevel]->Width * 4) % 64; + if (vv >= 4 && vv <= 32) { + WARN_ONCE("Corrupted texture ahead!\n"); + } + } t->size = (((tObj->Image[0][t->base.firstLevel]->Width - 1) << R300_TX_WIDTHMASK_SHIFT) |((tObj->Image[0][t->base.firstLevel]->Height - 1) << R300_TX_HEIGHTMASK_SHIFT) |