Commit graph

820 commits

Author SHA1 Message Date
kd-11 10fe14e783 rsx: Separate register context from RSX thread 2024-04-13 03:29:57 +03:00
kd-11 ec37e8f0dc rsx: Fix loading mid-draw call savestates 2024-03-29 08:15:38 +03:00
kd-11 00f1b2bfa7 rsx: Rewrite fragment shader invalidation test 2024-03-28 08:08:21 +01:00
kd-11 a9fad83971 rsx: Fix memory range invalidation 2024-03-28 08:08:21 +01:00
Eladash a6fa091ab3 Savestates/RSX: Save pending flip 2024-03-27 19:59:22 +02:00
Eladash 46a1c09abe Savestates: Minor logging message 2024-03-26 21:35:53 +02:00
Eladash c2076373e8 Utilities\BitField.h: Try to fix some warnings
Cleanup and make bitfield extraction u32 if possible
2024-01-01 11:58:00 +02:00
Megamouse 7a02787bee fix some more warnings 2023-12-30 21:14:26 +01:00
Megamouse 3f2c75d920 overlays: move debug overlay to native overlay 2023-12-20 23:33:43 +01:00
Eladash 9abf0b7176 Savestates: Asynchronous compression 2023-11-28 16:46:44 +02:00
Eladash c7c2baae03 Savestates: Implement 'autostart off' mode for debugging 2023-11-27 12:36:17 +02:00
Eladash f60bdbaece Savestates: Compressed state files 2023-11-27 12:36:17 +02:00
kd-11 ab8a12e211 rsx: Fix vertex input validation failure
- We switched from a allocate-per-draw-call to reusing the vertex input data. We need to make sure previous state does not affect validation results.
- Memcpy is too slow at this level of frequency, so just reset the attributes you're using before using them.
- Also changes the validation routine to only check attributes we're actually using.
2023-11-15 20:15:03 +03:00
Megamouse 840455b872 rsx: zip and unzip rsx captures 2023-11-10 09:05:16 +01: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 a26b8dff18 rsx: Fix index vertex array range with modulo calculation 2023-08-22 09:41:23 +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 b12edf70bb Optimize RSX Debugger 2023-07-31 11:55:31 +03:00
Eladash 9ff91c29f2 Invalidate Savestates 2023-07-23 17:58:54 +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 fac8bcc20c rsx: Formatting and tidying changes 2023-07-04 09:31:51 +03:00
kd-11 5dc4e74c98 rsx: Minor optimization to speed up texture state sync a bit given the larger structure in use now 2023-07-04 09:31:51 +03:00
kd-11 d77a78cdf1 rsx: Rework texture coordinate handling to support clamping and a more sane scale-bias setup 2023-07-04 09:31:51 +03:00
kd-11 72abc0f219 rsx: Minor annotations and refactoring 2023-06-10 01:36:10 +03:00
kd-11 7feb13671a rsx: Fix up the framebuffer width if the pitch fits scissor but not the clip width 2023-04-25 13:07:12 +03:00
kd-11 964ce3d6aa rsx: Add a clip_width workaround for some buggy games 2023-04-07 12:39:23 +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
Margen67 5bb89328d0 Remove whitespace 2023-02-15 08:58:02 +01: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
Megamouse 44771150b7 overlays: add simple home menu 2023-01-21 09:11:53 +01: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 36a55660bf
Unbreak BSD 2023-01-09 20:20:13 +01: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 6756bf7d4b rsx: Only request attribute interpolation if the GPU requires it and the driver supports it 2022-12-11 15:21:58 +03:00
kd-11 a0ef1a672c rsx: Implement interpolation using barycentrics 2022-12-11 15:21:58 +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
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
Eladash 18e30c7e44 rsx: Implement custom fractional frame limit 2022-10-24 00:10:37 +02:00
Elad Ashkenazi e0df2c584f rsx: Attempt to fix frame limiter 2022-10-09 01:33:40 +03:00
kd-11 5281a85b67 rsx: Fix compiler warnings 2022-09-28 12:55:31 +03:00
kd-11 de28c812e8 rsx: Re-evaluate color MRT setup when the surface target type changes 2022-09-28 12:55:31 +03:00
Eladash c8199de188 CPU preemption control: Improve stutter elimination 2022-09-16 18:57:55 +03:00
Eladash 2e9ee81dcd CPU preemption control: Improve analysis 2022-09-16 18:57:55 +03:00
Eladash cf4da5c4d1 CPU preemption control: bugfixes 2022-09-16 18:57:55 +03:00
Eladash 9c5108c1ca CPU preemption control: Add one more debug variable 2022-09-16 18:57:55 +03:00
Eladash ec7b18dab5 Implement independent CPU preemptions 2022-09-13 19:28:20 +03:00
kd-11 f43824762a rsx: Get rid of an allocation in analyse_vertex_data that adds about 5% overhead.
This method is called many thousands of times per frame and that single allocation introduces a small perf hit.
Just get rid of it, it doesn't improve anything to have it there.
2022-09-09 23:17:27 +03:00
Eladash 11a197a387 Savestates/RSX: fix unintentional vblank thread spin after abort 2022-09-01 20:09:28 +03:00
Elad Ashkenazi b2c9add47e rsx: Fix semaphore timeout on boot
Allow semaphore timeout to be disabled again.
2022-08-19 15:40:20 +03:00
Elad Ashkenazi c4cc0154be LV2: Optimizations and fixes
Fix and optimize sys_ppu_thread_yield

