summaryrefslogtreecommitdiff
path: root/src/mesa/math
diff options
context:
space:
mode:
authorGareth Hughes <gareth@valinux.com>2001-03-30 14:44:43 +0000
committerGareth Hughes <gareth@valinux.com>2001-03-30 14:44:43 +0000
commit5e23af22f708a66695c0e44e599c26f02d8d4dcd (patch)
treec01158b3ff58369e296a395c91c2dd6be0a12071 /src/mesa/math
parentafc5699b08b7eb4d29f2872c308800f2ae43d6b0 (diff)
Remove all traces of CULL_MASK_ACTIVE.
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_copy_tmp.h50
-rw-r--r--src/mesa/math/m_debug_norm.c33
-rw-r--r--src/mesa/math/m_debug_util.h4
-rw-r--r--src/mesa/math/m_debug_xform.c29
-rw-r--r--src/mesa/math/m_dotprod_tmp.h51
-rw-r--r--src/mesa/math/m_norm_tmp.h237
-rw-r--r--src/mesa/math/m_xform.c76
-rw-r--r--src/mesa/math/m_xform.h35
-rw-r--r--src/mesa/math/m_xform_tmp.h472
9 files changed, 352 insertions, 635 deletions
diff --git a/src/mesa/math/m_copy_tmp.h b/src/mesa/math/m_copy_tmp.h
index 019f3276b9..ccde3f3c47 100644
--- a/src/mesa/math/m_copy_tmp.h
+++ b/src/mesa/math/m_copy_tmp.h
@@ -1,4 +1,4 @@
-/* $Id: m_copy_tmp.h,v 1.5 2001/03/12 02:02:36 gareth Exp $ */
+/* $Id: m_copy_tmp.h,v 1.6 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -30,24 +30,20 @@
#define COPY_FUNC( BITS ) \
-static void TAG2(copy, BITS)( GLvector4f *to, const GLvector4f *f, \
- const GLubyte mask[] ) \
+static void TAG2(copy, BITS)( GLvector4f *to, const GLvector4f *f ) \
{ \
GLfloat (*t)[4] = (GLfloat (*)[4])to->start; \
GLfloat *from = f->start; \
GLuint stride = f->stride; \
GLuint count = f->count; \
GLuint i; \
- (void) mask; \
\
if (BITS) \
STRIDE_LOOP { \
- CULL_CHECK { \
- if (BITS&1) t[i][0] = from[0]; \
- if (BITS&2) t[i][1] = from[1]; \
- if (BITS&4) t[i][2] = from[2]; \
- if (BITS&8) t[i][3] = from[3]; \
- } \
+ if (BITS&1) t[i][0] = from[0]; \
+ if (BITS&2) t[i][1] = from[1]; \
+ if (BITS&4) t[i][2] = from[2]; \
+ if (BITS&8) t[i][3] = from[3]; \
} \
}
@@ -70,22 +66,22 @@ COPY_FUNC( 0xd )
COPY_FUNC( 0xe )
COPY_FUNC( 0xf )
-static void TAG2(init_copy, 0 ) ( void )
+static void TAG2(init_copy, 0)( void )
{
- _mesa_copy_tab[IDX][0x0] = TAG2(copy, 0x0);
- _mesa_copy_tab[IDX][0x1] = TAG2(copy, 0x1);
- _mesa_copy_tab[IDX][0x2] = TAG2(copy, 0x2);
- _mesa_copy_tab[IDX][0x3] = TAG2(copy, 0x3);
- _mesa_copy_tab[IDX][0x4] = TAG2(copy, 0x4);
- _mesa_copy_tab[IDX][0x5] = TAG2(copy, 0x5);
- _mesa_copy_tab[IDX][0x6] = TAG2(copy, 0x6);
- _mesa_copy_tab[IDX][0x7] = TAG2(copy, 0x7);
- _mesa_copy_tab[IDX][0x8] = TAG2(copy, 0x8);
- _mesa_copy_tab[IDX][0x9] = TAG2(copy, 0x9);
- _mesa_copy_tab[IDX][0xa] = TAG2(copy, 0xa);
- _mesa_copy_tab[IDX][0xb] = TAG2(copy, 0xb);
- _mesa_copy_tab[IDX][0xc] = TAG2(copy, 0xc);
- _mesa_copy_tab[IDX][0xd] = TAG2(copy, 0xd);
- _mesa_copy_tab[IDX][0xe] = TAG2(copy, 0xe);
- _mesa_copy_tab[IDX][0xf] = TAG2(copy, 0xf);
+ _mesa_copy_tab[0x0] = TAG2(copy, 0x0);
+ _mesa_copy_tab[0x1] = TAG2(copy, 0x1);
+ _mesa_copy_tab[0x2] = TAG2(copy, 0x2);
+ _mesa_copy_tab[0x3] = TAG2(copy, 0x3);
+ _mesa_copy_tab[0x4] = TAG2(copy, 0x4);
+ _mesa_copy_tab[0x5] = TAG2(copy, 0x5);
+ _mesa_copy_tab[0x6] = TAG2(copy, 0x6);
+ _mesa_copy_tab[0x7] = TAG2(copy, 0x7);
+ _mesa_copy_tab[0x8] = TAG2(copy, 0x8);
+ _mesa_copy_tab[0x9] = TAG2(copy, 0x9);
+ _mesa_copy_tab[0xa] = TAG2(copy, 0xa);
+ _mesa_copy_tab[0xb] = TAG2(copy, 0xb);
+ _mesa_copy_tab[0xc] = TAG2(copy, 0xc);
+ _mesa_copy_tab[0xd] = TAG2(copy, 0xd);
+ _mesa_copy_tab[0xe] = TAG2(copy, 0xe);
+ _mesa_copy_tab[0xf] = TAG2(copy, 0xf);
}
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 45532475b3..f1b702f02c 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -1,4 +1,4 @@
-/* $Id: m_debug_norm.c,v 1.6 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: m_debug_norm.c,v 1.7 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -113,7 +113,7 @@ static char *norm_strings[8] = {
};
-/* ================================================================
+/* =============================================================
* Reference transformations
*/
@@ -121,7 +121,6 @@ static void ref_norm_transform_rescale( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -129,7 +128,6 @@ static void ref_norm_transform_rescale( const GLmatrix *mat,
const GLfloat *m = mat->inv;
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
- (void) mask;
(void) lengths;
for ( i = 0 ; i < in->count ; i++ ) {
@@ -146,7 +144,6 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -154,8 +151,6 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
const GLfloat *m = mat->inv;
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
- (void) mask;
-
for ( i = 0 ; i < in->count ; i++ ) {
GLfloat t[3];
@@ -182,7 +177,7 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
}
-/* ================================================================
+/* =============================================================
* Normal transformation tests
*/
@@ -268,20 +263,20 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
ref2->flags = 0;
if ( norm_normalize_types[mtype] == 0 ) {
- ref_norm_transform_rescale( mat, scale, source, NULL, NULL, ref );
+ ref_norm_transform_rescale( mat, scale, source, NULL, ref );
} else {
- ref_norm_transform_normalize( mat, scale, source, NULL, NULL, ref );
- ref_norm_transform_normalize( mat, scale, source, length, NULL, ref2 );
+ ref_norm_transform_normalize( mat, scale, source, NULL, ref );
+ ref_norm_transform_normalize( mat, scale, source, length, ref2 );
}
if ( mesa_profile ) {
BEGIN_RACE( *cycles );
- func( mat, scale, source, NULL, NULL, dest );
+ func( mat, scale, source, NULL, dest );
END_RACE( *cycles );
- func( mat, scale, source, length, NULL, dest2 );
+ func( mat, scale, source, length, dest2 );
} else {
- func( mat, scale, source, NULL, NULL, dest );
- func( mat, scale, source, length, NULL, dest2 );
+ func( mat, scale, source, NULL, dest );
+ func( mat, scale, source, length, dest2 );
}
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
@@ -327,7 +322,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
void _math_test_all_normal_transform_functions( char *description )
{
int mtype;
- long benchmark_tab[0xf][0x4];
+ long benchmark_tab[0xf];
static int first_time = 1;
if ( first_time ) {
@@ -348,8 +343,8 @@ void _math_test_all_normal_transform_functions( char *description )
#endif
for ( mtype = 0 ; mtype < 8 ; mtype++ ) {
- normal_func func = _mesa_normal_tab[norm_types[mtype]][0];
- long *cycles = &(benchmark_tab[mtype][0]);
+ normal_func func = _mesa_normal_tab[norm_types[mtype]];
+ long *cycles = &benchmark_tab[mtype];
if ( test_norm_function( func, mtype, cycles ) == 0 ) {
char buf[100];
@@ -360,7 +355,7 @@ void _math_test_all_normal_transform_functions( char *description )
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile ) {
- printf( " %li\t", benchmark_tab[mtype][0] );
+ printf( " %li\t", benchmark_tab[mtype] );
printf( " | [%s]\n", norm_strings[mtype] );
}
#endif
diff --git a/src/mesa/math/m_debug_util.h b/src/mesa/math/m_debug_util.h
index 79e369ebd5..dc8024a162 100644
--- a/src/mesa/math/m_debug_util.h
+++ b/src/mesa/math/m_debug_util.h
@@ -1,4 +1,4 @@
-/* $Id: m_debug_util.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
+/* $Id: m_debug_util.h,v 1.3 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -191,7 +191,7 @@ extern char *mesa_profile;
#endif
-/* ================================================================
+/* =============================================================
* Helper functions
*/
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c
index 6e19adea38..9cbb95c125 100644
--- a/src/mesa/math/m_debug_xform.c
+++ b/src/mesa/math/m_debug_xform.c
@@ -1,4 +1,4 @@
-/* $Id: m_debug_xform.c,v 1.7 2001/03/29 06:46:27 gareth Exp $ */
+/* $Id: m_debug_xform.c,v 1.8 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -126,24 +126,19 @@ static char *mstrings[7] = {
};
-/* ================================================================
+/* =============================================================
* Reference transformations
*/
static void ref_transform( GLvector4f *dst,
const GLmatrix *mat,
- const GLvector4f *src,
- const GLubyte *clipmask,
- const GLubyte flag )
+ const GLvector4f *src )
{
GLuint i;
GLfloat *s = (GLfloat *)src->start;
GLfloat (*d)[4] = (GLfloat (*)[4])dst->start;
const GLfloat *m = mat->m;
- (void) clipmask;
- (void) flag;
-
for ( i = 0 ; i < src->count ; i++ ) {
TRANSFORM_POINT( d[i], m, s );
s = (GLfloat *)((char *)s + src->stride);
@@ -151,7 +146,7 @@ static void ref_transform( GLvector4f *dst,
}
-/* ================================================================
+/* =============================================================
* Vertex transformation tests
*/
@@ -165,7 +160,6 @@ static int test_transform_function( transform_func func, int psize,
GLvector4f source[1], dest[1], ref[1];
GLmatrix mat[1];
GLfloat *m;
- GLubyte mask[TEST_COUNT];
int i, j;
#ifdef RUN_DEBUG_BENCHMARK
int cycle_i; /* the counter for the benchmarks we run */
@@ -207,7 +201,6 @@ static int test_transform_function( transform_func func, int psize,
}
for ( i = 0 ; i < TEST_COUNT ; i++) {
- mask[i] = i % 2; /* mask every 2nd element */
ASSIGN_4V( d[i], 0.0, 0.0, 0.0, 1.0 );
ASSIGN_4V( s[i], 0.0, 0.0, 0.0, 1.0 );
for ( j = 0 ; j < psize ; j++ )
@@ -235,15 +228,15 @@ static int test_transform_function( transform_func func, int psize,
ref->size = 0;
ref->flags = 0;
- ref_transform( ref, mat, source, NULL, 0 );
+ ref_transform( ref, mat, source );
if ( mesa_profile ) {
BEGIN_RACE( *cycles );
- func( dest, mat->m, source, NULL, 0 );
+ func( dest, mat->m, source );
END_RACE( *cycles );
}
else {
- func( dest, mat->m, source, NULL, 0 );
+ func( dest, mat->m, source );
}
for ( i = 0 ; i < TEST_COUNT ; i++ ) {
@@ -275,7 +268,7 @@ static int test_transform_function( transform_func func, int psize,
void _math_test_all_transform_functions( char *description )
{
int psize, mtype;
- long benchmark_tab[2][4][7];
+ long benchmark_tab[4][7];
static int first_time = 1;
if ( first_time ) {
@@ -305,8 +298,8 @@ void _math_test_all_transform_functions( char *description )
for ( mtype = 0 ; mtype < 7 ; mtype++ ) {
for ( psize = 1 ; psize <= 4 ; psize++ ) {
- transform_func func = _mesa_transform_tab[0][psize][mtypes[mtype]];
- long *cycles = &(benchmark_tab[0][psize-1][mtype]);
+ transform_func func = _mesa_transform_tab[psize][mtypes[mtype]];
+ long *cycles = &(benchmark_tab[psize-1][mtype]);
if ( test_transform_function( func, psize, mtype, cycles ) == 0 ) {
char buf[100];
@@ -316,7 +309,7 @@ void _math_test_all_transform_functions( char *description )
}
#ifdef RUN_DEBUG_BENCHMARK
if ( mesa_profile )
- printf( " %li\t", benchmark_tab[0][psize-1][mtype] );
+ printf( " %li\t", benchmark_tab[psize-1][mtype] );
#endif
}
#ifdef RUN_DEBUG_BENCHMARK
diff --git a/src/mesa/math/m_dotprod_tmp.h b/src/mesa/math/m_dotprod_tmp.h
index 86b71e6d7e..9eead6c36e 100644
--- a/src/mesa/math/m_dotprod_tmp.h
+++ b/src/mesa/math/m_dotprod_tmp.h
@@ -1,4 +1,4 @@
-/* $Id: m_dotprod_tmp.h,v 1.5 2001/03/12 02:02:36 gareth Exp $ */
+/* $Id: m_dotprod_tmp.h,v 1.6 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -34,8 +34,7 @@
static void TAG(dotprod_vec2)( GLfloat *out,
GLuint outstride,
const GLvector4f *coord_vec,
- const GLfloat plane[4],
- const GLubyte mask[] )
+ const GLfloat plane[4] )
{
GLuint stride = coord_vec->stride;
GLfloat *coord = coord_vec->start;
@@ -45,22 +44,17 @@ static void TAG(dotprod_vec2)( GLfloat *out,
const GLfloat plane0 = plane[0], plane1 = plane[1], plane3 = plane[3];
- (void) mask;
-
for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
- CULL_CHECK {
- *out = (coord[0] * plane0 +
- coord[1] * plane1 +
- plane3);
- }
+ *out = (coord[0] * plane0 +
+ coord[1] * plane1 +
+ plane3);
}
}
static void TAG(dotprod_vec3)( GLfloat *out,
GLuint outstride,
const GLvector4f *coord_vec,
- const GLfloat plane[4],
- const GLubyte mask[] )
+ const GLfloat plane[4] )
{
GLuint stride = coord_vec->stride;
GLfloat *coord = coord_vec->start;
@@ -71,23 +65,18 @@ static void TAG(dotprod_vec3)( GLfloat *out,
const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2];
const GLfloat plane3 = plane[3];
- (void) mask;
-
for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
- CULL_CHECK {
- *out = (coord[0] * plane0 +
- coord[1] * plane1 +
- coord[2] * plane2 +
- plane3);
- }
+ *out = (coord[0] * plane0 +
+ coord[1] * plane1 +
+ coord[2] * plane2 +
+ plane3);
}
}
static void TAG(dotprod_vec4)( GLfloat *out,
GLuint outstride,
const GLvector4f *coord_vec,
- const GLfloat plane[4],
- const GLubyte mask[] )
+ const GLfloat plane[4] )
{
GLuint stride = coord_vec->stride;
GLfloat *coord = coord_vec->start;
@@ -97,22 +86,18 @@ static void TAG(dotprod_vec4)( GLfloat *out,
const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2];
const GLfloat plane3 = plane[3];
- (void) mask;
-
for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
- CULL_CHECK {
- *out = (coord[0] * plane0 +
- coord[1] * plane1 +
- coord[2] * plane2 +
- coord[3] * plane3);
- }
+ *out = (coord[0] * plane0 +
+ coord[1] * plane1 +
+ coord[2] * plane2 +
+ coord[3] * plane3);
}
}
static void TAG(init_dotprod)( void )
{
- _mesa_dotprod_tab[IDX&1][2] = TAG(dotprod_vec2);
- _mesa_dotprod_tab[IDX&1][3] = TAG(dotprod_vec3);
- _mesa_dotprod_tab[IDX&1][4] = TAG(dotprod_vec4);
+ _mesa_dotprod_tab[2] = TAG(dotprod_vec2);
+ _mesa_dotprod_tab[3] = TAG(dotprod_vec3);
+ _mesa_dotprod_tab[4] = TAG(dotprod_vec4);
}
diff --git a/src/mesa/math/m_norm_tmp.h b/src/mesa/math/m_norm_tmp.h
index fbaa7e75c9..bab84d24f5 100644
--- a/src/mesa/math/m_norm_tmp.h
+++ b/src/mesa/math/m_norm_tmp.h
@@ -1,4 +1,4 @@
-/* $Id: m_norm_tmp.h,v 1.6 2001/03/12 02:02:36 gareth Exp $ */
+/* $Id: m_norm_tmp.h,v 1.7 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -36,7 +36,6 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -49,29 +48,26 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
GLfloat m1 = m[1], m5 = m[5], m9 = m[9];
GLfloat m2 = m[2], m6 = m[6], m10 = m[10];
- (void) mask;
if (!lengths) {
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat tx, ty, tz;
- {
- const GLfloat ux = from[0], uy = from[1], uz = from[2];
- tx = ux * m0 + uy * m1 + uz * m2;
- ty = ux * m4 + uy * m5 + uz * m6;
- tz = ux * m8 + uy * m9 + uz * m10;
+ GLfloat tx, ty, tz;
+ {
+ const GLfloat ux = from[0], uy = from[1], uz = from[2];
+ tx = ux * m0 + uy * m1 + uz * m2;
+ ty = ux * m4 + uy * m5 + uz * m6;
+ tz = ux * m8 + uy * m9 + uz * m10;
+ }
+ {
+ GLdouble len = tx*tx + ty*ty + tz*tz;
+ if (len > 1e-20) {
+ GLdouble scale = 1.0 / GL_SQRT(len);
+ out[i][0] = (GLfloat) (tx * scale);
+ out[i][1] = (GLfloat) (ty * scale);
+ out[i][2] = (GLfloat) (tz * scale);
}
+ else
{
- GLdouble len = tx*tx + ty*ty + tz*tz;
- if (len > 1e-20) {
- GLdouble scale = 1.0 / GL_SQRT(len);
- out[i][0] = (GLfloat) (tx * scale);
- out[i][1] = (GLfloat) (ty * scale);
- out[i][2] = (GLfloat) (tz * scale);
- }
- else
- {
- out[i][0] = out[i][1] = out[i][2] = 0;
- }
+ out[i][0] = out[i][1] = out[i][2] = 0;
}
}
}
@@ -84,20 +80,18 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
}
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat tx, ty, tz;
- {
- const GLfloat ux = from[0], uy = from[1], uz = from[2];
- tx = ux * m0 + uy * m1 + uz * m2;
- ty = ux * m4 + uy * m5 + uz * m6;
- tz = ux * m8 + uy * m9 + uz * m10;
- }
- {
- GLfloat len = lengths[i];
- out[i][0] = tx * len;
- out[i][1] = ty * len;
- out[i][2] = tz * len;
- }
+ GLfloat tx, ty, tz;
+ {
+ const GLfloat ux = from[0], uy = from[1], uz = from[2];
+ tx = ux * m0 + uy * m1 + uz * m2;
+ ty = ux * m4 + uy * m5 + uz * m6;
+ tz = ux * m8 + uy * m9 + uz * m10;
+ }
+ {
+ GLfloat len = lengths[i];
+ out[i][0] = tx * len;
+ out[i][1] = ty * len;
+ out[i][2] = tz * len;
}
}
}
@@ -110,7 +104,6 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -122,29 +115,26 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
GLfloat m0 = m[0];
GLfloat m5 = m[5];
GLfloat m10 = m[10];
- (void) mask;
if (!lengths) {
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat tx, ty, tz;
- {
- const GLfloat ux = from[0], uy = from[1], uz = from[2];
- tx = ux * m0 ;
- ty = uy * m5 ;
- tz = uz * m10;
+ GLfloat tx, ty, tz;
+ {
+ const GLfloat ux = from[0], uy = from[1], uz = from[2];
+ tx = ux * m0 ;
+ ty = uy * m5 ;
+ tz = uz * m10;
+ }
+ {
+ GLdouble len = tx*tx + ty*ty + tz*tz;
+ if (len > 1e-20) {
+ GLdouble scale = 1.0 / GL_SQRT(len);
+ out[i][0] = (GLfloat) (tx * scale);
+ out[i][1] = (GLfloat) (ty * scale);
+ out[i][2] = (GLfloat) (tz * scale);
}
+ else
{
- GLdouble len = tx*tx + ty*ty + tz*tz;
- if (len > 1e-20) {
- GLdouble scale = 1.0 / GL_SQRT(len);
- out[i][0] = (GLfloat) (tx * scale);
- out[i][1] = (GLfloat) (ty * scale);
- out[i][2] = (GLfloat) (tz * scale);
- }
- else
- {
- out[i][0] = out[i][1] = out[i][2] = 0;
- }
+ out[i][0] = out[i][1] = out[i][2] = 0;
}
}
}
@@ -159,20 +149,18 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
}
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat tx, ty, tz;
- {
- const GLfloat ux = from[0], uy = from[1], uz = from[2];
- tx = ux * m0 ;
- ty = uy * m5 ;
- tz = uz * m10;
- }
- {
- GLfloat len = lengths[i];
- out[i][0] = tx * len;
- out[i][1] = ty * len;
- out[i][2] = tz * len;
- }
+ GLfloat tx, ty, tz;
+ {
+ const GLfloat ux = from[0], uy = from[1], uz = from[2];
+ tx = ux * m0 ;
+ ty = uy * m5 ;
+ tz = uz * m10;
+ }
+ {
+ GLfloat len = lengths[i];
+ out[i][0] = tx * len;
+ out[i][1] = ty * len;
+ out[i][2] = tz * len;
}
}
}
@@ -185,7 +173,6 @@ TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -198,14 +185,11 @@ TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat,
GLfloat m5 = scale*m[5];
GLfloat m10 = scale*m[10];
(void) lengths;
- (void) mask;
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat ux = from[0], uy = from[1], uz = from[2];
- out[i][0] = ux * m0;
- out[i][1] = uy * m5;
- out[i][2] = uz * m10;
- }
+ GLfloat ux = from[0], uy = from[1], uz = from[2];
+ out[i][0] = ux * m0;
+ out[i][1] = uy * m5;
+ out[i][2] = uz * m10;
}
dest->count = in->count;
}
@@ -215,7 +199,6 @@ TAG(transform_rescale_normals)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -231,14 +214,11 @@ TAG(transform_rescale_normals)( const GLmatrix *mat,
GLfloat m1 = scale*m[1], m5 = scale*m[5], m9 = scale*m[9];
GLfloat m2 = scale*m[2], m6 = scale*m[6], m10 = scale*m[10];
(void) lengths;
- (void) mask;
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat ux = from[0], uy = from[1], uz = from[2];
- out[i][0] = ux * m0 + uy * m1 + uz * m2;
- out[i][1] = ux * m4 + uy * m5 + uz * m6;
- out[i][2] = ux * m8 + uy * m9 + uz * m10;
- }
+ GLfloat ux = from[0], uy = from[1], uz = from[2];
+ out[i][0] = ux * m0 + uy * m1 + uz * m2;
+ out[i][1] = ux * m4 + uy * m5 + uz * m6;
+ out[i][2] = ux * m8 + uy * m9 + uz * m10;
}
dest->count = in->count;
}
@@ -249,7 +229,6 @@ TAG(transform_normals_no_rot)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -263,14 +242,11 @@ TAG(transform_normals_no_rot)( const GLmatrix *mat,
GLfloat m10 = m[10];
(void) scale;
(void) lengths;
- (void) mask;
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat ux = from[0], uy = from[1], uz = from[2];
- out[i][0] = ux * m0;
- out[i][1] = uy * m5;
- out[i][2] = uz * m10;
- }
+ GLfloat ux = from[0], uy = from[1], uz = from[2];
+ out[i][0] = ux * m0;
+ out[i][1] = uy * m5;
+ out[i][2] = uz * m10;
}
dest->count = in->count;
}
@@ -281,7 +257,6 @@ TAG(transform_normals)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -295,14 +270,11 @@ TAG(transform_normals)( const GLmatrix *mat,
GLfloat m2 = m[2], m6 = m[6], m10 = m[10];
(void) scale;
(void) lengths;
- (void) mask;
STRIDE_LOOP {
- CULL_CHECK {
- GLfloat ux = from[0], uy = from[1], uz = from[2];
- out[i][0] = ux * m0 + uy * m1 + uz * m2;
- out[i][1] = ux * m4 + uy * m5 + uz * m6;
- out[i][2] = ux * m8 + uy * m9 + uz * m10;
- }
+ GLfloat ux = from[0], uy = from[1], uz = from[2];
+ out[i][0] = ux * m0 + uy * m1 + uz * m2;
+ out[i][1] = ux * m4 + uy * m5 + uz * m6;
+ out[i][2] = ux * m8 + uy * m9 + uz * m10;
}
dest->count = in->count;
}
@@ -313,7 +285,6 @@ TAG(normalize_normals)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -322,35 +293,30 @@ TAG(normalize_normals)( const GLmatrix *mat,
GLuint count = in->count;
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
(void) mat;
- (void) mask;
(void) scale;
if (lengths) {
STRIDE_LOOP {
- CULL_CHECK {
- const GLfloat x = from[0], y = from[1], z = from[2];
- GLfloat invlen = lengths[i];
- out[i][0] = x * invlen;
- out[i][1] = y * invlen;
- out[i][2] = z * invlen;
- }
+ const GLfloat x = from[0], y = from[1], z = from[2];
+ GLfloat invlen = lengths[i];
+ out[i][0] = x * invlen;
+ out[i][1] = y * invlen;
+ out[i][2] = z * invlen;
}
}
else {
STRIDE_LOOP {
- CULL_CHECK {
- const GLfloat x = from[0], y = from[1], z = from[2];
- GLdouble len = x * x + y * y + z * z;
- if (len > 1e-50) {
- len = 1.0 / GL_SQRT(len);
- out[i][0] = (GLfloat) (x * len);
- out[i][1] = (GLfloat) (y * len);
- out[i][2] = (GLfloat) (z * len);
- }
- else {
- out[i][0] = x;
- out[i][1] = y;
- out[i][2] = z;
- }
+ const GLfloat x = from[0], y = from[1], z = from[2];
+ GLdouble len = x * x + y * y + z * z;
+ if (len > 1e-50) {
+ len = 1.0 / GL_SQRT(len);
+ out[i][0] = (GLfloat) (x * len);
+ out[i][1] = (GLfloat) (y * len);
+ out[i][2] = (GLfloat) (z * len);
+ }
+ else {
+ out[i][0] = x;
+ out[i][1] = y;
+ out[i][2] = z;
}
}
}
@@ -363,7 +329,6 @@ TAG(rescale_normals)( const GLmatrix *mat,
GLfloat scale,
const GLvector3f *in,
const GLfloat *lengths,
- const GLubyte mask[],
GLvector3f *dest )
{
GLuint i;
@@ -373,12 +338,8 @@ TAG(rescale_normals)( const GLmatrix *mat,
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
(void) mat;
(void) lengths;
- (void) mask;
-
STRIDE_LOOP {
- CULL_CHECK {
- SCALE_SCALAR_3V( out[i], scale, from );
- }
+ SCALE_SCALAR_3V( out[i], scale, from );
}
dest->count = in->count;
}
@@ -387,27 +348,27 @@ TAG(rescale_normals)( const GLmatrix *mat,
static void _XFORMAPI
TAG(init_c_norm_transform)( void )
{
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] =
TAG(transform_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] =
TAG(transform_rescale_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] =
TAG(transform_normalize_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM] =
TAG(transform_normals);
- _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] =
TAG(transform_rescale_normals);
- _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] =
TAG(transform_normalize_normals);
- _mesa_normal_tab[NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_RESCALE] =
TAG(rescale_normals);
- _mesa_normal_tab[NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_NORMALIZE] =
TAG(normalize_normals);
}
diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c
index 7103f11f94..6c938ea38b 100644
--- a/src/mesa/math/m_xform.c
+++ b/src/mesa/math/m_xform.c
@@ -1,4 +1,4 @@
-/* $Id: m_xform.c,v 1.11 2001/03/12 00:48:41 gareth Exp $ */
+/* $Id: m_xform.c,v 1.12 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -58,12 +58,10 @@
clip_func _mesa_clip_tab[5];
clip_func _mesa_clip_np_tab[5];
-dotprod_func _mesa_dotprod_tab[2][5];
-vec_copy_func _mesa_copy_tab[2][0x10];
-normal_func _mesa_normal_tab[0xf][0x4];
-transform_func **(_mesa_transform_tab[2]);
-static transform_func *cull_transform_tab[5];
-static transform_func *raw_transform_tab[5];
+dotprod_func _mesa_dotprod_tab[5];
+vec_copy_func _mesa_copy_tab[0x10];
+normal_func _mesa_normal_tab[0xf];
+transform_func *_mesa_transform_tab[5];
/* Raw data format used for:
@@ -72,14 +70,14 @@ static transform_func *raw_transform_tab[5];
* - Eye-to-clip transform (via the function above).
* - Cliptesting
* - And everything else too, if culling happens to be disabled.
+ *
+ * GH: It's used for everything now, as clipping/culling is done
+ * elsewhere (most often by the driver itself).
*/
-#define TAG(x) x##_raw
-#define TAG2(x,y) x##y##_raw
-#define IDX 0
-#define STRIDE_LOOP for (i=0;i<count;i++, STRIDE_F(from, stride))
-#define LOOP for (i=0;i<n;i++)
-#define CULL_CHECK
-#define CLIP_CHECK
+#define TAG(x) x
+#define TAG2(x,y) x##y
+#define STRIDE_LOOP for ( i = 0 ; i < count ; i++, STRIDE_F(from, stride) )
+#define LOOP for ( i = 0 ; i < n ; i++ )
#define ARGS
#include "m_xform_tmp.h"
#include "m_clip_tmp.h"
@@ -89,44 +87,13 @@ static transform_func *raw_transform_tab[5];
#undef TAG
#undef TAG2
#undef LOOP
-#undef CULL_CHECK
-#undef CLIP_CHECK
#undef ARGS
-#undef IDX
-
-/* Culled data used for:
- * - texture transformations
- * - viewport map transformation
- * - normal transformations prior to lighting
- * - user cliptests
- */
-#define TAG(x) x##_masked
-#define TAG2(x,y) x##y##_masked
-#define IDX 1
-#define STRIDE_LOOP for (i=0;i<count;i++, STRIDE_F(from, stride))
-#define LOOP for (i=0;i<n;i++)
-#define CULL_CHECK if (mask[i])
-#define CLIP_CHECK if ((mask[i] & flag) == 0)
-#define ARGS , const GLubyte mask[]
-#include "m_xform_tmp.h"
-#include "m_norm_tmp.h"
-#include "m_dotprod_tmp.h"
-#include "m_copy_tmp.h"
-#undef TAG
-#undef TAG2
-#undef LOOP
-#undef CULL_CHECK
-#undef CLIP_CHECK
-#undef ARGS
-#undef IDX
-
-
GLvector4f *_mesa_project_points( GLvector4f *proj_vec,
- const GLvector4f *clip_vec )
+ const GLvector4f *clip_vec )
{
const GLuint stride = clip_vec->stride;
const GLfloat *from = (GLfloat *)clip_vec->start;
@@ -224,18 +191,11 @@ void _mesa_transform_point_sz( GLfloat Q[4], const GLfloat M[16],
void
_math_init_transformation( void )
{
- _mesa_transform_tab[0] = raw_transform_tab;
- _mesa_transform_tab[1] = cull_transform_tab;
-
- init_c_transformations_raw();
- init_c_transformations_masked();
- init_c_norm_transform_raw();
- init_c_norm_transform_masked();
- init_c_cliptest_raw();
- init_copy0_raw();
- init_copy0_masked();
- init_dotprod_raw();
- init_dotprod_masked();
+ init_c_transformations();
+ init_c_norm_transform();
+ init_c_cliptest();
+ init_copy0();
+ init_dotprod();
#ifdef DEBUG
_math_test_all_transform_functions( "default" );
diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h
index d9e12407ee..f871783c16 100644
--- a/src/mesa/math/m_xform.h
+++ b/src/mesa/math/m_xform.h
@@ -1,4 +1,4 @@
-/* $Id: m_xform.h,v 1.9 2001/03/12 02:02:36 gareth Exp $ */
+/* $Id: m_xform.h,v 1.10 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -143,12 +143,10 @@ typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip,
typedef void (*dotprod_func)( GLfloat *out,
GLuint out_stride,
CONST GLvector4f *coord_vec,
- CONST GLfloat plane[4],
- CONST GLubyte mask[]);
+ CONST GLfloat plane[4] );
typedef void (*vec_copy_func)( GLvector4f *to,
- CONST GLvector4f *from,
- CONST GLubyte mask[]);
+ CONST GLvector4f *from );
@@ -159,15 +157,14 @@ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
GLfloat scale,
CONST GLvector3f *in,
CONST GLfloat lengths[],
- CONST GLubyte mask[],
GLvector3f *dest );
/* Flags for selecting a normal transformation function.
*/
-#define NORM_RESCALE 0x1 /* apply the scale factor */
-#define NORM_NORMALIZE 0x2 /* normalize */
-#define NORM_TRANSFORM 0x4 /* apply the transformation matrix */
+#define NORM_RESCALE 0x1 /* apply the scale factor */
+#define NORM_NORMALIZE 0x2 /* normalize */
+#define NORM_TRANSFORM 0x4 /* apply the transformation matrix */
#define NORM_TRANSFORM_NO_ROT 0x8 /* apply the transformation matrix */
@@ -180,9 +177,7 @@ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
*/
typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec,
CONST GLfloat m[16],
- CONST GLvector4f *from_vec,
- CONST GLubyte *clipmask,
- CONST GLubyte flag );
+ CONST GLvector4f *from_vec );
extern GLvector4f *_mesa_project_points( GLvector4f *to,
@@ -197,17 +192,17 @@ extern void _mesa_transform_bounds2( GLubyte *orMask, GLubyte *andMask,
CONST GLfloat src[][3] );
-extern dotprod_func _mesa_dotprod_tab[2][5];
-extern vec_copy_func _mesa_copy_tab[2][0x10];
-extern vec_copy_func _mesa_copy_clean_tab[2][5];
+extern dotprod_func _mesa_dotprod_tab[5];
+extern vec_copy_func _mesa_copy_tab[0x10];
+extern vec_copy_func _mesa_copy_clean_tab[5];
extern clip_func _mesa_clip_tab[5];
extern clip_func _mesa_clip_np_tab[5];
-extern normal_func _mesa_normal_tab[0xf][0x4];
+extern normal_func _mesa_normal_tab[0xf];
-/* Use of 3 layers of linked 1-dimensional arrays to reduce
+/* Use of 2 layers of linked 1-dimensional arrays to reduce
* cost of lookup.
*/
-extern transform_func **(_mesa_transform_tab[2]);
+extern transform_func *_mesa_transform_tab[5];
extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16],
@@ -215,8 +210,8 @@ extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16],
#define TransformRaw( to, mat, from ) \
- ( (*_mesa_transform_tab[0][(from)->size][(mat)->type])( to, (mat)->m, from, 0, 0 ), \
- (to) )
+ ( _mesa_transform_tab[(from)->size][(mat)->type]( to, (mat)->m, from ), \
+ (to) )
#endif
diff --git a/src/mesa/math/m_xform_tmp.h b/src/mesa/math/m_xform_tmp.h
index 8d96e6af71..ade052bdbd 100644
--- a/src/mesa/math/m_xform_tmp.h
+++ b/src/mesa/math/m_xform_tmp.h
@@ -1,4 +1,4 @@
-/* $Id: m_xform_tmp.h,v 1.5 2001/03/12 02:02:36 gareth Exp $ */
+/* $Id: m_xform_tmp.h,v 1.6 2001/03/30 14:44:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -65,12 +65,16 @@
* cliped and/or culled vertices.
*/
+/* GH: Not any more -- it's easier (and faster) to just process the
+ * entire vector. Clipping and culling are handled further down
+ * the pipe, most often during or after the conversion to some
+ * driver-specific vertex format.
+ */
+
static void _XFORMAPI
TAG(transform_points1_general)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -81,18 +85,13 @@ TAG(transform_points1_general)( GLvector4f *to_vec,
const GLfloat m2 = m[2], m14 = m[14];
const GLfloat m3 = m[3], m15 = m[15];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m1 * ox + m13;
- to[i][2] = m2 * ox + m14;
- to[i][3] = m3 * ox + m15;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m1 * ox + m13;
+ to[i][2] = m2 * ox + m14;
+ to[i][3] = m3 * ox + m15;
}
-
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
to_vec->count = from_vec->count;
@@ -101,24 +100,17 @@ TAG(transform_points1_general)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_identity)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
GLuint count = from_vec->count;
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint i;
- (void) mask;
- (void) flag;
if (to_vec == from_vec) return;
STRIDE_LOOP {
- CLIP_CHECK {
- to[i][0] = from[0];
- }
+ to[i][0] = from[0];
}
-
to_vec->size = 1;
to_vec->flags |= VEC_SIZE_1;
to_vec->count = from_vec->count;
@@ -127,9 +119,7 @@ TAG(transform_points1_identity)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_2d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -138,14 +128,10 @@ TAG(transform_points1_2d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1];
const GLfloat m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m1 * ox + m13;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m1 * ox + m13;
}
to_vec->size = 2;
to_vec->flags |= VEC_SIZE_2;
@@ -155,9 +141,7 @@ TAG(transform_points1_2d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -165,16 +149,11 @@ TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m13;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m13;
}
-
to_vec->size = 2;
to_vec->flags |= VEC_SIZE_2;
to_vec->count = from_vec->count;
@@ -183,9 +162,7 @@ TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_3d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -194,15 +171,11 @@ TAG(transform_points1_3d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1], m2 = m[2];
const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m1 * ox + m13;
- to[i][2] = m2 * ox + m14;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m1 * ox + m13;
+ to[i][2] = m2 * ox + m14;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -213,9 +186,7 @@ TAG(transform_points1_3d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -224,15 +195,11 @@ TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m0 = m[0];
const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m13;
- to[i][2] = m14;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m13;
+ to[i][2] = m14;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -242,9 +209,7 @@ TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points1_perspective)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -252,16 +217,12 @@ TAG(transform_points1_perspective)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0];
- to[i][0] = m0 * ox ;
- to[i][1] = 0 ;
- to[i][2] = m14;
- to[i][3] = 0;
- }
+ const GLfloat ox = from[0];
+ to[i][0] = m0 * ox ;
+ to[i][1] = 0 ;
+ to[i][2] = m14;
+ to[i][3] = 0;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -278,9 +239,7 @@ TAG(transform_points1_perspective)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_general)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -291,16 +250,12 @@ TAG(transform_points2_general)( GLvector4f *to_vec,
const GLfloat m2 = m[2], m6 = m[6], m14 = m[14];
const GLfloat m3 = m[3], m7 = m[7], m15 = m[15];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox + m4 * oy + m12;
- to[i][1] = m1 * ox + m5 * oy + m13;
- to[i][2] = m2 * ox + m6 * oy + m14;
- to[i][3] = m3 * ox + m7 * oy + m15;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox + m4 * oy + m12;
+ to[i][1] = m1 * ox + m5 * oy + m13;
+ to[i][2] = m2 * ox + m6 * oy + m14;
+ to[i][3] = m3 * ox + m7 * oy + m15;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -310,23 +265,17 @@ TAG(transform_points2_general)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_identity)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
- (void) mask;
- (void) flag;
if (to_vec == from_vec) return;
STRIDE_LOOP {
- CLIP_CHECK {
- to[i][0] = from[0];
- to[i][1] = from[1];
- }
+ to[i][0] = from[0];
+ to[i][1] = from[1];
}
to_vec->size = 2;
to_vec->flags |= VEC_SIZE_2;
@@ -336,9 +285,7 @@ TAG(transform_points2_identity)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_2d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -347,16 +294,11 @@ TAG(transform_points2_2d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
const GLfloat m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox + m4 * oy + m12;
- to[i][1] = m1 * ox + m5 * oy + m13;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox + m4 * oy + m12;
+ to[i][1] = m1 * ox + m5 * oy + m13;
}
-
to_vec->size = 2;
to_vec->flags |= VEC_SIZE_2;
to_vec->count = from_vec->count;
@@ -365,9 +307,7 @@ TAG(transform_points2_2d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -375,16 +315,11 @@ TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m5 * oy + m13;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m5 * oy + m13;
}
-
to_vec->size = 2;
to_vec->flags |= VEC_SIZE_2;
to_vec->count = from_vec->count;
@@ -393,9 +328,7 @@ TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_3d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -404,15 +337,11 @@ TAG(transform_points2_3d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1], m2 = m[2], m4 = m[4], m5 = m[5];
const GLfloat m6 = m[6], m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox + m4 * oy + m12;
- to[i][1] = m1 * ox + m5 * oy + m13;
- to[i][2] = m2 * ox + m6 * oy + m14;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox + m4 * oy + m12;
+ to[i][1] = m1 * ox + m5 * oy + m13;
+ to[i][2] = m2 * ox + m6 * oy + m14;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -426,9 +355,7 @@ TAG(transform_points2_3d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -437,15 +364,11 @@ TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m5 = m[5];
const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox + m12;
- to[i][1] = m5 * oy + m13;
- to[i][2] = m14;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox + m12;
+ to[i][1] = m5 * oy + m13;
+ to[i][2] = m14;
}
if (m14 == 0) {
to_vec->size = 2;
@@ -461,9 +384,7 @@ TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points2_perspective)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -471,16 +392,12 @@ TAG(transform_points2_perspective)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m5 = m[5], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1];
- to[i][0] = m0 * ox ;
- to[i][1] = m5 * oy ;
- to[i][2] = m14;
- to[i][3] = 0;
- }
+ const GLfloat ox = from[0], oy = from[1];
+ to[i][0] = m0 * ox ;
+ to[i][1] = m5 * oy ;
+ to[i][2] = m14;
+ to[i][3] = 0;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -492,9 +409,7 @@ TAG(transform_points2_perspective)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_general)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -505,16 +420,12 @@ TAG(transform_points3_general)( GLvector4f *to_vec,
const GLfloat m2 = m[2], m6 = m[6], m10 = m[10], m14 = m[14];
const GLfloat m3 = m[3], m7 = m[7], m11 = m[11], m15 = m[15];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12;
- to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13;
- to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
- to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12;
+ to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13;
+ to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
+ to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -524,24 +435,18 @@ TAG(transform_points3_general)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_identity)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
- (void) mask;
- (void) flag;
if (to_vec == from_vec) return;
STRIDE_LOOP {
- CLIP_CHECK {
- to[i][0] = from[0];
- to[i][1] = from[1];
- to[i][2] = from[2];
- }
+ to[i][0] = from[0];
+ to[i][1] = from[1];
+ to[i][2] = from[2];
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -551,9 +456,7 @@ TAG(transform_points3_identity)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_2d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -562,15 +465,11 @@ TAG(transform_points3_2d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
const GLfloat m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m4 * oy + m12 ;
- to[i][1] = m1 * ox + m5 * oy + m13 ;
- to[i][2] = + oz ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m4 * oy + m12 ;
+ to[i][1] = m1 * ox + m5 * oy + m13 ;
+ to[i][2] = + oz ;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -580,9 +479,7 @@ TAG(transform_points3_2d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -590,15 +487,11 @@ TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m12 ;
- to[i][1] = m5 * oy + m13 ;
- to[i][2] = + oz ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m12 ;
+ to[i][1] = m5 * oy + m13 ;
+ to[i][2] = + oz ;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -608,9 +501,7 @@ TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_3d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -620,15 +511,11 @@ TAG(transform_points3_3d)( GLvector4f *to_vec,
const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10];
const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 ;
- to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 ;
- to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 ;
+ to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 ;
+ to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 ;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -640,9 +527,7 @@ TAG(transform_points3_3d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -651,15 +536,11 @@ TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m5 = m[5];
const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m12 ;
- to[i][1] = m5 * oy + m13 ;
- to[i][2] = m10 * oz + m14 ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m12 ;
+ to[i][1] = m5 * oy + m13 ;
+ to[i][2] = m10 * oz + m14 ;
}
to_vec->size = 3;
to_vec->flags |= VEC_SIZE_3;
@@ -669,9 +550,7 @@ TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points3_perspective)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -680,16 +559,12 @@ TAG(transform_points3_perspective)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9];
const GLfloat m10 = m[10], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2];
- to[i][0] = m0 * ox + m8 * oz ;
- to[i][1] = m5 * oy + m9 * oz ;
- to[i][2] = m10 * oz + m14 ;
- to[i][3] = -oz ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2];
+ to[i][0] = m0 * ox + m8 * oz ;
+ to[i][1] = m5 * oy + m9 * oz ;
+ to[i][2] = m10 * oz + m14 ;
+ to[i][3] = -oz ;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -701,9 +576,7 @@ TAG(transform_points3_perspective)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_general)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -714,16 +587,12 @@ TAG(transform_points4_general)( GLvector4f *to_vec,
const GLfloat m2 = m[2], m6 = m[6], m10 = m[10], m14 = m[14];
const GLfloat m3 = m[3], m7 = m[7], m11 = m[11], m15 = m[15];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow;
- to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow;
- to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
- to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow;
+ to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow;
+ to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
+ to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -733,25 +602,19 @@ TAG(transform_points4_general)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_identity)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
- (void) mask;
- (void) flag;
if (to_vec == from_vec) return;
STRIDE_LOOP {
- CLIP_CHECK {
- to[i][0] = from[0];
- to[i][1] = from[1];
- to[i][2] = from[2];
- to[i][3] = from[3];
- }
+ to[i][0] = from[0];
+ to[i][1] = from[1];
+ to[i][2] = from[2];
+ to[i][3] = from[3];
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -761,9 +624,7 @@ TAG(transform_points4_identity)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_2d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -772,16 +633,12 @@ TAG(transform_points4_2d)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
const GLfloat m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m4 * oy + m12 * ow;
- to[i][1] = m1 * ox + m5 * oy + m13 * ow;
- to[i][2] = + oz ;
- to[i][3] = ow;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m4 * oy + m12 * ow;
+ to[i][1] = m1 * ox + m5 * oy + m13 * ow;
+ to[i][2] = + oz ;
+ to[i][3] = ow;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -791,9 +648,7 @@ TAG(transform_points4_2d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -801,16 +656,12 @@ TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
GLuint count = from_vec->count;
const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m12 * ow;
- to[i][1] = m5 * oy + m13 * ow;
- to[i][2] = + oz ;
- to[i][3] = ow;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m12 * ow;
+ to[i][1] = m5 * oy + m13 * ow;
+ to[i][2] = + oz ;
+ to[i][3] = ow;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -820,9 +671,7 @@ TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_3d)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -832,16 +681,12 @@ TAG(transform_points4_3d)( GLvector4f *to_vec,
const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10];
const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow;
- to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow;
- to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
- to[i][3] = ow;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow;
+ to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow;
+ to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
+ to[i][3] = ow;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -851,9 +696,7 @@ TAG(transform_points4_3d)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -862,16 +705,12 @@ TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m5 = m[5];
const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m12 * ow;
- to[i][1] = m5 * oy + m13 * ow;
- to[i][2] = m10 * oz + m14 * ow;
- to[i][3] = ow;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m12 * ow;
+ to[i][1] = m5 * oy + m13 * ow;
+ to[i][2] = m10 * oz + m14 * ow;
+ to[i][3] = ow;
}
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
@@ -881,9 +720,7 @@ TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
static void _XFORMAPI
TAG(transform_points4_perspective)( GLvector4f *to_vec,
const GLfloat m[16],
- const GLvector4f *from_vec,
- const GLubyte *mask,
- const GLubyte flag )
+ const GLvector4f *from_vec )
{
const GLuint stride = from_vec->stride;
GLfloat *from = from_vec->start;
@@ -892,18 +729,13 @@ TAG(transform_points4_perspective)( GLvector4f *to_vec,
const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9];
const GLfloat m10 = m[10], m14 = m[14];
GLuint i;
- (void) mask;
- (void) flag;
STRIDE_LOOP {
- CLIP_CHECK {
- const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
- to[i][0] = m0 * ox + m8 * oz ;
- to[i][1] = m5 * oy + m9 * oz ;
- to[i][2] = m10 * oz + m14 * ow ;
- to[i][3] = -oz ;
- }
+ const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+ to[i][0] = m0 * ox + m8 * oz ;
+ to[i][1] = m5 * oy + m9 * oz ;
+ to[i][2] = m10 * oz + m14 * ow ;
+ to[i][3] = -oz ;
}
-
to_vec->size = 4;
to_vec->flags |= VEC_SIZE_4;
to_vec->count = from_vec->count;
@@ -920,7 +752,7 @@ static transform_func _XFORMAPI TAG(transform_tab_4)[7];
*/
static void _XFORMAPI TAG(init_c_transformations)( void )
{
-#define TAG_TAB _mesa_transform_tab[IDX]
+#define TAG_TAB _mesa_transform_tab
#define TAG_TAB_1 TAG(transform_tab_1)
#define TAG_TAB_2 TAG(transform_tab_2)
#define TAG_TAB_3 TAG(transform_tab_3)
@@ -935,7 +767,7 @@ static void _XFORMAPI TAG(init_c_transformations)( void )
TAG_TAB_1[MATRIX_GENERAL] = TAG(transform_points1_general);
TAG_TAB_1[MATRIX_IDENTITY] = TAG(transform_points1_identity);
TAG_TAB_1[MATRIX_3D_NO_ROT] = TAG(transform_points1_3d_no_rot);
- TAG_TAB_1[MATRIX_PERSPECTIVE] = TAG(transform_points1_perspective) ;
+ TAG_TAB_1[MATRIX_PERSPECTIVE] = TAG(transform_points1_perspective);
TAG_TAB_1[MATRIX_2D] = TAG(transform_points1_2d);
TAG_TAB_1[MATRIX_2D_NO_ROT] = TAG(transform_points1_2d_no_rot);
TAG_TAB_1[MATRIX_3D] = TAG(transform_points1_3d);
@@ -944,7 +776,7 @@ static void _XFORMAPI TAG(init_c_transformations)( void )
TAG_TAB_2[MATRIX_GENERAL] = TAG(transform_points2_general);
TAG_TAB_2[MATRIX_IDENTITY] = TAG(transform_points2_identity);
TAG_TAB_2[MATRIX_3D_NO_ROT] = TAG(transform_points2_3d_no_rot);
- TAG_TAB_2[MATRIX_PERSPECTIVE] = TAG(transform_points2_perspective) ;
+ TAG_TAB_2[MATRIX_PERSPECTIVE] = TAG(transform_points2_perspective);
TAG_TAB_2[MATRIX_2D] = TAG(transform_points2_2d);
TAG_TAB_2[MATRIX_2D_NO_ROT] = TAG(transform_points2_2d_no_rot);
TAG_TAB_2[MATRIX_3D] = TAG(transform_points2_3d);