summaryrefslogtreecommitdiffstats
path: root/src/mesa/math/m_trans_tmp.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
committerBrian Paul <[email protected]>2001-01-24 00:04:58 +0000
commit74b493a5e61237de081a438e774e5d8139d4c6b7 (patch)
treea8bc94a65bacc67b9b1473f91a2bd84cd2b25937 /src/mesa/math/m_trans_tmp.h
parent125fddc31dc9959901d9f1ece693b09f04426d48 (diff)
Lots of GLchan datatype changes.
Added GLvector4us datatype in math/m_vector.[ch] Added _math_trans_4us() in math/m_translate.[ch] Choose GLvector4ub, GLvector4us, GLvector4f at compile time based on CHAN_BITS. Made Driver.ClearColor() and Driver.ClearIndex() optional driver functions. Changed args to Driver.ClearColor(), updated drivers. Reordered files in Makefile.X11
Diffstat (limited to 'src/mesa/math/m_trans_tmp.h')
-rw-r--r--src/mesa/math/m_trans_tmp.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/mesa/math/m_trans_tmp.h b/src/mesa/math/m_trans_tmp.h
index e7d8a880719..1b20266fbce 100644
--- a/src/mesa/math/m_trans_tmp.h
+++ b/src/mesa/math/m_trans_tmp.h
@@ -1,10 +1,10 @@
-/* $Id: m_trans_tmp.h,v 1.2 2001/01/02 22:02:52 brianp Exp $ */
+/* $Id: m_trans_tmp.h,v 1.3 2001/01/24 00:04:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 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"),
@@ -104,9 +104,9 @@ static void DEST_1F( GLfloat *t,
#ifdef DEST_4UB
static void DEST_4UB( GLubyte (*t)[4],
- CONST void *ptr,
- GLuint stride,
- ARGS)
+ CONST void *ptr,
+ GLuint stride,
+ ARGS)
{
const GLubyte *f = (GLubyte *) ptr + SRC_START * stride;
const GLubyte *first = f;
@@ -126,6 +126,30 @@ static void DEST_4UB( GLubyte (*t)[4],
#endif
+#ifdef DEST_4US
+static void DEST_4US( GLushort (*t)[4],
+ CONST void *ptr,
+ GLuint stride,
+ ARGS)
+{
+ const GLushort *f = (GLushort *) ptr + SRC_START * stride;
+ const GLushort *first = f;
+ GLuint i;
+ (void) start;
+ (void) first;
+ for (i = DST_START ; i < n ; i++, NEXT_F) {
+ CHECK {
+ NEXT_F2;
+ if (SZ >= 1) TRX_US(t[i][0], f, 0);
+ if (SZ >= 2) TRX_US(t[i][1], f, 1);
+ if (SZ >= 3) TRX_US(t[i][2], f, 2);
+ if (SZ == 4) TRX_US(t[i][3], f, 3); else t[i][3] = 65535;
+ }
+ }
+}
+#endif
+
+
#ifdef DEST_1UB
static void DEST_1UB( GLubyte *t,
CONST void *ptr,
@@ -190,6 +214,9 @@ static void INIT(void)
#ifdef DEST_4UB
TAB(_4ub)[SZ][SRC_IDX] = DEST_4UB;
#endif
+#ifdef DEST_4US
+ TAB(_4us)[SZ][SRC_IDX] = DEST_4US;
+#endif
#ifdef DEST_4F
TAB(_4f)[SZ][SRC_IDX] = DEST_4F;
#endif
@@ -201,6 +228,7 @@ static void INIT(void)
#undef DEST_1UI
#undef DEST_1UB
#undef DEST_4UB
+#undef DEST_4US
#undef DEST_3F
#undef DEST_4F
#undef DEST_1F