Fix LV2 syscalls with timeout bug. (use ppu_thread::cancel_sleep instead)

Move timeout notification out of mutex scope

Allow g_waiting timeouts to be awaked in scope
2022-08-11 11:42:16 +03:00
kd-11 2445ab8d8e Fix RSX capture playback 2022-08-04 19:01:45 +03:00
Eladash 3e51426379 Savestates/SPU: Kill emulation when its safe to save SPU state 2022-07-15 09:30:53 +03:00
Eladash e548743cbf Fixup rsx cpatures 2022-07-14 18:50:31 +03:00
Eladash ab27ee4cf4 Savestates/RSX: Save NV406E semaphore waiting 2022-07-12 15:15:42 +03:00
Eladash 87cd65ff03 Savestates: support game collections 2022-07-10 14:19:59 +03:00
Eladash 4ade06f36f Savestates/RSX: Restore the ZCULL control state
And fix the ZCULL control state at the initial state of RSX.
2022-07-10 14:19:59 +03:00
Eladash 4ac88fa8d3 Savestates/RSX: Save drawing context 2022-07-08 12:57:43 +03:00
Eladash 5f8f9e33f1 RSX/Savestates: Replace GCM hack with a proper fix 2022-07-08 12:57:43 +03:00
Eladash bd9ba7ef1f Remove incorrect Emu.IsStopped() checks 2022-07-05 08:25:36 +02:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Nekotekina 69912ba3c7 Partial revert for cf0fcf5a2a 2022-06-30 14:38:14 +03:00
Eladash cf0fcf5a2a SPU: Implement execution wake-up delay 2022-06-28 19:54:25 +03:00
Eladash f5a55b3024 rsx: Fixup after #12052 for frame limiter off 2022-06-25 17:39:07 +03:00
Eladash 7422ab9e55 rsx: Do not discard flip notifications 2022-06-25 15:30:41 +02:00
Eladash f66256cc13 rsx: PS3 Native frame limiter improvements, add Infinite frame limiter
* Do not wait on DEVICE 0x30 semaphore, it seems like it is something to do with queue command synchronization.
 - This also fixes cellGcmSetFlipWithWaitLabel which is built specifically to enable accurate RSX flipping time, its waiting command is confirmed to be placed **AFTER** DEVICE 0x30 waiting.
