Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
[mesa.git] / src / gallium / drivers / nv50 / nv50_draw.c
1 #include "draw/draw_private.h"
2 #include "pipe/p_util.h"
3
4 #include "nv50_context.h"
5
6 struct nv50_render_stage {
7 struct draw_stage stage;
8 struct nv50_context *nv50;
9 };
10
11 static INLINE struct nv50_render_stage *
12 nv50_render_stage(struct draw_stage *stage)
13 {
14 return (struct nv50_render_stage *)stage;
15 }
16
17 static void
18 nv50_render_point(struct draw_stage *stage, struct prim_header *prim)
19 {
20 NOUVEAU_ERR("\n");
21 }
22
23 static void
24 nv50_render_line(struct draw_stage *stage, struct prim_header *prim)
25 {
26 NOUVEAU_ERR("\n");
27 }
28
29 static void
30 nv50_render_tri(struct draw_stage *stage, struct prim_header *prim)
31 {
32 NOUVEAU_ERR("\n");
33 }
34
35 static void
36 nv50_render_flush(struct draw_stage *stage, unsigned flags)
37 {
38 }
39
40 static void
41 nv50_render_reset_stipple_counter(struct draw_stage *stage)
42 {
43 NOUVEAU_ERR("\n");
44 }
45
46 static void
47 nv50_render_destroy(struct draw_stage *stage)
48 {
49 free(stage);
50 }
51
52 struct draw_stage *
53 nv50_draw_render_stage(struct nv50_context *nv50)
54 {
55 struct nv50_render_stage *rs = CALLOC_STRUCT(nv50_render_stage);
56
57 rs->nv50 = nv50;
58 rs->stage.draw = nv50->draw;
59 rs->stage.destroy = nv50_render_destroy;
60 rs->stage.point = nv50_render_point;
61 rs->stage.line = nv50_render_line;
62 rs->stage.tri = nv50_render_tri;
63 rs->stage.flush = nv50_render_flush;
64 rs->stage.reset_stipple_counter = nv50_render_reset_stipple_counter;
65
66 return &rs->stage;
67 }
68