summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c8
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c8
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_context.h5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c20
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tile_soa.h3
6 files changed, 23 insertions, 23 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 6fd6acc0fa..6e94e22e5b 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -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;
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 318bf73b15..282b9a46d1 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -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 {
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index c0f516e12c..6d84147468 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -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)
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index d91ffc7c20..938f6ce262 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -30,14 +30,15 @@
#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 *))
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 041716adc9..f2665c11df 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -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;
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.h b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
index d72d6d2ef1..0e874ce451 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_soa.h
+++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
@@ -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