diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-06-08 12:49:25 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-06-08 12:49:25 +0000 |
commit | b150fb418e814e4cd9cadc0de64aa5603489ff59 (patch) | |
tree | c029ac6fb879d59d3301684182dfb609670fb85b /src | |
parent | 2cbd3698ba5c719b8315cc9c156ef8e424514ebc (diff) |
use unoptimized COPY_4UBV code on SPARC to avoid memory alignment problems (bug 430689)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/macros.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index acc70cf007..945cb9cecd 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -1,4 +1,4 @@ -/* $Id: macros.h,v 1.8.4.1 2001/03/02 16:40:47 gareth Exp $ */ +/* $Id: macros.h,v 1.8.4.2 2001/06/08 12:49:25 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -356,6 +356,15 @@ do { \ /* * Copy a vector of 4 GLubytes from SRC to DST. */ +#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)) { \ @@ -368,6 +377,7 @@ do { \ (DST)[3] = (SRC)[3]; \ } \ } while (0) +#endif /* Assign scalers to short vectors: */ |