aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt_decompose.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-05-05 00:40:56 +0100
committerJosé Fonseca <[email protected]>2010-05-05 00:46:13 +0100
commitddb0e18f6c5582d4d2cc59ffd16ad9c4639ed059 (patch)
tree883babf9defff6f298b488cc0f9bca743ea47072 /src/gallium/auxiliary/draw/draw_pt_decompose.h
parentdc1c33b448c830c5775e4f3fb6510830694a4177 (diff)
draw: Preserve the provoking vertex both when decomposing and clipping.
Based on John Lawless' feedback.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_decompose.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_decompose.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_decompose.h b/src/gallium/auxiliary/draw/draw_pt_decompose.h
index 3c44f7c11ee..02567d97f26 100644
--- a/src/gallium/auxiliary/draw/draw_pt_decompose.h
+++ b/src/gallium/auxiliary/draw/draw_pt_decompose.h
@@ -47,19 +47,10 @@ static void FUNC( ARGS,
case PIPE_PRIM_TRIANGLES:
for (i = 0; i+2 < count; i += 3) {
- if (flatfirst) {
- /* put provoking vertex in last pos for clipper */
- TRIANGLE( DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
- (i + 1),
- (i + 2),
- (i + 0 ));
- }
- else {
- TRIANGLE( DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
- (i + 0),
- (i + 1),
- (i + 2 ));
- }
+ TRIANGLE( DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
+ (i + 0),
+ (i + 1),
+ (i + 2 ));
}
break;
@@ -67,9 +58,9 @@ static void FUNC( ARGS,
if (flatfirst) {
for (i = 0; i+2 < count; i++) {
TRIANGLE( DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
+ (i + 0),
(i + 1 + (i&1)),
- (i + 2 - (i&1)),
- (i + 0) );
+ (i + 2 - (i&1)) );
}
}
else {
@@ -87,9 +78,9 @@ static void FUNC( ARGS,
if (flatfirst) {
for (i = 0; i+2 < count; i++) {
TRIANGLE( DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL,
+ (i + 1),
(i + 2),
- 0,
- (i + 1) );
+ 0 );
}
}
else {