From 71dfbb608acca74268cd6c93b121913a374f6b58 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Apr 2010 09:03:10 -0600 Subject: [PATCH] llvmpipe: move LP_MAX_TEXTURE_x_LEVELS, etc to lp_tile_size.h --- src/gallium/drivers/llvmpipe/lp_scene.h | 2 -- src/gallium/drivers/llvmpipe/lp_texture.h | 7 +------ src/gallium/drivers/llvmpipe/lp_tile_size.h | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index ac0717db6a1..273fc02b7c1 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -44,8 +44,6 @@ struct lp_scene_queue; /* 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 / TILE_SIZE) #define TILES_Y (MAXHEIGHT / TILE_SIZE) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index 858975bcee0..3026afe0a5b 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -31,12 +31,7 @@ #include "pipe/p_state.h" #include "util/u_debug.h" - - -#define LP_MAX_TEXTURE_2D_LEVELS 12 /* 2K x 2K for now */ -#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */ - -#define LP_MAX_TEXTURE_LEVELS LP_MAX_TEXTURE_2D_LEVELS +#include "lp_tile_size.h" enum lp_texture_usage diff --git a/src/gallium/drivers/llvmpipe/lp_tile_size.h b/src/gallium/drivers/llvmpipe/lp_tile_size.h index f0b983c0632..64d5dc18a3b 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_size.h +++ b/src/gallium/drivers/llvmpipe/lp_tile_size.h @@ -36,4 +36,22 @@ #define TILE_SIZE (1 << TILE_ORDER) +/** + * Max texture sizes + */ +#define LP_MAX_TEXTURE_2D_LEVELS 12 /* 2K x 2K for now */ +#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */ + + +/** This must be the larger of LP_MAX_TEXTURE_2D/3D_LEVELS */ +#define LP_MAX_TEXTURE_LEVELS LP_MAX_TEXTURE_2D_LEVELS + + +/** + * Max drawing surface size is the max texture size + */ +#define MAXHEIGHT (1 << (LP_MAX_TEXTURE_LEVELS - 1)) +#define MAXWIDTH (1 << (LP_MAX_TEXTURE_LEVELS - 1)) + + #endif -- 2.30.2