Stenzek
5b3bcf139d
GTE: Simplify FLAG error bit update
...
The error bit is always clear when it is computed, since FLAG is either
reset at the start of the instruction, or masked when the guest writes
it. So it can be ORed in, instead of being cleared and reinserted.
2026-10-13 15:21:24 +10:00
Stenzek
79161b0976
GTE: Use shift for IRGB/ORGB conversion
...
Dividing rounds towards zero, which needs a fixup for negative values.
Those are clamped to zero regardless, so an arithmetic shift is the same.
2026-10-13 15:21:24 +10:00
Stenzek
9a5bb3d856
GTE: Factorize NCLIP to use three multiplies
...
The cross product can be computed with half as many multiplies. None of
the intermediates can overflow, and only the sum was being range checked,
so MAC0 and the flags are unchanged.
2026-10-13 15:21:24 +10:00
Stenzek
d6d1373c55
GTE: Specialize instruction handlers on sf/lm
...
The recompilers resolve the handler once per instruction, so return a
variant with the sf/lm bits baked in. Shift amounts and IR saturation
limits become constants, rather than being decoded for each execution.
2026-10-13 15:21:24 +10:00
Stenzek
769f4330b5
GTE: Force inline matrix/lighting/projection helpers
...
The triple variants were making up to nine calls per instruction, with
FLAG and IR1-3 going through memory between each of them. PGXP's part of
RTPS is moved out of line instead, so the integer path stays compact.
2026-10-13 15:21:24 +10:00
Stenzek
953285bf56
GTE: Only sign extend MAC results on overflow
...
Sign extending to 44 bits is a no-op unless the value is out of range,
so move it to the overflow path, and test both bounds with a single
comparison. Shortens the dependency chain of each matrix row.
2026-10-13 15:21:24 +10:00
Stenzek
22a06c8a40
GTE: Add regression tests
...
Covers IR/colour saturation, 44-bit MAC overflow wrapping, NCLIP and ORGB
against reference formulas, and hashes the register state after random
instructions through both the interpreter and recompiler entry points.
2026-10-13 15:21:24 +10:00
Stenzek
5a5bb3db44
SPU: Extract reverb-master-enable out of loop
2026-10-13 15:21:24 +10:00
Stenzek
fd8574a845
SPU: Pack reverb FIR coefficients into 16-bit lanes
...
Use three packed multiply-adds for the 20-tap upsampling FIR and widen
the shared coefficients for downsampling. Preserve the final shift and clamp.
The absolute coefficient sum is 31142, keeping every s32 sum within range.
Validated output, persistent state, and RAM against the original across
8,192 frames using both SSE4.1 and SSE2; compiled with clang-cl /O2.
2026-10-13 15:21:24 +10:00
Stenzek
16fa96940a
SPU: Skip reverb output filtering at zero volume
...
Bypass the read-only upsampling FIR for channels with zero output volume.
Keep updating feedback and resampling history so re-enabling output is exact.
Validated output and persistent state against the original implementation
across 8,192 frames with independent output-volume and enable transitions.
2026-10-13 15:21:23 +10:00
Stenzek
5b37f3d913
SPU: Fast-path ADPCM blocks without predictors
...
Decode shifted nibbles directly when both predictor coefficients are zero,
preserving interpolation history, predictor history, and block flags.
Validated against the original decoder across 262,144 blocks and all
header filters/shifts; compiled with clang-cl /O2.
2026-10-13 15:21:23 +10:00
Stenzek
38651d4009
CPU/Recompiler: Handle large ARM64 backpatch cycle counts
...
Materialize cycle counts in a scratch register when they do not fit an ADD/SUB immediate, avoiding assertions for long blocks.
2026-10-13 15:21:23 +10:00
Stenzek
22a3b0674e
CPU/Recompiler: Use 32-bit ARM64 fastmem LUT indices
...
Shift the guest address into a W register in load and store paths, matching operand widths and avoiding VIXL_DEBUG assertions.
2026-10-13 15:21:23 +10:00
Stenzek
63cbd900d7
CPU/Recompiler: Align ARM32 backpatch thunk calls
...
Pad odd register save lists with the reserved state register to preserve the required eight-byte stack alignment when calling memory helpers.
2026-10-13 15:21:23 +10:00
Stenzek
b224f7a8ed
CPU/Recompiler: Decode ARM32 load exceptions from r0
...
Negate the low half of the checked-read error return so address and bus errors retain their correct exception codes.
2026-10-13 15:21:23 +10:00
Stenzek
05c811f4e8
CPU/Recompiler: Truncate ARM64 multiplication results in LO
...
Clear the upper product bits after extracting HI so an MFLO register rename cannot carry them into a guest fastmem address.
2026-10-13 15:21:23 +10:00
Stenzek
501fe22ed8
CPU/Recompiler: Mask constant variable shift counts on ARM
...
Mask shift counts to five bits before checking for zero, avoiding invalid ARM64 instructions and ARM32 assembler failures for counts such as 32.
2026-10-13 15:21:23 +10:00
Stenzek
c714922a54
CPU/Recompiler: Fix ARM32 VIXL debug builds
...
Use the assembler addresses for debug scopes and finalize jump patches and trampolines so VIXL_DEBUG can compile and emit code correctly.
2026-10-13 15:21:23 +10:00
Stenzek
96c75771c2
CPU/Recompiler: Correct misaligned indirect jump exceptions
...
Check constant JALR targets and report invalid JR/JALR targets in EPC and BadVaddr before executing the delay slot on every backend.
2026-10-13 15:21:23 +10:00
Stenzek
00adf511d9
CPU/Recompiler: Preserve pending loads on memory exceptions
...
Include the pending load in exception flushes so RaiseException commits it before entering the handler on every backend.
2026-10-13 15:21:22 +10:00
Stenzek
cc6f410b09
CPU/Recompiler: Trap constant signed arithmetic overflow
...
Detect overflow in folded ADD, SUB and ADDI and use the interpreter exception path, including writes to zero and branch delay slots.
2026-10-13 15:21:22 +10:00
Stenzek
95102c3641
CPU/Recompiler: Dispatch interpreter fallback exceptions
...
Exit generated blocks when the interpreter raises an exception, preserving its handler PC across all backends and implementing the missing RISC-V and LoongArch fallback paths.
2026-10-13 15:21:22 +10:00
Stenzek
19d5077076
CPU/Recompiler: Keep link-register delay slots in order
...
Track ra as the implicit branch-and-link destination and check decoded register dependencies before swapping the delay slot.
2026-10-13 15:21:22 +10:00
Stenzek
10525f9268
CPU/Recompiler: Cancel pending loads on self moves
...
Compile same-register moves as writes to cancel load delays, preserving constant operands before clearing the destination.
2026-10-13 15:21:22 +10:00
Stenzek
a6a22baff2
CPU/Recompiler: Respect load delays when swapping NOP slots
...
Check pending loads before accepting a NOP delay slot so branches read the original register value.
2026-10-13 15:21:22 +10:00
Stenzek
f20b39bd0b
FileSystem: Add more ReadFileToString() overloads
2026-10-13 15:21:22 +10:00
Stenzek
7d618a582f
FileSystem: More RVO optimizations
2026-10-13 15:21:22 +10:00
Stenzek
98c25ab782
FileSystem: Use shared file open for ReadBinaryFile/ReadFileToString
2026-10-13 15:21:22 +10:00
Stenzek
230b4788c0
FileSystem: Extract find result sorting to function
2026-10-13 15:21:22 +10:00
Stenzek
84d511d18e
FileSystem: Add error parameter to FTell64()
2026-10-13 15:21:22 +10:00
Stenzek
1b123c3975
FileSystem: Make OpenSharedCFile() wrap OpenCFile() on non-Windows
2026-10-13 15:21:21 +10:00
Stenzek
03f7316812
FileSystem: Backport additional helper functions
2026-10-13 15:21:21 +10:00
Stenzek
bd44b2a432
Core: Don't reset folders when resetting settings
...
Users having their data save locations would be unexpected.
2026-10-13 15:21:21 +10:00
Stenzek
5941550109
Settings: Don't copy controller type to game
...
These are part of the controller settings...
2026-10-13 15:21:21 +10:00
Stenzek
aa03edcd13
Settings: Add a dedicated key for overlays
2026-10-13 15:21:21 +10:00
Stenzek
de2dd2b68c
StringUtil: Fix possible integer overflow in EncodeAndAppendUTF8()
2026-10-13 15:21:21 +10:00
Stenzek
b8ce9b4df4
System: Provide content details to OnSystemStarted()
...
Avoids the OnGameChanged() call later.
2026-10-13 15:21:21 +10:00
Stenzek
43cf72faa5
GameList: Synchronize settings between FullscreenUI and Qt
...
Also share translations with other hosts.
2026-10-13 15:21:21 +10:00
Stenzek
deaa4a44bc
GameList: Allow use of external SettingsInterface
2026-10-13 15:21:21 +10:00
Stenzek
363da8d4fc
GameList: Don't persist cache map between refreshes
...
It was cleared anyway.
2026-10-13 15:21:21 +10:00
Stenzek
fdb7e8f7bf
GameDatabase: Sort disc sets by save title
...
And allow lookup by name.
2026-10-13 15:21:20 +10:00
Stenzek
8af1da4fcd
Threading: Add WaitFor() to ConditionVariable
2026-10-13 15:21:20 +10:00
Stenzek
3856bf0c3a
SettingsInterface: Guard against copying to self
2026-10-13 15:21:20 +10:00
Stenzek
e468c8084d
Achievements: Separate login and credential saving steps
...
Allows saving to an external settings interface, not needed on desktop.
2026-10-13 15:21:20 +10:00
Stenzek
6a9c296044
Achievements: Extract bucket names out of FullscreenUI
2026-10-13 15:21:20 +10:00
Stenzek
1b79c8b448
Deps: Update to 20261010
2026-10-13 15:21:20 +10:00
Stenzek
00e2997958
OpenGLDevice: Request coherent persistent buffer mappings
v0.1-12083
2026-10-13 15:20:05 +10:00
Stenzek
b3ab322124
OpenGLDevice: Pad push constant range to 16 bytes
2026-10-13 15:20:05 +10:00
Stenzek
cf71020c0d
D3D11Device: Fix race when creating pipelines from worker threads
2026-10-13 15:19:30 +10:00
Stenzek
9cb25f7e98
Qt: Fix crash when desktop file check is skipped
2026-10-10 21:47:38 +10:00