r300g: always set the pitch of the first miplevel in the tiling flags
authorMarek Olšák <maraeo@gmail.com>
Sun, 2 May 2010 11:27:57 +0000 (13:27 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 2 May 2010 11:27:57 +0000 (13:27 +0200)
This further reduces the number of DRM calls and flushes.

src/gallium/drivers/r300/r300_state.c

index bea1b58e06db697bc4921979e021bc6fcfa669f8..d31e7c53f71314610af5e0bc0aa7085cd5c00f58 100644 (file)
@@ -551,7 +551,7 @@ static void r300_fb_set_tiling_flags(struct r300_context *r300,
         level = new_state->cbufs[i]->level;
 
         r300->rws->buffer_set_tiling(r300->rws, tex->buffer,
-                                        tex->pitch[level],
+                                        tex->pitch[0],
                                         tex->microtile,
                                         tex->mip_macrotile[level]);
     }
@@ -560,7 +560,7 @@ static void r300_fb_set_tiling_flags(struct r300_context *r300,
         level = new_state->zsbuf->level;
 
         r300->rws->buffer_set_tiling(r300->rws, tex->buffer,
-                                        tex->pitch[level],
+                                        tex->pitch[0],
                                         tex->microtile,
                                         tex->mip_macrotile[level]);
     }