Commit graph

54 commits

Author SHA1 Message Date
Unknown W. Brackets
a84df2536a Core: Fix vrot cos(2) typo. 2021-04-25 19:26:16 -07:00
Unknown W. Brackets
07cb37c2c1 Compat: Remove single/double sincos path.
New implementation should work for both cases.
2021-04-25 07:09:50 -07:00
Unknown W. Brackets
ad876f06f3 Core: Special case 1/-1 for cosine.
It still gets these off from zero, so let's just special case.
2021-04-24 16:29:20 -07:00
Unknown W. Brackets
8f41c78ed7 Core: Strip off lower bits of sin/cos results. 2021-04-24 16:29:20 -07:00
Unknown W. Brackets
ad9ad0f70b Core: Apply custom narrowing before VFPU sin/cos.
This makes the results much more accurate to the PSP's results.
Could narrow a bit further swapping sin/cos/neg, which might be what the
hardware does given vrot.
2021-04-24 16:29:20 -07:00
Unknown W. Brackets
e9076c90bb Core: Cleanup VFPU float bit handling.
Just to use a common union.
2021-04-24 15:49:22 -07:00
Unknown W. Brackets
f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Henrik Rydgård
9e4c7c84ac Only use double precision sincos in Hitman Reborn Battle Arena 2. See #12900 2020-11-23 23:51:07 +01:00
Henrik Rydgård
c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Henrik Rydgård
f9ede96344 Address feedback 2019-08-06 16:39:28 +02:00
Henrik Rydgård
8642134419 VFPU-Int: Add a few fast-paths to ReadMatrix/WriteMatrix. Should gain back part of the speed lost in #12217
(which fixed #5399).
2019-08-06 16:29:58 +02:00
Unknown W. Brackets
c1c869df27 interp: Implement software inverse square root. 2019-08-04 21:24:13 -07:00
Unknown W. Brackets
6028b79895 interp: Oops, fix vdot bug with subnormals. 2019-08-04 21:23:19 -07:00
Unknown W. Brackets
13278dc1f4 interp: Implement software sqrt to match PSP.
This matches the PSP's square root better.

Disabled by default using a compile-time flag.
2019-08-04 21:23:04 -07:00
Unknown W. Brackets
7b84be1479 interp: Fix adding infinity in software dot. 2019-08-04 21:17:34 -07:00
Unknown W. Brackets
c61a24cef0 interp: Handle rounding in software dot. 2019-08-04 21:17:27 -07:00
Unknown W. Brackets
d5e572b82e interp: Correct INF * 0 during dot. 2019-08-04 21:17:21 -07:00
Unknown W. Brackets
2ba35c6391 interp: Use an integer multiply for dots. 2019-08-04 21:17:09 -07:00
Unknown W. Brackets
08a894abde interp: Handle NaN better in vfpu_dot. 2019-08-04 21:17:00 -07:00
Unknown W. Brackets
4bff980d34 interp: Use software dot for better accuracy.
This gets some vdot/similar tests to give more accurate results compared
to hardware.  Also added flushing of zero and NaNs.

Currently disabled, only enabled with a compile-time flag.
2019-08-04 21:14:23 -07:00
Unknown W. Brackets
c7e83cd4fa interp: Correct vfim for -inf and similar.
Was dropping the sign bit before for inf and nan.
2019-03-31 13:41:48 -07:00
Unknown W. Brackets
af3ed69144 interp: Mask moves to vfpu ctrl.
These bits of the registers can't be written.
2019-03-31 10:37:07 -07:00
Unknown W. Brackets
b86a6af364 interp: Properly apply mask on single lane ops.
When using something like vadd.s, we should still be applying the mask.
Mainly should only matter if masks are set in a conditional, or if games
nop out instructions.
2019-03-31 10:13:28 -07:00
Unknown W. Brackets
0be3213151 interp: Correct vscl prefix handling. 2019-03-31 10:13:28 -07:00
Unknown W. Brackets
fef8e71b8f interp: Correct behavior for matrixes with size=1.
Games don't (shouldn't?) actually use 1x1 matrices, but they seem to have
predictable behavior in matrix ops.
2019-03-31 08:21:29 -07:00
Unknown W. Brackets
22940f0393 Debugger: Avoid asserts in disassembly. 2018-06-08 06:59:18 -07:00
Henrik Rydgard
e1e335885c A better alternative to #8564 2016-12-01 18:23:58 +01:00
Henrik Rydgard
3cae60b320 Revert potentially dangerous optimization that may have caused #8754, though not sure how. 2016-05-18 21:22:08 +02:00
Henrik Rydgard
2cbfb192c4 IR: Lots more VFPU support, some with SIMD 2016-05-12 12:17:25 +02:00
Bovine
2ed4c1bd6b Fix matrix disassembly notation
Changed disassembler output to match gas input for operations on
transposed matrices where row != col.
2015-01-03 02:04:08 -07:00
Henrik Rydgard
29dcc0a303 Minor cleanups, warning fixes 2014-12-06 12:25:28 +01:00
Henrik Rydgard
8f016d3e48 Merge some matrix utils and stuff from the NEON branch 2014-11-29 11:37:45 +01:00
Aapo Rantalainen
ed6b8e34ab Fix missing includes (stdio.h) 2014-01-01 22:31:03 +02:00
Henrik Rydgård
ce378b231f Delete CPU.cpp/h , cleanup 2013-12-30 00:11:29 +01:00
Henrik Rydgard
2d8429ac48 Assorted cleanup in the MIPS emulation 2013-12-10 13:15:16 +01:00
Unknown W. Brackets
ec05146ffd Improve vfpu disasm for a few instructions. 2013-11-29 10:07:15 -08:00
Henrik Rydgard
55500d4bb6 Reorder VFPU registers in memory so that we can flush and reload them in bulk more often.
Doesn't actually do that yet, that's for the NEON branch.
2013-11-28 13:27:51 +01:00
Unknown W. Brackets
e3834d5833 Avoid some unlikely uninitialized values. 2013-10-26 18:31:14 -07:00
Unknown W. Brackets
109ad17ac6 Use a typesafe struct for opcodes.
Also, correctly read delayslots using Read_Instruction on ARM.
2013-08-24 15:36:24 -07:00
Unknown W. Brackets
46c5a48a86 Clean up some minor aliasing. 2013-08-22 23:31:49 -07:00
Unknown W. Brackets
b733bc1a2a Clean up some indents, add some reporting. 2013-05-18 02:09:32 -07:00
Unknown W. Brackets
e16514b50d Avoid float copy in vfpu to workaround 32-bit bug.
This appears to be an MSVC bug (or just precision issue) when using
fast math, only on 32-bit builds.  Anyway, memcpy or u32 * fixes it.

