diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-02 18:53:33 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-02 18:53:33 -0700 |
commit | de9f8e8b717aa4b4ab94af73be5aa70088cd6b81 (patch) | |
tree | 0ce4fc6110517e7ccdf5a3781663c80adfe516ae /src/mesa/pipe/cell/common.h | |
parent | da92ac01e80e8a83233b1d4a881503bfc2806a1a (diff) |
Cell: basic triangle rendering works.
The cell "render_stage" (last in the "draw" pipeline) emits vertices into
a buffer which is pulled by the SPUs in response to a "RENDER" command.
This is pretty much temporary/scaffold code for now.
Diffstat (limited to 'src/mesa/pipe/cell/common.h')
-rw-r--r-- | src/mesa/pipe/cell/common.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h index f7f1e2eb41..0868e8d90f 100644 --- a/src/mesa/pipe/cell/common.h +++ b/src/mesa/pipe/cell/common.h @@ -51,6 +51,7 @@ #define CELL_CMD_CLEAR_TILES 3 #define CELL_CMD_TRIANGLE 4 #define CELL_CMD_FINISH 5 +#define CELL_CMD_RENDER 6 /** @@ -80,12 +81,22 @@ struct cell_command_triangle } ALIGN16_ATTRIB; +struct cell_command_render +{ + uint prim_type; + uint num_verts; + float xmin, ymin, xmax, ymax; + void *vertex_data; +} ALIGN16_ATTRIB; + + /** XXX unions don't seem to work */ struct cell_command { struct cell_command_framebuffer fb; struct cell_command_clear_tiles clear; struct cell_command_triangle tri; + struct cell_command_render render; } ALIGN16_ATTRIB; @@ -98,6 +109,16 @@ struct cell_init_info } ALIGN16_ATTRIB; +/** Temporary */ +#define CELL_MAX_VERTS 48 +#define CELL_MAX_ATTRIBS 2 +struct cell_prim_buffer +{ + float vertex[CELL_MAX_VERTS][CELL_MAX_ATTRIBS][4] ALIGN16_ATTRIB; + float xmin, ymin, xmax, ymax; + uint num_verts; +} ALIGN16_ATTRIB; + #endif /* CELL_COMMON_H */ |