mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
Try to detect when native support to given texture width is not available.
This commit is contained in:
parent
f31448f3c8
commit
ddf61bfec9
1 changed files with 8 additions and 0 deletions
|
|
@ -354,6 +354,14 @@ static void r300SetTexImages(r300ContextPtr rmesa,
|
||||||
(log2Height << R200_FACE_HEIGHT_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)
|
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)
|
|((tObj->Image[0][t->base.firstLevel]->Height - 1) << R300_TX_HEIGHTMASK_SHIFT)
|
||||||
|((log2Width>log2Height)?log2Width:log2Height)<<R300_TX_SIZE_SHIFT);
|
|((log2Width>log2Height)?log2Width:log2Height)<<R300_TX_SIZE_SHIFT);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue