summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-23 09:03:10 -0600
committerBrian Paul <[email protected]>2010-04-23 09:13:26 -0600
commit71dfbb608acca74268cd6c93b121913a374f6b58 (patch)
tree8ece87443704c89794f5a1775e987b072deee154
parentccd13da0fc1f1813b55fc0d2181a6cb0d3b42b0d (diff)
llvmpipe: move LP_MAX_TEXTURE_x_LEVELS, etc to lp_tile_size.h
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h7
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tile_size.h18
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