Commit graph

399 commits

Author SHA1 Message Date
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
kd-11 0f3d2c7085 gl: Implement MSAA transparency (sample-to-coverage) 2025-02-11 02:28:31 +03: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
kd-11 e135012acd rsx: Properly track changes in instancing state 2024-12-29 20:53:05 +03:00
kd-11 9307abe7f5 rsx: Move more functions from rsx thread to the draw command processor 2024-12-29 20:53:05 +03:00
kd-11 05bab8ec4c rsx: Move draw call related functions to their own class 2024-12-29 20:53:05 +03:00
kd-11 43e04f3fc7 Revert "rsx/vk: Implement hardware instancing (#16466)"
This reverts commit 62701154f1.
2024-12-29 20:53:05 +03:00
kd-11 62701154f1
rsx/vk: Implement hardware instancing (#16466)
* rsx: Add code to detect instanced draw commands

* rsx: Add GLSL support for instanced rendering

* rsx: Move draw call related functions to their own class

* rsx: Move more functions from rsx thread to the draw command processor

* rsx: Fix vertex program compiler crash

* vk: Add support for hardware instanced draws

* rsx: Fix instancing bug when indexed addressing is used to read constants

* rsx: Fix rare crash in vertex program decompiler

- This whole decompiler mess needs a rewrite

* rsx: Handle dangling execution barriers

* rsx: Do not use global registers object in logical "firmware" units

* Cosmetic improvements

* rsx: Test vertex program flags on each draw

* rsx: Properly track changes in instancing state
2024-12-29 17:39:47 +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
kd-11 49d11b2e36 rsx: Make the deferred mm flush option usable with OpenGL 2024-12-16 19:00:08 +03:00
Elad 2222807624 RSX/GCM: Fix memory unmapping for HLE GCM 2024-11-01 10:43:46 +02:00
Elad 488814bb2d rsx/vm: Exclude events from VM mutex
Fixes a deadlock from a recent pull request, perhaps also some deadlocks with locking both IDM and VM mutex.
2024-11-01 07:37:57 +02:00
kd-11 5ed7d043c4 Fix build and cleanup 2024-10-23 16:33:44 +03:00
kd-11 6ce1816e3f rsx: Move the host job management into common code to share with GL 2024-10-23 16:33:44 +03:00
Elad Ashkenazi 743f9a9f51 rsx: Add 120fps and monitor refresh-rate frame limits 2024-09-12 13:49:03 +03:00
Elad Ashkenazi a2dcbb9c13 Replace src_loc with std::soource_location 2024-05-21 14:19:12 +03:00
Megamouse 2637dc35a7 rsx: Initialize some uninitialized members 2024-05-18 16:16:08 +02:00
kd-11 9e1019b1cf rsx: Start splitting off some stuff into the graph backend class 2024-05-12 21:26:25 +03:00
kd-11 c1aaa1bcf6 Get reworked RSX to compile 2024-04-13 03:29:57 +03:00
kd-11 51fc193395 rsx: De-spaghettify nv3089::image_in
- This function was a disaster with random code added in without much thought over a decade.
- Restructures the logic into decode and transfer steps for easier management.
2023-12-26 18:30:00 +03:00
kd-11 6a7386ddb8 rsx: Refactor out more junk from rsx::thread 2023-09-27 14:52:59 +03:00
Eladash 90ad129b83 Debugger: Fix GOTO and intruction stepping 2023-09-02 12:31:11 +03:00
Eladash e2d4d400ff rsx: Fixup calculate_required_range 2023-08-22 14:26:14 +03:00
Eladash cd98e84ca5 Debugger/RSX: Add FP/VP hash of current shader 2023-08-19 04:21:37 +03:00
Ivan Chikish d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Eladash c0280b43f2 PPU/Debugger: View the currently used CR field content in register panel 2023-07-12 13:22:06 +03:00
kd-11 c325017675 rsx: Preserve the texcoord transform around destructive modifications 2023-07-11 04:09:30 +03:00
Megamouse cd9ff08235 Decrease some include madness 2023-04-26 21:37:44 +02:00
kd-11 24edfe2190 rsx: Use simple_array for basic array of integers
- Some methods are getting spammed every draw call
2023-03-01 01:10:06 +03:00
kd-11 1b8a69154f rsx: Use non-owning container to ellide a derpy allocation with msvc 2023-03-01 01:10:06 +03:00
kd-11 5f0467b084 rsx: Remove framebuffer_status_valid flag and move to state 2023-01-26 11:42:39 +03:00
kd-11 6adcabda29 rsx: Fix graphics state foot-gun 2023-01-26 11:42:39 +03:00
kd-11 3dd6e5664c rsx: Do not call a dynamic function to simply test-and-set. Do it inline. 2023-01-11 16:48:53 +03:00
kd-11 73cda2324a rsx/lv2: Refactor DMA control stuff after VSH work 2023-01-11 16:48:53 +03:00
kd-11 3dba894369 rsx: Minor refactoring RSXThread
- Part 1 of many
2023-01-11 16:48:53 +03:00
Elad Ashkenazi 0946e5945f
VSH Improvements (#13172)
* sys_prx: Implement PRX LIB register syscall

* VSH: partial log spam fix

* sys_process reboot fix

* Implement sys_memory_container_destroy_parent_with_childs

* sys_net: Implement SO_RCVTIMEO/SO_SENDTIMEO

* VSH: Implement sys_rsx_context_free

* PPU LLVM: distinguish PPU cache exec also by address

Fixes referencing multiple PRX.

* UI: Do not report size of apps inside /dev_flash
2023-01-09 20:03:01 +03:00
kd-11 1fd265d316 rsx: Properly flag the program control if needed 2022-12-11 15:21:58 +03:00
kd-11 e3b23822fd rsx: Pass on shader flags to the cache 2022-12-11 15:21:58 +03:00
Eladash 151a0955cf rsx: Implement draw call stepping 2022-12-10 15:09:42 +01:00
Eladash 40406bd3fe RSX debugger: Implement Texture Dumper
Also fix many bugs in textures display.
2022-12-10 15:09:42 +01:00
kd-11 e04855a0da rsx: Improve ROP output handling
- Perform 8-bit quantization/rounding before emulated operations like ALPHA_TEST
2022-11-18 23:06:47 +03:00
kd-11 5943b802d7 grammar 2022-11-11 12:09:23 +03:00
Elad Ashkenazi c214f45e14
Savestates/rsx/IO: Resume emulation on long START press, enable "Start Paused" by defaut (#12881)
* Savestates: Enable "Start Paused" by default
* Emu/rsx/IO: Resume emulation on long START press
* rsx: fix missing graphics with savestates' "Start Paused" setting
* rsx/overlays: Add simple reference counting for messages to hide them manually
* Move some code in Emulator::Pause() so thread pausing is the first thing done by this function
2022-10-29 19:53:00 +02:00
Elad Ashkenazi 92b08a4faf
rsx: Fixup a bug after mfc list optimization (#12782) 2022-10-10 04:04:41 +03:00
Eladash a6dfc3be2f SPU: Enable the MFC list optimization for Atomic RSX FIFO 2022-10-09 19:27:46 +03:00
kd-11 d6d7ade6e3 vk: Reload state on dynamic state changed 2022-10-09 03:00:39 +03:00
kd-11 ffe8133865 vk: Avoid unnecessary dynamic state updates 2022-10-07 11:53:34 +03:00
kd-11 5281a85b67 rsx: Fix compiler warnings 2022-09-28 12:55:31 +03:00
Eladash 2e9ee81dcd CPU preemption control: Improve analysis 2022-09-16 18:57:55 +03:00
Eladash ec7b18dab5 Implement independent CPU preemptions 2022-09-13 19:28:20 +03:00