diff options
author | Maciej Cencora <[email protected]> | 2009-12-02 23:03:51 +0100 |
---|---|---|
committer | Maciej Cencora <[email protected]> | 2009-12-03 20:23:22 +0100 |
commit | 8cde43eb19c4dcceb74166e1da123d316a429c21 (patch) | |
tree | 48a3bd85b5357ac791ba2edf877db8d102df25b2 /src/mesa/drivers/dri | |
parent | 0c75854cc1650dc870e042aa66a053e70b3d4556 (diff) |
radeon: properly check if image should be placed in the miptree
Fixes #25355
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 0390d376ba2..00e0658dc54 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -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; |