radeon: fix cases when only first image where put directly into miptree.

Make sure that minimal width, height and depth of texture image is 1.
This commit is contained in:
Maciej Cencora 2009-12-07 22:24:41 +01:00
parent 013cf1d63d
commit 9921b3048e

View file

@ -524,9 +524,9 @@ static int image_matches_texture_obj(struct gl_texture_object *texObj,
return 0;
const unsigned levelDiff = level - texObj->BaseLevel;
const unsigned refWidth = baseImage->Width >> levelDiff;
const unsigned refHeight = baseImage->Height >> levelDiff;
const unsigned refDepth = baseImage->Depth >> levelDiff;
const unsigned refWidth = MAX2(baseImage->Width >> levelDiff, 1);
const unsigned refHeight = MAX2(baseImage->Height >> levelDiff, 1);
const unsigned refDepth = MAX2(baseImage->Depth >> levelDiff, 1);
return (texImage->Width == refWidth &&
texImage->Height == refHeight &&