Compare commits

...

152 Commits

Author SHA1 Message Date
Elad 4f37124c1d LLVM: Add short fallback for get_known_bits
Supports: when value is the immediate result of either a bitwise OR operation or a bitwise AND when either operands is a constant.

Prevents some false positives when the value has PHI nodes in its ancestors.
2026-07-21 18:42:57 +03:00
RipleyTom 24e1ce4ceb Fix: get_known_bits fix 2026-07-21 17:44:40 +03:00
Ani 63851f4242 atomic: Fix BSD compilation 2026-07-20 18:34:57 +02:00
schm1dtmac ee37ef277d [macOS] Update to the latest MoltenVK 1.4.2 prebuilt, re-disable Game Mode for now 2026-07-20 13:39:47 +02:00
Megamouse 357b7d4462 vfs: add source location to exception 2026-07-19 15:58:26 +02:00
Megamouse 8df0fcc0cc ARM: Fix some warning 2026-07-19 15:58:26 +02:00
Megamouse a7d90852dd pad settings: Fix for clearing bindings
Fix accidentally clearing a binding during remap if the same button is assigned to rightclick in the pad navigation.
Only allow clearing a binding on release if the same button was also pressed while no remapping occured.
2026-07-18 19:08:08 +02:00
Walter 9b3a916af0 [SPU LLVM] Use select in FMA to shorten its dependency chain (#19052)
The `FMA` instruction conditionally zeros one multiplicand if the other
is zero/denormal to emulate the xfloat's extended range. This patch
replaces that with a `select(is_non_zero, fma(a, b, c), c)` which has a
shorter dependency chain in most situations and probably allows LLVM to
better optimize it with surrounding instructions.

I added a AVX512 path that uses `vfixupimmps` to prevent a pessimization
where LLVM transforms it into a strictly serial predicate chain. I
confirmed that it works with denormals and both zeros.

https://godbolt.org/z/hsP5G43Ye
2026-07-18 08:18:10 +00:00
Elad 0fcb15ab18 SPU: Revert 49abd6d8e5 2026-07-18 04:05:46 +03:00
Elad 1d657c4e63 Skip 2026-07-17 22:04:57 +03:00
Elad 5d62ee4b42 Fix possible multi-platform race-condition (depending on kernel)
As well as remove another pthread_self call.
2026-07-17 22:04:57 +03:00
Elad 4e49c5319d Avoid using pthread_self() partially 2026-07-17 22:04:57 +03:00
Elad 6f0e78b6b5 SPU LLVM: Avoid raw pointers 2026-07-17 22:04:57 +03:00
Elad b35e4434aa SPU: LLVM: Add spu_thread::state check in Reduced Loop 2026-07-17 22:04:57 +03:00
Elad 21d5336753 SPU LLVM: Disable NaN rulling-out in Reduced Loop on ARM64 2026-07-17 22:04:57 +03:00
Elad 4e2839f3d3 SPU: Fix ppu_check_patch_spu_images 2026-07-17 22:04:57 +03:00
Elad 45a1da2d89 Disable trap on MacOs 2026-07-17 22:04:57 +03:00
Elad 8cc37e036d SPU: Extend LS memory mirrors 2026-07-17 22:04:57 +03:00
Elad 9bf67f0312 SPU LLVM: Discourage memory mirrors use on LQD/STQD 2026-07-17 22:04:57 +03:00
Jordan Jones 430984729d qt: Fix save manager crash when deleting multiple entries (#19019) 2026-07-17 11:27:07 +00:00
Ani 95da0365a3 metainfo: Update screenshot preview 2026-07-17 12:45:54 +02:00
Elad e9f833a2e8 PPU LLVM: Accelerate NJ handling in FTZ environment 2026-07-17 12:23:54 +03:00
Walter 656bc2a92c Fix LLVM version macro typo 2026-07-17 10:31:26 +03:00
Walter 634a41b488 LLVM 21 compatible computeKnownFPClass
The signature for `computeKnownFPClass` changed with LLVM 21, so this commit includes a conditional compilation which is compatible.
2026-07-17 10:31:26 +03:00
Walter 53835b294e Include KnownFPClass.h with later LLVM versions
LLVM 21 moved the KnownFPClass definition from `ValueTracking.h` to its own file. I verified that specific version moved it, with 20 being the last without it.
2026-07-17 10:31:26 +03:00
Walter fa418f0dbb [SPU LLVM] Add KnownFPClass to FMAs
Replaced the denormal/zero check in `fma32x4` with LLVM's `KnownFPClass` analysis.

That method now includes a overload which expects the caller to provide the known struct. This is used for memorization with the FMA instructions, where the range clamping and instruction specific special value handling are combined. `FMS` and `FNMS` has a larger search depth as it can potentially shorten the chain by a lot.
2026-07-17 10:31:26 +03:00
Walter d0fdd9bb6d [SPU LLVM] Add KnownFPClass to multiply and equals
Replace constant checks in `FM`, `FCEQ`, and `FCMEQ` with `KnownFPClass`. The equality compares now also optimize for when the operands is infinity, which is safe as it behaves identically to the default path.
2026-07-17 10:31:26 +03:00
Walter aec0917a86 [SPU LLVM] Add KnownFPClass to clamping
Avoid clamping if the value is known not to be Inf/NaN (overflow). Includes a optional precalculated argument, which only calculates the known if it has not been done already.
2026-07-17 10:31:26 +03:00
yahfz cdbc43712b PPU LLVM: Optimize vector denormal handling 2026-07-16 15:47:22 +03:00
yahfz 50df95d6c4 PPU LLVM: Optimize vector NaN handling 2026-07-16 12:00:23 +03:00
Megamouse 1269ebff27 Fix some warnings 2026-07-15 15:19:36 +02:00
Megamouse bdd28bfa0d Update fusion to 1.3.1 2026-07-15 15:19:36 +02:00
Elad 49b0306b1d sys_fs: Secure ENOTDIR for sys_fs_stat 2026-07-14 23:22:41 +03:00
Elad 217769d801 sys_fs: Fix ENOTDIR check for paths ending with /dot or /dotdot
They must be directories, even file-path/dot points to itself.
2026-07-14 23:22:41 +03:00
Elad 9d9f210ddb sys_fs: Debug validation layer for ENOTDIR detector 2026-07-14 23:22:41 +03:00
Elad 2f7b8a7149 Fix sys_rsx_context_iomap error check 2026-07-14 13:00:58 +03:00
Elad 2cacaa2da4 IDM: Optimize IDs for concurrency 2026-07-14 13:00:58 +03:00
Walter d755124c48 [SPU ASMJIT] Optimize FCGT, FM, FCMGT
Optimize the float multiply and compare methods by taking advantage of the `denormals-are-zero` flag, removing duplicated logic, and generally doing things more efficiently.
2026-07-13 11:05:29 +03:00
Walter 700ca262f4 [SPU LLVM] Refactor SELB
Refactors SELB by changing "division accuracy correction" pattern match to reduce nesting, include more comments, and use more descriptive variable names. Also replaced duplicated granularity-check loops with single loop which determines byte granularity as a integer.
2026-07-10 19:47:17 +03:00
Megamouse 4003b017f5 Fix PS1 classics shortcuts 2026-07-09 22:14:11 +02:00
Megamouse a71d3b8cab Update curl to 8.21.0 2026-07-09 18:12:27 +02:00
Megamouse bb5dc93bec Update fusion to 1.3.0 2026-07-08 16:50:07 +02:00
Zion Nimchuk 5c90bf5865 Optionally include opencv geometry.hpp if it exists, adding support for opencv 5 2026-07-07 07:21:01 +02:00
Megamouse d87cf99b65 VK: fix video_out_calibration_pass::get_fragment_inputs 2026-07-03 08:27:52 +02:00
Simon Capriotti dc06cac014 Bump global savestate version 2026-07-02 22:46:53 +03:00
Icnopandaz 94977d3545 input: fix arrow key mapping roundtrip on macOS ARM 2026-07-02 19:54:42 +02:00
RipleyTom f2820b75db Extra logging for GUI notifications 2026-07-02 18:25:43 +02:00
Megamouse cae36151ff Update SDL to 3.4.12 2026-07-01 22:56:29 +02:00
Megamouse 5434f0b0a4 Update FAudio to 26.07 2026-07-01 22:56:29 +02:00
Megamouse c05832b705 Move unsafe raw pointer write_to_ptr and read_from_ptr to write_to_ptr_unsafe and read_from_ptr_unsafe 2026-07-01 22:49:00 +03:00
Simon Capriotti 8145f24f05 cellSysmodule: fixup 2026-07-01 21:47:16 +03:00
Elad 88f81381e8 MacOS/Thread.cpp: Attempt recovery if pthread_jit_write_protect_np state is invalid 2026-07-01 19:31:41 +03:00
Elad 5bbce42adc MacOS: Do not leak MAP_JIT on utils::memory_decommit 2026-07-01 19:31:41 +03:00
Elad 9dc9730898 vm: Make vm::g_exec_addr not use MAP_JIT 2026-07-01 19:31:41 +03:00
Elad 11b57268e3 PPU LLVM/MacOs: Fix symbol resolver execution
Breakdown into relocation and exuection steps, fixing MAP_JIT region interaction
2026-07-01 19:31:41 +03:00
Elad 95c04556f0 Add some logging 2026-07-01 19:31:41 +03:00
Elad 99d15190e5 PPU: Cleanup MacOs executable write protection guards 2026-07-01 19:31:41 +03:00
capriots d6e813cd72 cellSysmodule: fixup 2026-07-01 18:50:02 +03:00
Elad 60c9705a7d sysinfo.cpp: Relax TSC calibration constraints 2026-07-01 15:19:31 +03:00
Cicero Hellmann Ratti 6647c5a2bd Fallback unsupported database SPU decoder on ARM64 (#18651)
## Summary
- fall back from database-applied `SPU Decoder: Recompiler (ASMJIT)` to
`Recompiler (LLVM)` on ARM64 builds during boot
- log the fallback in `fixup_settings()` instead of letting SPU
initialization fail later

## Problem
`Need for Speed: Most Wanted [BLES01659]` receives `SPU Decoder:
Recompiler (ASMJIT)` from the config database. On ARM64 builds that
decoder is unsupported, which caused RPCS3 to abort during SPU
initialization with `Unsupported spu decoder` while the UI remained on
the loading screen.

## Validation
- built RPCS3 locally on macOS Apple Silicon
- booted `BLES01659` through the database config path with the custom
per-game override temporarily removed
- verified the log now shows the ARM64 fallback warning and `SPU
Decoder: Recompiler (LLVM)` instead of the previous fatal error
- observed the title proceed past the old boot blocker into active RSX
program compilation

---------

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2026-07-01 11:08:54 +00:00
Malcolm 03647fdb4e SPU LLVM: Break out of checksum hole scan 2026-07-01 13:30:05 +03:00
Malcolm 1b54e8910c SPU: Add some comments clarifying very obtuse code 2026-07-01 13:30:05 +03:00
Malcolm 3f27cb8ff5 SPU LLVM: Loop large checksum verification 2026-07-01 13:30:05 +03:00
Malcolm fa5b899411 SPU LLVM: Reduce dot comparison result with addv 2026-07-01 13:30:05 +03:00
Whatcookie 35f65c2244 SPU LLVM: Add ARM checksum UABA path 2026-07-01 13:30:05 +03:00
Malcolm ed145540a2 SPU: Use multiply-accumulate comparisons for cmp_rdata and verification 2026-07-01 13:30:05 +03:00
Elad 537ad399bb Utilities/sema.cpp: Minor optimization 2026-07-01 12:52:13 +03:00
Elad 24a1576629 PPU LLVM: Recycle current thread for exxecution
Prevent invoking more than utils::get_max_threads() active thrreads at a time.
Windows sees more than utils::get_max_threads() active threads as potentially malicious behavior and lowers the program's overall CPU time.
2026-07-01 12:52:13 +03:00
Elad f05ece47ce PPU LLVM: Fix concurrrency weakness of jit_module_manager 2026-07-01 12:52:13 +03:00
Elad b90eef3fa7 PPU LLVM: Fix core_lock locking
Co-Authored-By: Megamouse <23019877+Megamouse@users.noreply.github.com>
2026-07-01 12:52:13 +03:00
Elad 73d9f34907 cellSysmodule: compilation fix 2026-07-01 12:52:13 +03:00
Whatcookie 18fe6eeb71 SPU LLVM: Use ARM USHL for masked infinite shifts
- LLVM can't handle the select pattern we use to avoid poison values for large shifts
- So let's just use the intrinsic to avoid poison values altogether for now
- https://github.com/llvm/llvm-project/issues/200698
2026-07-01 12:10:35 +03:00
Walter bfada94b9f SPU ASMJIT: Vectorized 16-bit variable shifts for SSE2 targets 2026-07-01 07:26:00 +00:00
capriots 71e5d87a07 cellSysmodule HLE implementation (#18962)
Fully implements cellSysmodule and sets it to HLE by default.

There is an undocumented function that decrypts the OpenPSID. There
doesn't seem to be any information about this on the PS3 dev wiki or
anywhere else, so I thought I mention this separately.
2026-07-01 06:42:17 +00:00
Megamouse 67ee6c1ab9 Fix OOB in Dimensions 2026-07-01 00:40:02 +02:00
silvatyrant 8c89adf177 macOS: DJ Hero Turntable support (deck buttons, passthrough conflict) (#18957) 2026-06-30 20:21:49 +02:00
Megamouse bec42ea93e Linux: get unshifted Qt keys 2026-06-30 18:27:37 +02:00
Ani f5e8a2bfa9 misc: Update README and metainfo 2026-06-29 22:34:47 +02:00
Ani 2f0daa62fc settings: Default Shader Mode to "Async with Shader Interpreter" 2026-06-29 22:34:47 +02:00
Ani e297c8cc64 settings: Default "Show shader compilation hint" to disabled 2026-06-29 22:34:47 +02:00
Megamouse 026077a7f8 Fix TTY UTF-8 logging 2026-06-29 19:12:27 +02:00
Elad 5b41d5880d SPU Precompilation: Add support for unaligned segments 2026-06-29 19:06:48 +03:00
Megamouse 8eaa3ec9a2 Propagate src_loc in write_to_ptr and read_from_ptr 2026-06-29 16:14:42 +02:00
Megamouse 635aac8ff3 Fix consteval read_from_ptr and add sanity checks if possible 2026-06-29 09:57:43 +03:00
Megamouse d63273c473 Use pos param of read_from_ptr and write_to_ptr where possible 2026-06-29 09:57:43 +03:00
Megamouse cffd02bb35 Add more motion control mappings to turntable and ghltar 2026-06-28 13:40:02 +02:00
Megamouse 5c55819b57 emulated turntable: allow to map motion sensors 2026-06-28 10:32:22 +02:00
Walter a7fc31f321 [SPU LLVM] Additional SHUFB splat/special-index fast paths (#18945) 2026-06-26 14:46:28 +00:00
Megamouse 51b35a7b2f Update 7zip to 26.02 2026-06-26 12:24:04 +02:00
Megamouse aca652e6fd Update wolfssl to 5.9.2 2026-06-26 08:42:43 +02:00
Walter 09d602fd5a [SPU LLVM] Refactor SHUFB
Refactored `SHUFB` by moving the byteswap optimization prior to the target specific path. Also separated the shuffle and special index constants calculation into separate steps in order to reduce code duplication.

Added a number of TODOs as this refactor revealed some of optimizations opportunities. None of which has been added as this refactor intends to minimize new behavior.
2026-06-24 21:06:13 +03:00
Malcolm 87608865b6 SPU LLVM: Use SVE2 XAR for constant rotates 2026-06-24 09:04:24 +03:00
Christopher Hotchkiss 42242b3c43 SPU Analyzer: fix wrong divisor in Giga const-prop re-decode
The "Fill more block info" re-decode indexed result.data[(ia - lsa) / 41] instead of / 4 (its companion decode uses / 4), so it read the wrong word and corrupted the per-block reg_const / reg_val32 constant propagation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 02:00:35 +03:00
Christopher Hotchkiss 064365d6fb SPU Analyzer: prune dead in-range targets from m_targets (Giga)
Giga cleanup clears m_block_info for removed blocks but left their in-range edges in m_targets, so the register-state walk dereferenced a stale target and aborted ("Range check failed") - e.g. a brsl whose return is a stop-trap, hit in Skylanders Giants. Prune those edges at the m_targets cleanup; export out_target_list after the prune so callers see the cleaned map; keep the initiate_patterns and cond_next-walk guards as defense in depth.

Adds made-up-data regression tests (the exported-map test fails without the prune) and the rpcs3_test.vcxproj entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 02:00:35 +03:00
Walter 927e2492ef SPU LLVM: Calculate FREST fraction LUT using vperm2dlculate FREST fraction using vperm2d for AVX512 (#18931)
The `FREST` instruction uses a scalar lookup-table loop to calculate the
mantissa. Given that it's only 32 elements, we can load it into two
512-bit vectors and treat them as the sources to the `vperm2d` shuffle
instruction. This allows it to be calculated in parallel, improving its
performance.
2026-06-22 15:27:37 +03:00
Megamouse c7478d6dcc Use more std::string_view 2026-06-21 21:01:39 +02:00
Megamouse ed6a2f862e Use std::string_view in rpcn code 2026-06-21 21:01:39 +02:00
Megamouse 7b5f3e6921 Fix unused midi_deleter variable warning 2026-06-21 21:01:39 +02:00
Megamouse f95a225d63 Use std::string_view in rsx code 2026-06-21 21:01:39 +02:00
Megamouse f8c88c3a7a Use std::string_view in cell modules 2026-06-21 21:01:39 +02:00
Antonino Di Guardo 2af7b58ce4 fix double path delimiter (#18923)
A cosmetic fix. It removes a double delimiter at the end of a path in
`games.yml` when using `VFS games` path.
2026-06-21 19:38:03 +02:00
Megamouse efc9a1a668 NP: Use std::string_view in clans 2026-06-21 16:37:09 +02:00
Megamouse 8da8c267c6 Update pugixml to 1.16 2026-06-21 16:37:09 +02:00
Megamouse e32d19ffac Add missing sanity check in savedata_op 2026-06-19 18:26:44 +02:00
Walter 33123bff04 [SPU] Calculate FRSQEST exponent using arithmetic (#18905)
The `FRSQEST` instruction uses a lookup-table to calculate both the
exponent and mantissa. The exponent follows a simple linear pattern and
thus can be calculated using integer arithmetic: `(exponent==0)? 0xFF :
190 - (exponent + 1) / 2`. This patch replaces the LUT with this method,
vectorizing its calculating and saving on 1kB.

The mantissa still relies on a LUT, which bottlenecks this instruction's
emulation despite the improvement.
2026-06-19 18:02:20 +03:00
Megamouse c0598f61e7 Handle curl_easy_setopt errors in clans_client 2026-06-18 21:16:12 +02:00
Megamouse 0735c55bfd Add user agent to curl requests 2026-06-18 21:16:12 +02:00
Megamouse 5ee92d2e6c Allow to add architecture to game window title 2026-06-18 21:16:12 +02:00
Megamouse 8be3a398dc Log architecture 2026-06-18 21:16:12 +02:00
schm1dtmac 860e2a82b1 [Mac OS] Update runners to OS 15 2026-06-18 17:51:58 +02:00
Megamouse 6a15f9dc8e Qt: use readable strings for windowState and visibility in gui settings 2026-06-17 18:09:27 +02:00
Megamouse a8559a526a tar: fix save_header regression 2026-06-17 13:13:38 +02:00
Megamouse 5758ab11f7 arm64: fix exclusion_callback type 2026-06-17 13:13:38 +02:00
Elad c1263eeb79 sys_rsx: Fix IOMAP syscalls argument types 2026-06-17 13:25:59 +03:00
Walter e429f8cf05 SPU LLVM + zero with saturation subtract
- Added a LLVM SPU recompiler implementation as LLVM can't take advantage of the rounding mode.
- Further optimized the method by replacing MSB check with saturation subtraction. Negative values are saturated to zero due to the float's sign bit.
2026-06-16 14:55:04 +03:00
Walter 4d38e69fd9 Make SSE2 compatible
Removed the SSE4.1 instruction to make it compatible with the baseline instruction set. Increased dependency chain by one instruction and caused constant generation to be slightly more expensive.
2026-06-16 14:55:04 +03:00
Walter 465b845bdf Avoid unused XmmGet on SSE2 path
Avoids creating a redundant `XmmGet` allocation on targets without SSE4.1, by duplicating the declaration across both target specific blocks.
2026-06-16 14:55:04 +03:00
Walter 6593caff67 [SPU ASMJIT] Add SSE4.1 CLZ method
Added a SSE4.1 vectorized CLZ method to the SPU ASMJT.
2026-06-16 14:55:04 +03:00
Megamouse e5cdae8c5a Use std::string_view in cpu code 2026-06-16 12:07:57 +02:00
Megamouse 54b8b5399b Use std::string_view in pine_server 2026-06-16 12:07:57 +02:00
Megamouse 7a4ec42362 Use std::string_view in loader code 2026-06-16 12:07:57 +02:00
Megamouse b8ca6d953f Use std::string_view in crypto code 2026-06-16 12:07:57 +02:00
Megamouse 5c4be5dd3b Qt: stop movies when the main window gets inactive 2026-06-16 08:50:48 +02:00
Megamouse 5e745ac661 Qt: prevent playing movies directly after a refresh 2026-06-16 08:50:48 +02:00
Megamouse 79616a376f Qt: don't play movie unless the parent window is active 2026-06-16 08:50:48 +02:00
Megamouse fbe9ad0f45 Use more fmt::split_sv 2026-06-16 01:28:35 +02:00
Megamouse a4649475b6 Use opengl renderer in game window title 2026-06-15 16:15:04 +02:00
kd-11 c38e8229ed gl: Finalize the merge of bind_texture_env and bind_interpreter_env 2026-06-15 02:31:47 +03:00
kd-11 00c57be1ed gl: Fix linux build 2026-06-15 02:31:47 +03:00
kd-11 ff68a1ea09 gl: Do not use SSBOs on devices that do not support the extension 2026-06-15 02:31:47 +03:00
kd-11 048b1c3f05 gl/interpreter: Do not emit bindless texture usage unless the textures are used 2026-06-15 02:31:47 +03:00
kd-11 06c8a87534 gl: Drop use of the retired glNamedBufferStorageEXT function
- The DSA_EXT fallback is now GLES-only.
- We introduce a wrapper to act as a fallback for older GPUs - NamedBufferStorageEX.
2026-06-15 02:31:47 +03:00
Megamouse 41a7cd29f8 Use std::string_view in input code 2026-06-14 17:41:33 +02:00
Megamouse 5bc128e085 Use std::string_view in midi handlers 2026-06-14 17:41:33 +02:00
Megamouse 74f3349b19 Use std::string_view in overlays 2026-06-14 17:41:33 +02:00
Jakub Marcowski 0fda2dd60f Optimise PNGs across the repo 2026-06-14 16:05:41 +02:00
Megamouse 4f321eb319 Do not throw on hex_to_bytes error in iso get_key
Just treat it as a regular key processing error
2026-06-14 12:06:54 +02:00
Megamouse 4fed5e7b88 Fix iso integrity log message 2026-06-14 09:04:03 +02:00
Megamouse f1a1f5616c Fix VS project 2026-06-14 09:04:03 +02:00
Megamouse 9373461d09 patch_manager: tiny optimizations 2026-06-14 09:04:03 +02:00
Antonino Di Guardo 23b414ac84 Add integrity check to PSN Content, DLC and Game Update files (#18669) 2026-06-14 07:35:49 +02:00
Megamouse 5252f47a33 Use more std::move 2026-06-13 19:08:16 +02:00
thephilcoulson 27b13dff20 gui: Play preview videos on row selection, not just hover 2026-06-13 17:52:50 +02:00
Megamouse 32a52c0e35 rsxaudio: fix some windows warnings
stumbled upon some warnings.
ensure() does not tell VS that an index is suffently checked for OOB.
2026-06-13 16:30:34 +02:00
Vishrut Sachan 3fd8fd0e34 gui: Move download database actions from game list to Manage -> Database submenu (#18870)
Closes #18856

Moved the three download database actions from the game list context
menu to Manage -> Databases submenu, since they are not related to a
specific game entry.
2026-06-13 07:59:18 +02:00
Antonino Di Guardo 16a53dfec7 UI: Fix drag & drop of files on main window 2026-06-13 04:13:16 +03:00
Megamouse 2ce45bd904 ffmpeg: remove directshow backend 2026-06-12 08:09:18 +02:00
Elad 1492d647f4 SaveStates: Fix lv2_timer serialization 2026-06-11 20:55:21 +03:00
Megamouse 0b535328c8 Qt: Add exit game shortcut 2026-06-11 11:15:15 +02:00
kd-11 f32ff351da rsx: Use mip0 resolution scale when computing mipmap scaling factors 2026-06-09 23:53:48 +03:00
Elad e379fba97d SPU/PPU: Implement PPU reservation priority over SPUs 2026-06-07 23:30:05 +03:00
Elad 57b4687ac2 cellAudio: Fix _mxr000 event queue hack 2026-06-07 19:52:34 +03:00
399 changed files with 7475 additions and 3276 deletions
+10 -45
View File
@@ -13,31 +13,18 @@ export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew update
brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER"
brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER"
if [ "$AARCH64" -eq 1 ]; then
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
else
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet python@3.14 opencv@4 "llvm@$LLVM_COMPILER_VER" sdl3 vulkan-headers vulkan-loader molten-vk
arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative protobuf || true
fi
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
export CXX=clang++
export CC=clang
export BREW_PATH;
if [ "$AARCH64" -eq 1 ]; then
BREW_PATH="$(brew --prefix)"
export BREW_BIN="/opt/homebrew/bin"
export BREW_SBIN="/opt/homebrew/sbin"
else
BREW_PATH="$("/usr/local/bin/brew" --prefix)"
export BREW_BIN="/usr/local/bin"
export BREW_SBIN="/usr/local/sbin"
fi
BREW_PATH="$(brew --prefix)"
export BREW_BIN="$BREW_PATH/bin"
export BREW_SBIN="$BREW_PATH/sbin"
export WORKDIR;
WORKDIR="$(pwd)"
@@ -68,7 +55,7 @@ ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER"
export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN"
export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3"
export PATH="/opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
export PATH="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
export LDFLAGS="-L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++ -L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind -lunwind"
export VULKAN_SDK
@@ -82,12 +69,13 @@ LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER"
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules)
mkdir build && cd build || exit 1
# The below should be uncommented once bugs with Qt 6 QListWidgets when using the OS 26 visual style are resolved.
# sudo xcode-select -switch /Applications/Xcode_26.3.app/Contents/Developer
if [ "$AARCH64" -eq 1 ]; then
cmake .. \
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}" \
@@ -102,31 +90,8 @@ cmake .. \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_OPENCV=ON \
-G Ninja
else
cmake .. \
-DBUILD_RPCS3_TESTS=OFF \
-DRUN_RPCS3_TESTS=OFF \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
-DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinX86_64.cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}"\
-DSTATIC_LINK_LLVM=ON \
-DUSE_SDL=ON \
-DUSE_DISCORD_RPC=ON \
-DUSE_AUDIOUNIT=ON \
-DUSE_SYSTEM_FFMPEG=OFF \
-DUSE_NATIVE_INSTRUCTIONS=OFF \
-DUSE_PRECOMPILED_HEADERS=OFF \
-DUSE_SYSTEM_MVK=ON \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_OPENCV=ON \
-G Ninja
fi
ninja; build_status=$?;
ninja -j4; build_status=$?;
cd ..
+5 -10
View File
@@ -4,16 +4,11 @@
cd build || exit 1
cd bin
git clone --revision=a075e5e417f87675ea3137b7365f3e5a99608d72 https://github.com/KhronosGroup/MoltenVK.git
cd MoltenVK
./fetchDependencies --macos
sudo xcode-select -switch /Applications/Xcode_16.2.app/Contents/Developer
make macos MVK_USE_METAL_PRIVATE_API=1
cd ../
mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
cp "MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
cp "MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.2-rc1/MoltenVK-macos-privateapi.tar
tar -xvf MoltenVK-macos-privateapi.tar
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
@@ -84,7 +79,7 @@ echo "[InternetShortcut]" > Quickstart.url
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
echo "IconIndex=0" >> Quickstart.url
if [ "$AARCH64" -eq 1 ]; then
if [ "$(arch)" = "arm64" ]; then
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos_aarch64.7z"
else
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos.7z"
+4 -5
View File
@@ -123,15 +123,15 @@ jobs:
matrix:
include:
- name: Intel
AARCH64: 0
runs-on: macos-15-intel
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac
- name: Apple Silicon
AARCH64: 1
runs-on: macos-15
UPLOAD_COMMIT_HASH: 8e21bdbc40711a3fccd18fbf17b742348b0f4281
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac-arm64
name: RPCS3 Mac ${{ matrix.name }}
runs-on: macos-14
runs-on: ${{ matrix.runs-on }}
env:
CCACHE_DIR: /tmp/ccache_dir
QT_VER: '6.11.1'
@@ -140,8 +140,7 @@ jobs:
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
AARCH64: ${{ matrix.AARCH64 }}
RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
RUN_UNIT_TESTS: ${{ matrix.name == 'Apple Silicon' && (github.event_name == 'pull_request' && 'ON') || 'OFF' }}
steps:
- name: Checkout repository
uses: actions/checkout@main
+26 -6
View File
@@ -72,12 +72,15 @@
<ClCompile Include="curl\lib\cf-haproxy.c" />
<ClCompile Include="curl\lib\cf-https-connect.c" />
<ClCompile Include="curl\lib\cf-ip-happy.c" />
<ClCompile Include="curl\lib\cf-recvbuf.c" />
<ClCompile Include="curl\lib\cf-setup.c" />
<ClCompile Include="curl\lib\cf-socket.c" />
<ClCompile Include="curl\lib\cfilters.c" />
<ClCompile Include="curl\lib\conncache.c" />
<ClCompile Include="curl\lib\connect.c" />
<ClCompile Include="curl\lib\content_encoding.c" />
<ClCompile Include="curl\lib\cookie.c" />
<ClCompile Include="curl\lib\creds.c" />
<ClCompile Include="curl\lib\cshutdn.c" />
<ClCompile Include="curl\lib\curlx\base64.c" />
<ClCompile Include="curl\lib\curlx\basename.c" />
@@ -167,13 +170,14 @@
<ClCompile Include="curl\lib\multi_ev.c" />
<ClCompile Include="curl\lib\multi_ntfy.c" />
<ClCompile Include="curl\lib\netrc.c" />
<ClCompile Include="curl\lib\noproxy.c" />
<ClCompile Include="curl\lib\openldap.c" />
<ClCompile Include="curl\lib\parsedate.c" />
<ClCompile Include="curl\lib\peer.c" />
<ClCompile Include="curl\lib\pingpong.c" />
<ClCompile Include="curl\lib\pop3.c" />
<ClCompile Include="curl\lib\progress.c" />
<ClCompile Include="curl\lib\protocol.c" />
<ClCompile Include="curl\lib\proxy.c" />
<ClCompile Include="curl\lib\psl.c" />
<ClCompile Include="curl\lib\rand.c" />
<ClCompile Include="curl\lib\ratelimit.c" />
@@ -208,13 +212,19 @@
<ClCompile Include="curl\lib\urlapi.c" />
<ClCompile Include="curl\lib\vauth\gsasl.c" />
<ClCompile Include="curl\lib\version.c" />
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
<ClCompile Include="curl\lib\vquic\capsule.c" />
<ClCompile Include="curl\lib\vquic\cf-capsule.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-cmn.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-proxy.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2.c" />
<ClCompile Include="curl\lib\vquic\cf-quiche.c" />
<ClCompile Include="curl\lib\vquic\vquic-tls.c" />
<ClCompile Include="curl\lib\vssh\vssh.c" />
<ClCompile Include="curl\lib\vtls\apple.c" />
<ClCompile Include="curl\lib\vtls\cipher_suite.c" />
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
<ClCompile Include="curl\lib\vtls\rustls.c" />
<ClCompile Include="curl\lib\vtls\vtls_config.c" />
<ClCompile Include="curl\lib\vtls\vtls_scache.c" />
<ClCompile Include="curl\lib\vtls\vtls_spack.c" />
<ClCompile Include="curl\lib\vtls\x509asn1.c" />
@@ -265,6 +275,8 @@
<ClInclude Include="curl\lib\cf-haproxy.h" />
<ClInclude Include="curl\lib\cf-https-connect.h" />
<ClInclude Include="curl\lib\cf-ip-happy.h" />
<ClInclude Include="curl\lib\cf-recvbuf.h" />
<ClInclude Include="curl\lib\cf-setup.h" />
<ClInclude Include="curl\lib\cf-socket.h" />
<ClInclude Include="curl\lib\cfilters.h" />
<ClInclude Include="curl\lib\config-mac.h" />
@@ -276,6 +288,7 @@
<ClInclude Include="curl\lib\connect.h" />
<ClInclude Include="curl\lib\content_encoding.h" />
<ClInclude Include="curl\lib\cookie.h" />
<ClInclude Include="curl\lib\creds.h" />
<ClInclude Include="curl\lib\cshutdn.h" />
<ClInclude Include="curl\lib\curlx\base64.h" />
<ClInclude Include="curl\lib\curlx\basename.h" />
@@ -368,12 +381,13 @@
<ClInclude Include="curl\lib\multi_ev.h" />
<ClInclude Include="curl\lib\multi_ntfy.h" />
<ClInclude Include="curl\lib\netrc.h" />
<ClInclude Include="curl\lib\noproxy.h" />
<ClInclude Include="curl\lib\parsedate.h" />
<ClInclude Include="curl\lib\peer.h" />
<ClInclude Include="curl\lib\pingpong.h" />
<ClInclude Include="curl\lib\pop3.h" />
<ClInclude Include="curl\lib\progress.h" />
<ClInclude Include="curl\lib\protocol.h" />
<ClInclude Include="curl\lib\proxy.h" />
<ClInclude Include="curl\lib\psl.h" />
<ClInclude Include="curl\lib\rand.h" />
<ClInclude Include="curl\lib\ratelimit.h" />
@@ -411,8 +425,13 @@
<ClInclude Include="curl\lib\url.h" />
<ClInclude Include="curl\lib\urlapi-int.h" />
<ClInclude Include="curl\lib\urldata.h" />
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
<ClInclude Include="curl\lib\vquic\capsule.h" />
<ClInclude Include="curl\lib\vquic\cf-capsule.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-cmn.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-proxy.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2.h" />
<ClInclude Include="curl\lib\vquic\cf-quiche.h" />
<ClInclude Include="curl\lib\vquic\vquic-tls.h" />
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
<ClInclude Include="curl\lib\vssh\vssh.h" />
<ClInclude Include="curl\lib\vtls\apple.h" />
@@ -420,6 +439,7 @@
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
<ClInclude Include="curl\lib\vtls\rustls.h" />
<ClInclude Include="curl\lib\vtls\schannel_int.h" />
<ClInclude Include="curl\lib\vtls\vtls_config.h" />
<ClInclude Include="curl\lib\vtls\vtls_int.h" />
<ClInclude Include="curl\lib\vtls\vtls_scache.h" />
<ClInclude Include="curl\lib\vtls\vtls_spack.h" />
+78 -18
View File
@@ -366,9 +366,6 @@
<ClCompile Include="curl\lib\headers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\noproxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\ws.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -384,12 +381,6 @@
<ClCompile Include="curl\lib\cf-socket.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\curl_quiche.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\http1.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -564,6 +555,45 @@
<ClCompile Include="curl\lib\thrdqueue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vtls\vtls_config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\capsule.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-capsule.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-cmn.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-quiche.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\vquic-tls.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\cf-recvbuf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\cf-setup.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\creds.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\peer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="curl\include\curl\curl.h">
@@ -944,9 +974,6 @@
<ClInclude Include="curl\lib\functypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\noproxy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\ws.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -962,12 +989,6 @@
<ClInclude Include="curl\lib\cf-socket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\curl_quiche.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\vquic_int.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1145,6 +1166,45 @@
<ClInclude Include="curl\lib\thrdqueue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vtls\vtls_config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\capsule.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-capsule.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-cmn.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-proxy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-quiche.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\vquic-tls.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\cf-recvbuf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\cf-setup.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\creds.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\peer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\proxy.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="curl\lib\libcurl.rc">
+4 -4
View File
@@ -13,17 +13,17 @@
<ItemGroup>
<ClInclude Include="fusion\Fusion\Fusion.h" />
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
<ClInclude Include="fusion\Fusion\FusionBias.h" />
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
<ClInclude Include="fusion\Fusion\FusionMath.h" />
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
<ClInclude Include="fusion\Fusion\FusionModel.h" />
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fusion\Fusion\FusionAhrs.c" />
<ClCompile Include="fusion\Fusion\FusionBias.c" />
<ClCompile Include="fusion\Fusion\FusionCompass.c" />
<ClCompile Include="fusion\Fusion\FusionOffset.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<RootNamespace>Fusion</RootNamespace>
+4 -4
View File
@@ -8,12 +8,12 @@
<ItemGroup>
<ClInclude Include="fusion\Fusion\Fusion.h" />
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
<ClInclude Include="fusion\Fusion\FusionMath.h" />
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
<ClInclude Include="fusion\Fusion\FusionBias.h" />
<ClInclude Include="fusion\Fusion\FusionModel.h" />
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fusion\Fusion\FusionAhrs.c">
@@ -22,7 +22,7 @@
<ClCompile Include="fusion\Fusion\FusionCompass.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="fusion\Fusion\FusionOffset.c">
<ClCompile Include="fusion\Fusion\FusionBias.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+10 -7
View File
@@ -164,14 +164,17 @@ namespace pine
return IPCBuffer{ 5, MakeFailIPC(ret_buffer) };
};
const auto write_string = [&](const std::string& str)
const auto write_string = [&](std::string_view str)
{
if (!SafetyChecks(buf_cnt, 0, ret_cnt, str.size() + 1 + sizeof(u32), buf_size))
return false;
ToArray(ret_buffer, ::narrow<u32>(str.size() + 1), ret_cnt);
ret_cnt += sizeof(u32);
memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
ret_cnt += str.size();
if (str.size())
{
std::memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
ret_cnt += str.size();
}
ret_buffer[ret_cnt++] = '\0';
return true;
};
@@ -512,7 +515,7 @@ namespace pine
*/
static inline bool SafetyChecks(usz command_len, usz command_size, usz reply_len, usz reply_size = 0, usz buf_size = MAX_IPC_SIZE - 1)
{
bool res = ((command_len + command_size) > buf_size ||
const bool res = ((command_len + command_size) > buf_size ||
(reply_len + reply_size) >= MAX_IPC_RETURN_SIZE);
if (res) [[unlikely]]
return false;
@@ -524,8 +527,8 @@ namespace pine
pine_server() noexcept
{
#ifdef _WIN32
WSADATA wsa;
struct sockaddr_in server;
WSADATA wsa {};
struct sockaddr_in server {};
m_sock = INVALID_SOCKET;
m_msgsock = INVALID_SOCKET;
@@ -579,7 +582,7 @@ namespace pine
fmt::append(m_socket_name, ".%d", slot);
}
struct sockaddr_un server;
struct sockaddr_un server {};
m_sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (m_sock < 0)
+3
View File
@@ -46,6 +46,9 @@
#define HAVE_AESGCM
#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS
#define HAVE_HKDF
#define WC_RSA_PSS
#define WOLFSSL_TLS13
#define HAVE_ECC
#define ECC_SHAMIR
#define ECC_TIMING_RESISTANT
+103 -5
View File
@@ -71,15 +71,40 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="wolfssl\src\bio.c" />
<ClCompile Include="wolfssl\src\conf.c" />
<ClCompile Include="wolfssl\src\crl.c" />
<ClCompile Include="wolfssl\src\dtls.c" />
<ClCompile Include="wolfssl\src\dtls13.c" />
<ClCompile Include="wolfssl\src\internal.c" />
<ClCompile Include="wolfssl\src\pk.c" />
<ClCompile Include="wolfssl\src\pk_ec.c" />
<ClCompile Include="wolfssl\src\pk_rsa.c" />
<ClCompile Include="wolfssl\src\quic.c" />
<ClCompile Include="wolfssl\src\sniffer.c" />
<ClCompile Include="wolfssl\src\ssl_api_cert.c" />
<ClCompile Include="wolfssl\src\ssl_api_crl_ocsp.c" />
<ClCompile Include="wolfssl\src\ssl_api_dtls.c" />
<ClCompile Include="wolfssl\src\ssl_api_ext.c" />
<ClCompile Include="wolfssl\src\ssl_api_pk.c" />
<ClCompile Include="wolfssl\src\ssl_asn1.c" />
<ClCompile Include="wolfssl\src\ssl_bn.c" />
<ClCompile Include="wolfssl\src\ssl_certman.c" />
<ClCompile Include="wolfssl\src\ssl_crypto.c" />
<ClCompile Include="wolfssl\src\ssl_ech.c" />
<ClCompile Include="wolfssl\src\ssl_load.c" />
<ClCompile Include="wolfssl\src\ssl_misc.c" />
<ClCompile Include="wolfssl\src\ssl_p7p12.c" />
<ClCompile Include="wolfssl\src\ssl_sess.c" />
<ClCompile Include="wolfssl\src\ssl_sk.c" />
<ClCompile Include="wolfssl\src\wolfio.c" />
<ClCompile Include="wolfssl\src\keys.c" />
<ClCompile Include="wolfssl\src\ocsp.c" />
<ClCompile Include="wolfssl\src\ssl.c" />
<ClCompile Include="wolfssl\src\tls.c" />
<ClCompile Include="wolfssl\src\tls13.c" />
<ClCompile Include="wolfssl\src\x509.c" />
<ClCompile Include="wolfssl\src\x509_str.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\aes.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\arc4.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\asn.c" />
@@ -139,6 +164,77 @@
<ItemGroup>
<ClInclude Include="extra\win32\user_settings.h" />
<ClInclude Include="wolfssl\resource.h" />
<ClInclude Include="wolfssl\wolfssl\callbacks.h" />
<ClInclude Include="wolfssl\wolfssl\certs_test.h" />
<ClInclude Include="wolfssl\wolfssl\certs_test_sm.h" />
<ClInclude Include="wolfssl\wolfssl\crl.h" />
<ClInclude Include="wolfssl\wolfssl\error-ssl.h" />
<ClInclude Include="wolfssl\wolfssl\internal.h" />
<ClInclude Include="wolfssl\wolfssl\ocsp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\aes.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\asn1.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\asn1t.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\bio.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\bn.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\buffer.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\camellia.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\cmac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\cms.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\compat_types.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\conf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\crypto.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\des.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\dh.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\dsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec25519.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec448.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ecdh.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ecdsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ed25519.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ed448.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\engine.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\err.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\evp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\fips_rand.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\hmac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\kdf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\lhash.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\md4.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\md5.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\modes.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\objects.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\obj_mac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ocsp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\opensslconf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\opensslv.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ossl_typ.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pem.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs12.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs7.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rand.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rc4.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ripemd.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\safestack.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\sha.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\sha3.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\srp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ssl.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ssl23.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\stack.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\tls1.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\txt_db.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ui.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509v3.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509_vfy.h" />
<ClInclude Include="wolfssl\wolfssl\quic.h" />
<ClInclude Include="wolfssl\wolfssl\sniffer.h" />
<ClInclude Include="wolfssl\wolfssl\sniffer_error.h" />
<ClInclude Include="wolfssl\wolfssl\ssl.h" />
<ClInclude Include="wolfssl\wolfssl\test.h" />
<ClInclude Include="wolfssl\wolfssl\version.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\aes.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\arc4.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn.h" />
@@ -166,8 +262,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed448.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\error-crypt.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\falcon.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_448.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_operations.h" />
@@ -180,7 +274,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\integer.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kdf.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\logging.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md2.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md4.h" />
@@ -194,6 +287,7 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs12.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs7.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\poly1305.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\puf.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pwdbased.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\random.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rc2.h" />
@@ -212,7 +306,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm3.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm4.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sphincs.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp_int.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\srp.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\tfm.h" />
@@ -221,12 +314,16 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_encrypt.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mldsa.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mlkem.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_pkcs11.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_port.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_she.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_slhdsa.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfevent.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfmath.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfio.h" />
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
@@ -247,6 +344,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="wolfssl\wolfssl\sniffer_error.rc" />
</ItemGroup>
<ItemGroup>
<None Include="wolfssl\wolfssl\wolfcrypt\include.am" />
+1 -1
View File
@@ -9,7 +9,7 @@ The world's first free and open-source PlayStation 3 emulator/debugger, written
You can find some basic information on our [**website**](https://rpcs3.net/). Game info is being populated on the [**Wiki**](https://wiki.rpcs3.net/).
For discussion about this emulator, PS3 emulation, and game compatibility reports, please visit our [**forums**](https://forums.rpcs3.net) and our [**Discord server**](https://discord.gg/RPCS3).
[**Support Lead Developers Nekotekina and kd-11 on Patreon**](https://www.patreon.com/Nekotekina)
[**Support the Lead Developers on Patreon**](https://rpcs3.net/patreon)
## Contributing
+1 -1
View File
@@ -757,7 +757,7 @@ void cfg::log_entry::from_default()
std::pair<u16, u16> cfg::device_info::get_usb_ids() const
{
auto string_to_hex = [](const std::string& str) -> u16
auto string_to_hex = [](std::string_view str) -> u16
{
u16 value = 0x0000;
if (!str.empty() && std::from_chars(str.data(), str.data() + str.size(), value, 16).ec != std::errc{})
+27 -6
View File
@@ -244,7 +244,6 @@ namespace asmjit
void vec_load_unaligned(u32 esize, const Operand& v, const x86::Mem& src);
void vec_store_unaligned(u32 esize, const Operand& v, const x86::Mem& dst);
void vec_partial_move(u32 esize, const Operand& dst, const Operand& src);
void _vec_binary_op(x86::Inst::Id sse_op, x86::Inst::Id vex_op, x86::Inst::Id evex_op, const Operand& dst, const Operand& lhs, const Operand& rhs);
@@ -434,13 +433,35 @@ namespace asmjit
#endif
}
#ifdef __APPLE__
struct jit_write_guard
{
jit_write_guard() noexcept
{
pthread_jit_write_protect_np(false);
// Ensure stores are not reordered by the compiler
atomic_fence_acq_rel();
}
~jit_write_guard() noexcept
{
// Ensure stores are not reordered by the compiler
atomic_fence_seq_cst();
pthread_jit_write_protect_np(true);
}
};
#else
#define jit_write_guard [[maybe_unused]] int
#endif
// Build runtime function with asmjit::X86Assembler
template <typename FT, typename Asm = native_asm, typename F>
inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime* custom_runtime = nullptr, bool reduced_size = false)
{
#ifdef __APPLE__
pthread_jit_write_protect_np(false);
#endif
jit_write_guard jit_guard;
using namespace asmjit;
auto& rt = custom_runtime ? *custom_runtime : get_global_runtime();
@@ -525,7 +546,7 @@ class jit_compiler final
atomic_t<usz> m_disk_space = umax;
public:
jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
jit_compiler& operator=(thread_state) noexcept;
~jit_compiler() noexcept;
@@ -571,7 +592,7 @@ public:
u64 get(const std::string& name);
// Get CPU info
static std::string cpu(const std::string& _cpu);
static std::string cpu(std::string_view _cpu);
// Get system triple (PPU)
static std::string triple1();
+4 -4
View File
@@ -122,7 +122,7 @@ static u8* get_jit_memory()
// Reserve 2G memory (magic static)
static void* const s_memory2 = []() -> void*
{
void* ptr = utils::memory_reserve(0x80000000);
void* ptr = utils::memory_reserve(0x80000000, true);
#ifdef CAN_OVERCOMMIT
utils::memory_commit(ptr, 0x80000000);
utils::memory_protect(ptr, 0x40000000, utils::protection::wx);
@@ -316,10 +316,10 @@ void jit_runtime::finalize() noexcept
#endif
// Reset JIT memory
#ifdef CAN_OVERCOMMIT
utils::memory_reset(get_jit_memory(), 0x80000000);
utils::memory_reset(get_jit_memory(), 0x80000000, true);
utils::memory_protect(get_jit_memory(), 0x40000000, utils::protection::wx);
#else
utils::memory_decommit(get_jit_memory(), 0x80000000);
utils::memory_decommit(get_jit_memory(), 0x80000000, true);
#endif
s_code_pos = 0;
@@ -348,7 +348,7 @@ jit_runtime_base& asmjit::get_global_runtime()
{
custom_runtime() noexcept
{
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size)));
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size, true)));
// Initialize "end" pointer
m_max = m_pos + size;
+5 -5
View File
@@ -241,7 +241,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
MemoryManager1(std::function<u64(const std::string&)> symbols_cement = {}) noexcept
: m_symbols_cement(std::move(symbols_cement))
{
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3));
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3, true));
m_code_mems = ptr;
// ptr += c_max_size;
// m_data_ro_mems = ptr;
@@ -260,7 +260,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
// utils::memory_decommit(m_code_mems, how_much(code_ptr));
// utils::memory_decommit(m_data_ro_mems, how_much(data_ro_ptr));
// utils::memory_decommit(m_data_rw_mems, how_much(data_rw_ptr));
utils::memory_decommit(m_code_mems, c_max_size * 3);
utils::memory_decommit(m_code_mems, c_max_size * 3, true);
}
llvm::JITSymbol findSymbol(const std::string& name) override
@@ -551,9 +551,9 @@ public:
}
};
std::string jit_compiler::cpu(const std::string& _cpu)
std::string jit_compiler::cpu(std::string_view _cpu)
{
std::string m_cpu = _cpu;
std::string m_cpu = std::string(_cpu);
if (m_cpu.empty())
{
@@ -681,7 +681,7 @@ bool jit_compiler::add_sub_disk_space(ssz space)
}).second;
}
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
: m_context(new llvm::LLVMContext)
, m_cpu(cpu(_cpu))
{
+14
View File
@@ -630,6 +630,13 @@ namespace fmt
thread_ctrl::emergency_exit(out);
}
[[noreturn]] void raw_verify_error(std::source_location loc, std::source_location propagated_loc, const char8_t* msg, usz object)
{
std::string out;
fmt::append(out, "%s (object: 0x%x)%s%s", msg ? msg : u8"Verification failed", object, loc, propagated_loc);
thread_ctrl::emergency_exit(out);
}
[[noreturn]] void raw_range_error(std::source_location loc, std::string_view index, usz container_size)
{
std::string out;
@@ -921,6 +928,13 @@ std::string_view fmt::trim_front_sv(std::string_view source, std::string_view va
void fmt::trim_back(std::string& source, std::string_view values)
{
const usz index = source.find_last_not_of(values);
if (index == source.npos)
{
source.clear();
return;
}
source.resize(index + 1);
}
+82 -14
View File
@@ -2191,6 +2191,37 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
append_thread_name(msg);
#ifdef __APPLE__
thread_local bool s_tls_is_attempting_recovery = false;
thread_local bool s_tls_last_cause_is_executing = false;
if (reinterpret_cast<u64>(info->si_addr) < 0x10000)
{
// Do not recover from the virtual page of 0x0 (such as nullptr)
}
else if (is_executing || is_writing)
{
if (s_tls_is_attempting_recovery && s_tls_last_cause_is_executing != is_executing)
{
// Cause changed, inform recovery
s_tls_is_attempting_recovery = false;
}
if (!s_tls_is_attempting_recovery)
{
s_tls_last_cause_is_executing = is_executing;
s_tls_is_attempting_recovery = true;
pthread_jit_write_protect_np(is_executing ? true : false);
sys_log.error("\n%s", msg);
sys_log.notice("\n%s", dump_useful_thread_info());
sys_log.error("Attempting recovery using pthread_jit_write_protect_np()");
logs::listener::sync_all();
return;
}
}
#endif
sys_log.fatal("\n%s", msg);
sys_log.notice("\n%s", dump_useful_thread_info());
logs::listener::sync_all();
@@ -2306,6 +2337,7 @@ void thread_base::start()
ensure(::ResumeThread(reinterpret_cast<HANDLE>(+m_thread)) != static_cast<DWORD>(-1));
#elif defined(__APPLE__)
pthread_attr_t attrs;
pthread_t thread_id{};
struct sched_param sp;
memset(&sp, 0, sizeof(struct sched_param));
sp.sched_priority=99;
@@ -2315,20 +2347,43 @@ void thread_base::start()
pthread_attr_set_qos_class_np(&attrs, QOS_CLASS_USER_INTERACTIVE, 0);
pthread_attr_setschedpolicy(&attrs, SCHED_RR);
pthread_attr_setschedparam(&attrs, &sp);
ensure(pthread_create(reinterpret_cast<pthread_t*>(&m_thread.raw()), &attrs, entry_point, this) == 0);
ensure(pthread_create(&thread_id, &attrs, entry_point, this) == 0);
#else
ensure(pthread_create(reinterpret_cast<pthread_t*>(&m_thread.raw()), nullptr, entry_point, this) == 0);
pthread_t thread_id{};
ensure(pthread_create(&thread_id, nullptr, entry_point, this) == 0);
#endif
#ifndef _WIN32
// Update m_thread atomically
u64 dest_id = 0;
std::memcpy(&dest_id, &thread_id, sizeof(thread_id));
if (!m_thread && !m_thread.compare_and_swap_test(0, dest_id))
{
ensure(m_thread == dest_id);
}
#endif
}
void thread_base::initialize(void (*error_cb)())
{
#ifndef _WIN32
#ifdef ANDROID
m_thread.release(pthread_self());
#ifdef __APPLE__
while (!m_thread)
{
busy_wait();
}
[[maybe_unused]] u64 new_tid = 0;
#elif defined(ANDROID)
const u64 new_tid = pthread_self();
#else
m_thread.release(reinterpret_cast<u64>(pthread_self()));
const u64 new_tid = reinterpret_cast<u64>(pthread_self());
#endif
if (!m_thread && !m_thread.compare_and_swap_test(0, new_tid))
{
ensure(m_thread == new_tid);
}
#endif
// Initialize TLS variables
@@ -3016,7 +3071,9 @@ void thread_ctrl::set_name(std::string name)
return false;
}).second)
{
#ifndef __APPLE__
utils::trap();
#endif
}
}
@@ -3527,15 +3584,26 @@ std::pair<void*, usz> thread_ctrl::get_thread_stack()
u64 thread_ctrl::get_tid()
{
#ifdef _WIN32
return GetCurrentThreadId();
#elif defined(ANDROID)
return static_cast<u64>(pthread_self());
#elif defined(__linux__)
return syscall(SYS_gettid);
#else
return reinterpret_cast<u64>(pthread_self());
#endif
static thread_local u64 s_tls_tid = []() -> u64
{
#ifdef _WIN32
return GetCurrentThreadId();
#elif defined(ANDROID)
return pthread_gettid_np(pthread_self());
#elif defined(__linux__)
return syscall(SYS_gettid);
#elif defined(__APPLE__)
u64 tid{};
pthread_threadid_np(nullptr, &tid);
return tid;
#elif defined(__FreeBSD__)
return pthread_getthreadid_np();
#else
return static_cast<u64>(pthread_self());
#endif
}();
return s_tls_tid;
}
bool thread_ctrl::is_main()
+4 -4
View File
@@ -29,7 +29,7 @@ void fmt_class_string<cheat_type>::format(std::string& out, u64 arg)
bool cheat_info::from_str(std::string_view cheat_line)
{
const auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
s64 val64 = 0;
if (cheat_vec.size() != 5 || !try_to_int64(&val64, cheat_vec[2], 0, cheat_type_max - 1))
@@ -38,11 +38,11 @@ bool cheat_info::from_str(std::string_view cheat_line)
return false;
}
game = cheat_vec[0];
description = cheat_vec[1];
game = std::move(cheat_vec[0]);
description = std::move(cheat_vec[1]);
type = cheat_type{::narrow<u8>(val64)};
offset = std::stoul(cheat_vec[3]);
red_script = cheat_vec[4];
red_script = std::move(cheat_vec[4]);
return true;
}
+7 -1
View File
@@ -41,7 +41,13 @@ void semaphore_base::imp_wait()
// Add waiter
value += c_waiter;
}
});
else
{
return false;
}
return true;
}).first;
if (value & c_value_mask)
{
+4 -4
View File
@@ -119,18 +119,18 @@ namespace utils
if (sym->NameLen)
{
const auto function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
std::string function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
// Attempt to get file and line information if available
DWORD unused2;
if (SymGetLineFromAddrW64(hProcess, reinterpret_cast<DWORD64>(pointer), &unused2, &line_info))
{
const auto full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
result.push_back(full_path);
std::string full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
result.push_back(std::move(full_path));
}
else
{
result.push_back(function_name);
result.push_back(std::move(function_name));
}
}
else
+2 -2
View File
@@ -14,7 +14,7 @@ namespace utils
// Printing utilities
template <typename T>
concept Logger = requires (T& t, const std::string& msg)
concept Logger = requires (T& t, std::string_view msg)
{
{ t.print(msg) };
};
@@ -28,7 +28,7 @@ namespace utils
: log(chan)
{}
void print(const std::string& s)
void print(std::string_view s)
{
log.error("%s", s);
}
+1 -1
View File
@@ -33,7 +33,7 @@ public:
std::lock_guard lock(mutex);
if (std::shared_ptr<void> new_val = std::invoke(func); new_val)
{
storage.push_back(new_val);
storage.push_back(std::move(new_val));
}
delete_unused();
}
+7 -9
View File
@@ -24,29 +24,27 @@ namespace utils
return (m_hi << 24) | (m_mid << 16) | (m_lo << 8) | ((uint(m_type) & 0xf) << 4) | (m_type_index & 0xf);
}
std::string version::to_string() const
std::string version::to_string(bool simple) const
{
std::string version = std::to_string(hi()) + "." + std::to_string(mid());
std::string version = fmt::format("%d.%d", hi(), mid());
if (lo())
{
version += '.';
version += std::to_string(lo());
fmt::append(version, ".%d", lo());
}
if (type() != version_type::release)
if (!simple && type() != version_type::release)
{
if (!postfix().empty())
{
version += "-" + postfix();
fmt::append(version, "-%s", postfix());
}
version += ' ';
version += utils::to_string(type());
fmt::append(version, " %s", utils::to_string(type()));
if (type_index() > 1)
{
version += " " + std::to_string(type_index());
fmt::append(version, " %d", type_index());
}
}
+4 -4
View File
@@ -23,10 +23,10 @@ namespace utils
uint m_lo;
version_type m_type = version_type::release;
uint m_type_index = 1;
const char* m_postfix;
std::string_view m_postfix;
public:
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, const char* postfix)
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, std::string_view postfix)
: m_hi(hi)
, m_mid(mid)
, m_lo(lo)
@@ -56,7 +56,7 @@ namespace utils
return m_type;
}
std::string postfix() const
std::string_view postfix() const
{
return m_postfix;
}
@@ -67,7 +67,7 @@ namespace utils
}
uint to_hex() const;
std::string to_string() const;
std::string to_string(bool simple = false) const;
};
// Generic version comparison (e.g. 0.0.5 vs 1.3)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+8
View File
@@ -117,6 +117,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3_test", "rpcs3\tests\r
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12} = {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pugixml", "pugixml", "{F520F4A6-27D1-4DD2-9BB2-E0625826D0A3}"
ProjectSection(SolutionItems) = preProject
3rdparty\pugixml\src\pugiconfig.hpp = 3rdparty\pugixml\src\pugiconfig.hpp
3rdparty\pugixml\src\pugixml.cpp = 3rdparty\pugixml\src\pugixml.cpp
3rdparty\pugixml\src\pugixml.hpp = 3rdparty\pugixml\src\pugixml.hpp
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -274,6 +281,7 @@ Global
{8846A9AA-5539-4C91-8301-F54260E1A07A} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{D1CBF84E-07F8-4ACB-9CD2-BD205FDEEE1E} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{F520F4A6-27D1-4DD2-9BB2-E0625826D0A3} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06CC7920-E085-4B81-9582-8DE8AAD42510}
+3 -1
View File
@@ -81,7 +81,7 @@ if (NOT ANDROID)
# Unix display manager
if(X11_FOUND)
target_link_libraries(rpcs3_lib PRIVATE X11::X11)
target_link_libraries(rpcs3_lib PRIVATE X11::X11 xkbcommon-x11)
elseif(USE_VULKAN AND UNIX AND NOT WAYLAND_FOUND AND NOT APPLE AND NOT ANDROID)
# Wayland has been checked in 3rdparty/CMakeLists.txt already.
message(FATAL_ERROR "RPCS3 requires either X11 or Wayland (or both) for Vulkan.")
@@ -192,6 +192,8 @@ if(BUILD_RPCS3_TESTS)
tests/test_rsx_cfg.cpp
tests/test_rsx_fp_asm.cpp
tests/test_dmux_pamf.cpp
tests/test_spu_analyser.cpp
tests/test_types_util.cpp
)
target_link_libraries(rpcs3_test

Some files were not shown because too many files have changed in this diff Show More