summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-06-13 17:13:15 +0000
committerBrian Paul <[email protected]>2006-06-13 17:13:15 +0000
commit7dfdf3a5b74d3498a98f71d18eb2e706f2fedd04 (patch)
treef3dba60519f87cbaf6752d9eb13bb32c98817a40
parent44b82dffe836b25d42c7a3d7b4e62d0eb7cc033f (diff)
Rename some functions/macros to better reflect their behaviour:
3F -> 3FN because integer types are normalized 4FC -> 3FN because we can normalize non-color attributes
-rw-r--r--src/mesa/array_cache/ac_import.c6
-rw-r--r--src/mesa/math/m_trans_tmp.h54
-rw-r--r--src/mesa/math/m_translate.c152
-rw-r--r--src/mesa/math/m_translate.h4
4 files changed, 105 insertions, 111 deletions
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 3612a1e019b..119e58bf249 100644
--- a/src/mesa/array_cache/ac_import.c
+++ b/src/mesa/array_cache/ac_import.c
@@ -221,7 +221,7 @@ import( const GLcontext *ctx,
switch (destType) {
case GL_FLOAT:
- _math_trans_4fc( (GLfloat (*)[4]) to->Ptr,
+ _math_trans_4fn( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -343,7 +343,7 @@ import_normal( GLcontext *ctx, GLenum type, GLuint stride )
ASSERT(type == GL_FLOAT);
ASSERT(stride == 3*sizeof(GLfloat) || stride == 0);
- _math_trans_3f( (GLfloat (*)[3]) to->Ptr,
+ _math_trans_3fn((GLfloat (*)[3]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -476,7 +476,7 @@ import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride )
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
if (from->Normalized) {
- _math_trans_4fc( (GLfloat (*)[4]) to->Ptr,
+ _math_trans_4fn( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
diff --git a/src/mesa/math/m_trans_tmp.h b/src/mesa/math/m_trans_tmp.h
index c1f0f767436..08fb4d1e9c4 100644
--- a/src/mesa/math/m_trans_tmp.h
+++ b/src/mesa/math/m_trans_tmp.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -22,17 +22,11 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/*
- * New (3.1) transformation code written by Keith Whitwell.
+/**
+ * \brief Templates for vector conversions.
+ * \author Keith Whitwell.
*/
-
-/* KW: This file also included by tnl/trans_elt.c to build code
- * specific to the implementation of array-elements in the
- * tnl module.
- */
-
-
#ifdef DEST_4F
static void DEST_4F( GLfloat (*t)[4],
CONST void *ptr,
@@ -59,8 +53,8 @@ static void DEST_4F( GLfloat (*t)[4],
-#ifdef DEST_4FC
-static void DEST_4FC( GLfloat (*t)[4],
+#ifdef DEST_4FN
+static void DEST_4FN( GLfloat (*t)[4],
CONST void *ptr,
GLuint stride,
ARGS )
@@ -74,18 +68,18 @@ static void DEST_4FC( GLfloat (*t)[4],
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
- if (SZ >= 1) t[i][0] = TRX_4FC(f, 0);
- if (SZ >= 2) t[i][1] = TRX_4FC(f, 1);
- if (SZ >= 3) t[i][2] = TRX_4FC(f, 2);
- if (SZ == 4) t[i][3] = TRX_4FC(f, 3); else t[i][3] = 1.0;
+ if (SZ >= 1) t[i][0] = TRX_4FN(f, 0);
+ if (SZ >= 2) t[i][1] = TRX_4FN(f, 1);
+ if (SZ >= 3) t[i][2] = TRX_4FN(f, 2);
+ if (SZ == 4) t[i][3] = TRX_4FN(f, 3); else t[i][3] = 1.0;
}
}
}
#endif
-#ifdef DEST_3F
-static void DEST_3F( GLfloat (*t)[3],
+#ifdef DEST_3FN
+static void DEST_3FN( GLfloat (*t)[3],
CONST void *ptr,
GLuint stride,
ARGS )
@@ -98,9 +92,9 @@ static void DEST_3F( GLfloat (*t)[3],
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
- t[i][0] = TRX_3F(f, 0);
- t[i][1] = TRX_3F(f, 1);
- t[i][2] = TRX_3F(f, 2);
+ t[i][0] = TRX_3FN(f, 0);
+ t[i][1] = TRX_3FN(f, 1);
+ t[i][2] = TRX_3FN(f, 2);
}
}
}
@@ -231,9 +225,9 @@ static void INIT(void)
ASSERT(SZ == 1);
TAB(_1f)[SRC_IDX] = DEST_1F;
#endif
-#ifdef DEST_3F
+#ifdef DEST_3FN
ASSERT(SZ == 3);
- TAB(_3f)[SRC_IDX] = DEST_3F;
+ TAB(_3fn)[SRC_IDX] = DEST_3FN;
#endif
#ifdef DEST_4UB
TAB(_4ub)[SZ][SRC_IDX] = DEST_4UB;
@@ -244,8 +238,8 @@ static void INIT(void)
#ifdef DEST_4F
TAB(_4f)[SZ][SRC_IDX] = DEST_4F;
#endif
-#ifdef DEST_4FC
- TAB(_4fc)[SZ][SRC_IDX] = DEST_4FC;
+#ifdef DEST_4FN
+ TAB(_4fn)[SZ][SRC_IDX] = DEST_4FN;
#endif
}
@@ -266,14 +260,14 @@ static void INIT(void)
#ifdef DEST_4US
#undef DEST_4US
#endif
-#ifdef DEST_3F
-#undef DEST_3F
+#ifdef DEST_3FN
+#undef DEST_3FN
#endif
#ifdef DEST_4F
#undef DEST_4F
#endif
-#ifdef DEST_4FC
-#undef DEST_4FC
+#ifdef DEST_4FN
+#undef DEST_4FN
#endif
#ifdef DEST_1F
#undef DEST_1F
diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c
index 50fe0176987..c7423e9d9db 100644
--- a/src/mesa/math/m_translate.c
+++ b/src/mesa/math/m_translate.c
@@ -72,7 +72,7 @@ typedef void (*trans_4f_func)(GLfloat (*to)[4],
GLuint start,
GLuint n );
-typedef void (*trans_3f_func)(GLfloat (*to)[3],
+typedef void (*trans_3fn_func)(GLfloat (*to)[3],
CONST void *ptr,
GLuint stride,
GLuint start,
@@ -92,11 +92,11 @@ typedef void (*trans_3f_func)(GLfloat (*to)[3],
static trans_1f_func _math_trans_1f_tab[MAX_TYPES];
static trans_1ui_func _math_trans_1ui_tab[MAX_TYPES];
static trans_1ub_func _math_trans_1ub_tab[MAX_TYPES];
-static trans_3f_func _math_trans_3f_tab[MAX_TYPES];
+static trans_3fn_func _math_trans_3fn_tab[MAX_TYPES];
static trans_4ub_func _math_trans_4ub_tab[5][MAX_TYPES];
static trans_4us_func _math_trans_4us_tab[5][MAX_TYPES];
static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES];
-static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
+static trans_4f_func _math_trans_4fn_tab[5][MAX_TYPES];
#define PTR_ELT(ptr, elt) (((SRC *)ptr)[elt])
@@ -119,13 +119,13 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLbyte
#define SRC_IDX TYPE_IDX(GL_BYTE)
-#define TRX_3F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_3FN(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
#if 1
#define TRX_4F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
#else
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
#endif
-#define TRX_4FC(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_4FN(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_UB(ub, f,n) ub = BYTE_TO_UBYTE( PTR_ELT(f,n) )
#define TRX_US(ch, f,n) ch = BYTE_TO_USHORT( PTR_ELT(f,n) )
#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
@@ -134,7 +134,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLbyte_raw
#define DEST_4F trans_4_GLbyte_4f_raw
-#define DEST_4FC trans_4_GLbyte_4fc_raw
+#define DEST_4FN trans_4_GLbyte_4fn_raw
#define DEST_4UB trans_4_GLbyte_4ub_raw
#define DEST_4US trans_4_GLbyte_4us_raw
#include "m_trans_tmp.h"
@@ -142,30 +142,30 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLbyte_raw
#define DEST_4F trans_3_GLbyte_4f_raw
-#define DEST_4FC trans_3_GLbyte_4fc_raw
+#define DEST_4FN trans_3_GLbyte_4fn_raw
#define DEST_4UB trans_3_GLbyte_4ub_raw
#define DEST_4US trans_3_GLbyte_4us_raw
-#define DEST_3F trans_3_GLbyte_3f_raw
+#define DEST_3FN trans_3_GLbyte_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLbyte_raw
#define DEST_4F trans_2_GLbyte_4f_raw
-#define DEST_4FC trans_2_GLbyte_4fc_raw
+#define DEST_4FN trans_2_GLbyte_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLbyte_raw
#define DEST_4F trans_1_GLbyte_4f_raw
-#define DEST_4FC trans_1_GLbyte_4fc_raw
+#define DEST_4FN trans_1_GLbyte_4fn_raw
#define DEST_1UB trans_1_GLbyte_1ub_raw
#define DEST_1UI trans_1_GLbyte_1ui_raw
#include "m_trans_tmp.h"
#undef SRC
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -177,9 +177,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLubyte
#define SRC_IDX TYPE_IDX(GL_UNSIGNED_BYTE)
-#define TRX_3F(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n))
+#define TRX_3FN(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n))
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
-#define TRX_4FC(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n))
+#define TRX_4FN(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n))
#define TRX_UB(ub, f,n) ub = PTR_ELT(f,n)
#define TRX_US(us, f,n) us = UBYTE_TO_USHORT(PTR_ELT(f,n))
#define TRX_UI(f,n) (GLuint)PTR_ELT(f,n)
@@ -189,7 +189,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLubyte_raw
#define DEST_4F trans_4_GLubyte_4f_raw
-#define DEST_4FC trans_4_GLubyte_4fc_raw
+#define DEST_4FN trans_4_GLubyte_4fn_raw
#define DEST_4US trans_4_GLubyte_4us_raw
#include "m_trans_tmp.h"
@@ -198,9 +198,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define INIT init_trans_3_GLubyte_raw
#define DEST_4UB trans_3_GLubyte_4ub_raw
#define DEST_4US trans_3_GLubyte_4us_raw
-#define DEST_3F trans_3_GLubyte_3f_raw
+#define DEST_3FN trans_3_GLubyte_3fn_raw
#define DEST_4F trans_3_GLubyte_4f_raw
-#define DEST_4FC trans_3_GLubyte_4fc_raw
+#define DEST_4FN trans_3_GLubyte_4fn_raw
#include "m_trans_tmp.h"
@@ -212,9 +212,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -224,9 +224,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLshort
#define SRC_IDX TYPE_IDX(GL_SHORT)
-#define TRX_3F(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_3FN(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
-#define TRX_4FC(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_4FN(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_UB(ub, f,n) ub = SHORT_TO_UBYTE(PTR_ELT(f,n))
#define TRX_US(us, f,n) us = SHORT_TO_USHORT(PTR_ELT(f,n))
#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
@@ -235,7 +235,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLshort_raw
#define DEST_4F trans_4_GLshort_4f_raw
-#define DEST_4FC trans_4_GLshort_4fc_raw
+#define DEST_4FN trans_4_GLshort_4fn_raw
#define DEST_4UB trans_4_GLshort_4ub_raw
#define DEST_4US trans_4_GLshort_4us_raw
#include "m_trans_tmp.h"
@@ -243,22 +243,22 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLshort_raw
#define DEST_4F trans_3_GLshort_4f_raw
-#define DEST_4FC trans_3_GLshort_4fc_raw
+#define DEST_4FN trans_3_GLshort_4fn_raw
#define DEST_4UB trans_3_GLshort_4ub_raw
#define DEST_4US trans_3_GLshort_4us_raw
-#define DEST_3F trans_3_GLshort_3f_raw
+#define DEST_3FN trans_3_GLshort_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLshort_raw
#define DEST_4F trans_2_GLshort_4f_raw
-#define DEST_4FC trans_2_GLshort_4fc_raw
+#define DEST_4FN trans_2_GLshort_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLshort_raw
#define DEST_4F trans_1_GLshort_4f_raw
-#define DEST_4FC trans_1_GLshort_4fc_raw
+#define DEST_4FN trans_1_GLshort_4fn_raw
#define DEST_1UB trans_1_GLshort_1ub_raw
#define DEST_1UI trans_1_GLshort_1ui_raw
#include "m_trans_tmp.h"
@@ -266,9 +266,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -278,9 +278,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLushort
#define SRC_IDX TYPE_IDX(GL_UNSIGNED_SHORT)
-#define TRX_3F(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_3FN(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
-#define TRX_4FC(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_4FN(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_UB(ub,f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 8)
#define TRX_US(us,f,n) us = PTR_ELT(f,n)
#define TRX_UI(f,n) (GLuint) PTR_ELT(f,n)
@@ -289,7 +289,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLushort_raw
#define DEST_4F trans_4_GLushort_4f_raw
-#define DEST_4FC trans_4_GLushort_4fc_raw
+#define DEST_4FN trans_4_GLushort_4fn_raw
#define DEST_4UB trans_4_GLushort_4ub_raw
#define DEST_4US trans_4_GLushort_4us_raw
#include "m_trans_tmp.h"
@@ -297,31 +297,31 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLushort_raw
#define DEST_4F trans_3_GLushort_4f_raw
-#define DEST_4FC trans_3_GLushort_4fc_raw
+#define DEST_4FN trans_3_GLushort_4fn_raw
#define DEST_4UB trans_3_GLushort_4ub_raw
#define DEST_4US trans_3_GLushort_4us_raw
-#define DEST_3F trans_3_GLushort_3f_raw
+#define DEST_3FN trans_3_GLushort_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLushort_raw
#define DEST_4F trans_2_GLushort_4f_raw
-#define DEST_4FC trans_2_GLushort_4fc_raw
+#define DEST_4FN trans_2_GLushort_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLushort_raw
#define DEST_4F trans_1_GLushort_4f_raw
-#define DEST_4FC trans_1_GLushort_4fc_raw
+#define DEST_4FN trans_1_GLushort_4fn_raw
#define DEST_1UB trans_1_GLushort_1ub_raw
#define DEST_1UI trans_1_GLushort_1ui_raw
#include "m_trans_tmp.h"
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -331,9 +331,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLint
#define SRC_IDX TYPE_IDX(GL_INT)
-#define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_3FN(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
-#define TRX_4FC(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_4FN(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_UB(ub, f,n) ub = INT_TO_UBYTE(PTR_ELT(f,n))
#define TRX_US(us, f,n) us = INT_TO_USHORT(PTR_ELT(f,n))
#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
@@ -342,7 +342,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLint_raw
#define DEST_4F trans_4_GLint_4f_raw
-#define DEST_4FC trans_4_GLint_4fc_raw
+#define DEST_4FN trans_4_GLint_4fn_raw
#define DEST_4UB trans_4_GLint_4ub_raw
#define DEST_4US trans_4_GLint_4us_raw
#include "m_trans_tmp.h"
@@ -350,22 +350,22 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLint_raw
#define DEST_4F trans_3_GLint_4f_raw
-#define DEST_4FC trans_3_GLint_4fc_raw
+#define DEST_4FN trans_3_GLint_4fn_raw
#define DEST_4UB trans_3_GLint_4ub_raw
#define DEST_4US trans_3_GLint_4us_raw
-#define DEST_3F trans_3_GLint_3f_raw
+#define DEST_3FN trans_3_GLint_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLint_raw
#define DEST_4F trans_2_GLint_4f_raw
-#define DEST_4FC trans_2_GLint_4fc_raw
+#define DEST_4FN trans_2_GLint_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLint_raw
#define DEST_4F trans_1_GLint_4f_raw
-#define DEST_4FC trans_1_GLint_4fc_raw
+#define DEST_4FN trans_1_GLint_4fn_raw
#define DEST_1UB trans_1_GLint_1ub_raw
#define DEST_1UI trans_1_GLint_1ui_raw
#include "m_trans_tmp.h"
@@ -373,9 +373,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -385,9 +385,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLuint
#define SRC_IDX TYPE_IDX(GL_UNSIGNED_INT)
-#define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_3FN(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
-#define TRX_4FC(f,n) UINT_TO_FLOAT( PTR_ELT(f,n) )
+#define TRX_4FN(f,n) UINT_TO_FLOAT( PTR_ELT(f,n) )
#define TRX_UB(ub, f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 24)
#define TRX_US(us, f,n) us = (GLshort) (PTR_ELT(f,n) >> 16)
#define TRX_UI(f,n) PTR_ELT(f,n)
@@ -396,7 +396,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLuint_raw
#define DEST_4F trans_4_GLuint_4f_raw
-#define DEST_4FC trans_4_GLuint_4fc_raw
+#define DEST_4FN trans_4_GLuint_4fn_raw
#define DEST_4UB trans_4_GLuint_4ub_raw
#define DEST_4US trans_4_GLuint_4us_raw
#include "m_trans_tmp.h"
@@ -404,31 +404,31 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLuint_raw
#define DEST_4F trans_3_GLuint_4f_raw
-#define DEST_4FC trans_3_GLuint_4fc_raw
+#define DEST_4FN trans_3_GLuint_4fn_raw
#define DEST_4UB trans_3_GLuint_4ub_raw
#define DEST_4US trans_3_GLuint_4us_raw
-#define DEST_3F trans_3_GLuint_3f_raw
+#define DEST_3FN trans_3_GLuint_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLuint_raw
#define DEST_4F trans_2_GLuint_4f_raw
-#define DEST_4FC trans_2_GLuint_4fc_raw
+#define DEST_4FN trans_2_GLuint_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLuint_raw
#define DEST_4F trans_1_GLuint_4f_raw
-#define DEST_4FC trans_1_GLuint_4fc_raw
+#define DEST_4FN trans_1_GLuint_4fn_raw
#define DEST_1UB trans_1_GLuint_1ub_raw
#define DEST_1UI trans_1_GLuint_1ui_raw
#include "m_trans_tmp.h"
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -438,9 +438,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
*/
#define SRC GLdouble
#define SRC_IDX TYPE_IDX(GL_DOUBLE)
-#define TRX_3F(f,n) (GLfloat) PTR_ELT(f,n)
+#define TRX_3FN(f,n) (GLfloat) PTR_ELT(f,n)
#define TRX_4F(f,n) (GLfloat) PTR_ELT(f,n)
-#define TRX_4FC(f,n) (GLfloat) PTR_ELT(f,n)
+#define TRX_4FN(f,n) (GLfloat) PTR_ELT(f,n)
#define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n))
#define TRX_US(us,f,n) UNCLAMPED_FLOAT_TO_USHORT(us, PTR_ELT(f,n))
#define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n)
@@ -450,7 +450,7 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 4
#define INIT init_trans_4_GLdouble_raw
#define DEST_4F trans_4_GLdouble_4f_raw
-#define DEST_4FC trans_4_GLdouble_4fc_raw
+#define DEST_4FN trans_4_GLdouble_4fn_raw
#define DEST_4UB trans_4_GLdouble_4ub_raw
#define DEST_4US trans_4_GLdouble_4us_raw
#include "m_trans_tmp.h"
@@ -458,22 +458,22 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define SZ 3
#define INIT init_trans_3_GLdouble_raw
#define DEST_4F trans_3_GLdouble_4f_raw
-#define DEST_4FC trans_3_GLdouble_4fc_raw
+#define DEST_4FN trans_3_GLdouble_4fn_raw
#define DEST_4UB trans_3_GLdouble_4ub_raw
#define DEST_4US trans_3_GLdouble_4us_raw
-#define DEST_3F trans_3_GLdouble_3f_raw
+#define DEST_3FN trans_3_GLdouble_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLdouble_raw
#define DEST_4F trans_2_GLdouble_4f_raw
-#define DEST_4FC trans_2_GLdouble_4fc_raw
+#define DEST_4FN trans_2_GLdouble_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLdouble_raw
#define DEST_4F trans_1_GLdouble_4f_raw
-#define DEST_4FC trans_1_GLdouble_4fc_raw
+#define DEST_4FN trans_1_GLdouble_4fn_raw
#define DEST_1UB trans_1_GLdouble_1ub_raw
#define DEST_1UI trans_1_GLdouble_1ui_raw
#define DEST_1F trans_1_GLdouble_1f_raw
@@ -491,28 +491,28 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#define DEST_4UB trans_4_GLfloat_4ub_raw
#define DEST_4US trans_4_GLfloat_4us_raw
#define DEST_4F trans_4_GLfloat_4f_raw
-#define DEST_4FC trans_4_GLfloat_4fc_raw
+#define DEST_4FN trans_4_GLfloat_4fn_raw
#include "m_trans_tmp.h"
#define SZ 3
#define INIT init_trans_3_GLfloat_raw
#define DEST_4F trans_3_GLfloat_4f_raw
-#define DEST_4FC trans_3_GLfloat_4fc_raw
+#define DEST_4FN trans_3_GLfloat_4fn_raw
#define DEST_4UB trans_3_GLfloat_4ub_raw
#define DEST_4US trans_3_GLfloat_4us_raw
-#define DEST_3F trans_3_GLfloat_3f_raw
+#define DEST_3FN trans_3_GLfloat_3fn_raw
#include "m_trans_tmp.h"
#define SZ 2
#define INIT init_trans_2_GLfloat_raw
#define DEST_4F trans_2_GLfloat_4f_raw
-#define DEST_4FC trans_2_GLfloat_4fc_raw
+#define DEST_4FN trans_2_GLfloat_4fn_raw
#include "m_trans_tmp.h"
#define SZ 1
#define INIT init_trans_1_GLfloat_raw
#define DEST_4F trans_1_GLfloat_4f_raw
-#define DEST_4FC trans_1_GLfloat_4fc_raw
+#define DEST_4FN trans_1_GLfloat_4fn_raw
#define DEST_1UB trans_1_GLfloat_1ub_raw
#define DEST_1UI trans_1_GLfloat_1ui_raw
#define DEST_1F trans_1_GLfloat_1f_raw
@@ -521,9 +521,9 @@ static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES];
#undef SRC
#undef SRC_IDX
-#undef TRX_3F
+#undef TRX_3FN
#undef TRX_4F
-#undef TRX_4FC
+#undef TRX_4FN
#undef TRX_UB
#undef TRX_US
#undef TRX_UI
@@ -558,11 +558,11 @@ static void init_translate_raw(void)
{
MEMSET( TAB(_1ui), 0, sizeof(TAB(_1ui)) );
MEMSET( TAB(_1ub), 0, sizeof(TAB(_1ub)) );
- MEMSET( TAB(_3f), 0, sizeof(TAB(_3f)) );
+ MEMSET( TAB(_3fn), 0, sizeof(TAB(_3fn)) );
MEMSET( TAB(_4ub), 0, sizeof(TAB(_4ub)) );
MEMSET( TAB(_4us), 0, sizeof(TAB(_4us)) );
MEMSET( TAB(_4f), 0, sizeof(TAB(_4f)) );
- MEMSET( TAB(_4fc), 0, sizeof(TAB(_4fc)) );
+ MEMSET( TAB(_4fn), 0, sizeof(TAB(_4fn)) );
init_trans_4_GLbyte_raw();
init_trans_3_GLbyte_raw();
@@ -691,7 +691,7 @@ void _math_trans_4chan( GLchan (*to)[4],
#elif CHAN_TYPE == GL_UNSIGNED_SHORT
_math_trans_4us( to, ptr, stride, type, size, start, n );
#elif CHAN_TYPE == GL_FLOAT
- _math_trans_4fc( to, ptr, stride, type, size, start, n );
+ _math_trans_4fn( to, ptr, stride, type, size, start, n );
#endif
}
@@ -726,7 +726,7 @@ void _math_trans_4f(GLfloat (*to)[4],
/**
* Translate vector of values to GLfloat[4], normalized to [-1, 1].
*/
-void _math_trans_4fc(GLfloat (*to)[4],
+void _math_trans_4fn(GLfloat (*to)[4],
CONST void *ptr,
GLuint stride,
GLenum type,
@@ -734,18 +734,18 @@ void _math_trans_4fc(GLfloat (*to)[4],
GLuint start,
GLuint n )
{
- _math_trans_4fc_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_4fn_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
}
/**
* Translate vector of values to GLfloat[3], normalized to [-1, 1].
*/
-void _math_trans_3f(GLfloat (*to)[3],
+void _math_trans_3fn(GLfloat (*to)[3],
CONST void *ptr,
GLuint stride,
GLenum type,
GLuint start,
GLuint n )
{
- _math_trans_3f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_3fn_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
}
diff --git a/src/mesa/math/m_translate.h b/src/mesa/math/m_translate.h
index d76eac69393..0bcf96005c7 100644
--- a/src/mesa/math/m_translate.h
+++ b/src/mesa/math/m_translate.h
@@ -101,7 +101,7 @@ extern void _math_trans_4f(GLfloat (*to)[4],
GLuint n );
/** Convert to normalized floats in [0,1] or [-1, 1] */
-extern void _math_trans_4fc(GLfloat (*to)[4],
+extern void _math_trans_4fn(GLfloat (*to)[4],
CONST void *ptr,
GLuint stride,
GLenum type,
@@ -109,7 +109,7 @@ extern void _math_trans_4fc(GLfloat (*to)[4],
GLuint start,
GLuint n );
-extern void _math_trans_3f(GLfloat (*to)[3],
+extern void _math_trans_3fn(GLfloat (*to)[3],
CONST void *ptr,
GLuint stride,
GLenum type,