Merge pull request #623 from phire/sw-xfb-clamping

Fix incorrect clamping in SWRenderer.
This commit is contained in:
Lioncash
2014-07-15 12:04:06 -04:00
3 changed files with 20 additions and 20 deletions

View File

@ -20,6 +20,14 @@ inline void Clamp(T* val, const T& min, const T& max)
*val = max;
}
template<class T>
inline T Clamp(const T val, const T& min, const T& max)
{
T ret = val;
Clamp(&ret, min, max);
return ret;
}
// The most significant bit of the fraction is an is-quiet bit on all architectures we care about.
static const u64 DOUBLE_SIGN = 0x8000000000000000ULL,