aboutsummaryrefslogtreecommitdiffstats
path: root/community/firefox/b3d8b08265b800165d684281d19ac845a8ff9a66.patch
blob: 873f4c3ad4d40e6d0a685a775e165d0e92616102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

# HG changeset patch
# User Andrew Osmond <aosmond@mozilla.com>
# Date 1579706360 0
# Node ID b3d8b08265b800165d684281d19ac845a8ff9a66
# Parent  50c371b37a9fcd994a5866db73bd0d078e19f95d
Bug 1610814 - Fix NEON compile error with gcc and RGB unpacking. r=lsalzman

This patch makes us use the correct intrinsic for loading a uint8x16
register. It is not entirely clear why clang accepts this without
complaint but beyond the types, it should be equivalent.

Differential Revision: https://phabricator.services.mozilla.com/D60667

diff --git a/gfx/2d/SwizzleNEON.cpp b/gfx/2d/SwizzleNEON.cpp
--- a/gfx/2d/SwizzleNEON.cpp
+++ b/gfx/2d/SwizzleNEON.cpp
@@ -407,25 +407,25 @@ void UnpackRowRGB24_NEON(const uint8_t* 
   }
 
   uint8x16_t alpha = vreinterpretq_u8_u32(vdupq_n_u32(0xFF000000));
 
   // Process all 4-pixel chunks as one vector.
   src -= 4 * 3;
   dst -= 4 * 4;
   while (src >= aSrc) {
-    uint8x16_t px = vld1q_u16(reinterpret_cast<const uint16_t*>(src));
+    uint8x16_t px = vld1q_u8(src);
     // G2R2B1G1 R1B0G0R0 -> X1R1G1B1 X0R0G0B0
     uint8x8_t pxlo = vtbl1_u8(vget_low_u8(px), masklo);
     // B3G3R3B2 G2R2B1G1 -> X3R3G3B3 X2R2G2B2
     uint8x8_t pxhi =
         vtbl1_u8(vext_u8(vget_low_u8(px), vget_high_u8(px), 4), maskhi);
     px = vcombine_u8(pxlo, pxhi);
     px = vorrq_u8(px, alpha);
-    vst1q_u16(reinterpret_cast<uint16_t*>(dst), px);
+    vst1q_u8(dst, px);
     src -= 4 * 3;
     dst -= 4 * 4;
   }
 }
 
 // Force instantiation of swizzle variants here.
 template void UnpackRowRGB24_NEON<false>(const uint8_t*, uint8_t*, int32_t);
 template void UnpackRowRGB24_NEON<true>(const uint8_t*, uint8_t*, int32_t);