mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 03:55:33 +00:00
Common: Add Vector4i xyxy(Vector2i)
This commit is contained in:
parent
1063c3da7f
commit
9bc5ffe091
@ -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)); }
|
||||
@ -3153,6 +3155,8 @@ public:
|
||||
return GSVector4(vcombine_f32(l.v2s, h.v2s));
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static GSVector4 xyxy(const GSVector2& l) { return GSVector4(vcombine_f32(l.v2s, l.v2s)); }
|
||||
|
||||
#define VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \
|
||||
ALWAYS_INLINE GSVector4 xs##ys##zs##ws() const \
|
||||
{ \
|
||||
|
@ -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(xyzw.x, xyzw.y, xyzw.x, xyzw.y); }
|
||||
|
||||
ALWAYS_INLINE GSVector2i xy() const { return GSVector2i(x, y); }
|
||||
ALWAYS_INLINE GSVector2i zw() const { return GSVector2i(z, w); }
|
||||
|
||||
@ -2320,6 +2322,8 @@ public:
|
||||
|
||||
ALWAYS_INLINE static GSVector4 xyxy(const GSVector2& l, const GSVector2& h) { return GSVector4(l.x, l.y, h.x, h.y); }
|
||||
|
||||
ALWAYS_INLINE static GSVector4 xyxy(const GSVector2& l) { return GSVector4(l.x, l.y, l.x, l.y); }
|
||||
|
||||
#define VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \
|
||||
ALWAYS_INLINE GSVector4 xs##ys##zs##ws() const { return GSVector4(F32[xn], F32[yn], F32[zn], F32[wn]); }
|
||||
|
||||
|
@ -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));
|
||||
@ -2421,6 +2426,11 @@ public:
|
||||
return GSVector4(_mm_movelh_ps(l.m, h.m));
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static GSVector4 xyxy(const GSVector2& l)
|
||||
{
|
||||
return GSVector4(_mm_movelh_ps(l.m, l.m));
|
||||
}
|
||||
|
||||
#define VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \
|
||||
ALWAYS_INLINE GSVector4 xs##ys##zs##ws() const \
|
||||
{ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user