Mesa (lp-binning): llvmpipe: use one loop in lp_rast_clear_zstencil()

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 14 02:01:34 UTC 2010


Module: Mesa
Branch: lp-binning
Commit: 2ba1c8189a124932b7b35115caf8f442bf4a7125
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ba1c8189a124932b7b35115caf8f442bf4a7125

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jan 13 18:58:38 2010 -0700

llvmpipe: use one loop in lp_rast_clear_zstencil()

This is just a tiny bit faster.

---

 src/gallium/drivers/llvmpipe/lp_rast.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 3849116..75562bf 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -226,14 +226,13 @@ void lp_rast_clear_zstencil( struct lp_rasterizer *rast,
                              unsigned thread_index,
                              const union lp_rast_cmd_arg arg)
 {
-   unsigned i, j;
+   unsigned i;
    uint32_t *depth_tile = rast->tasks[thread_index].tile.depth;
    
    LP_DBG(DEBUG_RAST, "%s 0x%x\n", __FUNCTION__, arg.clear_zstencil);
 
-   for (i = 0; i < TILE_SIZE; i++)
-      for (j = 0; j < TILE_SIZE; j++)
-	 depth_tile[i*TILE_SIZE + j] = arg.clear_zstencil;
+   for (i = 0; i < TILE_SIZE * TILE_SIZE; i++)
+      depth_tile[i] = arg.clear_zstencil;
 }
 
 




More information about the mesa-commit mailing list