summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-06-08 12:49:38 +0000
committerBrian Paul <[email protected]>2001-06-08 12:49:38 +0000
commit36822c50ad84d255f1e7c94b56cfff1cd8bcef85 (patch)
tree70504c2c2ae7d6631d6079186fe5a1e1e9e2aced /src/mesa
parent4a497e649b33f8b73696bbef0e6da221491460fe (diff)
use unoptimized COPY_4UBV code on SPARC to avoid memory alignment problems (bug 430689)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/macros.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 9a32ad5bd49..fb9f029ac26 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -1,4 +1,4 @@
-/* $Id: macros.h,v 1.21 2001/04/19 12:22:09 keithw Exp $ */
+/* $Id: macros.h,v 1.22 2001/06/08 12:49:38 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -122,6 +122,15 @@ do { \
(DST)[3] = (SRC)[3]; \
} while (0)
+#if defined(__sparc__)
+/* Using the GLuint cast fails if DST or SRC are not dword-aligned */
+do { \
+ (DST)[0] = (SRC)[0]; \
+ (DST)[1] = (SRC)[1]; \
+ (DST)[2] = (SRC)[2]; \
+ (DST)[3] = (SRC)[3]; \
+} while (0)
+#else
#define COPY_4UBV(DST, SRC) \
do { \
if (sizeof(GLuint)==4*sizeof(GLubyte)) { \
@@ -134,7 +143,7 @@ do { \
(DST)[3] = (SRC)[3]; \
} \
} while (0)
-
+#endif
#define COPY_2FV( DST, SRC ) \
do { \