radeon: fix #25463
authorMaciej Cencora <m.cencora@gmail.com>
Sat, 12 Dec 2009 01:02:53 +0000 (02:02 +0100)
committerMaciej Cencora <m.cencora@gmail.com>
Sat, 12 Dec 2009 01:02:53 +0000 (02:02 +0100)
This is just a workaroung until we properly fix texture mapping in radeonSpanRenderStart

src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c

index 91f0db958b9f14b730c98a054ddb8e3b0b16afa7..d7b5d71d21f6a8bec436a4910a23f517947f973f 100644 (file)
@@ -436,7 +436,10 @@ static void migrate_image_to_miptree(radeon_mipmap_tree *mt,
                radeon_bo_unmap(image->mt->bo);
 
                radeon_miptree_unreference(&image->mt);
-       } else {
+       } else if (image->base.Data) {
+               /* This condition should be removed, it's here to workaround
+                * a segfault when mapping textures during software fallbacks.
+                */
                const uint32_t srcrowstride = _mesa_format_row_stride(image->base.TexFormat, image->base.Width);
                uint32_t rows = image->base.Height * image->base.Depth;