From 68be85be40440ca3de47cf16ac8578233096812f Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Wed, 2 Dec 2009 23:03:51 +0100 Subject: [PATCH] radeon: properly check if image should be placed in the miptree --- 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 0390d37..de9fcb8 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -515,8 +515,11 @@ 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; -- 1.6.3.3