Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 1 | /* |
2 | * Copyright 2008 Ben Skeggs |
||
3 | * |
||
4 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
5 | * copy of this software and associated documentation files (the "Software"), |
||
6 | * to deal in the Software without restriction, including without limitation |
||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
8 | * and/or sell copies of the Software, and to permit persons to whom the |
||
9 | * Software is furnished to do so, subject to the following conditions: |
||
10 | * |
||
11 | * The above copyright notice and this permission notice shall be included in |
||
12 | * all copies or substantial portions of the Software. |
||
13 | * |
||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
20 | * OTHER DEALINGS IN THE SOFTWARE. |
||
21 | */ |
||
22 | |||
23 | #include "draw/draw_pipe.h" |
||
24 | |||
25 | #include "nv50_context.h" |
||
26 | |||
27 | struct nv50_render_stage { |
||
28 | struct draw_stage stage; |
||
29 | struct nv50_context *nv50; |
||
30 | }; |
||
31 | |||
32 | static INLINE struct nv50_render_stage * |
||
33 | nv50_render_stage(struct draw_stage *stage) |
||
34 | { |
||
35 | return (struct nv50_render_stage *)stage; |
||
36 | } |
||
37 | |||
38 | static void |
||
39 | nv50_render_point(struct draw_stage *stage, struct prim_header *prim) |
||
40 | { |
||
41 | NOUVEAU_ERR("\n"); |
||
42 | } |
||
43 | |||
44 | static void |
||
45 | nv50_render_line(struct draw_stage *stage, struct prim_header *prim) |
||
46 | { |
||
47 | NOUVEAU_ERR("\n"); |
||
48 | } |
||
49 | |||
50 | static void |
||
51 | nv50_render_tri(struct draw_stage *stage, struct prim_header *prim) |
||
52 | { |
||
53 | NOUVEAU_ERR("\n"); |
||
54 | } |
||
55 | |||
56 | static void |
||
57 | nv50_render_flush(struct draw_stage *stage, unsigned flags) |
||
58 | { |
||
59 | } |
||
60 | |||
61 | static void |
||
62 | nv50_render_reset_stipple_counter(struct draw_stage *stage) |
||
63 | { |
||
64 | NOUVEAU_ERR("\n"); |
||
65 | } |
||
66 | |||
67 | static void |
||
68 | nv50_render_destroy(struct draw_stage *stage) |
||
69 | { |
||
70 | FREE(stage); |
||
71 | } |
||
72 | |||
73 | struct draw_stage * |
||
74 | nv50_draw_render_stage(struct nv50_context *nv50) |
||
75 | { |
||
76 | struct nv50_render_stage *rs = CALLOC_STRUCT(nv50_render_stage); |
||
77 | |||
78 | rs->nv50 = nv50; |
||
79 | rs->stage.draw = nv50->draw; |
||
80 | rs->stage.destroy = nv50_render_destroy; |
||
81 | rs->stage.point = nv50_render_point; |
||
82 | rs->stage.line = nv50_render_line; |
||
83 | rs->stage.tri = nv50_render_tri; |
||
84 | rs->stage.flush = nv50_render_flush; |
||
85 | rs->stage.reset_stipple_counter = nv50_render_reset_stipple_counter; |
||
86 | |||
87 | return &rs->stage; |
||
88 | } |