diff options
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.c')
-rw-r--r-- | src/mesa/main/texcompress_rgtc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c index 66de1f17d8b..8cab7a56b1a 100644 --- a/src/mesa/main/texcompress_rgtc.c +++ b/src/mesa/main/texcompress_rgtc.c @@ -196,9 +196,11 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_LA_LATC2_UNORM); if (baseInternalFormat == GL_RG) - tempFormat = MESA_FORMAT_R8G8_UNORM; + tempFormat = _mesa_little_endian() ? MESA_FORMAT_R8G8_UNORM + : MESA_FORMAT_G8R8_UNORM; else - tempFormat = MESA_FORMAT_L8A8_UNORM; + tempFormat = _mesa_little_endian() ? MESA_FORMAT_L8A8_UNORM + : MESA_FORMAT_A8L8_UNORM; rgRowStride = 2 * srcWidth * sizeof(GLubyte); tempImage = malloc(srcWidth * srcHeight * 2 * sizeof(GLubyte)); |