Mesa (master): llvmpipe: move LP_MAX_TEXTURE_x_LEVELS, etc to lp_tile_size. h

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 23 15:14:41 UTC 2010


Module: Mesa
Branch: master
Commit: 71dfbb608acca74268cd6c93b121913a374f6b58
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71dfbb608acca74268cd6c93b121913a374f6b58

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Apr 23 09:03:10 2010 -0600

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 ac0717d..273fc02 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 858975b..3026afe 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 f0b983c..64d5dc1 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




More information about the mesa-commit mailing list