Home | History | Annotate | Download | only in draw

Lines Matching refs:stage

42    struct draw_stage stage;
51 static INLINE struct offset_stage *offset_stage( struct draw_stage *stage )
53 return (struct offset_stage *) stage;
64 static void do_offset_tri( struct draw_stage *stage,
67 const unsigned pos = draw_current_shader_position_output(stage->draw);
68 struct offset_stage *offset = offset_stage(stage);
106 stage->next->tri( stage->next, header );
110 static void offset_tri( struct draw_stage *stage,
118 tmp.v[0] = dup_vert(stage, header->v[0], 0);
119 tmp.v[1] = dup_vert(stage, header->v[1], 1);
120 tmp.v[2] = dup_vert(stage, header->v[2], 2);
122 do_offset_tri( stage, &tmp );
126 static void offset_first_tri( struct draw_stage *stage,
129 struct offset_stage *offset = offset_stage(stage);
131 offset->units = (float) (stage->draw->rasterizer->offset_units * stage->draw->mrd);
132 offset->scale = stage->draw->rasterizer->offset_scale;
133 offset->clamp = stage->draw->rasterizer->offset_clamp;
135 stage->tri = offset_tri;
136 stage->tri( stage, header );
142 static void offset_flush( struct draw_stage *stage,
145 stage->tri = offset_first_tri;
146 stage->next->flush( stage->next, flags );
150 static void offset_reset_stipple_counter( struct draw_stage *stage )
152 stage->next->reset_stipple_counter( stage->next );
156 static void offset_destroy( struct draw_stage *stage )
158 draw_free_temp_verts( stage );
159 FREE( stage );
164 * Create polygon offset drawing stage.
172 offset->stage.draw = draw;
173 offset->stage.name = "offset";
174 offset->stage.next = NULL;
175 offset->stage.point = draw_pipe_passthrough_point;
176 offset->stage.line = draw_pipe_passthrough_line;
177 offset->stage.tri = offset_first_tri;
178 offset->stage.flush = offset_flush;
179 offset->stage.reset_stipple_counter = offset_reset_stipple_counter;
180 offset->stage.destroy = offset_destroy;
182 if (!draw_alloc_temp_verts( &offset->stage, 3 ))
185 return &offset->stage;
189 offset->stage.destroy( &offset->stage );