tempImageSlices[0] = (GLubyte *) tempImage;
_mesa_texstore(ctx, dims,
baseInternalFormat,
- MESA_FORMAT_R8G8B8A8_UNORM,
+ _mesa_little_endian() ? MESA_FORMAT_R8G8B8A8_UNORM
+ : MESA_FORMAT_A8B8G8R8_UNORM,
rgbaRowStride, tempImageSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
tempImageSlices[0] = (GLubyte *) tempImage;
_mesa_texstore(ctx, dims,
baseInternalFormat,
- MESA_FORMAT_R8G8B8A8_UNORM,
+ _mesa_little_endian() ? MESA_FORMAT_R8G8B8A8_UNORM
+ : MESA_FORMAT_A8B8G8R8_UNORM,
rgbaRowStride, tempImageSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
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));
tempImageSlices[0] = (GLubyte *) tempImage;
_mesa_texstore(ctx, dims,
baseInternalFormat,
- MESA_FORMAT_R8G8B8A8_UNORM,
+ _mesa_little_endian() ? MESA_FORMAT_R8G8B8A8_UNORM
+ : MESA_FORMAT_A8B8G8R8_UNORM,
rgbaRowStride, tempImageSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
tempImageSlices[0] = (GLubyte *) tempImage;
_mesa_texstore(ctx, dims,
baseInternalFormat,
- MESA_FORMAT_R8G8B8A8_UNORM,
+ _mesa_little_endian() ? MESA_FORMAT_R8G8B8A8_UNORM
+ : MESA_FORMAT_A8B8G8R8_UNORM,
rgbaRowStride, tempImageSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
tempImageSlices[0] = (GLubyte *) tempImage;
_mesa_texstore(ctx, dims,
baseInternalFormat,
- MESA_FORMAT_R8G8B8A8_UNORM,
+ _mesa_little_endian() ? MESA_FORMAT_R8G8B8A8_UNORM
+ : MESA_FORMAT_A8B8G8R8_UNORM,
rgbaRowStride, tempImageSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,