Skip to content

Commit b5b87ef

Browse files
authored
Simplify vmask4 mask() implementation for reference SIMD
1 parent 3ee11bc commit b5b87ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/astcenc_vecmathlib_none_4.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,10 @@ ASTCENC_SIMD_INLINE vmask4 operator~(vmask4 a)
412412
*/
413413
ASTCENC_SIMD_INLINE unsigned int mask(vmask4 a)
414414
{
415-
return ((a.m[0] >> 31) & 0x1) |
416-
((a.m[1] >> 30) & 0x2) |
417-
((a.m[2] >> 29) & 0x4) |
418-
((a.m[3] >> 28) & 0x8);
415+
return (a.m[0] & 0x1) |
416+
(a.m[1] & 0x2) |
417+
(a.m[2] & 0x4) |
418+
(a.m[3] & 0x8);
419419
}
420420

421421
/**

0 commit comments

Comments
 (0)