Unfortunately, matrix ops have similar issues and memcpy doesn't seem
to help there.
2013-05-18 02:09:32 -07:00
Henrik Rydgard
516ca8a0c4 Merge branch 'master' into armjit-fpu
Conflicts:
	Core/MIPS/ARM/ArmJit.h
	Core/MIPS/x86/CompVFPU.cpp
	GPU/GLES/Framebuffer.cpp
2013-02-28 23:56:28 +01:00
Unknown W. Brackets
01f3c4ecde Log an error if we hit a 1x1 matrix. 2013-02-19 07:46:29 -08:00
Henrik Rydgard
e32721c72a Merge branch 'master' into armjit-fpu
Conflicts:
	Core/MIPS/MIPSVFPUUtils.cpp
	Core/MIPS/x86/CompVFPU.cpp
	GPU/GLES/VertexDecoder.cpp
2013-02-19 00:50:33 +01:00
Unknown W. Brackets
179fccaff7 Tests say matrices apply mask to last col (kinda.)
It seems inconsistent but probably better than before.  Also add an error.
2013-02-18 13:19:16 -08:00
Unknown W. Brackets
be631dea64 Disasm transposed vectors properly. 2013-02-17 17:52:58 -08:00
Henrik Rydgard
159f423135 VFPUutil style & simplification 2013-02-16 09:28:56 +01:00
Henrik Rydgard
909b768f47 Don't need separate variables for writemask. Some optimizations. 2013-02-16 09:28:55 +01:00
Henrik Rydgard
526335cacf VFPUutil style & simplification 2013-02-15 23:09:02 +01:00