From: Corbin Simpson Date: Wed, 8 Jul 2009 18:26:52 +0000 (-0700) Subject: gallium: Add endian detection to p_config. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce0f7954f883c94c793bf1b93699351defae34c5;p=mesa.git gallium: Add endian detection to p_config. --- diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index c956a693a09..4152d6ac36a 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -101,6 +101,19 @@ #endif +/* + * Endian detection. + */ + +#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) +#define PIPE_ARCH_LITTLE_ENDIAN +#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) +#define PIPE_ARCH_BIG_ENDIAN +#else +#define PIPE_ARCH_UNKNOWN_ENDIAN +#endif + + /* * Operating system family. *