diff options
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_main.h')
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_main.h b/src/mesa/pipe/cell/spu/spu_main.h index 9ef8cf0709..ea43224d02 100644 --- a/src/mesa/pipe/cell/spu/spu_main.h +++ b/src/mesa/pipe/cell/spu/spu_main.h @@ -30,10 +30,9 @@ #include "pipe/cell/common.h" +#include "pipe/p_state.h" -extern volatile struct cell_init_info init; - struct framebuffer { void *color_start; /**< addr of color surface in main memory */ void *depth_start; /**< addr of depth surface in main memory */ @@ -44,11 +43,27 @@ struct framebuffer { uint color_clear_value; uint depth_clear_value; -}; +} ALIGN16_ATTRIB; + + +/** + * All SPU global/context state will be in singleton object of this type: + */ +struct spu_global +{ + struct cell_init_info init; + + struct framebuffer fb; + struct pipe_depth_stencil_alpha_state depth_stencil; + struct pipe_blend_state blend; + /* XXX more state to come */ + +} ALIGN16_ATTRIB; + + +extern struct spu_global spu; -/* XXX Collect these globals in a struct: */ -extern struct framebuffer fb; /* DMA TAGS */ @@ -66,7 +81,7 @@ extern struct framebuffer fb; #define ASSERT(x) \ if (!(x)) { \ fprintf(stderr, "SPU %d: %s:%d: %s(): assertion %s failed.\n", \ - init.id, __FILE__, __LINE__, __FUNCTION__, #x); \ + spu.init.id, __FILE__, __LINE__, __FUNCTION__, #x); \ exit(1); \ } |