Commit Graph
100 Commits
Author SHA1 Message Date
Stenzek 875f0e07f1 Settings: Shorten fastmem mode description 2026-10-10 21:47:44 +10:00
Stenzek 252c1cbec6 InputManager: Return proper error from GetGenericBindingMapping() 2026-10-10 21:47:44 +10:00
Stenzek e04aa86a42 ZipHelpers: Fix incorrect error message 2026-10-10 21:47:44 +10:00
Stenzek dcb230b15c System: Avoid unnecessary mutex unlock->relock 2026-10-10 21:47:44 +10:00
Stenzek 88af218295 System: Add optional callback to screenshot save 2026-10-10 21:47:44 +10:00
Stenzek 371115a5b8 CPU: Don't stall for GTE with a single cycle remaining
Fixes timing of 5 and 8 cycle commands in psxtest_gte.
2026-10-10 21:47:44 +10:00
Stenzek 44bb56d651 CMake: Improve reproducibility
Relative build RPATH, rcc mtime pinning.
2026-10-10 21:47:44 +10:00
Stenzek 29fe750fc9 MSBuild: Improve reproducibility
Pin mtime of rcc timestamps.
2026-10-10 21:47:44 +10:00
Stenzek 73d4e3c75a CDROM: Vectorize XA resampling 2026-10-10 21:47:43 +10:00
Stenzek bbf5cc9142 GTE: Use branchless saturation for light matrix multiply
With lm set, every normal facing away from a light gets clamped to zero,
so unlike elsewhere, the saturation branches are frequently mispredicted
here. Clamp unconditionally and derive the flag from the comparison.
2026-10-10 21:47:43 +10:00
Stenzek 077c034020 GTE: Mark saturation branches as unlikely
With the helpers inlined, FLAG is kept in a register, which led to the
compiler turning the IR/colour saturation checks into conditional moves.
That is slower than a predicted branch when saturation is rare, and made
DPCS slower than it was before inlining.
2026-10-10 21:47:43 +10:00
Stenzek 86c84f9d5f 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-10 21:47:43 +10:00
Stenzek 50225103a1 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-10 21:47:43 +10:00
Stenzek 7547f640c5 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-10 21:47:43 +10:00
Stenzek ef5bffc8d7 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-10 21:47:43 +10:00
Stenzek 811585c42c 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-10 21:47:43 +10:00
Stenzek 78f91b6d34 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-10 21:47:43 +10:00
Stenzek cc9be54402 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-10 21:47:43 +10:00
Stenzek 276b8adb2d SPU: Extract reverb-master-enable out of loop 2026-10-10 21:47:42 +10:00
Stenzek aad9c4ebec 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-10 21:47:42 +10:00
Stenzek e7098b5156 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-10 21:47:42 +10:00
Stenzek 69f643c195 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-10 21:47:42 +10:00
Stenzek 9deb896297 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-10 21:47:42 +10:00
Stenzek 470ef0656f 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-10 21:47:42 +10:00
Stenzek a5d6e76ef1 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-10 21:47:42 +10:00
Stenzek beb75d1dec 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-10 21:47:42 +10:00
Stenzek 6db5f053d9 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-10 21:47:42 +10:00
Stenzek 885d5bbdde 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-10 21:47:42 +10:00
Stenzek 22cc43186c 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-10 21:47:42 +10:00
Stenzek cb3cfb8c1f 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-10 21:47:41 +10:00
Stenzek c401e9318d 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-10 21:47:41 +10:00
Stenzek 3a8b6fccfc 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-10 21:47:41 +10:00
Stenzek bd29ee475f 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-10 21:47:41 +10:00
Stenzek e78ab9a273 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-10 21:47:41 +10:00
Stenzek 0aa0c767e1 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-10 21:47:41 +10:00
Stenzek ed990b9275 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-10 21:47:41 +10:00
Stenzek 9bedaa6163 FileSystem: Add more ReadFileToString() overloads 2026-10-10 21:47:41 +10:00
Stenzek 6d96829465 FileSystem: More RVO optimizations 2026-10-10 21:47:41 +10:00
Stenzek a8fb9d70e4 FileSystem: Use shared file open for ReadBinaryFile/ReadFileToString 2026-10-10 21:47:41 +10:00
Stenzek aaffbd66d9 FileSystem: Extract find result sorting to function 2026-10-10 21:47:40 +10:00
Stenzek 066d89715c FileSystem: Add error parameter to FTell64() 2026-10-10 21:47:40 +10:00
Stenzek 60aec342eb FileSystem: Make OpenSharedCFile() wrap OpenCFile() on non-Windows 2026-10-10 21:47:40 +10:00
Stenzek 659ff37089 FileSystem: Backport additional helper functions 2026-10-10 21:47:40 +10:00
Stenzek ba3590f902 Core: Don't reset folders when resetting settings
Users having their data save locations would be unexpected.
2026-10-10 21:47:40 +10:00
Stenzek 95722d8e99 Settings: Don't copy controller type to game
These are part of the controller settings...
2026-10-10 21:47:40 +10:00
Stenzek 8bb030b8cf Settings: Add a dedicated key for overlays 2026-10-10 21:47:40 +10:00
Stenzek 4ad124e8d1 StringUtil: Fix possible integer overflow in EncodeAndAppendUTF8() 2026-10-10 21:47:40 +10:00
Stenzek 4e652d5bb9 System: Provide content details to OnSystemStarted()
Avoids the OnGameChanged() call later.
2026-10-10 21:47:40 +10:00
Stenzek 07d3a934a6 GameList: Synchronize settings between FullscreenUI and Qt
Also share translations with other hosts.
2026-10-10 21:47:40 +10:00
Stenzek e02bb9c748 GameList: Allow use of external SettingsInterface 2026-10-10 21:47:39 +10:00
Stenzek d253d0a1d9 GameList: Don't persist cache map between refreshes
It was cleared anyway.
2026-10-10 21:47:39 +10:00
Stenzek a4048c9c37 GameDatabase: Sort disc sets by save title
And allow lookup by name.
2026-10-10 21:47:39 +10:00
Stenzek dbc8b22917 Threading: Add WaitFor() to ConditionVariable 2026-10-10 21:47:39 +10:00
Stenzek 83153676d7 SettingsInterface: Guard against copying to self 2026-10-10 21:47:39 +10:00
Stenzek 93e53494ac Achievements: Separate login and credential saving steps
Allows saving to an external settings interface, not needed on desktop.
2026-10-10 21:47:39 +10:00
Stenzek 364c7bd485 Achievements: Extract bucket names out of FullscreenUI 2026-10-10 21:47:39 +10:00
Stenzek 18e2aa1615 Deps: Update to 20261010 2026-10-10 21:47:39 +10:00
Stenzek 9cb25f7e98 Qt: Fix crash when desktop file check is skipped 2026-10-10 21:47:38 +10:00
Stenzek 21b05557c7 Qt: Fix desktop environment conditions 2026-10-10 21:47:19 +10:00
Stenzek cbcbbe1eba GameDB: Disable auto-analog on Khamrai 2026-10-10 15:37:08 +10:00
Stenzek df8059758b Achievements: Don't try to fetch badges without cache
Why are you trying to run two instances out of the same directory anyhow?
2026-10-07 22:15:51 +10:00
Stenzek e0668baab4 Achievements: Don't lock in prefetch callback
Always executes on the core thread, and avoids a deadlock if the cache
is not open (e.g. you are running two instances).
2026-10-07 21:53:36 +10:00
Stenzek 697599c47a CI: Use prefix path in cross appimage
Hopefully fix it being broken in Qt 6.12.
2026-10-06 17:54:22 +10:00
Stenzek baf6c425d0 System: Fix incorrect title being copied into save state header
How on earth did I derp this up...
2026-10-06 17:39:04 +10:00
Stenzek 898b6a3caa GameDB: Fix a bunch of incorrect release dates 2026-10-06 17:39:04 +10:00
Stenzek 4122fed9ad INISettingsInterface: ClearSection() should not create an empty section 2026-10-02 20:33:49 +10:00
Stenzek 9d00d6b6e3 GPU/HW: Use correct format for ROV buffers 2026-10-02 20:33:48 +10:00
Stenzek fd88101c80 VulkanDevice: Fix spec violation in ROV clear 2026-10-02 19:47:46 +10:00
Stenzek 14c2267628 Qt: Use AppRoot for translations
Hopefully fix it breaking when running under an AppImage on Linux, with
AppRun having a different AT_EXECFN value.
2026-10-01 21:42:33 +10:00
Stenzek acad15618e Deps: Update to 20261001 2026-10-01 21:09:12 +10:00
Stenzek 8fa9ef5394 FullscreenUI: Fix focus reset on escape in game list search 2026-10-01 15:35:33 +10:00
Stenzek 3f037f2682 CDImageCHD: Read out the correct sector size depending on mode
Probably doesn't affect anything in normal PSX dumps, but possibly
homebrew.
2026-10-01 15:09:00 +10:00
Stenzek e68431fda8 CDImagePPF: Handle non-mode2 sectors
Don't think anything will actually rely on this, but just in case...
2026-10-01 15:08:57 +10:00
Stenzek 4d3dadd07e CDImageMemory: Read each sector in its native format
Hopefully fixes the crash with mode-1 sectors when precaching is
enabled.
2026-10-01 15:08:57 +10:00
Stenzek 39a1e37be9 Qt: Update English translation catalog 2026-10-01 14:35:47 +10:00
Stenzek 003ff5a8d7 Qt: Update machine translations 2026-10-01 14:35:09 +10:00
Stenzek 8d42a0c022 FullscreenUI: Fix compiler warning 2026-09-30 21:25:05 +10:00
Stenzek 2d8e5b68a5 MDEC: Don't clear output FIFO on new command
Fixes corrupted MDEC-decoded-images in Bealphareth.
2026-09-30 21:25:03 +10:00
Stenzek b3b2bbc751 FullscreenUI: Display progress for on-demand game list load
Better than freezing up without any indication as to what's going on.
2026-09-30 00:33:10 +10:00
Stenzek 2c1fba1cd5 FullscreenUI: Size loading screen text and progress separately
Avoids wrapping on longer text.
2026-09-30 00:31:30 +10:00
Stenzek 4091d29353 FullscreenUI: Fix change disc menu getting stuck in some scenarios
e.g. using playlist.
2026-09-29 23:44:09 +10:00
Stenzek a429876f53 Misc: Remove more unused include guards 2026-09-29 23:34:08 +10:00
Stenzek 41c1fb10e9 Qt: Use posix_spawn for updater relaunch on Linux 2026-09-29 18:06:25 +10:00
Stenzek bfb23fb8c9 GPU: Improve CRTC function readability 2026-09-29 11:34:20 +10:00
Stenzek 60f7ffa2d0 GPU: Fix scanline sync before vertical_display_start
If the current line was before start, it wouldn't sync before end.
2026-09-29 11:32:07 +10:00
Stenzek 8a46ed8b7d Misc: Replace std::shared_mutex with Threading::SharedMutex 2026-09-28 21:17:34 +10:00
Stenzek d78fd23db9 ImGuiManager: Avoid unsafe read of context pointer on core thread 2026-09-28 01:33:14 +10:00
Stenzek 616c41d492 ImGuiManager: Stash overlays in separate draw list when transition active
Fixes OSD messages and notifications getting caught in the transition
and looking terrible.
2026-09-28 01:33:14 +10:00
Stenzek c4b4496e9b FullscreenUI: Display subset icon as game icon in subset view
Same for the background.
2026-09-28 00:29:51 +10:00
Stenzek f3d2843541 FullscreenUI: Add background image blurring for headers 2026-09-28 00:29:51 +10:00
Stenzek d901b25907 D3D12Device: Ensure all samplers are initialized in LookupSingle()
Because a single sampler can later get used as a group.
2026-09-28 00:29:51 +10:00
Stenzek 9fcff157a2 D3D12Device: Remove MAX_UNIFORM_BUFFER_SIZE
This was a Vulkan-only quirk.
2026-09-28 00:29:51 +10:00
Stenzek de1fd8c667 GPUDevice: Move UNIFORM_PUSH_CONSTANTS_SIZE into base class 2026-09-28 00:29:50 +10:00
Stenzek 2859162551 GPUDevice: Remove MultiTextureAndUBO pipeline layout
Was only used by ReShade, which can be swapped to use the push constant
layout. The push constants remain unused, which _should_ hopefully mean
the cost is basically zero because they're at the end of the root
signature and not read by the shader.
2026-09-28 00:29:50 +10:00
Stenzek 2ab88c6d9b ImGuiManager: Move blur constants into main UBO
Avoids pipeline changes while drawing.
2026-09-28 00:29:50 +10:00
Stenzek 10632b92e5 GPU/HW: Simplify pipeline layouts 2026-09-28 00:29:50 +10:00
Stenzek 5e54cade98 GPU/HW: Fix background replacements disappearing after TC toggled off 2026-09-28 00:29:50 +10:00
Stenzek dc4e772980 VulkanDevice: Fix incorrect hazard tracking in stream buffer
Draw A (maps) -> Flush -> Draw B (no map) -> Draw C (map) would allow
Draw C to overwrite Draw A's uniforms.

Mainly an issue if we run out of descriptors.
2026-09-28 00:29:50 +10:00
Stenzek 0619481dcb MetalDevice: Drop feedback loop path
I could never test this since I don't have a non-Apple GPU, and I don't
think it ever worked properly anyway.
2026-09-28 00:29:50 +10:00
Stenzek 56dbfea7fd Qt: Fix doubled-up help description 2026-09-27 12:33:12 +10:00