1 /* $Id: t_imm_elt.c,v 1.20 2002/10/29 20:29:02 brianp Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 * Keith Whitwell <keith@tungstengraphics.com>
37 #include "math/m_translate.h"
39 #include "t_context.h"
40 #include "t_imm_elt.h"
44 typedef void (*trans_elt_1f_func
)(GLfloat
*to
,
53 typedef void (*trans_elt_1ui_func
)(GLuint
*to
,
62 typedef void (*trans_elt_1ub_func
)(GLubyte
*to
,
71 typedef void (*trans_elt_4ub_func
)(GLubyte (*to
)[4],
80 typedef void (*trans_elt_4us_func
)(GLushort (*to
)[4],
89 typedef void (*trans_elt_4f_func
)(GLfloat (*to
)[4],
98 typedef void (*trans_elt_3f_func
)(GLfloat (*to
)[3],
110 static trans_elt_1f_func _tnl_trans_elt_1f_tab
[MAX_TYPES
];
111 static trans_elt_1ui_func _tnl_trans_elt_1ui_tab
[MAX_TYPES
];
112 static trans_elt_1ub_func _tnl_trans_elt_1ub_tab
[MAX_TYPES
];
113 static trans_elt_3f_func _tnl_trans_elt_3f_tab
[MAX_TYPES
];
114 static trans_elt_4ub_func _tnl_trans_elt_4ub_tab
[5][MAX_TYPES
];
115 static trans_elt_4us_func _tnl_trans_elt_4us_tab
[5][MAX_TYPES
];
116 static trans_elt_4f_func _tnl_trans_elt_4f_tab
[5][MAX_TYPES
];
119 #define PTR_ELT(ptr, elt) (((SRC *)ptr)[elt])
125 /* Code specific to array element implementation. There is a small
126 * subtlety in the bits CHECK() tests, and the way bits are set in
127 * glArrayElement which ensures that if, eg, in the case that the
128 * vertex array is disabled and normal array is enabled, and we get
131 * ArrayElement() OR Normal()
132 * Normal() ArrayElement()
135 * That the correct value for normal is used.
137 #define TAB(x) _tnl_trans_elt##x##_tab
138 #define ARGS GLuint *flags, GLuint *elts, GLuint match, \
139 GLuint start, GLuint n
141 #define DST_START start
142 #define CHECK if ((flags[i]&match) == VERT_BIT_ELT)
143 #define NEXT_F (void)1
144 #define NEXT_F2 f = first + elts[i] * stride;
150 #define SRC_IDX TYPE_IDX(GL_BYTE)
151 #define TRX_3F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
152 #define TRX_4F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
153 #define TRX_UB(ub, f,n) ub = BYTE_TO_UBYTE( PTR_ELT(f,n) )
154 #define TRX_US(us, f,n) us = BYTE_TO_USHORT( PTR_ELT(f,n) )
155 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
159 #define INIT init_trans_4_GLbyte_elt
160 #define DEST_4F trans_4_GLbyte_4f_elt
161 #define DEST_4UB trans_4_GLbyte_4ub_elt
162 #define DEST_4US trans_4_GLbyte_4us_elt
163 #include "math/m_trans_tmp.h"
166 #define INIT init_trans_3_GLbyte_elt
167 #define DEST_4F trans_3_GLbyte_4f_elt
168 #define DEST_4UB trans_3_GLbyte_4ub_elt
169 #define DEST_4US trans_3_GLbyte_4us_elt
170 #define DEST_3F trans_3_GLbyte_3f_elt
171 #include "math/m_trans_tmp.h"
174 #define INIT init_trans_2_GLbyte_elt
175 #define DEST_4F trans_2_GLbyte_4f_elt
176 #include "math/m_trans_tmp.h"
179 #define INIT init_trans_1_GLbyte_elt
180 #define DEST_4F trans_1_GLbyte_4f_elt
181 #define DEST_1UB trans_1_GLbyte_1ub_elt
182 #define DEST_1UI trans_1_GLbyte_1ui_elt
183 #include "math/m_trans_tmp.h"
196 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_BYTE)
197 #define TRX_3F(f,n) UBYTE_TO_FLOAT( PTR_ELT(f,n) )
198 #define TRX_4F(f,n) UBYTE_TO_FLOAT( PTR_ELT(f,n) )
199 #define TRX_UB(ub, f,n) ub = PTR_ELT(f,n)
200 #define TRX_US(us, f,n) us = PTR_ELT(f,n)
201 #define TRX_UI(f,n) (GLuint)PTR_ELT(f,n)
203 /* 4ub->4ub handled in special case below.
206 #define INIT init_trans_4_GLubyte_elt
207 #define DEST_4F trans_4_GLubyte_4f_elt
208 #define DEST_4US trans_4_GLubyte_4us_elt
209 #include "math/m_trans_tmp.h"
212 #define INIT init_trans_3_GLubyte_elt
213 #define DEST_4F trans_3_GLubyte_4f_elt
214 #define DEST_3F trans_3_GLubyte_3f_elt
215 #define DEST_4UB trans_3_GLubyte_4ub_elt
216 #define DEST_4US trans_3_GLubyte_4us_elt
217 #include "math/m_trans_tmp.h"
221 #define INIT init_trans_1_GLubyte_elt
222 #define DEST_1UI trans_1_GLubyte_1ui_elt
223 #define DEST_1UB trans_1_GLubyte_1ub_elt
224 #include "math/m_trans_tmp.h"
238 #define SRC_IDX TYPE_IDX(GL_SHORT)
239 #define TRX_3F(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
240 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
241 #define TRX_UB(ub, f,n) ub = SHORT_TO_UBYTE(PTR_ELT(f,n))
242 #define TRX_US(us, f,n) us = SHORT_TO_USHORT(PTR_ELT(f,n))
243 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
247 #define INIT init_trans_4_GLshort_elt
248 #define DEST_4F trans_4_GLshort_4f_elt
249 #define DEST_4UB trans_4_GLshort_4ub_elt
250 #define DEST_4US trans_4_GLshort_4us_elt
251 #include "math/m_trans_tmp.h"
254 #define INIT init_trans_3_GLshort_elt
255 #define DEST_4F trans_3_GLshort_4f_elt
256 #define DEST_4UB trans_3_GLshort_4ub_elt
257 #define DEST_4US trans_3_GLshort_4us_elt
258 #define DEST_3F trans_3_GLshort_3f_elt
259 #include "math/m_trans_tmp.h"
262 #define INIT init_trans_2_GLshort_elt
263 #define DEST_4F trans_2_GLshort_4f_elt
264 #include "math/m_trans_tmp.h"
267 #define INIT init_trans_1_GLshort_elt
268 #define DEST_4F trans_1_GLshort_4f_elt
269 #define DEST_1UB trans_1_GLshort_1ub_elt
270 #define DEST_1UI trans_1_GLshort_1ui_elt
271 #include "math/m_trans_tmp.h"
286 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_SHORT)
287 #define TRX_3F(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
288 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
289 #define TRX_UB(ub,f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 8)
290 #define TRX_US(us,f,n) us = PTR_ELT(f,n)
291 #define TRX_UI(f,n) (GLuint) PTR_ELT(f,n)
295 #define INIT init_trans_4_GLushort_elt
296 #define DEST_4F trans_4_GLushort_4f_elt
297 #define DEST_4UB trans_4_GLushort_4ub_elt
298 #define DEST_4US trans_4_GLushort_4us_elt
299 #include "math/m_trans_tmp.h"
302 #define INIT init_trans_3_GLushort_elt
303 #define DEST_4F trans_3_GLushort_4f_elt
304 #define DEST_4UB trans_3_GLushort_4ub_elt
305 #define DEST_4US trans_3_GLushort_4us_elt
306 #define DEST_3F trans_3_GLushort_3f_elt
307 #include "math/m_trans_tmp.h"
310 #define INIT init_trans_2_GLushort_elt
311 #define DEST_4F trans_2_GLushort_4f_elt
312 #include "math/m_trans_tmp.h"
315 #define INIT init_trans_1_GLushort_elt
316 #define DEST_4F trans_1_GLushort_4f_elt
317 #define DEST_1UB trans_1_GLushort_1ub_elt
318 #define DEST_1UI trans_1_GLushort_1ui_elt
319 #include "math/m_trans_tmp.h"
333 #define SRC_IDX TYPE_IDX(GL_INT)
334 #define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
335 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
336 #define TRX_UB(ub, f,n) ub = INT_TO_UBYTE(PTR_ELT(f,n))
337 #define TRX_US(us, f,n) us = INT_TO_USHORT(PTR_ELT(f,n))
338 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
342 #define INIT init_trans_4_GLint_elt
343 #define DEST_4F trans_4_GLint_4f_elt
344 #define DEST_4UB trans_4_GLint_4ub_elt
345 #define DEST_4US trans_4_GLint_4us_elt
346 #include "math/m_trans_tmp.h"
349 #define INIT init_trans_3_GLint_elt
350 #define DEST_4F trans_3_GLint_4f_elt
351 #define DEST_4UB trans_3_GLint_4ub_elt
352 #define DEST_4US trans_3_GLint_4us_elt
353 #define DEST_3F trans_3_GLint_3f_elt
354 #include "math/m_trans_tmp.h"
357 #define INIT init_trans_2_GLint_elt
358 #define DEST_4F trans_2_GLint_4f_elt
359 #include "math/m_trans_tmp.h"
362 #define INIT init_trans_1_GLint_elt
363 #define DEST_4F trans_1_GLint_4f_elt
364 #define DEST_1UB trans_1_GLint_1ub_elt
365 #define DEST_1UI trans_1_GLint_1ui_elt
366 #include "math/m_trans_tmp.h"
381 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_INT)
382 #define TRX_3F(f,n) UINT_TO_FLOAT( PTR_ELT(f,n) )
383 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
384 #define TRX_UB(ub, f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 24)
385 #define TRX_US(us, f,n) us = (GLushort) (PTR_ELT(f,n) >> 16)
386 #define TRX_UI(f,n) PTR_ELT(f,n)
390 #define INIT init_trans_4_GLuint_elt
391 #define DEST_4F trans_4_GLuint_4f_elt
392 #define DEST_4UB trans_4_GLuint_4ub_elt
393 #define DEST_4US trans_4_GLuint_4us_elt
394 #include "math/m_trans_tmp.h"
397 #define INIT init_trans_3_GLuint_elt
398 #define DEST_4F trans_3_GLuint_4f_elt
399 #define DEST_4UB trans_3_GLuint_4ub_elt
400 #define DEST_4US trans_3_GLuint_4us_elt
401 #define DEST_3F trans_3_GLuint_3f_elt
402 #include "math/m_trans_tmp.h"
405 #define INIT init_trans_2_GLuint_elt
406 #define DEST_4F trans_2_GLuint_4f_elt
407 #include "math/m_trans_tmp.h"
410 #define INIT init_trans_1_GLuint_elt
411 #define DEST_4F trans_1_GLuint_4f_elt
412 #define DEST_1UB trans_1_GLuint_1ub_elt
413 #define DEST_1UI trans_1_GLuint_1ui_elt
414 #include "math/m_trans_tmp.h"
428 #define SRC_IDX TYPE_IDX(GL_DOUBLE)
429 #define TRX_3F(f,n) (GLfloat) PTR_ELT(f,n)
430 #define TRX_4F(f,n) (GLfloat) PTR_ELT(f,n)
431 #define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n))
432 #define TRX_US(us,f,n) UNCLAMPED_FLOAT_TO_USHORT(us, PTR_ELT(f,n))
433 #define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n)
434 #define TRX_1F(f,n) (GLfloat) PTR_ELT(f,n)
438 #define INIT init_trans_4_GLdouble_elt
439 #define DEST_4F trans_4_GLdouble_4f_elt
440 #define DEST_4UB trans_4_GLdouble_4ub_elt
441 #define DEST_4US trans_4_GLdouble_4us_elt
442 #include "math/m_trans_tmp.h"
445 #define INIT init_trans_3_GLdouble_elt
446 #define DEST_4F trans_3_GLdouble_4f_elt
447 #define DEST_4UB trans_3_GLdouble_4ub_elt
448 #define DEST_4US trans_3_GLdouble_4us_elt
449 #define DEST_3F trans_3_GLdouble_3f_elt
450 #include "math/m_trans_tmp.h"
453 #define INIT init_trans_2_GLdouble_elt
454 #define DEST_4F trans_2_GLdouble_4f_elt
455 #include "math/m_trans_tmp.h"
458 #define INIT init_trans_1_GLdouble_elt
459 #define DEST_4F trans_1_GLdouble_4f_elt
460 #define DEST_1UB trans_1_GLdouble_1ub_elt
461 #define DEST_1UI trans_1_GLdouble_1ui_elt
462 #define DEST_1F trans_1_GLdouble_1f_elt
463 #include "math/m_trans_tmp.h"
471 #define SRC_IDX TYPE_IDX(GL_FLOAT)
473 #define INIT init_trans_4_GLfloat_elt
474 #define DEST_4UB trans_4_GLfloat_4ub_elt
475 #define DEST_4US trans_4_GLfloat_4us_elt
476 #define DEST_4F trans_4_GLfloat_4f_elt
477 #include "math/m_trans_tmp.h"
480 #define INIT init_trans_3_GLfloat_elt
481 #define DEST_4F trans_3_GLfloat_4f_elt
482 #define DEST_4UB trans_3_GLfloat_4ub_elt
483 #define DEST_4US trans_3_GLfloat_4us_elt
484 #define DEST_3F trans_3_GLfloat_3f_elt
485 #include "math/m_trans_tmp.h"
488 #define INIT init_trans_2_GLfloat_elt
489 #define DEST_4F trans_2_GLfloat_4f_elt
490 #include "math/m_trans_tmp.h"
493 #define INIT init_trans_1_GLfloat_elt
494 #define DEST_4F trans_1_GLfloat_3f_elt
495 #define DEST_1UB trans_1_GLfloat_1ub_elt
496 #define DEST_1UI trans_1_GLfloat_1ui_elt
497 #define DEST_1F trans_1_GLfloat_1f_elt
498 #include "math/m_trans_tmp.h"
509 static void trans_4_GLubyte_4ub(GLubyte (*t
)[4],
514 const GLubyte
*f
= (GLubyte
*) Ptr
+ SRC_START
* stride
;
515 const GLubyte
*first
= f
;
518 if (((((long) f
| (long) stride
)) & 3L) == 0L) {
521 for (i
= DST_START
; i
< n
; i
++, NEXT_F
) {
524 COPY_4UBV( t
[i
], f
);
528 for (i
= DST_START
; i
< n
; i
++, NEXT_F
) {
541 static void init_translate_elt(void)
543 MEMSET( TAB(_1ui
), 0, sizeof(TAB(_1ui
)) );
544 MEMSET( TAB(_1ub
), 0, sizeof(TAB(_1ub
)) );
545 MEMSET( TAB(_3f
), 0, sizeof(TAB(_3f
)) );
546 MEMSET( TAB(_4ub
), 0, sizeof(TAB(_4ub
)) );
547 MEMSET( TAB(_4us
), 0, sizeof(TAB(_4us
)) );
548 MEMSET( TAB(_4f
), 0, sizeof(TAB(_4f
)) );
550 TAB(_4ub
)[4][TYPE_IDX(GL_UNSIGNED_BYTE
)] = trans_4_GLubyte_4ub
;
552 init_trans_4_GLbyte_elt();
553 init_trans_3_GLbyte_elt();
554 init_trans_2_GLbyte_elt();
555 init_trans_1_GLbyte_elt();
556 init_trans_1_GLubyte_elt();
557 init_trans_3_GLubyte_elt();
558 init_trans_4_GLubyte_elt();
559 init_trans_4_GLshort_elt();
560 init_trans_3_GLshort_elt();
561 init_trans_2_GLshort_elt();
562 init_trans_1_GLshort_elt();
563 init_trans_4_GLushort_elt();
564 init_trans_3_GLushort_elt();
565 init_trans_2_GLushort_elt();
566 init_trans_1_GLushort_elt();
567 init_trans_4_GLint_elt();
568 init_trans_3_GLint_elt();
569 init_trans_2_GLint_elt();
570 init_trans_1_GLint_elt();
571 init_trans_4_GLuint_elt();
572 init_trans_3_GLuint_elt();
573 init_trans_2_GLuint_elt();
574 init_trans_1_GLuint_elt();
575 init_trans_4_GLdouble_elt();
576 init_trans_3_GLdouble_elt();
577 init_trans_2_GLdouble_elt();
578 init_trans_1_GLdouble_elt();
579 init_trans_4_GLfloat_elt();
580 init_trans_3_GLfloat_elt();
581 init_trans_2_GLfloat_elt();
582 init_trans_1_GLfloat_elt();
595 void _tnl_imm_elt_init( void )
597 init_translate_elt();
602 static void _tnl_trans_elt_1f(GLfloat
*to
,
603 const struct gl_client_array
*from
,
610 _tnl_trans_elt_1f_tab
[TYPE_IDX(from
->Type
)]( to
,
622 static void _tnl_trans_elt_1ui(GLuint
*to
,
623 const struct gl_client_array
*from
,
630 _tnl_trans_elt_1ui_tab
[TYPE_IDX(from
->Type
)]( to
,
642 static void _tnl_trans_elt_1ub(GLubyte
*to
,
643 const struct gl_client_array
*from
,
650 _tnl_trans_elt_1ub_tab
[TYPE_IDX(from
->Type
)]( to
,
663 static void _tnl_trans_elt_4ub(GLubyte (*to
)[4],
664 const struct gl_client_array
*from
,
671 _tnl_trans_elt_4ub_tab
[from
->Size
][TYPE_IDX(from
->Type
)]( to
,
684 static void _tnl_trans_elt_4us(GLushort (*to
)[4],
685 const struct gl_client_array
*from
,
692 _tnl_trans_elt_4us_tab
[from
->Size
][TYPE_IDX(from
->Type
)]( to
,
704 static void _tnl_trans_elt_4f(GLfloat (*to
)[4],
705 const struct gl_client_array
*from
,
712 _tnl_trans_elt_4f_tab
[from
->Size
][TYPE_IDX(from
->Type
)]( to
,
726 static void _tnl_trans_elt_3f(GLfloat (*to
)[3],
727 const struct gl_client_array
*from
,
734 _tnl_trans_elt_3f_tab
[TYPE_IDX(from
->Type
)]( to
,
747 /* Batch function to translate away all the array elements in the
748 * input buffer prior to transform. Done only the first time a vertex
749 * buffer is executed or compiled.
751 * KW: Have to do this after each glEnd if arrays aren't locked.
753 void _tnl_translate_array_elts( GLcontext
*ctx
, struct immediate
*IM
,
754 GLuint start
, GLuint count
)
756 GLuint
*flags
= IM
->Flag
;
757 GLuint
*elts
= IM
->Elt
;
758 GLuint translate
= ctx
->Array
._Enabled
;
761 if (MESA_VERBOSE
& VERBOSE_IMMEDIATE
)
762 _mesa_debug(ctx
, "exec_array_elements %d .. %d\n", start
, count
);
764 if (translate
& VERT_BIT_POS
) {
765 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_POS
],
767 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_POS
),
770 if (ctx
->Array
.Vertex
.Size
== 4)
771 translate
|= VERT_BITS_OBJ_234
;
772 else if (ctx
->Array
.Vertex
.Size
== 3)
773 translate
|= VERT_BITS_OBJ_23
;
777 if (translate
& VERT_BIT_NORMAL
)
778 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_NORMAL
],
780 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_NORMAL
),
783 if (translate
& VERT_BIT_EDGEFLAG
)
784 _tnl_trans_elt_1ub( IM
->EdgeFlag
,
785 &ctx
->Array
.EdgeFlag
,
786 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_EDGEFLAG
),
789 if (translate
& VERT_BIT_COLOR0
) {
790 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_COLOR0
],
792 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_COLOR0
),
796 if (translate
& VERT_BIT_COLOR1
) {
797 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_COLOR1
],
798 &ctx
->Array
.SecondaryColor
,
799 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_COLOR1
),
803 if (translate
& VERT_BIT_FOG
)
804 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_FOG
],
805 &ctx
->Array
.FogCoord
,
806 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_FOG
),
809 if (translate
& VERT_BIT_INDEX
)
810 _tnl_trans_elt_1ui( IM
->Index
,
812 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_INDEX
),
815 if (translate
& VERT_BITS_TEX_ANY
) {
816 for (i
= 0 ; i
< ctx
->Const
.MaxTextureUnits
; i
++)
817 if (translate
& VERT_BIT_TEX(i
)) {
818 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_TEX0
+ i
],
819 &ctx
->Array
.TexCoord
[i
],
820 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_TEX(i
)),
823 if (ctx
->Array
.TexCoord
[i
].Size
== 4)
824 IM
->TexSize
|= TEX_SIZE_4(i
);
825 else if (ctx
->Array
.TexCoord
[i
].Size
== 3)
826 IM
->TexSize
|= TEX_SIZE_3(i
);
830 for (i
= start
; i
< count
; i
++)
831 if (flags
[i
] & VERT_BIT_ELT
) flags
[i
] |= translate
;