From 69f33a4782857bf2027db6c81f670409bed76b43 Mon Sep 17 00:00:00 2001 From: iCatButler Date: Sat, 30 Jul 2016 17:43:12 +0100 Subject: 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 --- libpcsxcore/pgxp_debug.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libpcsxcore/pgxp_debug.h') diff --git a/libpcsxcore/pgxp_debug.h b/libpcsxcore/pgxp_debug.h index b19b3560..aaac6333 100644 --- a/libpcsxcore/pgxp_debug.h +++ b/libpcsxcore/pgxp_debug.h @@ -30,7 +30,13 @@ #include "psxcommon.h" -#define PGXP_CPU_DEBUG +//#define PGXP_CPU_DEBUG +//#define PGXP_OUTPUT_ALL +//#define PGXP_FORCE_INPUT_VALUES +//#define PGXP_TEST_OUTPUT_VALUES + +#define PGXP_DEBUG_TOLERANCE 2.f + // Debug wrappers void PGXP_psxTraceOp(u32 eOp, u32 code); -- cgit v1.2.3