llvmpipe: remove one of two definitions of TILESIZE
authorKeith Whitwell <keithw@vmware.com>
Wed, 21 Oct 2009 14:21:11 +0000 (15:21 +0100)
committerKeith Whitwell <keithw@vmware.com>
Wed, 21 Oct 2009 14:21:11 +0000 (15:21 +0100)
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_rast.h
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_setup_context.h
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_tile_soa.h

index 6fd6acc0fa497032c2aeb7a089496246f665a3d0..6e94e22e5b23dc78a2333c8a30c40f35885b1500 100644 (file)
@@ -71,8 +71,8 @@ boolean lp_rast_begin( struct lp_rasterizer *rast,
    rast->state.write_zstencil = write_zstencil;
    rast->state.write_color = write_color;
 
-   rast->check_for_clipped_tiles = (width % TILESIZE != 0 ||
-                                    height % TILESIZE != 0);
+   rast->check_for_clipped_tiles = (width % TILE_SIZE != 0 ||
+                                    height % TILE_SIZE != 0);
 
    if (cbuf) {
       rast->cbuf_transfer = screen->get_tex_transfer(rast->screen,
@@ -311,8 +311,8 @@ static void lp_rast_store_color( struct lp_rasterizer *rast )
 {
    const unsigned x = rast->x;
    const unsigned y = rast->y;
-   unsigned w = TILESIZE;
-   unsigned h = TILESIZE;
+   unsigned w = TILE_SIZE;
+   unsigned h = TILE_SIZE;
 
    if (x + w > rast->width)
       w -= x + w - rast->width;
index 318bf73b15917bd68023094ea708c00c749850d2..282b9a46d1b3f74640020fb2917d291f5697ad77 100644 (file)
@@ -41,8 +41,6 @@ struct pipe_screen;
 
 #define FIXED_ORDER 4
 #define FIXED_ONE (1<<FIXED_ORDER)
-#define TILE_ORDER 6
-#define TILESIZE (1<<TILE_ORDER)
 
 
 struct lp_rast_state {
index c0f516e12c7343ba512cbbd521db78a6a701d70b..6d841474680a154653de0d72bb9e3940a0a0acf7 100644 (file)
@@ -194,8 +194,8 @@ rasterize_bins( struct setup_context *setup,
       for (j = 0; j < setup->tiles_y; j++) {
 
          lp_rast_start_tile( rast, 
-                             i * TILESIZE,
-                             j * TILESIZE );
+                             i * TILE_SIZE,
+                             j * TILE_SIZE );
 
          for (block = setup->tile[i][j].head; block; block = block->next) {
             for (k = 0; k < block->count; k++) {
@@ -241,8 +241,8 @@ begin_binning( struct setup_context *setup )
                               setup->fb.zsbuf->height);
    }
 
-   setup->tiles_x = align(setup->fb.width, TILESIZE) / TILESIZE;
-   setup->tiles_y = align(setup->fb.height, TILESIZE) / TILESIZE;
+   setup->tiles_x = align(setup->fb.width, TILE_SIZE) / TILE_SIZE;
+   setup->tiles_y = align(setup->fb.height, TILE_SIZE) / TILE_SIZE;
 
    if (setup->fb.cbuf) {
       if (setup->clear.flags & PIPE_CLEAR_COLOR)
index d91ffc7c20a15b65657c315c06b1e5d832fd6138..938f6ce262d8e1fa205765886cc6bc979f475673 100644 (file)
 
 #include "lp_setup.h"
 #include "lp_rast.h"
+#include "lp_tile_soa.h"        /* for TILE_SIZE */
 
 /* We're limited to 2K by 2K for 32bit fixed point rasterization.
  * Will need a 64-bit version for larger framebuffers.
  */
 #define MAXHEIGHT 2048
 #define MAXWIDTH 2048
-#define TILES_X (MAXWIDTH / TILESIZE)
-#define TILES_Y (MAXHEIGHT / TILESIZE)
+#define TILES_X (MAXWIDTH / TILE_SIZE)
+#define TILES_Y (MAXHEIGHT / TILE_SIZE)
 
 #define CMD_BLOCK_MAX 128
 #define DATA_BLOCK_SIZE (16 * 1024 - sizeof(unsigned) - sizeof(void *))
index 041716adc939f50fa6f6324aa25a0e5bcac21ac9..f2665c11df378506dbb679d7a88885f0da04921a 100644 (file)
@@ -372,10 +372,10 @@ do_triangle_ccw(struct setup_context *setup,
       }
    }
 
-   minx = tri->minx / TILESIZE;
-   miny = tri->miny / TILESIZE;
-   maxx = tri->maxx / TILESIZE;
-   maxy = tri->maxy / TILESIZE;
+   minx = tri->minx / TILE_SIZE;
+   miny = tri->miny / TILE_SIZE;
+   maxx = tri->maxx / TILE_SIZE;
+   maxy = tri->maxy / TILE_SIZE;
 
 
    /* Convert to tile coordinates:
@@ -390,14 +390,14 @@ do_triangle_ccw(struct setup_context *setup,
    else 
    {
       int c1 = (tri->c1 + 
-                tri->dx12 * miny * TILESIZE - 
-                tri->dy12 * minx * TILESIZE);
+                tri->dx12 * miny * TILE_SIZE - 
+                tri->dy12 * minx * TILE_SIZE);
       int c2 = (tri->c2 + 
-                tri->dx23 * miny * TILESIZE -
-                tri->dy23 * minx * TILESIZE);
+                tri->dx23 * miny * TILE_SIZE -
+                tri->dy23 * minx * TILE_SIZE);
       int c3 = (tri->c3 +
-                tri->dx31 * miny * TILESIZE -
-                tri->dy31 * minx * TILESIZE);
+                tri->dx31 * miny * TILE_SIZE -
+                tri->dy31 * minx * TILE_SIZE);
 
       int ei1 = tri->ei1 << TILE_ORDER;
       int ei2 = tri->ei2 << TILE_ORDER;
index d72d6d2ef15ca5be776768bb2b072ac8a2f1bf3b..0e874ce45153e5663f65930d6ea786e7efa0ebf7 100644 (file)
@@ -43,7 +43,8 @@ struct pipe_transfer;
 /**
  * Cache tile size (width and height). This needs to be a power of two.
  */
-#define TILE_SIZE 64
+#define TILE_ORDER 6
+#define TILE_SIZE (1<<TILE_ORDER)
 
 
 #define TILE_VECTOR_HEIGHT 4