projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f31448f
)
Try to detect when native support to given texture width is not available.
author
Aapo Tahkola
<aet@rasterburn.org>
Fri, 18 Nov 2005 20:53:50 +0000
(20:53 +0000)
committer
Aapo Tahkola
<aet@rasterburn.org>
Fri, 18 Nov 2005 20:53:50 +0000
(20:53 +0000)
src/mesa/drivers/dri/r300/r300_texstate.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/r300/r300_texstate.c
b/src/mesa/drivers/dri/r300/r300_texstate.c
index ec1adfebc989dcf8369602f3a33547da6480cbd3..c06fadaa5e25a2d5a647f2f1df60f60588df58f9 100644
(file)
--- 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)