r300g: fix macrotiling for non-square textures
authorMathias Fröhlich <Mathias.Froehlich@web.de>
Sat, 27 Mar 2010 12:40:38 +0000 (13:40 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 27 Mar 2010 13:06:41 +0000 (14:06 +0100)
FDO bug #27338.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
src/gallium/drivers/r300/r300_texture.c

index 1b796257e4fe4f464043de103be6abeb63993891..7c86bdb4bdc9b6c8f694134ae625c2ad55903e2e 100644 (file)
@@ -692,7 +692,8 @@ static void r300_setup_miptree(struct r300_screen* screen,
         /* Let's see if this miplevel can be macrotiled. */
         tex->mip_macrotile[i] =
             (tex->macrotile == R300_BUFFER_TILED &&
-             r300_texture_macro_switch(tex, i, rv350_mode, TILE_WIDTH)) ?
+             r300_texture_macro_switch(tex, i, rv350_mode, TILE_WIDTH) &&
+             r300_texture_macro_switch(tex, i, rv350_mode, TILE_HEIGHT)) ?
              R300_BUFFER_TILED : R300_BUFFER_LINEAR;
 
         stride = r300_texture_get_stride(screen, tex, i);