diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-20 17:27:05 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-20 17:27:05 -0700 |
commit | f0be276c2e84716856ae87b4b0f0411700ed5be4 (patch) | |
tree | 7aa3d98bb0c822a29a5038a0129bb7e361dfde39 /src/mesa/pipe/cell/spu/spu_main.h | |
parent | 661be1ae7b1cd5837d8e7224a5ebe1b8d428137e (diff) |
Cell: clean-up/re-org tile code
Also, support 16 or 32-bit Z buffer at runtime.
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_main.h')
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.h | 24 |
1 files changed, 21 insertions, 3 deletions
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 */ |