radeon: properly check if image should be placed in the miptree

Fixes #25355
This commit is contained in:
Maciej Cencora 2009-12-02 23:03:51 +01:00
parent 0c75854cc1
commit 8cde43eb19

View file

@ -515,7 +515,10 @@ static int image_matches_texture_obj(struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
unsigned level)
{
const struct gl_texture_image *baseImage = texObj->Image[0][level];
const struct gl_texture_image *baseImage = texObj->Image[0][texObj->BaseLevel];
if (!baseImage)
return 0;
if (level < texObj->BaseLevel || level > texObj->MaxLevel)
return 0;