summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa/src/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras/Mesa/src/macros.h')
-rw-r--r--xc/extras/Mesa/src/macros.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/xc/extras/Mesa/src/macros.h b/xc/extras/Mesa/src/macros.h
index b3502b609..dbe097961 100644
--- a/xc/extras/Mesa/src/macros.h
+++ b/xc/extras/Mesa/src/macros.h
@@ -58,15 +58,6 @@
#endif
-
-/*
- * Bitmask helpers
- */
-#define SET_BITS(WORD, BITS) (WORD) |= (BITS)
-#define CLEAR_BITS(WORD, BITS) (WORD) &= ~(BITS)
-#define TEST_BITS(WORD, BITS) ((WORD) & (BITS))
-
-
/* Stepping a GLfloat pointer by a byte stride
*/
#define STRIDE_F(p, i) (p = (GLfloat *)((GLubyte *)p + i))
@@ -121,6 +112,27 @@ do { \
(DST)[3] = (SRC)[3]; \
} while (0)
+#define COPY_2V_CAST( DST, SRC, CAST ) \
+do { \
+ (DST)[0] = (CAST)(SRC)[0]; \
+ (DST)[1] = (CAST)(SRC)[1]; \
+} while (0)
+
+#define COPY_3V_CAST( DST, SRC, CAST ) \
+do { \
+ (DST)[0] = (CAST)(SRC)[0]; \
+ (DST)[1] = (CAST)(SRC)[1]; \
+ (DST)[2] = (CAST)(SRC)[2]; \
+} while (0)
+
+#define COPY_4V_CAST( DST, SRC, CAST ) \
+do { \
+ (DST)[0] = (CAST)(SRC)[0]; \
+ (DST)[1] = (CAST)(SRC)[1]; \
+ (DST)[2] = (CAST)(SRC)[2]; \
+ (DST)[3] = (CAST)(SRC)[3]; \
+} while (0)
+
#if defined(__i386__)
#define COPY_4UBV(DST, SRC) \
do { \
@@ -453,7 +465,7 @@ do { \
-/* Generic color packing macros.
+/* Generic color packing macros
* XXX We may move these into texutil.h at some point.
*/