X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftexcompress_bptc.c;h=26e59158007c966b0c35f3dde11e7c9c1c095a28;hb=e70d0d22a2dccc1df2c88890a2964491cdafac94;hp=a600180e236328305e77ca18ff68ca2054641941;hpb=bfcdb843830bba0190e00e35e3c5c18c4bdb5de1;p=mesa.git diff --git a/src/mesa/main/texcompress_bptc.c b/src/mesa/main/texcompress_bptc.c index a600180e236..26e59158007 100644 --- a/src/mesa/main/texcompress_bptc.c +++ b/src/mesa/main/texcompress_bptc.c @@ -30,6 +30,7 @@ #include "texcompress.h" #include "texcompress_bptc.h" #include "util/format_srgb.h" +#include "util/half_float.h" #include "texstore.h" #include "macros.h" #include "image.h" @@ -1291,7 +1292,8 @@ _mesa_texstore_bptc_rgba_unorm(TEXSTORE_PARAMS) 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,