1 #include "pipe/draw/draw_private.h"
2 #include "pipe/p_util.h"
4 #include "nv40_context.h"
6 struct nv40_draw_stage
{
7 struct draw_stage draw
;
8 struct nv40_context
*nv40
;
12 nv40_draw_point(struct draw_stage
*draw
, struct prim_header
*prim
)
18 nv40_draw_line(struct draw_stage
*draw
, struct prim_header
*prim
)
24 nv40_draw_tri(struct draw_stage
*draw
, struct prim_header
*prim
)
30 nv40_draw_flush(struct draw_stage
*draw
, unsigned flags
)
35 nv40_draw_reset_stipple_counter(struct draw_stage
*draw
)
41 nv40_draw_destroy(struct draw_stage
*draw
)
47 nv40_draw_render_stage(struct nv40_context
*nv40
)
49 struct nv40_draw_stage
*nv40draw
= CALLOC_STRUCT(nv40_draw_stage
);
51 nv40draw
->nv40
= nv40
;
52 nv40draw
->draw
.draw
= nv40
->draw
;
53 nv40draw
->draw
.point
= nv40_draw_point
;
54 nv40draw
->draw
.line
= nv40_draw_line
;
55 nv40draw
->draw
.tri
= nv40_draw_tri
;
56 nv40draw
->draw
.flush
= nv40_draw_flush
;
57 nv40draw
->draw
.reset_stipple_counter
= nv40_draw_reset_stipple_counter
;
58 nv40draw
->draw
.destroy
= nv40_draw_destroy
;
60 return &nv40draw
->draw
;