From 0189e1ef81d3c506891414b9c0ba8b03696c1ae1 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 15 Jan 2025 23:53:48 +1000 Subject: [PATCH] Common: Fix vector allfalse() on ARM32 --- src/common/gsvector_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/gsvector_neon.h b/src/common/gsvector_neon.h index eefb317b42..c0c4642222 100644 --- a/src/common/gsvector_neon.h +++ b/src/common/gsvector_neon.h @@ -661,8 +661,8 @@ class alignas(16) GSVector2i #ifdef CPU_ARCH_ARM64 return (vmaxv_u32(vreinterpret_u8_s32(v2s)) & 0x80) != 0x80; #else - return ((vget_lane_u32(vreinterpret_u32_s32(v2s), 0) & vget_lane_u32(vreinterpret_u32_s32(v2s), 1) & 0x80808080u) == - 0); + return ( + ((vget_lane_u32(vreinterpret_u32_s32(v2s), 0) | vget_lane_u32(vreinterpret_u32_s32(v2s), 1)) & 0x80808080u) == 0); #endif } @@ -2125,8 +2125,8 @@ class alignas(16) GSVector4i #ifdef CPU_ARCH_ARM64 return (vmaxvq_u32(vreinterpretq_u8_s32(v4s)) & 0x80) != 0x80; #else - const uint32x2_t res = vreinterpret_u32_s32(vand_s32(vget_low_s32(v4s), vget_high_s32(v4s))); - return ((vget_lane_u32(res, 0) & vget_lane_u32(res, 1) & 0x80808080u) == 0); + const uint32x2_t res = vreinterpret_u32_s32(vorr_s32(vget_low_s32(v4s), vget_high_s32(v4s))); + return ((vget_lane_u32(res, 0) | vget_lane_u32(res, 1) & 0x80808080u) == 0); #endif }