static void unfilled_first_tri( struct draw_stage *stage, struct prim_header *header ) { struct unfilled_stage *unfilled = unfilled_stage(stage); unfilled->mode[0] = stage->draw->rasterizer->fill_ccw; /* front */ unfilled->mode[1] = stage->draw->rasterizer->fill_cw; /* back */ stage->tri = unfilled_tri; stage->tri( stage, header ); }
static void unfilled_first_tri( struct draw_stage *stage, struct prim_header *header ) { struct unfilled_stage *unfilled = unfilled_stage(stage); const struct pipe_rasterizer_state *rast = stage->draw->rasterizer; unfilled->mode[0] = rast->front_ccw ? rast->fill_front : rast->fill_back; unfilled->mode[1] = rast->front_ccw ? rast->fill_back : rast->fill_front; stage->tri = unfilled_tri; stage->tri( stage, header ); }
/* Unfilled tri: * * Note edgeflags in the vertex struct is not sufficient as we will * need to manipulate them when decomposing primitives. * * We currently keep the vertex edgeflag and primitive edgeflag mask * separate until the last possible moment. */ static void unfilled_tri( struct draw_stage *stage, struct prim_header *header ) { struct unfilled_stage *unfilled = unfilled_stage(stage); unsigned mode = unfilled->mode[header->det >= 0.0]; switch (mode) { case PIPE_POLYGON_MODE_FILL: stage->next->tri( stage->next, header ); break; case PIPE_POLYGON_MODE_LINE: lines( stage, header ); break; case PIPE_POLYGON_MODE_POINT: points( stage, header ); break; default: assert(0); } }