CPU/PGXP: Inline valid flag updates
This commit is contained in:
@ -58,14 +58,8 @@ struct PGXPValue
|
||||
u32 value;
|
||||
u32 flags;
|
||||
|
||||
ALWAYS_INLINE void SetValid(u32 comp, bool valid = true)
|
||||
{
|
||||
const u32 mask = (1u << comp);
|
||||
flags = valid ? (flags | mask) : (flags & ~mask);
|
||||
}
|
||||
ALWAYS_INLINE void Validate(u32 psxval) { flags = (value == psxval) ? flags : 0; }
|
||||
|
||||
ALWAYS_INLINE bool HasValid(u32 comp) const { return ConvertToBoolUnchecked((flags >> comp) & 1); }
|
||||
ALWAYS_INLINE float GetValidX(u32 psxval) const
|
||||
{
|
||||
return (flags & 1) ? x : static_cast<float>(static_cast<s16>(psxval));
|
||||
|
||||
Reference in New Issue
Block a user