Mesa (lp-surface-tiling): llvmpipe: clean-up, comments in lp_surface_copy()

Brian Paul brianp at kemper.freedesktop.org
Wed Apr 7 23:06:22 UTC 2010


Module: Mesa
Branch: lp-surface-tiling
Commit: 7b337e64fec92836ccdf9d96216289dd58418e35
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b337e64fec92836ccdf9d96216289dd58418e35

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr  7 17:06:08 2010 -0600

llvmpipe: clean-up, comments in lp_surface_copy()

---

 src/gallium/drivers/llvmpipe/lp_surface.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c
index 7b14ce1..038fe30 100644
--- a/src/gallium/drivers/llvmpipe/lp_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_surface.c
@@ -93,11 +93,10 @@ lp_surface_copy(struct pipe_context *pipe,
 
          for (y = 0; y < th; y += TILE_SIZE) {
             for (x = 0; x < tw; x += TILE_SIZE) {
-               void *p;
-               p = llvmpipe_get_texture_tile_linear(src_tex,
-                                                    src->face, src->level,
-                                                    LP_TEX_USAGE_READ,
-                                                    tx + x, ty + y);
+               (void) llvmpipe_get_texture_tile_linear(src_tex,
+                                                       src->face, src->level,
+                                                       LP_TEX_USAGE_READ,
+                                                       tx + x, ty + y);
             }
          }
       }
@@ -108,6 +107,10 @@ lp_surface_copy(struct pipe_context *pipe,
          unsigned x, y;
          enum lp_texture_usage usage;
 
+         /* XXX for the tiles which are completely contained by the
+          * dest rectangle, we could set the usage mode to WRITE_ALL.
+          * Just test for the case of replacing the whole dest region for now.
+          */
          if (width == dst_tex->base.width0 && height == dst_tex->base.height0)
             usage = LP_TEX_USAGE_WRITE_ALL;
          else
@@ -117,11 +120,10 @@ lp_surface_copy(struct pipe_context *pipe,
 
          for (y = 0; y < th; y += TILE_SIZE) {
             for (x = 0; x < tw; x += TILE_SIZE) {
-               void *p;
-               p = llvmpipe_get_texture_tile_linear(dst_tex,
-                                                    dst->face, dst->level,
-                                                    usage,
-                                                    tx + x, ty + y);
+               (void) llvmpipe_get_texture_tile_linear(dst_tex,
+                                                       dst->face, dst->level,
+                                                       usage,
+                                                       tx + x, ty + y);
             }
          }
       }




More information about the mesa-commit mailing list