GSVector: Remove unused functions

This commit is contained in:
Stenzek 2024-07-11 18:36:43 +10:00
parent d8413719c1
commit d70f5ddb32
No known key found for this signature in database
4 changed files with 2 additions and 166 deletions

View file

@ -7,22 +7,6 @@
#include <cstring>
enum Align_Mode
{
Align_Outside,
Align_Inside,
Align_NegInf,
Align_PosInf
};
enum Round_Mode
{
Round_NearestInt = 8,
Round_NegInf = 9,
Round_PosInf = 10,
Round_Truncate = 11
};
template<class T>
class GSVector2T
{

View file

@ -141,50 +141,6 @@ public:
ALWAYS_INLINE bool rintersects(const GSVector4i& v) const { return !rintersect(v).rempty(); }
ALWAYS_INLINE bool rcontains(const GSVector4i& v) const { return rintersect(v).eq(v); }
template<Align_Mode mode>
GSVector4i _ralign_helper(const GSVector4i& mask) const
{
GSVector4i v;
switch (mode)
{
case Align_Inside:
v = add32(mask);
break;
case Align_Outside:
v = add32(mask.zwxy());
break;
case Align_NegInf:
v = *this;
break;
case Align_PosInf:
v = add32(mask.xyxy());
break;
default:
break;
}
return v.andnot(mask.xyxy());
}
/// Align the rect using mask values that already have one subtracted (1 << n - 1 aligns to 1 << n)
template<Align_Mode mode>
GSVector4i ralign_presub(const GSVector2i& a) const
{
return _ralign_helper<mode>(GSVector4i(a));
}
template<Align_Mode mode>
GSVector4i ralign(const GSVector2i& a) const
{
// a must be 1 << n
return _ralign_helper<mode>(GSVector4i(a) - GSVector4i(1, 1));
}
//
ALWAYS_INLINE u32 rgba32() const
{
GSVector4i v = *this;
@ -1347,19 +1303,6 @@ public:
return GSVector4(recip);
}
template<int mode>
ALWAYS_INLINE GSVector4 round() const
{
if constexpr (mode == Round_NegInf)
return floor();
else if constexpr (mode == Round_PosInf)
return ceil();
else if constexpr (mode == Round_NearestInt)
return GSVector4(vrndnq_f32(v4s));
else
return GSVector4(vrndq_f32(v4s));
}
ALWAYS_INLINE GSVector4 floor() const { return GSVector4(vrndmq_f32(v4s)); }
ALWAYS_INLINE GSVector4 ceil() const { return GSVector4(vrndpq_f32(v4s)); }

View file

@ -187,50 +187,6 @@ public:
ALWAYS_INLINE bool rintersects(const GSVector4i& v) const { return !rintersect(v).rempty(); }
ALWAYS_INLINE bool rcontains(const GSVector4i& v) const { return rintersect(v).eq(v); }
template<Align_Mode mode>
GSVector4i _ralign_helper(const GSVector4i& mask) const
{
GSVector4i v;
switch (mode)
{
case Align_Inside:
v = add32(mask);
break;
case Align_Outside:
v = add32(mask.zwxy());
break;
case Align_NegInf:
v = *this;
break;
case Align_PosInf:
v = add32(mask.xyxy());
break;
default:
break;
}
return v.andnot(mask.xyxy());
}
/// Align the rect using mask values that already have one subtracted (1 << n - 1 aligns to 1 << n)
template<Align_Mode mode>
GSVector4i ralign_presub(const GSVector2i& v) const
{
return _ralign_helper<mode>(GSVector4i(v));
}
template<Align_Mode mode>
GSVector4i ralign(const GSVector2i& v) const
{
// a must be 1 << n
return _ralign_helper<mode>(GSVector4i(v).sub32(GSVector4i(1, 1)));
}
//
ALWAYS_INLINE u32 rgba32() const
{
GSVector4i v = *this;

View file

@ -141,47 +141,6 @@ public:
ALWAYS_INLINE bool rintersects(const GSVector4i& v) const { return !rintersect(v).rempty(); }
ALWAYS_INLINE bool rcontains(const GSVector4i& v) const { return rintersect(v).eq(v); }
template<Align_Mode mode>
GSVector4i _ralign_helper(const GSVector4i& mask) const
{
GSVector4i v;
switch (mode)
{
case Align_Inside:
v = add32(mask);
break;
case Align_Outside:
v = add32(mask.zwxy());
break;
case Align_NegInf:
v = *this;
break;
case Align_PosInf:
v = add32(mask.xyxy());
break;
default:
break;
}
return v.andnot(mask.xyxy());
}
/// Align the rect using mask values that already have one subtracted (1 << n - 1 aligns to 1 << n)
template<Align_Mode mode>
GSVector4i ralign_presub(const GSVector2i& v) const
{
return _ralign_helper<mode>(GSVector4i(v));
}
template<Align_Mode mode>
GSVector4i ralign(const GSVector2i& v) const
{
// a must be 1 << n
return _ralign_helper<mode>(GSVector4i(v).sub32(GSVector4i(1, 1)));
}
//
@ -989,15 +948,9 @@ public:
return (v_ + v_) - (v_ * v_) * *this;
}
template<int mode>
ALWAYS_INLINE GSVector4 round() const
{
return GSVector4(_mm_round_ps(m, mode));
}
ALWAYS_INLINE GSVector4 floor() const { return GSVector4(_mm_round_ps(m, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)); }
ALWAYS_INLINE GSVector4 floor() const { return round<Round_NegInf>(); }
ALWAYS_INLINE GSVector4 ceil() const { return round<Round_PosInf>(); }
ALWAYS_INLINE GSVector4 ceil() const { return GSVector4(_mm_round_ps(m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)); }
ALWAYS_INLINE GSVector4 madd(const GSVector4& a_, const GSVector4& b_) const
{