diff --git a/src/common/gsvector_neon.h b/src/common/gsvector_neon.h index bcde43d49..967a67e19 100644 --- a/src/common/gsvector_neon.h +++ b/src/common/gsvector_neon.h @@ -2346,6 +2346,8 @@ public: return GSVector4i(vcombine_s32(xy.v2s, zw.v2s)); } + ALWAYS_INLINE static GSVector4i xyxy(const GSVector2i& xyzw) { return GSVector4i(vcombine_s32(xyzw.v2s, xyzw.v2s)); } + ALWAYS_INLINE GSVector2i xy() const { return GSVector2i(vget_low_s32(v4s)); } ALWAYS_INLINE GSVector2i zw() const { return GSVector2i(vget_high_s32(v4s)); } diff --git a/src/common/gsvector_nosimd.h b/src/common/gsvector_nosimd.h index 8293131ea..58362c367 100644 --- a/src/common/gsvector_nosimd.h +++ b/src/common/gsvector_nosimd.h @@ -1665,6 +1665,8 @@ public: return GSVector4i(xy.x, xy.y, zw.x, zw.y); } + ALWAYS_INLINE static GSVector4i xyxy(const GSVector2i& xyzw) { return GSVector4i(xyxy.x, xyxy.y, xyzw.x, xyzw.y); } + ALWAYS_INLINE GSVector2i xy() const { return GSVector2i(x, y); } ALWAYS_INLINE GSVector2i zw() const { return GSVector2i(z, w); } diff --git a/src/common/gsvector_sse.h b/src/common/gsvector_sse.h index a3fd46f83..0e98d5cb4 100644 --- a/src/common/gsvector_sse.h +++ b/src/common/gsvector_sse.h @@ -1831,6 +1831,11 @@ public: ALWAYS_INLINE GSVector4i xyxy(const GSVector4i& v) const { return upl64(v); } + ALWAYS_INLINE static GSVector4i xyxy(const GSVector2i& xyzw) + { + return GSVector4i(_mm_unpacklo_epi64(xyzw.m, xyzw.m)); + } + ALWAYS_INLINE static GSVector4i xyxy(const GSVector2i& xy, const GSVector2i& zw) { return GSVector4i(_mm_unpacklo_epi64(xy.m, zw.m));