mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
Small optimization for big-endian (e.g., PowerPC) systems.
This commit is contained in:
parent
f459b9f9c0
commit
f404ff7b76
1 changed files with 10 additions and 0 deletions
|
|
@ -115,6 +115,16 @@
|
|||
: "=r" (p) : "r" (p) ); \
|
||||
((GLuint *)rgba)[0] = p; \
|
||||
} while (0)
|
||||
# elif defined( MESA_BIG_ENDIAN )
|
||||
/* On PowerPC with GCC 3.4.2 the shift madness below becomes a single
|
||||
* rotlwi instruction. It also produces good code on SPARC.
|
||||
*/
|
||||
# define READ_RGBA( rgba, _x, _y ) \
|
||||
do { \
|
||||
GLuint p = *(volatile GLuint *) GET_SRC_PTR(_x, _y); \
|
||||
GLuint t = p; \
|
||||
*((uint32_t *) rgba) = (t >> 24) | (p << 8); \
|
||||
} while (0)
|
||||
# else
|
||||
# define READ_RGBA( rgba, _x, _y ) \
|
||||
do { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue