summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/spu/spu_main.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-01 15:33:53 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-01 15:33:53 -0700
commit42201d7574ebb1582563988820c248680081c42f (patch)
tree35033930ab6221cf3db8e1ffd0025bc866dbfaba /src/mesa/pipe/cell/spu/spu_main.h
parent17305489f0d2a0681d4c0d4952957af517019ab6 (diff)
Cell: rename/move global vars
Put tile-related globals into spu_global struct. Rename c/ztile fields to be more consistant.
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_main.h')
-rw-r--r--src/mesa/pipe/cell/spu/spu_main.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_main.h b/src/mesa/pipe/cell/spu/spu_main.h
index 8be5268f52..cce5e70802 100644
--- a/src/mesa/pipe/cell/spu/spu_main.h
+++ b/src/mesa/pipe/cell/spu/spu_main.h
@@ -36,6 +36,11 @@
#include "pipe/p_state.h"
+
+#define MAX_WIDTH 1024
+#define MAX_HEIGHT 1024
+
+
typedef union
{
vector float v;
@@ -43,6 +48,21 @@ typedef union
} float4;
+typedef union {
+ ushort us[TILE_SIZE][TILE_SIZE];
+ uint ui[TILE_SIZE][TILE_SIZE];
+ vector unsigned short us8[TILE_SIZE/2][TILE_SIZE/4];
+ vector unsigned int ui4[TILE_SIZE/2][TILE_SIZE/2];
+} tile_t;
+
+
+#define TILE_STATUS_CLEAR 1
+#define TILE_STATUS_DEFINED 2 /**< defined in FB, but not in local store */
+#define TILE_STATUS_CLEAN 3 /**< in local store, but not changed */
+#define TILE_STATUS_DIRTY 4 /**< modified locally, but not put back yet */
+#define TILE_STATUS_GETTING 5 /**< mfc_get() called but not yet arrived */
+
+
struct spu_framebuffer {
void *color_start; /**< addr of color surface in main memory */
void *depth_start; /**< addr of depth surface in main memory */
@@ -75,6 +95,18 @@ struct spu_global
/* XXX more state to come */
+
+ /** current color and Z tiles */
+ tile_t ctile ALIGN16_ATTRIB;
+ tile_t ztile ALIGN16_ATTRIB;
+
+ /** Current tiles' status */
+ ubyte cur_ctile_status, cur_ztile_status;
+
+ /** Status of all tiles in framebuffer */
+ ubyte ctile_status[MAX_HEIGHT/TILE_SIZE][MAX_WIDTH/TILE_SIZE] ALIGN16_ATTRIB;
+ ubyte ztile_status[MAX_HEIGHT/TILE_SIZE][MAX_WIDTH/TILE_SIZE] ALIGN16_ATTRIB;
+
} ALIGN16_ATTRIB;