Home | History | Annotate | Download | only in draw

Lines Matching refs:stage

29  * \brief  Drawing stage for polygon culling
42 struct draw_stage stage;
48 static INLINE struct cull_stage *cull_stage( struct draw_stage *stage )
50 return (struct cull_stage *)stage;
54 static void cull_tri( struct draw_stage *stage,
57 const unsigned pos = draw_current_shader_position_output(stage->draw);
78 unsigned face = ((ccw == cull_stage(stage)->front_ccw) ?
82 if ((face & cull_stage(stage)->cull_face) == 0) {
83 /* triangle is not culled, pass to next stage */
84 stage->next->tri( stage->next, header );
90 static void cull_first_tri( struct draw_stage *stage,
93 struct cull_stage *cull = cull_stage(stage);
95 cull->cull_face = stage->draw->rasterizer->cull_face;
96 cull->front_ccw = stage->draw->rasterizer->front_ccw;
98 stage->tri = cull_tri;
99 stage->tri( stage, header );
103 static void cull_flush( struct draw_stage *stage, unsigned flags )
105 stage->tri = cull_first_tri;
106 stage->next->flush( stage->next, flags );
110 static void cull_reset_stipple_counter( struct draw_stage *stage )
112 stage->next->reset_stipple_counter( stage->next );
116 static void cull_destroy( struct draw_stage *stage )
118 draw_free_temp_verts( stage );
119 FREE( stage );
124 * Create a new polygon culling stage.
132 cull->stage.draw = draw;
133 cull->stage.name = "cull";
134 cull->stage.next = NULL;
135 cull->stage.point = draw_pipe_passthrough_point;
136 cull->stage.line = draw_pipe_passthrough_line;
137 cull->stage.tri = cull_first_tri;
138 cull->stage.flush = cull_flush;
139 cull->stage.reset_stipple_counter = cull_reset_stipple_counter;
140 cull->stage.destroy = cull_destroy;
142 if (!draw_alloc_temp_verts( &cull->stage, 0 ))
145 return &cull->stage;
149 cull->stage.destroy( &cull->stage );