summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-15 14:54:32 -0600
committerBrian Paul <[email protected]>2009-10-15 14:54:32 -0600
commita37c9ac8eee8c0d5b49f198f490828a794dc93c4 (patch)
tree2392804540c4ceed2022404acd82744a3f888d8b /src/mesa
parent9bf2aa33298db5af9128ad8f625321be47ab65c3 (diff)
dri/common: use _mesa_little_endian() and update comments
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/texmem.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c
index e8880d9ae8d..798c09f09f1 100644
--- a/src/mesa/drivers/dri/common/texmem.c
+++ b/src/mesa/drivers/dri/common/texmem.c
@@ -1302,8 +1302,8 @@ driCalculateTextureFirstLastLevel( driTextureObject * t )
/**
- * \name DRI texture formats. Pointers initialized to either the big- or
- * little-endian Mesa formats.
+ * \name DRI texture formats. These vars are initialized to either the
+ * big- or little-endian Mesa formats.
*/
/*@{*/
gl_format _dri_texformat_rgba8888 = MESA_FORMAT_NONE;
@@ -1320,15 +1320,13 @@ gl_format _dri_texformat_l8 = MESA_FORMAT_L8;
/**
- * Initialize little endian target, host byte order independent texture formats
+ * Initialize _dri_texformat_* vars according to whether we're on
+ * a big or little endian system.
*/
void
driInitTextureFormats(void)
{
- const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
-
- if (littleEndian) {
+ if (_mesa_little_endian()) {
_dri_texformat_rgba8888 = MESA_FORMAT_RGBA8888;
_dri_texformat_argb8888 = MESA_FORMAT_ARGB8888;
_dri_texformat_rgb565 = MESA_FORMAT_RGB565;