2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * Keith Whitwell <keith@tungstengraphics.com>
34 #include "math/m_translate.h"
36 #include "t_context.h"
37 #include "t_imm_elt.h"
41 typedef void (*trans_elt_1ui_func
)(GLuint
*to
,
50 typedef void (*trans_elt_1ub_func
)(GLubyte
*to
,
59 typedef void (*trans_elt_4f_func
)(GLfloat (*to
)[4],
70 static trans_elt_1ui_func _tnl_trans_elt_1ui_tab
[MAX_TYPES
];
71 static trans_elt_1ub_func _tnl_trans_elt_1ub_tab
[MAX_TYPES
];
72 static trans_elt_4f_func _tnl_trans_elt_4f_tab
[5][MAX_TYPES
];
73 static trans_elt_4f_func _tnl_trans_elt_4fc_tab
[5][MAX_TYPES
];
76 #define PTR_ELT(ptr, elt) (((SRC *)ptr)[elt])
80 /* Code specific to array element implementation. There is a small
81 * subtlety in the bits CHECK() tests, and the way bits are set in
82 * glArrayElement which ensures that if, eg, in the case that the
83 * vertex array is disabled and normal array is enabled, and we get
86 * ArrayElement() OR Normal()
87 * Normal() ArrayElement()
90 * That the correct value for normal is used.
92 #define TAB(x) _tnl_trans_elt##x##_tab
93 #define ARGS const GLuint *flags, const GLuint *elts, GLuint match, \
94 GLuint start, GLuint n
96 #define DST_START start
97 #define CHECK if ((flags[i]&match) == VERT_BIT_ELT)
98 #define NEXT_F (void)1
99 #define NEXT_F2 f = first + elts[i] * stride;
105 #define SRC_IDX TYPE_IDX(GL_BYTE)
106 #define TRX_4F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
107 #define TRX_4FC(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
108 #define TRX_UB(ub, f,n) ub = BYTE_TO_UBYTE( PTR_ELT(f,n) )
109 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
113 #define INIT init_trans_4_GLbyte_elt
114 #define DEST_4F trans_4_GLbyte_4f_elt
115 #define DEST_4FC trans_4_GLbyte_4fc_elt
116 #include "math/m_trans_tmp.h"
119 #define INIT init_trans_3_GLbyte_elt
120 #define DEST_4F trans_3_GLbyte_4f_elt
121 #define DEST_4FC trans_3_GLbyte_4fc_elt
122 #include "math/m_trans_tmp.h"
125 #define INIT init_trans_2_GLbyte_elt
126 #define DEST_4F trans_2_GLbyte_4f_elt
127 #define DEST_4FC trans_2_GLbyte_4fc_elt
128 #include "math/m_trans_tmp.h"
131 #define INIT init_trans_1_GLbyte_elt
132 #define DEST_4F trans_1_GLbyte_4f_elt
133 #define DEST_4FC trans_1_GLbyte_4fc_elt
134 #define DEST_1UB trans_1_GLbyte_1ub_elt
135 #define DEST_1UI trans_1_GLbyte_1ui_elt
136 #include "math/m_trans_tmp.h"
148 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_BYTE)
149 #define TRX_4F(f,n) UBYTE_TO_FLOAT( PTR_ELT(f,n) )
150 #define TRX_4FC(f,n) UBYTE_TO_FLOAT( PTR_ELT(f,n) )
151 #define TRX_UB(ub, f,n) ub = PTR_ELT(f,n)
152 #define TRX_UI(f,n) (GLuint)PTR_ELT(f,n)
154 /* 4ub->4ub handled in special case below.
157 #define INIT init_trans_4_GLubyte_elt
158 #define DEST_4F trans_4_GLubyte_4f_elt
159 #define DEST_4FC trans_4_GLubyte_4fc_elt
160 #include "math/m_trans_tmp.h"
163 #define INIT init_trans_3_GLubyte_elt
164 #define DEST_4F trans_3_GLubyte_4f_elt
165 #define DEST_4FC trans_3_GLubyte_4fc_elt
166 #include "math/m_trans_tmp.h"
170 #define INIT init_trans_1_GLubyte_elt
171 #define DEST_4F trans_1_GLubyte_4f_elt
172 #define DEST_4FC trans_1_GLubyte_4fc_elt
173 #define DEST_1UB trans_1_GLubyte_1ub_elt
174 #define DEST_1UI trans_1_GLubyte_1ui_elt
175 #include "math/m_trans_tmp.h"
188 #define SRC_IDX TYPE_IDX(GL_SHORT)
189 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
190 #define TRX_4FC(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
191 #define TRX_UB(ub, f,n) ub = SHORT_TO_UBYTE(PTR_ELT(f,n))
192 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
196 #define INIT init_trans_4_GLshort_elt
197 #define DEST_4F trans_4_GLshort_4f_elt
198 #define DEST_4FC trans_4_GLshort_4fc_elt
199 #include "math/m_trans_tmp.h"
202 #define INIT init_trans_3_GLshort_elt
203 #define DEST_4F trans_3_GLshort_4f_elt
204 #define DEST_4FC trans_3_GLshort_4fc_elt
205 #include "math/m_trans_tmp.h"
208 #define INIT init_trans_2_GLshort_elt
209 #define DEST_4F trans_2_GLshort_4f_elt
210 #define DEST_4FC trans_2_GLshort_4fc_elt
211 #include "math/m_trans_tmp.h"
214 #define INIT init_trans_1_GLshort_elt
215 #define DEST_4F trans_1_GLshort_4f_elt
216 #define DEST_4FC trans_1_GLshort_4fc_elt
217 #define DEST_1UB trans_1_GLshort_1ub_elt
218 #define DEST_1UI trans_1_GLshort_1ui_elt
219 #include "math/m_trans_tmp.h"
233 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_SHORT)
234 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
235 #define TRX_4FC(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
236 #define TRX_UB(ub,f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 8)
237 #define TRX_UI(f,n) (GLuint) PTR_ELT(f,n)
241 #define INIT init_trans_4_GLushort_elt
242 #define DEST_4F trans_4_GLushort_4f_elt
243 #define DEST_4FC trans_4_GLushort_4fc_elt
244 #include "math/m_trans_tmp.h"
247 #define INIT init_trans_3_GLushort_elt
248 #define DEST_4F trans_3_GLushort_4f_elt
249 #define DEST_4FC trans_3_GLushort_4fc_elt
250 #include "math/m_trans_tmp.h"
253 #define INIT init_trans_2_GLushort_elt
254 #define DEST_4F trans_2_GLushort_4f_elt
255 #define DEST_4FC trans_2_GLushort_4fc_elt
256 #include "math/m_trans_tmp.h"
259 #define INIT init_trans_1_GLushort_elt
260 #define DEST_4F trans_1_GLushort_4f_elt
261 #define DEST_4FC trans_1_GLushort_4fc_elt
262 #define DEST_1UB trans_1_GLushort_1ub_elt
263 #define DEST_1UI trans_1_GLushort_1ui_elt
264 #include "math/m_trans_tmp.h"
277 #define SRC_IDX TYPE_IDX(GL_INT)
278 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
279 #define TRX_4FC(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
280 #define TRX_UB(ub, f,n) ub = INT_TO_UBYTE(PTR_ELT(f,n))
281 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
285 #define INIT init_trans_4_GLint_elt
286 #define DEST_4F trans_4_GLint_4f_elt
287 #define DEST_4FC trans_4_GLint_4fc_elt
288 #include "math/m_trans_tmp.h"
291 #define INIT init_trans_3_GLint_elt
292 #define DEST_4F trans_3_GLint_4f_elt
293 #define DEST_4FC trans_3_GLint_4fc_elt
294 #include "math/m_trans_tmp.h"
297 #define INIT init_trans_2_GLint_elt
298 #define DEST_4F trans_2_GLint_4f_elt
299 #define DEST_4FC trans_2_GLint_4fc_elt
300 #include "math/m_trans_tmp.h"
303 #define INIT init_trans_1_GLint_elt
304 #define DEST_4F trans_1_GLint_4f_elt
305 #define DEST_4FC trans_1_GLint_4fc_elt
306 #define DEST_1UB trans_1_GLint_1ub_elt
307 #define DEST_1UI trans_1_GLint_1ui_elt
308 #include "math/m_trans_tmp.h"
322 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_INT)
323 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
324 #define TRX_4FC(f,n) UINT_TO_FLOAT( PTR_ELT(f,n) )
325 #define TRX_UB(ub, f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 24)
326 #define TRX_UI(f,n) PTR_ELT(f,n)
330 #define INIT init_trans_4_GLuint_elt
331 #define DEST_4F trans_4_GLuint_4f_elt
332 #define DEST_4FC trans_4_GLuint_4fc_elt
333 #include "math/m_trans_tmp.h"
336 #define INIT init_trans_3_GLuint_elt
337 #define DEST_4F trans_3_GLuint_4f_elt
338 #define DEST_4FC trans_3_GLuint_4fc_elt
339 #include "math/m_trans_tmp.h"
342 #define INIT init_trans_2_GLuint_elt
343 #define DEST_4F trans_2_GLuint_4f_elt
344 #define DEST_4FC trans_2_GLuint_4fc_elt
345 #include "math/m_trans_tmp.h"
348 #define INIT init_trans_1_GLuint_elt
349 #define DEST_4F trans_1_GLuint_4f_elt
350 #define DEST_4FC trans_1_GLuint_4fc_elt
351 #define DEST_1UB trans_1_GLuint_1ub_elt
352 #define DEST_1UI trans_1_GLuint_1ui_elt
353 #include "math/m_trans_tmp.h"
366 #define SRC_IDX TYPE_IDX(GL_DOUBLE)
367 #define TRX_4F(f,n) (GLfloat) PTR_ELT(f,n)
368 #define TRX_4FC(f,n) (GLfloat) PTR_ELT(f,n)
369 #define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n))
370 #define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n)
371 #define TRX_1F(f,n) (GLfloat) PTR_ELT(f,n)
375 #define INIT init_trans_4_GLdouble_elt
376 #define DEST_4F trans_4_GLdouble_4f_elt
377 #define DEST_4FC trans_4_GLdouble_4fc_elt
378 #include "math/m_trans_tmp.h"
381 #define INIT init_trans_3_GLdouble_elt
382 #define DEST_4F trans_3_GLdouble_4f_elt
383 #define DEST_4FC trans_3_GLdouble_4fc_elt
384 #include "math/m_trans_tmp.h"
387 #define INIT init_trans_2_GLdouble_elt
388 #define DEST_4F trans_2_GLdouble_4f_elt
389 #define DEST_4FC trans_2_GLdouble_4fc_elt
390 #include "math/m_trans_tmp.h"
393 #define INIT init_trans_1_GLdouble_elt
394 #define DEST_4F trans_1_GLdouble_4f_elt
395 #define DEST_4FC trans_1_GLdouble_4fc_elt
396 #define DEST_1UB trans_1_GLdouble_1ub_elt
397 #define DEST_1UI trans_1_GLdouble_1ui_elt
398 #include "math/m_trans_tmp.h"
410 #define SRC_IDX TYPE_IDX(GL_FLOAT)
411 #define TRX_4F(f,n) (GLfloat) PTR_ELT(f,n)
412 #define TRX_4FC(f,n) (GLfloat) PTR_ELT(f,n)
413 #define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n))
414 #define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n)
415 #define TRX_1F(f,n) (GLfloat) PTR_ELT(f,n)
419 #define INIT init_trans_4_GLfloat_elt
420 #define DEST_4F trans_4_GLfloat_4f_elt
421 #define DEST_4FC trans_4_GLfloat_4fc_elt
422 #include "math/m_trans_tmp.h"
425 #define INIT init_trans_3_GLfloat_elt
426 #define DEST_4F trans_3_GLfloat_4f_elt
427 #define DEST_4FC trans_3_GLfloat_4fc_elt
428 #include "math/m_trans_tmp.h"
431 #define INIT init_trans_2_GLfloat_elt
432 #define DEST_4F trans_2_GLfloat_4f_elt
433 #define DEST_4FC trans_2_GLfloat_4fc_elt
434 #include "math/m_trans_tmp.h"
437 #define INIT init_trans_1_GLfloat_elt
438 #define DEST_4F trans_1_GLfloat_4f_elt
439 #define DEST_4FC trans_1_GLfloat_4fc_elt
440 #define DEST_1UB trans_1_GLfloat_1ub_elt
441 #define DEST_1UI trans_1_GLfloat_1ui_elt
442 #include "math/m_trans_tmp.h"
454 static void init_translate_elt(void)
456 MEMSET( TAB(_1ui
), 0, sizeof(TAB(_1ui
)) );
457 MEMSET( TAB(_1ub
), 0, sizeof(TAB(_1ub
)) );
458 MEMSET( TAB(_4f
), 0, sizeof(TAB(_4f
)) );
459 MEMSET( TAB(_4fc
), 0, sizeof(TAB(_4fc
)) );
461 init_trans_4_GLbyte_elt();
462 init_trans_3_GLbyte_elt();
463 init_trans_2_GLbyte_elt();
464 init_trans_1_GLbyte_elt();
465 init_trans_1_GLubyte_elt();
466 init_trans_3_GLubyte_elt();
467 init_trans_4_GLubyte_elt();
468 init_trans_4_GLshort_elt();
469 init_trans_3_GLshort_elt();
470 init_trans_2_GLshort_elt();
471 init_trans_1_GLshort_elt();
472 init_trans_4_GLushort_elt();
473 init_trans_3_GLushort_elt();
474 init_trans_2_GLushort_elt();
475 init_trans_1_GLushort_elt();
476 init_trans_4_GLint_elt();
477 init_trans_3_GLint_elt();
478 init_trans_2_GLint_elt();
479 init_trans_1_GLint_elt();
480 init_trans_4_GLuint_elt();
481 init_trans_3_GLuint_elt();
482 init_trans_2_GLuint_elt();
483 init_trans_1_GLuint_elt();
484 init_trans_4_GLdouble_elt();
485 init_trans_3_GLdouble_elt();
486 init_trans_2_GLdouble_elt();
487 init_trans_1_GLdouble_elt();
488 init_trans_4_GLfloat_elt();
489 init_trans_3_GLfloat_elt();
490 init_trans_2_GLfloat_elt();
491 init_trans_1_GLfloat_elt();
505 void _tnl_imm_elt_init( void )
507 init_translate_elt();
511 static void _tnl_trans_elt_1ui(GLuint
*to
,
512 const struct gl_client_array
*from
,
519 const GLubyte
*fromData
= ADD_POINTERS( from
->Ptr
, from
->BufferObj
->Data
);
520 _tnl_trans_elt_1ui_tab
[TYPE_IDX(from
->Type
)]( to
,
532 static void _tnl_trans_elt_1ub(GLubyte
*to
,
533 const struct gl_client_array
*from
,
540 const GLubyte
*fromData
= ADD_POINTERS( from
->Ptr
, from
->BufferObj
->Data
);
541 _tnl_trans_elt_1ub_tab
[TYPE_IDX(from
->Type
)]( to
,
552 static void _tnl_trans_elt_4f(GLfloat (*to
)[4],
553 const struct gl_client_array
*from
,
560 const GLubyte
*fromData
= ADD_POINTERS( from
->Ptr
, from
->BufferObj
->Data
);
561 _tnl_trans_elt_4f_tab
[from
->Size
][TYPE_IDX(from
->Type
)]( to
,
573 static void _tnl_trans_elt_4fc(GLfloat (*to
)[4],
574 const struct gl_client_array
*from
,
581 const GLubyte
*fromData
= ADD_POINTERS( from
->Ptr
, from
->BufferObj
->Data
);
582 _tnl_trans_elt_4fc_tab
[from
->Size
][TYPE_IDX(from
->Type
)]( to
,
596 /* Batch function to translate away all the array elements in the
597 * input buffer prior to transform. Done only the first time a vertex
598 * buffer is executed or compiled.
600 * KW: Have to do this after each glEnd if arrays aren't locked.
602 void _tnl_translate_array_elts( GLcontext
*ctx
, struct immediate
*IM
,
603 GLuint start
, GLuint count
)
605 GLuint
*flags
= IM
->Flag
;
606 const GLuint
*elts
= IM
->Elt
;
607 GLuint translate
= ctx
->Array
._Enabled
;
608 GLuint translateConventional
;
611 if (MESA_VERBOSE
& VERBOSE_IMMEDIATE
)
612 _mesa_debug(ctx
, "exec_array_elements %d .. %d\n", start
, count
);
614 /* XXX It would be nice to replace this code with a loop over the vertex
615 * attributes but there's a fair number of special cases.
618 /* Allocate destination attribute arrays if needed */
619 ASSERT(IM
->Attrib
[VERT_ATTRIB_POS
]);
620 for (attr
= 1; attr
< VERT_ATTRIB_MAX
; attr
++) {
621 if ((translate
& (1 << attr
)) && !IM
->Attrib
[attr
]) {
622 IM
->Attrib
[attr
] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE
* 4 * sizeof(GLfloat
));
623 if (!IM
->Attrib
[attr
]) {
624 _mesa_error(ctx
, GL_OUT_OF_MEMORY
, "vertex processing2");
630 translateConventional
= translate
;
633 * When vertex program mode is enabled, the generic vertex attribute arrays
634 * have priority over the conventional arrays. Process those arrays now.
635 * When we're done here, translateConventional will indicate which
636 * conventional arrays still have to be translated when we're done.
638 if (ctx
->VertexProgram
.Enabled
) {
639 for (attr
= 0; attr
< VERT_ATTRIB_MAX
; attr
++) {
640 const GLuint attrBit
= 1 << attr
;
641 if ((translate
& attrBit
) && ctx
->Array
.VertexAttrib
[attr
].Enabled
) {
642 _tnl_trans_elt_4f( IM
->Attrib
[attr
],
643 &ctx
->Array
.VertexAttrib
[attr
],
644 flags
, elts
, (VERT_BIT_ELT
| attrBit
),
646 /* special case stuff */
647 if (attr
== VERT_ATTRIB_POS
) {
648 if (ctx
->Array
.VertexAttrib
[VERT_ATTRIB_POS
].Size
== 4)
649 translate
|= VERT_BITS_OBJ_234
;
650 else if (ctx
->Array
.VertexAttrib
[VERT_ATTRIB_POS
].Size
== 3)
651 translate
|= VERT_BITS_OBJ_23
;
653 else if (attr
>= VERT_ATTRIB_TEX0
&& attr
<= VERT_ATTRIB_TEX7
) {
654 if (ctx
->Array
.VertexAttrib
[attr
].Size
== 4)
655 IM
->TexSize
|= TEX_SIZE_4(attr
- VERT_ATTRIB_TEX0
);
656 else if (ctx
->Array
.VertexAttrib
[attr
].Size
== 3)
657 IM
->TexSize
|= TEX_SIZE_3(attr
- VERT_ATTRIB_TEX0
);
659 /* override the conventional array */
660 translateConventional
&= ~attrBit
;
666 * Check which conventional arrays are needed.
668 if (translateConventional
& VERT_BIT_POS
) {
669 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_POS
],
671 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_POS
),
674 if (ctx
->Array
.Vertex
.Size
== 4)
675 translate
|= VERT_BITS_OBJ_234
;
676 else if (ctx
->Array
.Vertex
.Size
== 3)
677 translate
|= VERT_BITS_OBJ_23
;
680 if (translateConventional
& VERT_BIT_NORMAL
) {
681 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_NORMAL
],
683 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_NORMAL
),
687 if (translateConventional
& VERT_BIT_COLOR0
) {
688 _tnl_trans_elt_4fc( IM
->Attrib
[VERT_ATTRIB_COLOR0
],
690 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_COLOR0
),
694 if (translateConventional
& VERT_BIT_COLOR1
) {
695 _tnl_trans_elt_4fc( IM
->Attrib
[VERT_ATTRIB_COLOR1
],
696 &ctx
->Array
.SecondaryColor
,
697 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_COLOR1
),
701 if (translateConventional
& VERT_BIT_FOG
) {
702 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_FOG
],
703 &ctx
->Array
.FogCoord
,
704 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_FOG
),
708 if (translateConventional
& VERT_BITS_TEX_ANY
) {
710 for (i
= 0 ; i
< ctx
->Const
.MaxTextureCoordUnits
; i
++)
711 if (translateConventional
& VERT_BIT_TEX(i
)) {
712 _tnl_trans_elt_4f( IM
->Attrib
[VERT_ATTRIB_TEX0
+ i
],
713 &ctx
->Array
.TexCoord
[i
],
714 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_TEX(i
)),
717 if (ctx
->Array
.TexCoord
[i
].Size
== 4)
718 IM
->TexSize
|= TEX_SIZE_4(i
);
719 else if (ctx
->Array
.TexCoord
[i
].Size
== 3)
720 IM
->TexSize
|= TEX_SIZE_3(i
);
724 if (translate
& VERT_BIT_INDEX
)
725 _tnl_trans_elt_1ui( IM
->Index
,
727 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_INDEX
),
730 if (translate
& VERT_BIT_EDGEFLAG
)
731 _tnl_trans_elt_1ub( IM
->EdgeFlag
,
732 &ctx
->Array
.EdgeFlag
,
733 flags
, elts
, (VERT_BIT_ELT
|VERT_BIT_EDGEFLAG
),
738 for (i
= start
; i
< count
; i
++)
739 if (flags
[i
] & VERT_BIT_ELT
)
740 flags
[i
] |= translate
;