From: Dave Airlie Date: Tue, 9 Jun 2009 03:52:58 +0000 (+1000) Subject: radeon: fix mipmap_limits crasher. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18b3cbcede292ce7b90b818b6abb064869072ff3;p=mesa.git radeon: fix mipmap_limits crasher. This gets the correct srclvl image map when uploading images to the new mipmap. --- 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);