r300g: always create microtiled zbuffer regardless of texture dimensions
authorMarek Olšák <maraeo@gmail.com>
Sat, 17 Apr 2010 15:00:41 +0000 (17:00 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 18 Apr 2010 00:56:09 +0000 (02:56 +0200)
src/gallium/drivers/r300/r300_texture.c

index 4439e35d670bc00ff34553810177c2d25b7788a9..a37b33edf29d6cde3d1bb0c6096f9f5f578f4e9d 100644 (file)
@@ -835,13 +835,14 @@ static void r300_setup_tiling(struct pipe_screen *screen,
     struct r300_winsys_screen *rws = (struct r300_winsys_screen *)screen->winsys;
     enum pipe_format format = tex->b.b.format;
     boolean rv350_mode = r300_screen(screen)->caps.family >= CHIP_FAMILY_RV350;
+    boolean is_zb = util_format_is_depth_or_stencil(format);
 
     if (!r300_format_is_plain(format)) {
         return;
     }
 
-    if (tex->b.b.width0 == 1 ||
-        tex->b.b.height0 == 1) {
+    /* If height == 1, disable microtiling except for zbuffer. */
+    if (!is_zb && tex->b.b.height0 == 1) {
         return;
     }