From 18b3cbcede292ce7b90b818b6abb064869072ff3 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 9 Jun 2009 13:52:58 +1000 Subject: [PATCH] radeon: fix mipmap_limits crasher. This gets the correct srclvl image map when uploading images to the new mipmap. --- src/mesa/drivers/dri/radeon/radeon_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 564da19f58e..0d87f152e99 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -830,7 +830,7 @@ static void migrate_image_to_miptree(radeon_mipmap_tree *mt, radeon_texture_imag * In fact, that memcpy() could be done by the hardware in many * cases, provided that we have a proper memory manager. */ - radeon_mipmap_level *srclvl = &image->mt->levels[image->mtlevel]; + radeon_mipmap_level *srclvl = &image->mt->levels[image->mtlevel-image->mt->firstLevel]; assert(srclvl->size == dstlvl->size); assert(srclvl->rowstride == dstlvl->rowstride); -- 2.30.2