aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_decompose_tmp.h
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-02-06 16:29:03 +0100
committerChristoph Bumiller <[email protected]>2012-02-09 15:01:34 +0100
commit8b4f7b0672d663273310fffa9490ad996f5b914a (patch)
treef2ba67e7db09659b5a0062644cf46d297578a29a /src/gallium/auxiliary/draw/draw_decompose_tmp.h
parent26de5273acf1ebe6730b5e72b55b3bcceba167c6 (diff)
gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION
Just let the hardware do it if it can and avoid drivers having to check for the special case on each draw call. v2: update the draw module
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_decompose_tmp.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_decompose_tmp.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/draw/draw_decompose_tmp.h b/src/gallium/auxiliary/draw/draw_decompose_tmp.h
index a142563af97..ee6877df99d 100644
--- a/src/gallium/auxiliary/draw/draw_decompose_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_decompose_tmp.h
@@ -193,13 +193,18 @@ FUNC(FUNC_VARS)
flags = DRAW_PIPE_RESET_STIPPLE |
DRAW_PIPE_EDGE_FLAG_0 |
DRAW_PIPE_EDGE_FLAG_1;
- /* XXX should always emit idx[0] first */
- /* always emit idx[3] first */
- TRIANGLE(flags, idx[3], idx[0], idx[1]);
+ /* always emit idx[3] / idx[0] first */
+ if (quads_flatshade_last)
+ TRIANGLE(flags, idx[3], idx[0], idx[1]);
+ else
+ TRIANGLE(flags, idx[0], idx[1], idx[2]);
flags = DRAW_PIPE_EDGE_FLAG_1 |
DRAW_PIPE_EDGE_FLAG_2;
- TRIANGLE(flags, idx[3], idx[1], idx[2]);
+ if (quads_flatshade_last)
+ TRIANGLE(flags, idx[3], idx[1], idx[2]);
+ else
+ TRIANGLE(flags, idx[0], idx[2], idx[3]);
}
}
break;
@@ -237,13 +242,18 @@ FUNC(FUNC_VARS)
flags = DRAW_PIPE_RESET_STIPPLE |
DRAW_PIPE_EDGE_FLAG_0 |
DRAW_PIPE_EDGE_FLAG_1;
- /* XXX should always emit idx[0] first */
- /* always emit idx[3] first */
- TRIANGLE(flags, idx[3], idx[2], idx[0]);
+ /* always emit idx[3] / idx[0 first */
+ if (quads_flatshade_last)
+ TRIANGLE(flags, idx[3], idx[2], idx[0]);
+ else
+ TRIANGLE(flags, idx[0], idx[3], idx[2]);
flags = DRAW_PIPE_EDGE_FLAG_1 |
DRAW_PIPE_EDGE_FLAG_2;
- TRIANGLE(flags, idx[3], idx[0], idx[1]);
+ if (quads_flatshade_last)
+ TRIANGLE(flags, idx[3], idx[0], idx[1]);
+ else
+ TRIANGLE(flags, idx[0], idx[1], idx[3]);
}
}
}