* Fix default vsync state to be enabled. (and set it to enabled in cellGcmSetVBlankFrequency as well)
* Add experimental "Infinite" frame limiter mode.
* Fix spurious enabling of second vblank.
2022-06-25 15:30:41 +02:00
Eladash 5e01ffdfd8 Debugger: Optimize cpu_thread::dump_regs()
Reuse string buffer. Copies and reallocations are expensive with such large strings.
2022-06-23 22:41:32 +02:00
Eladash 264253757c rsx: Improve Null Renderer 2022-06-12 20:54:42 +03:00
Elad Ashkenazi ec530a2c91
rsx: Suggest to try setting RSX FIFO Accuracy to a higher mode of accuracy on crash (#12204) 2022-06-11 23:26:12 +02:00
Eladash f9bc7458d4 rsx: Resurgence of HLE GCM 2022-06-06 12:56:25 +02:00
Elad Ashkenazi 9bb7e8d614
rsx: Implement atomic FIFO fetching (stability improvement) (non-default setting) (#12107) 2022-06-04 15:35:06 +03:00
kd-11 286f97fad0 rsx: Reduce some error spam 2022-06-04 14:02:33 +03:00
Elad Ashkenazi 95233b5299 rsx: Fix deadlock in vm::_page_unmap 2022-05-30 11:53:34 +03:00
Elad Ashkenazi 610d29dab0 rsx: Fix VBLANK time 2022-05-28 13:00:42 +02:00
kd-11 7c8fbc35bc rsx: Move PS3-compliant behavior to a new option 2022-05-21 16:35:35 +03:00
kd-11 b637429e44 Fix display flickering 2022-05-21 16:35:35 +03:00
kd-11 d52bb78d2c rsx: Trivial non-blocking display synchronization 2022-05-21 16:35:35 +03:00
kd-11 4e6be9172a rsx: Asynchronously flush the pipelines when handing ZCULL memory access violations 2022-05-21 10:06:32 +03:00
Eladash cd74fb6a6d rsx: Implement HW accurate frame limiter 2022-05-20 22:40:48 +02:00
kd-11 ec2d529832 rsx: Separate loop interrupts from graphics state
- The interrupts are for multithreaded signals andmake the main loop run more aggressively for the next cycle
2022-05-20 16:29:27 +03:00
kd-11 257556bbf5 rsx: Add eng lock before flagging memory unmap
- This is much better than polling on atomics every cycle for something that happens a few times during gameplay
2022-05-20 16:29:27 +03:00
kd-11 e368453751 rsx: Rework loop interrupts a bit
- Reset backend interrupt in core handler
- Separate memory config interrupt from regular backend interrupt
2022-05-20 16:29:27 +03:00
kd-11 094fda0e73 Crash fix 2022-05-20 16:29:27 +03:00
kd-11 d2de560060 rsx: Improve sync_hint callback interface 2022-05-20 16:29:27 +03:00
kd-11 5315eb546f rsx: Stop spamming ZCULL update method
- This has a negative impact when ZCULL is active due to spamming __rdtsc
- While the method is fast, it is not free and some checks are done before the instruction can be emitted
  Let's use the saved time to actually get something useful done
2022-05-20 16:29:27 +03:00
kd-11 7fa521a046 rsx/vk: Redesign how conditional rendering hints work
- Pass a sync address to the backend
- Ignore the hint if the query is running in lazy mode
- Do not submit CBs too close to each other. Submits are expensive
2022-05-20 16:29:27 +03:00
kd-11 9a1e6cc3e8 rsx: Implement RSX reports area access detection and optimize around it
- If nobody is reading RSX reports, do not be in a hurry to write them
- Requires HLE of some methods (cellGcmGetTimestamp) to function correctly
2022-05-20 16:29:27 +03:00
kd-11 850eef0c1a rsx: Move ZCULL logic to its own file
- It's over 1k lines of code in its own namespace; it really should be in its own file
2022-05-20 16:29:27 +03:00
Eladash 6783bcd273 Log a snippet of guest thread code at crash 2022-04-15 22:34:51 +03:00
Eladash 1d51f3af0c RSX-Debugger: Implement backwards scrolling
* Use 2 points of known true RSX code roots and follow them in order to peek at the current section of valid RSX code:
These roots are: current RSX instruction address and the last targeted address by a branch instruction.
2022-04-15 22:34:51 +03:00
kd-11 57aee92bfe rsx: Separate guest flip timer from host timing operations 2022-04-13 23:39:01 +03:00
kd-11 fc05511354 rsx: Optimize software sampling further for the 6-tap kernel 2022-04-04 16:51:03 +03:00
kd-11 1592ecdc55 rsx: Invalidate transform block on program change
- Since each program now does a remap of the outputs, we need to reupload the constants
- This is not a loss, constants are almost always changing between draw calls anyway
2022-03-26 16:10:18 +03:00
kd-11 d057ffe80f rsx: Fix program generation and compact referenced data blocks 2022-03-26 16:10:18 +03:00