summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_texstate.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2006-10-15 18:22:28 +0000
committerJerome Glisse <glisse@freedesktop.org>2006-10-15 18:22:28 +0000
commitf0775c7fccac2b91200dd4537686fe5c9b61c6ab (patch)
treec58343fe01864af72cf056d368e14c5e7ee2e751 /src/mesa/drivers/dri/r300/r300_texstate.c
parent2b6d2e4dcbdc253e8148888d1a7e60d8466ba4e8 (diff)
downloadexternal_mesa3d-f0775c7fccac2b91200dd4537686fe5c9b61c6ab.zip
external_mesa3d-f0775c7fccac2b91200dd4537686fe5c9b61c6ab.tar.gz
external_mesa3d-f0775c7fccac2b91200dd4537686fe5c9b61c6ab.tar.bz2
Use endianness test function provided by mesa.
Use the _mesa_little_endian helper function insted of the MESA_BIG_ENDIAN flag. There is still place using this flag but we need to find how to submit 16bits elements on big endian computer.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_texstate.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 791427a..1d78918 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -172,18 +172,16 @@ static void r300SetTexImages(r300ContextPtr rmesa,
GLint numLevels;
GLint log2Width, log2Height, log2Depth;
const GLuint ui = 1;
- const GLubyte littleEndian = *((const GLubyte *) &ui);
/* Set the hardware texture format
*/
if (VALID_FORMAT(baseImage->TexFormat->MesaFormat)) {
- if (littleEndian) {
+ if (_mesa_little_endian()) {
t->format =
tx_table_le[baseImage->TexFormat->MesaFormat].format;
t->filter |=
tx_table_le[baseImage->TexFormat->MesaFormat].filter;
- }
- else {
+ } else {
t->format =
tx_table_be[baseImage->TexFormat->MesaFormat].format;
t->filter |=