llvmpipe: update line rasterization code to current master
[mesa.git] / src / gallium / drivers / llvmpipe / lp_setup_line.c
1 /**************************************************************************
2 *
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /*
29 * Binning code for lines
30 */
31
32 #include "util/u_math.h"
33 #include "util/u_memory.h"
34 #include "lp_perf.h"
35 #include "lp_setup_context.h"
36 #include "lp_rast.h"
37 #include "lp_state_fs.h"
38
39 #define NUM_CHANNELS 4
40
41
42
43 /**
44 * Compute a0 for a constant-valued coefficient (GL_FLAT shading).
45 */
46 static void constant_coef( struct lp_setup_context *setup,
47 struct lp_rast_triangle *tri,
48 unsigned slot,
49 const float value,
50 unsigned i )
51 {
52 tri->inputs.a0[slot][i] = value;
53 tri->inputs.dadx[slot][i] = 0.0f;
54 tri->inputs.dady[slot][i] = 0.0f;
55 }
56
57
58 /**
59 * Compute a0, dadx and dady for a linearly interpolated coefficient,
60 * for a triangle.
61 */
62 static void linear_coef( struct lp_setup_context *setup,
63 struct lp_rast_triangle *tri,
64 float oneoverarea,
65 unsigned slot,
66 const float (*v1)[4],
67 const float (*v2)[4],
68 unsigned vert_attr,
69 unsigned i)
70 {
71 float a1 = v1[vert_attr][i];
72 float a2 = v2[vert_attr][i];
73
74 float da21 = a1 - a2;
75 float dadx = da21 * tri->dx * oneoverarea;
76 float dady = da21 * tri->dy * oneoverarea;
77
78 tri->inputs.dadx[slot][i] = dadx;
79 tri->inputs.dady[slot][i] = dady;
80
81 tri->inputs.a0[slot][i] = (a1 -
82 (dadx * (v1[0][0] - setup->pixel_offset) +
83 dady * (v1[0][1] - setup->pixel_offset)));
84 }
85
86
87 /**
88 * Compute a0, dadx and dady for a perspective-corrected interpolant,
89 * for a triangle.
90 * We basically multiply the vertex value by 1/w before computing
91 * the plane coefficients (a0, dadx, dady).
92 * Later, when we compute the value at a particular fragment position we'll
93 * divide the interpolated value by the interpolated W at that fragment.
94 */
95 static void perspective_coef( struct lp_setup_context *setup,
96 struct lp_rast_triangle *tri,
97 float oneoverarea,
98 unsigned slot,
99 const float (*v1)[4],
100 const float (*v2)[4],
101 unsigned vert_attr,
102 unsigned i)
103 {
104 /* premultiply by 1/w (v[0][3] is always 1/w):
105 */
106 float a1 = v1[vert_attr][i] * v1[0][3];
107 float a2 = v2[vert_attr][i] * v2[0][3];
108
109 float da21 = a1 - a2;
110 float dadx = da21 * tri->dx * oneoverarea;
111 float dady = da21 * tri->dy * oneoverarea;
112
113 tri->inputs.dadx[slot][i] = dadx;
114 tri->inputs.dady[slot][i] = dady;
115
116 tri->inputs.a0[slot][i] = (a1 -
117 (dadx * (v1[0][0] - setup->pixel_offset) +
118 dady * (v1[0][1] - setup->pixel_offset)));
119 }
120
121 static void
122 setup_fragcoord_coef( struct lp_setup_context *setup,
123 struct lp_rast_triangle *tri,
124 float oneoverarea,
125 unsigned slot,
126 const float (*v1)[4],
127 const float (*v2)[4],
128 unsigned usage_mask)
129 {
130 /*X*/
131 if (usage_mask & TGSI_WRITEMASK_X) {
132 tri->inputs.a0[slot][0] = 0.0;
133 tri->inputs.dadx[slot][0] = 1.0;
134 tri->inputs.dady[slot][0] = 0.0;
135 }
136
137 /*Y*/
138 if (usage_mask & TGSI_WRITEMASK_Y) {
139 tri->inputs.a0[slot][1] = 0.0;
140 tri->inputs.dadx[slot][1] = 0.0;
141 tri->inputs.dady[slot][1] = 1.0;
142 }
143
144 /*Z*/
145 if (usage_mask & TGSI_WRITEMASK_Z) {
146 linear_coef(setup, tri, oneoverarea, slot, v1, v2, 0, 2);
147 }
148
149 /*W*/
150 if (usage_mask & TGSI_WRITEMASK_W) {
151 linear_coef(setup, tri, oneoverarea, slot, v1, v2, 0, 3);
152 }
153 }
154
155 /**
156 * Compute the tri->coef[] array dadx, dady, a0 values.
157 */
158 static void setup_line_coefficients( struct lp_setup_context *setup,
159 struct lp_rast_triangle *tri,
160 float oneoverarea,
161 const float (*v1)[4],
162 const float (*v2)[4])
163 {
164 unsigned fragcoord_usage_mask = TGSI_WRITEMASK_XYZ;
165 unsigned slot;
166
167 /* setup interpolation for all the remaining attributes:
168 */
169 for (slot = 0; slot < setup->fs.nr_inputs; slot++) {
170 unsigned vert_attr = setup->fs.input[slot].src_index;
171 unsigned usage_mask = setup->fs.input[slot].usage_mask;
172 unsigned i;
173
174 switch (setup->fs.input[slot].interp) {
175 case LP_INTERP_CONSTANT:
176 if (setup->flatshade_first) {
177 for (i = 0; i < NUM_CHANNELS; i++)
178 if (usage_mask & (1 << i))
179 constant_coef(setup, tri, slot+1, v1[vert_attr][i], i);
180 }
181 else {
182 for (i = 0; i < NUM_CHANNELS; i++)
183 if (usage_mask & (1 << i))
184 constant_coef(setup, tri, slot+1, v2[vert_attr][i], i);
185 }
186 break;
187
188 case LP_INTERP_LINEAR:
189 for (i = 0; i < NUM_CHANNELS; i++)
190 if (usage_mask & (1 << i))
191 linear_coef(setup, tri, oneoverarea, slot+1, v1, v2, vert_attr, i);
192 break;
193
194 case LP_INTERP_PERSPECTIVE:
195 for (i = 0; i < NUM_CHANNELS; i++)
196 if (usage_mask & (1 << i))
197 perspective_coef(setup, tri, oneoverarea, slot+1, v1, v2, vert_attr, i);
198 fragcoord_usage_mask |= TGSI_WRITEMASK_W;
199 break;
200
201 case LP_INTERP_POSITION:
202 /*
203 * The generated pixel interpolators will pick up the coeffs from
204 * slot 0, so all need to ensure that the usage mask is covers all
205 * usages.
206 */
207 fragcoord_usage_mask |= usage_mask;
208 break;
209
210 default:
211 assert(0);
212 }
213 }
214
215 /* The internal position input is in slot zero:
216 */
217 setup_fragcoord_coef(setup, tri, oneoverarea, 0, v1, v2,
218 fragcoord_usage_mask);
219 }
220
221
222
223 static INLINE int subpixel_snap( float a )
224 {
225 return util_iround(FIXED_ONE * a);
226 }
227
228
229 /**
230 * Print line vertex attribs (for debug).
231 */
232 static void
233 print_line(struct lp_setup_context *setup,
234 const float (*v1)[4],
235 const float (*v2)[4])
236 {
237 uint i;
238
239 debug_printf("llvmpipe line\n");
240 for (i = 0; i < 1 + setup->fs.nr_inputs; i++) {
241 debug_printf(" v1[%d]: %f %f %f %f\n", i,
242 v1[i][0], v1[i][1], v1[i][2], v1[i][3]);
243 }
244 for (i = 0; i < 1 + setup->fs.nr_inputs; i++) {
245 debug_printf(" v2[%d]: %f %f %f %f\n", i,
246 v2[i][0], v2[i][1], v2[i][2], v2[i][3]);
247 }
248 }
249
250
251 static INLINE boolean sign(float x){
252 return x >= 0;
253 }
254
255
256 /* Used on positive floats only:
257 */
258 static INLINE float fracf(float f)
259 {
260 return f - floorf(f);
261 }
262
263
264
265 static void
266 lp_setup_line( struct lp_setup_context *setup,
267 const float (*v1)[4],
268 const float (*v2)[4])
269 {
270 struct lp_scene *scene = lp_setup_get_current_scene(setup);
271 struct lp_rast_triangle *line;
272 float oneoverarea;
273 float width = MAX2(1.0, setup->line_width);
274 struct u_rect bbox;
275 unsigned tri_bytes;
276 int x[4];
277 int y[4];
278 int i;
279 int nr_planes = 4;
280
281 /* linewidth should be interpreted as integer */
282 int fixed_width = subpixel_snap(round(width));
283
284 float x_offset=0;
285 float y_offset=0;
286 float x_offset_end=0;
287 float y_offset_end=0;
288
289 float x1diff;
290 float y1diff;
291 float x2diff;
292 float y2diff;
293 float dx, dy;
294
295 boolean draw_start;
296 boolean draw_end;
297 boolean will_draw_start;
298 boolean will_draw_end;
299
300 if (0)
301 print_line(setup, v1, v2);
302
303 if (setup->scissor_test) {
304 nr_planes = 8;
305 }
306 else {
307 nr_planes = 4;
308 }
309
310
311 dx = v1[0][0] - v2[0][0];
312 dy = v1[0][1] - v2[0][1];
313
314 /* X-MAJOR LINE */
315 if (fabsf(dx) >= fabsf(dy)) {
316 float dydx = dy / dx;
317
318 x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5;
319 y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5;
320 x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5;
321 y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5;
322
323 if (y2diff==-0.5 && dy<0){
324 y2diff = 0.5;
325 }
326
327 /*
328 * Diamond exit rule test for starting point
329 */
330 if (fabsf(x1diff) + fabsf(y1diff) < 0.5) {
331 draw_start = TRUE;
332 }
333 else if (sign(x1diff) == sign(-dx)) {
334 draw_start = FALSE;
335 }
336 else if (sign(-y1diff) != sign(dy)) {
337 draw_start = TRUE;
338 }
339 else {
340 /* do intersection test */
341 float yintersect = fracf(v1[0][1]) + x1diff * dydx;
342 draw_start = (yintersect < 1.0 && yintersect > 0.0);
343 }
344
345
346 /*
347 * Diamond exit rule test for ending point
348 */
349 if (fabsf(x2diff) + fabsf(y2diff) < 0.5) {
350 draw_end = FALSE;
351 }
352 else if (sign(x2diff) != sign(-dx)) {
353 draw_end = FALSE;
354 }
355 else if (sign(-y2diff) == sign(dy)) {
356 draw_end = TRUE;
357 }
358 else {
359 /* do intersection test */
360 float yintersect = fracf(v2[0][1]) + x2diff * dydx;
361 draw_end = (yintersect < 1.0 && yintersect > 0.0);
362 }
363
364 /* Are we already drawing start/end?
365 */
366 will_draw_start = sign(-x1diff) != sign(dx);
367 will_draw_end = (sign(x2diff) == sign(-dx)) || x2diff==0;
368
369 if (dx < 0) {
370 /* if v2 is to the right of v1, swap pointers */
371 const float (*temp)[4] = v1;
372 v1 = v2;
373 v2 = temp;
374 dx = -dx;
375 dy = -dy;
376 /* Otherwise shift planes appropriately */
377 if (will_draw_start != draw_start) {
378 x_offset_end = - x1diff - 0.5;
379 y_offset_end = x_offset_end * dydx;
380
381 }
382 if (will_draw_end != draw_end) {
383 x_offset = - x2diff - 0.5;
384 y_offset = x_offset * dydx;
385 }
386
387 }
388 else{
389 /* Otherwise shift planes appropriately */
390 if (will_draw_start != draw_start) {
391 x_offset = - x1diff + 0.5;
392 y_offset = x_offset * dydx;
393 }
394 if (will_draw_end != draw_end) {
395 x_offset_end = - x2diff + 0.5;
396 y_offset_end = x_offset_end * dydx;
397 }
398 }
399
400 /* x/y positions in fixed point */
401 x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset);
402 x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset);
403 x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset);
404 x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset);
405
406 y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) - fixed_width/2;
407 y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) - fixed_width/2;
408 y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) + fixed_width/2;
409 y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) + fixed_width/2;
410
411 }
412 else {
413 const float dxdy = dx / dy;
414
415 /* Y-MAJOR LINE */
416 x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5;
417 y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5;
418 x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5;
419 y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5;
420
421 if (x2diff==-0.5 && dx<0) {
422 x2diff = 0.5;
423 }
424
425 /*
426 * Diamond exit rule test for starting point
427 */
428 if (fabsf(x1diff) + fabsf(y1diff) < 0.5) {
429 draw_start = TRUE;
430 }
431 else if (sign(-y1diff) == sign(dy)) {
432 draw_start = FALSE;
433 }
434 else if (sign(x1diff) != sign(-dx)) {
435 draw_start = TRUE;
436 }
437 else {
438 /* do intersection test */
439 float xintersect = fracf(v1[0][0]) + y1diff * dxdy;
440 draw_start = (xintersect < 1.0 && xintersect > 0.0);
441 }
442
443 /*
444 * Diamond exit rule test for ending point
445 */
446 if (fabsf(x2diff) + fabsf(y2diff) < 0.5) {
447 draw_end = FALSE;
448 }
449 else if (sign(-y2diff) != sign(dy) ) {
450 draw_end = FALSE;
451 }
452 else if (sign(x2diff) == sign(-dx) ) {
453 draw_end = TRUE;
454 }
455 else {
456 /* do intersection test */
457 float xintersect = fracf(v2[0][0]) + y2diff * dxdy;
458 draw_end = (xintersect < 1.0 && xintersect > 0.0);
459 }
460
461 /* Are we already drawing start/end?
462 */
463 will_draw_start = sign(y1diff) == sign(dy);
464 will_draw_end = (sign(-y2diff) == sign(dy)) || y2diff==0;
465
466 if (dy > 0) {
467 /* if v2 is on top of v1, swap pointers */
468 const float (*temp)[4] = v1;
469 v1 = v2;
470 v2 = temp;
471 dx = -dx;
472 dy = -dy;
473
474 /* Otherwise shift planes appropriately */
475 if (will_draw_start != draw_start) {
476 y_offset_end = - y1diff + 0.5;
477 x_offset_end = y_offset_end * dxdy;
478 }
479 if (will_draw_end != draw_end) {
480 y_offset = - y2diff + 0.5;
481 x_offset = y_offset * dxdy;
482 }
483 }
484 else {
485 /* Otherwise shift planes appropriately */
486 if (will_draw_start != draw_start) {
487 y_offset = - y1diff - 0.5;
488 x_offset = y_offset * dxdy;
489
490 }
491 if (will_draw_end != draw_end) {
492 y_offset_end = - y2diff - 0.5;
493 x_offset_end = y_offset_end * dxdy;
494 }
495 }
496
497 /* x/y positions in fixed point */
498 x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) - fixed_width/2;
499 x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) - fixed_width/2;
500 x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) + fixed_width/2;
501 x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) + fixed_width/2;
502
503 y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
504 y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset);
505 y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset);
506 y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
507 }
508
509
510
511 LP_COUNT(nr_tris);
512
513
514 /* Bounding rectangle (in pixels) */
515 {
516 /* Yes this is necessary to accurately calculate bounding boxes
517 * with the two fill-conventions we support. GL (normally) ends
518 * up needing a bottom-left fill convention, which requires
519 * slightly different rounding.
520 */
521 int adj = (setup->pixel_offset != 0) ? 1 : 0;
522
523 bbox.x0 = (MIN4(x[0], x[1], x[2], x[3]) + (FIXED_ONE-1)) >> FIXED_ORDER;
524 bbox.x1 = (MAX4(x[0], x[1], x[2], x[3]) + (FIXED_ONE-1)) >> FIXED_ORDER;
525 bbox.y0 = (MIN4(y[0], y[1], y[2], y[3]) + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
526 bbox.y1 = (MAX4(y[0], y[1], y[2], y[3]) + (FIXED_ONE-1) + adj) >> FIXED_ORDER;
527
528 /* Inclusive coordinates:
529 */
530 bbox.x1--;
531 bbox.y1--;
532 }
533
534 if (bbox.x1 < bbox.x0 ||
535 bbox.y1 < bbox.y0) {
536 if (0) debug_printf("empty bounding box\n");
537 LP_COUNT(nr_culled_tris);
538 return;
539 }
540
541 if (!u_rect_test_intersection(&setup->draw_region, &bbox)) {
542 if (0) debug_printf("offscreen\n");
543 LP_COUNT(nr_culled_tris);
544 return;
545 }
546
547 u_rect_find_intersection(&setup->draw_region, &bbox);
548
549 line = lp_setup_alloc_triangle(scene,
550 setup->fs.nr_inputs,
551 nr_planes,
552 &tri_bytes);
553 if (!line)
554 return;
555
556 #ifdef DEBUG
557 line->v[0][0] = v1[0][0];
558 line->v[1][0] = v2[0][0];
559 line->v[0][1] = v1[0][1];
560 line->v[1][1] = v2[0][1];
561 #endif
562
563 line->dx = dx;
564 line->dy = dy;
565
566 /* calculate the deltas */
567 line->plane[0].dcdy = x[0] - x[1];
568 line->plane[1].dcdy = x[1] - x[2];
569 line->plane[2].dcdy = x[2] - x[3];
570 line->plane[3].dcdy = x[3] - x[0];
571
572 line->plane[0].dcdx = y[0] - y[1];
573 line->plane[1].dcdx = y[1] - y[2];
574 line->plane[2].dcdx = y[2] - y[3];
575 line->plane[3].dcdx = y[3] - y[0];
576
577
578 oneoverarea = 1.0f / (dx * dx + dy * dy);
579
580 /* Setup parameter interpolants:
581 */
582 setup_line_coefficients( setup, line, oneoverarea, v1, v2);
583
584 line->inputs.facing = 1.0F;
585 line->inputs.state = setup->fs.stored;
586
587 for (i = 0; i < 4; i++) {
588 struct lp_rast_plane *plane = &line->plane[i];
589
590 /* half-edge constants, will be interated over the whole render
591 * target.
592 */
593 plane->c = plane->dcdx * x[i] - plane->dcdy * y[i];
594
595
596 /* correct for top-left vs. bottom-left fill convention.
597 *
598 * note that we're overloading gl_rasterization_rules to mean
599 * both (0.5,0.5) pixel centers *and* bottom-left filling
600 * convention.
601 *
602 * GL actually has a top-left filling convention, but GL's
603 * notion of "top" differs from gallium's...
604 *
605 * Also, sometimes (in FBO cases) GL will render upside down
606 * to its usual method, in which case it will probably want
607 * to use the opposite, top-left convention.
608 */
609 if (plane->dcdx < 0) {
610 /* both fill conventions want this - adjust for left edges */
611 plane->c++;
612 }
613 else if (plane->dcdx == 0) {
614 if (setup->pixel_offset == 0) {
615 /* correct for top-left fill convention:
616 */
617 if (plane->dcdy > 0) plane->c++;
618 }
619 else {
620 /* correct for bottom-left fill convention:
621 */
622 if (plane->dcdy < 0) plane->c++;
623 }
624 }
625
626 plane->dcdx *= FIXED_ONE;
627 plane->dcdy *= FIXED_ONE;
628
629 /* find trivial reject offsets for each edge for a single-pixel
630 * sized block. These will be scaled up at each recursive level to
631 * match the active blocksize. Scaling in this way works best if
632 * the blocks are square.
633 */
634 plane->eo = 0;
635 if (plane->dcdx < 0) plane->eo -= plane->dcdx;
636 if (plane->dcdy > 0) plane->eo += plane->dcdy;
637
638 /* Calculate trivial accept offsets from the above.
639 */
640 plane->ei = plane->dcdy - plane->dcdx - plane->eo;
641 }
642
643
644 /*
645 * When rasterizing scissored tris, use the intersection of the
646 * triangle bounding box and the scissor rect to generate the
647 * scissor planes.
648 *
649 * This permits us to cut off the triangle "tails" that are present
650 * in the intermediate recursive levels caused when two of the
651 * triangles edges don't diverge quickly enough to trivially reject
652 * exterior blocks from the triangle.
653 *
654 * It's not really clear if it's worth worrying about these tails,
655 * but since we generate the planes for each scissored tri, it's
656 * free to trim them in this case.
657 *
658 * Note that otherwise, the scissor planes only vary in 'C' value,
659 * and even then only on state-changes. Could alternatively store
660 * these planes elsewhere.
661 */
662 if (nr_planes == 8) {
663 line->plane[4].dcdx = -1;
664 line->plane[4].dcdy = 0;
665 line->plane[4].c = 1-bbox.x0;
666 line->plane[4].ei = 0;
667 line->plane[4].eo = 1;
668
669 line->plane[5].dcdx = 1;
670 line->plane[5].dcdy = 0;
671 line->plane[5].c = bbox.x1+1;
672 line->plane[5].ei = -1;
673 line->plane[5].eo = 0;
674
675 line->plane[6].dcdx = 0;
676 line->plane[6].dcdy = 1;
677 line->plane[6].c = 1-bbox.y0;
678 line->plane[6].ei = 0;
679 line->plane[6].eo = 1;
680
681 line->plane[7].dcdx = 0;
682 line->plane[7].dcdy = -1;
683 line->plane[7].c = bbox.y1+1;
684 line->plane[7].ei = -1;
685 line->plane[7].eo = 0;
686 }
687
688 lp_setup_bin_triangle(setup, line, &bbox, nr_planes);
689 }
690
691
692 void lp_setup_choose_line( struct lp_setup_context *setup )
693 {
694 setup->line = lp_setup_line;
695 }
696
697