r600: fix brownbag, only align if we are dealing with cubemap
authorAndre Maasikas <amaasikas@gmail.com>
Fri, 22 Jan 2010 11:47:31 +0000 (13:47 +0200)
committerAndre Maasikas <amaasikas@gmail.com>
Fri, 22 Jan 2010 11:49:12 +0000 (13:49 +0200)
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c

index 5ea213dc5ffa9729a2162c235d0dbf6a9f0052bd..a1a523931fb1136e844668961141b17bb904a2ed 100644 (file)
@@ -181,7 +181,7 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_
                 * we have separate register for 1'st level offset so add
                 * 2 image alignment after 1'st mip level */
                if(rmesa->radeonScreen->chip_family >= CHIP_FAMILY_R600 &&
-                  level >= 1)
+                  mt->target == GL_TEXTURE_CUBE_MAP && level >= 1)
                        curOffset += 2 * mt->levels[level].size;
        }