From f0be276c2e84716856ae87b4b0f0411700ed5be4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 20 Jan 2008 17:27:05 -0700 Subject: Cell: clean-up/re-org tile code Also, support 16 or 32-bit Z buffer at runtime. --- src/mesa/pipe/cell/spu/spu_main.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'src/mesa/pipe/cell/spu/spu_main.h') diff --git a/src/mesa/pipe/cell/spu/spu_main.h b/src/mesa/pipe/cell/spu/spu_main.h index cd2afbe9bf..2aa7015ae3 100644 --- a/src/mesa/pipe/cell/spu/spu_main.h +++ b/src/mesa/pipe/cell/spu/spu_main.h @@ -32,8 +32,6 @@ #include "pipe/cell/common.h" #include "pipe/p_state.h" -/** XXX temp bytes/z value */ -#define ZSIZE 2 struct spu_framebuffer { void *color_start; /**< addr of color surface in main memory */ @@ -45,6 +43,8 @@ struct spu_framebuffer { uint color_clear_value; uint depth_clear_value; + + uint zsize; /**< 0, 2 or 4 bytes per Z */ } ALIGN16_ATTRIB; @@ -90,8 +90,26 @@ extern struct spu_global spu; } -void +extern void wait_on_mask(unsigned tag); +static INLINE void +memset16(ushort *d, ushort value, uint count) +{ + uint i; + for (i = 0; i < count; i++) + d[i] = value; +} + + +static INLINE void +memset32(uint *d, uint value, uint count) +{ + uint i; + for (i = 0; i < count; i++) + d[i] = value; +} + + #endif /* SPU_MAIN_H */ -- cgit v1.2.3