Fix toArgb32 on NEON
The color components were not correctly shuffled to ARGB host-order form. Discovered and tested with tst_QPainter::blendARGBonRGB on ARM. Change-Id: I2ef9b6129dd83f3c6be0b30c0a5e3684564e6b2f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
7991a70d28
commit
3d08f308f1
@ -214,7 +214,12 @@ inline uint toArgb32(QRgba64 rgba64)
|
|||||||
return toArgb32(v);
|
return toArgb32(v);
|
||||||
#elif defined __ARM_NEON__
|
#elif defined __ARM_NEON__
|
||||||
uint16x4_t v = vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(&rgba64)));
|
uint16x4_t v = vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(&rgba64)));
|
||||||
v = vext_u16(v, v, 1);
|
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
|
||||||
|
const uint8x8_t shuffleMask = { 4, 5, 2, 3, 0, 1, 6, 7 };
|
||||||
|
v = vreinterpret_u16_u8(vtbl1_u8(vreinterpret_u8_u16(v), shuffleMask));
|
||||||
|
#else
|
||||||
|
v = vext_u16(v, v, 3);
|
||||||
|
#endif
|
||||||
return toArgb32(v);
|
return toArgb32(v);
|
||||||
#else
|
#else
|
||||||
return rgba64.toArgb32();
|
return rgba64.toArgb32();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user