mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
only copy GLubyte[4] as a GLuint on x86
This commit is contained in:
parent
36822c50ad
commit
fabc30cfdd
1 changed files with 8 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: macros.h,v 1.22 2001/06/08 12:49:38 brianp Exp $ */
|
||||
/* $Id: macros.h,v 1.23 2001/06/08 15:46:30 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -122,27 +122,19 @@ do { \
|
|||
(DST)[3] = (SRC)[3]; \
|
||||
} while (0)
|
||||
|
||||
#if defined(__sparc__)
|
||||
/* Using the GLuint cast fails if DST or SRC are not dword-aligned */
|
||||
#if defined(__i386__)
|
||||
#define COPY_4UBV(DST, SRC) \
|
||||
do { \
|
||||
*((GLuint*)(DST)) = *((GLuint*)(SRC)); \
|
||||
} while (0)
|
||||
#else
|
||||
/* The GLuint cast might fail if DST or SRC are not dword-aligned (RISC) */
|
||||
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)) { \
|
||||
*((GLuint*)(DST)) = *((GLuint*)(SRC)); \
|
||||
} \
|
||||
else { \
|
||||
(DST)[0] = (SRC)[0]; \
|
||||
(DST)[1] = (SRC)[1]; \
|
||||
(DST)[2] = (SRC)[2]; \
|
||||
(DST)[3] = (SRC)[3]; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define COPY_2FV( DST, SRC ) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue