Commit Graph

442 Commits

Author SHA1 Message Date
1ee6824324 VertexLoaderTest: Add test for skipped texture coordinates
Jimmie Johnson's Anything with an Engine is known to use texture coordinate 7 (and only texture coordinate 7) in some cases. There are a lot of possible edge-cases, so this test brute-forces all combinations with coordinates 0, 1, and 2.
2023-12-02 15:54:52 -08:00
530590d162 VertexLoaderTest: Add test for skipped colors
This test fails with the non-JIT vertex loader due to an issue fixed in a later commit in this PR. (Note that the non-JIT vertex loader is only used on machines where no JIT is available or if COMPARE_VERTEXLOADERS is enabled in VertexLoaderBase.cpp.)
2023-12-02 15:53:59 -08:00
255ee3fdce JitArm64: Use LSL+CLS for classifying floats
This is a little trick I came up with that lets us restructure our float
classification code so we can exit earlier when the float is normal,
which is the case more often than not.

First we shift left by 1 to get rid of the sign bit, and then we count
the number of leading sign bits. If the result is less than 10 (for
doubles) or 7 (for floats), the float is normal. This is because, if the
float isn't normal, the exponent is either all zeroes or all ones.
2023-11-28 18:30:45 +01:00
f0d2ce4683 Remove _M_X86 in favour of _M_X86_64 2023-11-28 23:03:20 +11:00
76d605639b Merge pull request #11881 from JosJuice/aarch64-function-call
JitArm64: Add utility for calling a function with arguments
2023-11-25 17:30:42 +01:00
ec69ed2173 Merge pull request #12133 from mandar1jn/skylanders-improved-generation
Skylanders: Improve figure data view and generation
2023-11-05 18:29:19 +01:00
afdf6de041 Skylanders: Improve figure data view and generation
Co-authored-by: deReeperJosh <joshua@dereeper.co.nz>
2023-11-05 18:06:10 +01:00
c248a69268 JitArm64: Add utility for calling a function with arguments
With this, situations where multiple arguments need to be moved
from multiple registers become easy to handle, and we also get
compile-time checking that the number of arguments is correct.
2023-11-01 19:01:58 +01:00
ef7f3b5bac UnitTests: Test ApproximateReciprocalSquareRoot 2023-10-30 22:39:12 +01:00
75a62e116c PageFaultTest: Use GTEST_SKIP instead of early return
Using GTEST_SKIP instead of just returning from the function shows that
a test was skipped in the test summary. If GTEST_SKIP is called the rest
of the function won't be run, just like with the return.

GTEST_SKIP wasn't available until gtest 1.10, and we updated to 1.12 in
597f8f1b87.
2023-08-29 12:24:11 -07:00
2502e412b3 Merge pull request #12117 from JosJuice/config-callback-cpu
Don't call RunAsCPUThread in config callbacks
2023-08-26 16:34:46 +02:00
1104b93ee4 UnitTests: Declare as CPU thread when using CPUThreadConfigCallback
This fixes a bunch of DEBUG_ASSERTs in the unit tests.
2023-08-17 19:19:25 +02:00
4ccac53e9f X64EmitterTest: Check bytes instead of disassembly in JMP test
Check bytes directly to avoid ambiguity in the disassembly between short
and near jumps, which could hypothetically cause the test to pass when
it shouldn't.
2023-08-05 13:51:42 -07:00
dcd5ba6587 x64EmitterTest: add J/J_CC/CALL unit tests 2023-08-05 13:51:42 -07:00
17f2072e1c UnitTests: Enable cluster check in FileSystemTest.GetDirectoryStats. 2023-07-14 04:20:57 +02:00
04fcf68176 xEmitter: Convert PrefetchLevel to enum class 2023-06-17 16:41:32 -07:00
4c2759f541 XEmitter: Add enum class Jump
Replace the bool parameter force5bytes in J, JMP, and J_CC with an enum
class Jump::Short/Near. Many callers set that parameter to the literal
'true', which was unclear if you didn't already know what it did.
2023-06-12 13:04:18 -07:00
b3c9f49cbe Core: Assert that only the Host thread may call PauseAndLock(). 2023-06-02 18:51:43 +02:00
d368c989e7 StringUtil: Move GetEscapedHtml() into Common namespace 2023-05-16 14:21:19 -04:00
df458aed89 CMake: Set --output-on-failure flag for unittests target. 2023-05-14 04:52:50 +02:00
784a216927 Common/MathUtil: Move IntLog2 into MathUtil namespace
Gets this out of the global namespace.
2023-04-15 03:35:05 -04:00
23843583bf PowerPC: Refactor to class, move to System. 2023-04-09 21:48:37 +02:00
62de9c593b UnitTests: Avoid ppcState global. 2023-04-05 20:09:32 +02:00
7f50c070b2 JitInterface: Convert m_jit to unique_ptr. 2023-03-26 14:38:07 +02:00
9217a9eba4 JitInterface: Refactor to class, move to System. 2023-03-26 14:38:07 +02:00
9c0226b7e3 JitBase: Avoid System::GetInstance() and ppcState. 2023-03-25 02:37:00 +01:00
0f326c6067 Common: Move FixedSizeQueue into Common namespace
Gets this out of the global namespace.
2023-03-22 01:23:15 -04:00
0888c93d48 Common: Move FPU-related helpers into Common namespace
Makes these utilities' namespace consistent with the majority of the
Common library.
2023-03-21 10:58:13 -04:00
2c2fb869a2 use std-provided randomness for JitArm64 unittests
decreases runtime significantly and lessens dependency on mbedtls
2023-02-22 12:55:12 -08:00
c36994a90d Add unit test for File::CreateFullPath(). 2023-02-15 02:56:10 +01:00
07e98c7790 CMake: Use imported target for fmt in tests
This properly adds the header include paths when using system fmt
2023-01-29 14:37:54 -06:00
61ba516570 PowerPC: Move a few functions to PowerPCState. 2023-01-27 15:22:44 +01:00
e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
597f8f1b87 Externals: Convert gtest to a submodule and update to v1.12.1 2023-01-20 11:43:34 -08:00
92b6446da1 UnitTests: Add custom main that calls RegisterMsgAlertHandler
This prevents a failed assertion from hanging on the MSVC buildbots.
2023-01-13 15:38:00 -08:00
454537d53e Replace BitUtils with C++20: RotateLeft/RotateRight
Now that we've flipped the C++20 switch, let's start making use of
the nice new <bit> header.

