mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 08:07:45 +00:00
Merge pull request #623 from phire/sw-xfb-clamping
Fix incorrect clamping in SWRenderer.
This commit is contained in:
commit
79eb0f8d0c
3 changed files with 20 additions and 20 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue