diff options
| author | iCatButler <i.am.catbutler@gmail.com> | 2016-07-30 17:43:12 +0100 |
|---|---|---|
| committer | iCatButler <i.am.catbutler@gmail.com> | 2016-07-30 17:43:12 +0100 |
| commit | 69f33a4782857bf2027db6c81f670409bed76b43 (patch) | |
| tree | ca5ac7afe837748e8c1db89c2519eabf367df4ea /libpcsxcore/pgxp_value.h | |
| parent | d5b40fbbe0eee90573ec1848ac135962fba9438e (diff) | |
Various CPU updates
- Sign extend values read using LH
- Add conversion functions to represent Signed/Unsigned 16-bit ranges
- Add overflow and truncation functions for 16-bit ranges
- Sign extend imm value in ADD(U)
- Add component overflow and truncation to ADD/SUB functions
- Construct new value in logic operators where result using inputs is undefined
- Return a valid W component from logic operators (if either input has one)
- Compare against high value (y), then low value (x) in less than operators
- Use doubles and implement overflow for Multiply operations to try to increase accuracy
- Use unsigned values in both MUL and DIV operations to make output as accurate as possible
- Implement several variants of shift operators. Trying both arithmetically correct and more analytical approaches with varying success.
Debug updates
- Added ability to force all values to be equal to low precision values before operating on them
- Added feature to test output of operations against a tolerance and print only those which fail
GPU updates
- Colour vertices with valid XY coordinates but no W as cyan to make them easier to spot
- Remove cyan colouring for stale vertices (wasn't useful)
- Added ability to skip debug rendering when needed (like seeing the output of offscreen rendering applied to a sprite).
- Added new mode which shows primitive type
Diffstat (limited to 'libpcsxcore/pgxp_value.h')
| -rw-r--r-- | libpcsxcore/pgxp_value.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libpcsxcore/pgxp_value.h b/libpcsxcore/pgxp_value.h index e92f5f4a..68809fa2 100644 --- a/libpcsxcore/pgxp_value.h +++ b/libpcsxcore/pgxp_value.h @@ -98,10 +98,16 @@ typedef enum static const PGXP_value PGXP_value_invalid_address = { 0.f, 0.f, 0.f, 0, 0, 0, INVALID_ADDRESS, 0, 0 }; static const PGXP_value PGXP_value_zero = { 0.f, 0.f, 0.f, 0, 0, VALID_ALL, 0, 0, 0 }; -void MakeValid(PGXP_value *pV, u32 psxV); -void Validate(PGXP_value *pV, u32 psxV); -void MaskValidate(PGXP_value *pV, u32 psxV, u32 mask, u32 validMask); +void SetValue(PGXP_value *pV, u32 psxV); +void MakeValid(PGXP_value *pV, u32 psxV); +void Validate(PGXP_value *pV, u32 psxV); +void MaskValidate(PGXP_value *pV, u32 psxV, u32 mask, u32 validMask); +u32 ValueToTolerance(PGXP_value *pV, u32 psxV, float tolerance); +double f16Sign(double in); +double f16Unsign(double in); +double fu16Trunc(double in); +double f16Overflow(double in); typedef union { |