I'm planning on handling this move away from BitUtils.h incrementally
in a series of PRs. There may be a few functions remaining in
BitUtils.h by the end that C++20 doesn't have any equivalents for.
2022-12-11 08:59:18 +01:00
daa70533cd CoreTiming: Store Globals in CoreTimingManager. 2022-11-27 03:47:12 +01:00
c9558ecb4c CoreTiming: Refactor to class. 2022-11-27 03:47:12 +01:00
86f17511fc CoreTiming: Move the 'Globals' instance into Core::System. 2022-11-26 04:22:32 +01:00
0a6fdb9c13 HW: Pass System to MMIO handlers. 2022-11-23 05:52:21 +01:00
Mai
a47ed2124f Merge pull request #11253 from AdmiralCurtiss/core-timing-events-pass-system
CoreTiming: Pass Core::System to Events.
2022-11-23 04:46:11 +00:00
0bcd3c79bb VertexLoader: Eliminate use of DataReader
DataReader is generally jank - it has a start and end pointer, but the end pointer is generally not used, and all of the vertex loaders mostly bypassed it anyways.

Wrapper code (the vertex loaer test, as well as Fifo.cpp and OpcodeDecoding.cpp) still uses it, as does the software vertex loader (which is not a subclass of VertexLoader). These can probably be eliminated later.
2022-11-22 17:17:11 -08:00
a36a5c1308 CoreTiming: Pass Core::System to Events. 2022-11-06 17:54:58 +01:00
53ee1b50fe VertexLoaderTest: Add NormalAll
This currently fails for direct with NormalIndex3 enabled (see https://bugs.dolphin-emu.org/issues/12952). The goal of this test is to be able to confidently say that that bug has been fixed.
2022-09-18 23:33:23 -07:00
729498ab41 VertexLoaderTest: Add DirectAllComponents
We have one that does a similar thing, but only to measure speed and uses indices. This one verifies accuracy (and uses the largest possible input size by using direct components).
2022-09-18 23:33:23 -07:00
8b7e6f1863 Merge pull request #10933 from shuffle2/vs
msbuild: fix overbuilding of externals and lessen rebuild likelyhood
2022-08-22 15:19:13 +02:00
f9e39cf200 Add Discord presence ioctlv to /dev/dolphin 2022-08-06 07:32:29 +01:00
c5da2877cc msbuild: refactor to reduce rebuild events
* moves dolphin-specific settings out of Base.props
* creates exports.props for externals, allowing to easily import
  individual Externals
* corrects some cruft that accumulated and probably contributed
  to msbuild overbuilding
2022-08-02 22:24:22 -07:00
fb45ed3981 Merge pull request #10883 from Pokechu22/pi-fifo-reset-gp-fifo
ProcessorInterface: Reset both GPFifo and Fifo on PI_FIFO_RESET
2022-07-31 17:06:37 +02:00
f8b9034a28 Crypto/SHA1: add unittests 2022-07-27 01:07:48 -07:00