3 static void FUNC( ARGS
,
10 for (i
= 0; i
< count
; i
++) {
16 for (i
= 0; i
+1 < count
; i
+= 2) {
17 LINE( DRAW_PIPE_RESET_STIPPLE
,
23 case PIPE_PRIM_LINE_LOOP
:
25 flags
= DRAW_PIPE_RESET_STIPPLE
;
27 for (i
= 1; i
< count
; i
++, flags
= 0) {
39 case PIPE_PRIM_LINE_STRIP
:
40 flags
= DRAW_PIPE_RESET_STIPPLE
;
41 for (i
= 1; i
< count
; i
++, flags
= 0) {
48 case PIPE_PRIM_TRIANGLES
:
49 for (i
= 0; i
+2 < count
; i
+= 3) {
50 TRIANGLE( DRAW_PIPE_RESET_STIPPLE
| DRAW_PIPE_EDGE_FLAG_ALL
,
57 case PIPE_PRIM_TRIANGLE_STRIP
:
59 for (i
= 0; i
+2 < count
; i
++) {
60 /* Emit first triangle vertex as first triangle vertex */
61 TRIANGLE( DRAW_PIPE_RESET_STIPPLE
| DRAW_PIPE_EDGE_FLAG_ALL
,
68 for (i
= 0; i
+2 < count
; i
++) {
69 /* Emit last triangle vertex as last triangle vertex */
70 TRIANGLE( DRAW_PIPE_RESET_STIPPLE
| DRAW_PIPE_EDGE_FLAG_ALL
,
78 case PIPE_PRIM_TRIANGLE_FAN
:
81 for (i
= 0; i
+2 < count
; i
++) {
82 TRIANGLE( DRAW_PIPE_RESET_STIPPLE
| DRAW_PIPE_EDGE_FLAG_ALL
,
89 for (i
= 0; i
+2 < count
; i
++) {
90 TRIANGLE( DRAW_PIPE_RESET_STIPPLE
| DRAW_PIPE_EDGE_FLAG_ALL
,
100 case PIPE_PRIM_QUADS
:
101 /* GL quads don't follow provoking vertex convention */
103 for (i
= 0; i
+3 < count
; i
+= 4) {
104 /* emit last quad vertex as first triangle vertex */
105 QUAD_FIRST_PV( (i
+ 3),
112 for (i
= 0; i
+3 < count
; i
+= 4) {
113 /* emit last quad vertex as last triangle vertex */
114 QUAD_LAST_PV( (i
+ 0),
122 case PIPE_PRIM_QUAD_STRIP
:
123 /* GL quad strips don't follow provoking vertex convention */
125 for (i
= 0; i
+3 < count
; i
+= 2) {
126 /* emit last quad vertex as first triangle vertex */
127 QUAD_FIRST_PV( (i
+ 3),
135 for (i
= 0; i
+3 < count
; i
+= 2) {
136 /* emit last quad vertex as last triangle vertex */
137 QUAD_LAST_PV( (i
+ 2),
145 case PIPE_PRIM_POLYGON
:
146 /* GL polygons don't follow provoking vertex convention */
148 /* These bitflags look a little odd because we submit the
149 * vertices as (1,2,0) to satisfy flatshade requirements.
151 const ushort edge_first
= DRAW_PIPE_EDGE_FLAG_2
;
152 const ushort edge_middle
= DRAW_PIPE_EDGE_FLAG_0
;
153 const ushort edge_last
= DRAW_PIPE_EDGE_FLAG_1
;
155 flags
= DRAW_PIPE_RESET_STIPPLE
| edge_first
| edge_middle
;
157 for (i
= 0; i
+2 < count
; i
++, flags
= edge_middle
) {
163 /* emit first polygon vertex as first triangle vertex */
170 /* emit first polygon vertex as last triangle vertex */