summaryrefslogtreecommitdiffstats
path: root/src/mesa/math/m_trans_tmp.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-08-20 07:21:41 +0000
committerKeith Whitwell <[email protected]>2003-08-20 07:21:41 +0000
commit12c037dbff3d5a812e31624645d577413cd54122 (patch)
treef9ef3af36fb03266bcfa89ed61578655ca2e2ec0 /src/mesa/math/m_trans_tmp.h
parent9ec58c2c5bbf90428a0e8e1c4f4af3805c602cd3 (diff)
Use correct conversions when translating array colors.
Diffstat (limited to 'src/mesa/math/m_trans_tmp.h')
-rw-r--r--src/mesa/math/m_trans_tmp.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/math/m_trans_tmp.h b/src/mesa/math/m_trans_tmp.h
index 2ade71e4b61..c1f0f767436 100644
--- a/src/mesa/math/m_trans_tmp.h
+++ b/src/mesa/math/m_trans_tmp.h
@@ -58,6 +58,32 @@ static void DEST_4F( GLfloat (*t)[4],
#endif
+
+#ifdef DEST_4FC
+static void DEST_4FC( GLfloat (*t)[4],
+ CONST void *ptr,
+ GLuint stride,
+ ARGS )
+{
+ const GLubyte *f = (GLubyte *) ptr + SRC_START * stride;
+ const GLubyte *first = f;
+ GLuint i;
+
+ (void) first;
+ (void) start;
+ 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;
+ }
+ }
+}
+#endif
+
+
#ifdef DEST_3F
static void DEST_3F( GLfloat (*t)[3],
CONST void *ptr,
@@ -218,6 +244,9 @@ 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;
+#endif
}
@@ -243,6 +272,9 @@ static void INIT(void)
#ifdef DEST_4F
#undef DEST_4F
#endif
+#ifdef DEST_4FC
+#undef DEST_4FC
+#endif
#ifdef DEST_1F
#undef DEST_1F
#endif