r600c: fix mipmap stride on evergreen
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 24 Sep 2010 17:20:58 +0000 (13:20 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Fri, 24 Sep 2010 17:20:58 +0000 (13:20 -0400)
taken from Dave's r600g fix

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

index b0340cee218a726839ff111e258602853ffa1569..85e4988c53f788b88cbd90ed262606cfa5e83988 100644 (file)
@@ -245,9 +245,16 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
                DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
 
        if (IS_R600_CLASS(radeon->radeonScreen)) {
-               radeon->texture_row_align = 256;
-               radeon->texture_rect_row_align = 256;
-               radeon->texture_compressed_row_align = 256;
+               int chip_family = radeon->radeonScreen->chip_family;
+               if (chip_family >= CHIP_FAMILY_CEDAR) {
+                       radeon->texture_row_align = 512;
+                       radeon->texture_rect_row_align = 512;
+                       radeon->texture_compressed_row_align = 512;
+               } else {
+                       radeon->texture_row_align = 256;
+                       radeon->texture_rect_row_align = 256;
+                       radeon->texture_compressed_row_align = 256;
+               }
        } else if (IS_R200_CLASS(radeon->radeonScreen) ||
                   IS_R100_CLASS(radeon->radeonScreen)) {
                radeon->texture_row_align = 32;