Commit graph

616 commits

Author SHA1 Message Date
elad335 3f2075070a Fix UB
Reference exists after destructor is called.
2025-05-14 09:44:07 +03:00
Megamouse 501643c10a Use const for present_samples buf argument 2025-05-08 12:58:38 +02:00
Megamouse fc3a905c90 Use string_view for log params 2025-05-08 12:58:38 +02:00
Vestral 3cebfaa648
Atomic utils fixup after ASLR changes (#17168) 2025-05-05 21:48:07 +03:00
Vestral e066735fe9 Utils fixes for ASLR 2025-04-30 02:56:23 +02:00
Vestral 77eef4d783 Don't make assumptions about address format 2025-04-30 02:56:23 +02:00
elad335 79b63556bb vm_native.cpp: Fix possible weakness of map_self() 2025-04-29 14:54:40 +03:00
Megamouse c2a5ac96cd Fix some warnings 2025-04-25 11:10:07 +02:00
kd-11 a928e8a3db types: Fix comment 2025-04-20 17:50:01 +02:00
kd-11 ef95fa9f5f rsx: de-uglify buffer upload restructure 2025-04-20 17:50:01 +02:00
Megamouse 5526c33d69 Review fixes + warning fixes 2025-03-31 18:27:54 +02:00
Megamouse 8e83fd7d50 Qt/overlays: expose qt_video_source_wrapper as emu callback 2025-03-31 18:27:54 +02:00
Megamouse b9e0a36816 Qt: Add qt video source class for more generic video playback 2025-03-29 15:09:25 +01:00
Whatcookie d9071abd8b
Utils: Remove AVX10-256 detection (#16904)
- Intel recently removed 256b AVX10 from the AVX10 spec.
2025-03-22 13:28:45 +02:00
DH 95d0cb18e4 Coding style issues fixes
Thanks @Megamouse
2025-03-10 21:09:27 +01:00
DH 976b0a8f1d cpu stats: do not try parse /proc/stat on android 2025-03-10 21:09:27 +01:00
DH 919cb8e05c android: atomic: do not test SYS_futex_waitv syscall 2025-03-10 21:09:27 +01:00
DH edf096fc13 vm: do not check overcommit_memory on android 2025-03-10 21:09:27 +01:00
DH 2ebf257f84 vm: removed c_page_size, it cannot be used by globals 2025-03-10 21:09:27 +01:00
DH 798c194025 android stuff 2025-03-10 21:09:27 +01:00
Megamouse a8fc3f5f74 static analysis: more const 2025-03-05 00:12:30 +01:00
Elad 207ee59acd PPU Analyzer: Firmware/import caller analysis and KLIC finding pass 2025-02-27 12:32:21 +02:00
oltolm 29ad4ecc78 concepts: fix review notes 2025-02-26 11:04:02 +02:00
oltolm ebde5310b9 use concepts instead of std::enable_if 2025-02-26 11:04:02 +02:00
Megamouse 3c576da42f Move debugger functions to emu_utils.cpp 2025-02-25 19:45:43 +01:00
oltolm b08273b127
Use Microsoft::WRL::ComPtr (#16744) 2025-02-23 15:39:39 +02:00
Elad 52edef0867 Remove xxHash submodule 2025-02-17 18:00:01 +02:00
Jan Beich 19077ee1ed cpu_stats: restore a header for BSDs after cd87a64621
rpcs3/util/cpu_stats.cpp:390:4: error: use of undeclared identifier 'getpid'
  390 |                         getpid(),
      |                         ^
2025-02-13 13:37:36 +00:00
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
Megamouse 50387cc516 update_manager: use v3 api for all OS 2025-02-03 22:53:53 +00:00
kd-11 cfd571cfc2 Re-enable TSC on ryzen CPUs 2025-02-02 17:45:50 +03:00
Elad 394fc8eb79 Enable Time-based TSC for non-Ryzen CPUs 2025-01-31 14:35:08 +02:00
Elad 9d5b75bb7a LLVM: Slice PPU executable memory 2025-01-25 12:47:44 +02:00
Megamouse ba702509c8 Qt: Add Recent savestates menu 2025-01-23 22:55:07 +01:00
kd-11 27c56cde22 rsx/shaders: Track active MRT count per shader
- Also use more robust hashing to avoid collisions
2025-01-10 04:34:28 +03:00
Elad 6165c2d8b3 Thread.h: Fix a bug by adding thread_state::destroying_context 2025-01-05 10:01:35 +02:00
Elad 036693a14d Fix sys_config_unregister_service 2025-01-05 10:01:35 +02:00
Megamouse 15f29eedee
Fix atomic_ptr value constructing overloads (#16473)
* Fix idm remove

idm::remove calls shared_ptr::exchange with a null_ptr.
This calls the stored object's constructor with null args.

---------

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2024-12-29 14:53:04 +02:00
Elad cfeb022340 shared_ptr.hpp: Rewrite shared_ptr to single_ptr conversion
Logic felt non-intuitive and this method should be very explicit.
2024-12-27 22:08:28 +02:00
Elad 0cc655074d serialzation.hpp: Fix add_padding 2024-12-27 22:08:28 +02:00
Elad 4d0c835df3 util/shared_ptr.hpp: STX pointers library fixes 2024-12-24 21:31:57 +02:00
Elad 575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
Megamouse cf0b4d4ed4 cellGem: split status_flags into calibration flags and runtime flags 2024-12-20 17:30:25 +01:00
capriots 9d4ff13c2b
cellAdec implementation part 2: LPCM decoder (#16381)
* cellAdec: savestate fixup

* simd.hpp: add some intrinsics

* cellAdec implementation part 2: LPCM decoder

* cellAdec: set to HLE by default

* cellAdec: review fixes

---------

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2024-12-18 20:21:56 +02:00
Megamouse 657ab4261c Fix some static analysis warnings 2024-12-17 20:46:07 +01:00
Elad 191e132c6c util/types.hpp: Rewrite narrow<> 2024-11-27 16:00:40 +02:00
Elad 05096854bc Update vm_native.cpp 2024-11-16 13:53:25 +02:00
Elad 1475625705 Implement lf_array::for_each 2024-11-16 12:22:23 +02:00
Elad e7faec6b0e
util/vm_native.cpp: Fix memory leak 2024-11-15 14:00:30 +02:00
oltolm 2b0f786b2d
Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00