summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell/spu/tri.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-02 18:53:33 -0700
committerBrian <[email protected]>2008-01-02 18:53:33 -0700
commitde9f8e8b717aa4b4ab94af73be5aa70088cd6b81 (patch)
tree0ce4fc6110517e7ccdf5a3781663c80adfe516ae /src/mesa/pipe/cell/spu/tri.c
parentda92ac01e80e8a83233b1d4a881503bfc2806a1a (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/spu/tri.c')
-rw-r--r--src/mesa/pipe/cell/spu/tri.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mesa/pipe/cell/spu/tri.c b/src/mesa/pipe/cell/spu/tri.c
index cd648db3604..ce759a56470 100644
--- a/src/mesa/pipe/cell/spu/tri.c
+++ b/src/mesa/pipe/cell/spu/tri.c
@@ -74,8 +74,6 @@
static int cliprect_minx, cliprect_maxx, cliprect_miny, cliprect_maxy;
-static uint tile[TILE_SIZE][TILE_SIZE] ALIGN16_ATTRIB;
-
#endif
@@ -879,11 +877,26 @@ draw_triangle(struct prim_header *tri, uint tx, uint ty)
cliprect_maxx = (tx + 1) * TILE_SIZE;
cliprect_maxy = (ty + 1) * TILE_SIZE;
- get_tile(&fb, tx, ty, (uint *) tile);
+ get_tile(&fb, tx, ty, (uint *) tile, DefaultTag);
wait_on_mask(1 << DefaultTag);
setup_tri(tri);
- put_tile(&fb, tx, ty, (uint *) tile);
+ put_tile(&fb, tx, ty, (uint *) tile, DefaultTag);
wait_on_mask(1 << DefaultTag);
}
+
+
+void
+tri_draw(struct prim_header *tri, uint tx, uint ty)
+{
+ /* set clipping bounds to tile bounds */
+ cliprect_minx = tx * TILE_SIZE;
+ cliprect_miny = ty * TILE_SIZE;
+ cliprect_maxx = (tx + 1) * TILE_SIZE;
+ cliprect_maxy = (ty + 1) * TILE_SIZE;
+
+ setup_tri(tri);
+}
+
+