Commit graph

690 commits

Author SHA1 Message Date
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
kd-11 9a2d4fe46b rsx: Relocatable transform constants 2022-03-26 16:10:18 +03:00
kd-11 bc7ed8eaab rsx/vk: Rework MSAA implementation 2022-03-17 22:02:20 +03:00
kd-11 cfecbb24ca rsx: Avoid calling slow functions every draw call
- Use TSC for timing where interval duration matters.
- Use atomic counter for ordering timestamps otherwise.
2022-03-08 22:06:26 +03:00
Megamouse 93e7988df7 rsx: add boost mode shortcut 2022-02-20 11:56:11 +01:00
kd-11 86919ec0e1 rsx: Validate requested images before attempting to upload them
- Do not allow dimensions of 0 to reach the backend APIs
2022-01-30 14:58:51 +03:00
nastys 6b5f0957ce Disable macOS swizzling workaround 2022-01-22 00:17:17 +01:00
kd-11 59b1c324a9 rsx: Properly implement immediate mode rendering
- Treat the draw commands as being consumed on-the-fly with ATTR0 as provoking attribute
- Analysing streams sent to RSX and the results implies they are consumed fully inline.
  This only makes sense if a provoking attribute is present. The 'static' register is truly the immediate register for the draw.
2021-11-15 18:14:15 +03:00
kd-11 7e3eab9915 rsx: Fix texture state propagation between unrelated draw calls
- Older games can load all textures before a draw sequence and then swap shaders for different draws.
- Optimizations in texture state streaming make it so that only referenced data is carried forward.
2021-11-09 12:39:49 +03:00
Eladash b84e95d768 rsx: Fixate time stamp of VBLANK 2021-11-01 10:04:53 +01:00
Eladash 4369fb234e rsx: Fix typo in VBLANK processing regarding emulation pause 2021-11-01 10:04:53 +01:00
Eladash 58040d478a rsx: Implement NTSC fixup mode, improve VBLANK accuracy 2021-11-01 10:04:53 +01:00
kd-11 2e22a0d9bb rsx: Optimize thread self-tests 2021-09-28 17:43:15 +03:00
kd-11 7b9fb7ad9c rsx: refactor rsx_utils a bit
- Move obviously standalone things to their own utility files
2021-09-28 17:43:15 +03:00
kd-11 6781eb7c76 rsx: Avoid calling get_system_time() every draw call 2021-09-28 17:43:15 +03:00
kd-11 3e09b97f58 rsx: Minor optimization; avoid preparing unused vertex streams
- Also discards unused program state variables
2021-09-28 17:43:15 +03:00
kd-11 46b3027981 rsx: Invariably clear the texture state if referenced. 2021-09-21 19:53:46 +03:00
Megamouse 14a425e487 rsx: wait when emulation is paused
This decreases my cpu usage by to <1% during Emu.Pause()
2021-09-17 23:13:24 +02:00
kd-11 c2ab3c664c rsx: Fix stupid overflow 2021-09-17 20:12:08 +03:00
kd-11 53457262d4 rsx: Implement ZPASS results scaling for precise stats 2021-09-06 20:04:03 +03:00
kd-11 472efc08eb rsx: Implement precise ZCULL stats 2021-09-06 20:04:03 +03:00
Megamouse 0debcfed0a Silence some warnings 2021-09-02 19:39:42 +02:00
kd-11 a5e455d8ed rsx/fp: Handle signed operator precedence
This was marked TODO for a long time
- Unsigned remap seems to be overriden by gamma mask (Resistance 3)
- We already know sign mask overrides gamma mask from UE3 titles
2021-08-30 11:41:19 +03:00
Eladash fcfeac818f
Loader: Improve just-in-time installation of disc game files (#10719)
* rsx: Indexed access to surface attributes
2021-08-19 08:49:59 +03:00
Eladash a346767a72 rsx: Improve rsx::recover_fifo() to take a hint from driver wake-up delay 2021-08-17 16:40:41 +03:00
Eladash 2ce164be09 rsx: Implement crash-proofing for 308A_COLOR dst address 2021-08-17 16:40:41 +03:00
Eladash 62beaf299f
Remove old RSX instructions viewer (#10710) 2021-08-14 21:20:11 +03:00
kd-11 c9afb3daaa rsx: Significantly reduce the applied subpixel bias when handling unnormalized access
- If a large value is set (e.g 0.5) rounding will sample 'up' and we can read the wrong texel
2021-08-10 12:02:19 +03:00
kd-11 99b6963fab rsx: Improve unnormalized coordinate sampling
- Improve rounding when sampling nearest neighbour. This is mostly a problem with NVIDIA
- Implement unnormalized 3D sampling
2021-08-03 00:36:04 +03:00
Eladash dcb2e8cd9e rsx: Improve VBLANK accuracy 2021-06-27 16:39:08 +03:00
kd-11 d3ff67ffb5 rsx: Pass vertex attributes streamed via register write in PS3-correct format
- TODO: Optimize this, we can avoid the double bswap in FIFO and then in attribute push
  Not very important since nobody is doing register push in high-performance path.
2021-06-14 10:24:03 +03:00