RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.33k stars 1.91k forks source link

Surface configuration works inconsistently #9133

Open kd-11 opened 3 years ago

kd-11 commented 3 years ago

"Ideal world conditions" are supposed to be perfect as far as emulation goes, but for some reason, games are negatively affected when they are enabled (WCB+WDB+RCB+RDB). This is because these options are rarely if ever used in combination by actual users so we don't see any bug reports for them. This is a tracker to get this issue solved.

Work items

Finally

Blocks https://github.com/RPCS3/rpcs3/pull/9107

NOTE: If adding issues here, ignore titles that have broken SPU post-processing as that is very likely to be unrelated to the problems I am talking about. SPU post-process bug is characterized by random noisy squares on the screen with part correct visuals intersecting with incorrect/corrupt sections and will usually go away when "SPU mlaa" is disabled with a patch.

Satan86 commented 3 years ago

Car reflection on GT6 is broken with RCB enabled screenshot-2020_11_13_18_57_08

kd-11 commented 3 years ago

That issue can be caused by using patches that affect movement of data (MLAA patch for example), not having the other data synchronization options enabled, or more likely the texture leakage mentioned in https://github.com/RPCS3/rpcs3/pull/9107. The reflection surface is detected as being corrupted and removed, so only black output is left.

Caladain commented 3 years ago

Would you like me to regress the games I have now (and in the future) with WCB+WDB+RCB+RDB in addition to the standard default config testing?

kd-11 commented 3 years ago

That isn't necessary right now. I'll be doing some rewrites in a few weeks, you'll see an 'in progress' label on this ticket when that time comes. If you do want to test, you can still do so, but any bugs found must be reported here. Do not open separate issues for them.

kd-11 commented 3 years ago

Merger of buffer options is done, but I first need to diagnose what is wrong with enabling both at the same time before that change can be merged. For anyone curious about testing https://github.com/RPCS3/rpcs3/pull/10119

kd-11 commented 3 years ago

With current code, text in madden still disappears, but reappears and renders correctly after a short while. This disappearance still needs investigation as it shows that some data was lost even if temporarily. Root cause is as of yet unknown.

kd-11 commented 3 years ago

ACiT shows vertex buffer corruption at the great clock, a sign that invalid overwrites are happening. Likely the same phenomenon affecting Madden, more work remains to be done in write buffers code, specifically WDB in this case.

kd-11 commented 3 years ago

ACiT bug is fixed with https://github.com/RPCS3/rpcs3/pull/10184

kd-11 commented 3 years ago

Madden renders correctly with WCB+WDB (with my experimental branch https://github.com/RPCS3/rpcs3/pull/10119) but RCB still causes text to disappear. This issue seems to be caused by something different.

kd-11 commented 3 years ago

https://github.com/RPCS3/rpcs3/issues/10208 Documents the cause of the strange visual bugs observed in some games and tracks the implementation as well.

kd-11 commented 3 years ago

Finally figured out the final piece of the puzzle. I'll need to improve communication between the surface and texture caches which are unfortunately separate due to historical reasons.

Darkhost1999 commented 2 years ago

I don't know where to report this or if it's of any interest until after Read buffers is enabled by default. Far cry 4:

I'm testing "Ideal world conditions" among other tests to try to discover optimal settings for this game so far I believe Write color buffers, atomic FIFO accuracy, accurate rsx reservation access, and allow host gpu labels are needed. However, the Read Depth buffers if enabled at all won't even get past the loading SPU cache screen into the Ubi logo.

P.S. Far cry 3 exhibits the same behavior

Darkhost1999 commented 2 years ago

To try the recommendation from VKTexture.cpp:253 and change resolution scale to 50% I get E RSX: Blit request denied because the destination region does not fit! x10 F {SPU[0x0000100] Thread (Gear_ManagedCellSpursKernel0) [0x09a68]} SIG: Thread terminated due to fatal error: Assertion Failed! Vulkan API call failed with unrecoverable error: Device lost (Driver crashed with unspecified error or stopped responding and recovered) (VK_ERROR_DEVICE_LOST) (in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\RSX\VK\vkutils\sync.cpp:214[:5], in function wait_for_event) (in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\RSX\VK\vkutils\shared.cpp:107[:24], in function die_with_error) RPCS3.log Debug.log

kd-11 commented 2 years ago

Thanks. Yes, report here if buffer options trigger bugs.

Darkhost1999 commented 2 years ago

A piece of information for the // "Out of memory (compute heap). Lower your resolution scale setting." error with the read depth buffers. Raising the resolution scale works fine without issue. When using default resolution it fatal errors that code. And only far cry 4 fatal errors with the other error at 50% resolution scale. Meanwhile far cry 3 works fine with errors about E RSX: Blit request denied because the destination region does not fit!.

So this read depth buffer issue can go unobserved with people upscaling their game. While downscaling just gives some can't fit the screen errors.

Zackpunky commented 1 year ago

hey there ! sorry to necro this thread but i noticed this issue in most madden games either black playfield or no texts is there a solution?

kd-11 commented 1 year ago

There are solutions, but not something an end user can easily set up on their end. Most of the solutions will bring your fps down to single digits if you tried to enable developer debug build options. Just be a little patient. Progress has been made and I hope to have it out in the next few weeks before the year comes to an end.

Triticum0 commented 1 year ago

12946 Broken setting menu with WCB

Ordinary205 commented 1 year ago

Enabling RCB causes extra graphical bug on Need for Speed The Run.

WCB Works

WCB+RCB Doesnt

WCB: RPCS3.log.gz

WCB+RCB: RPCS3.log.gz

This issue happens to all frostbite games.

Darkhost1999 commented 1 year ago

Thanks. Yes, report here if buffer options trigger bugs.

https://github.com/RPCS3/rpcs3/issues/7308#issuecomment-1046473292

Triticum0 commented 1 year ago

enable WCB+RCB on pes 2014/15/16/17/18 causes graphical glitches NPUB90987_screenshot_2023_06_24_10_11_34

Darkhost1999 commented 11 months ago

Thanks. Yes, report here if buffer options trigger bugs.

It seems that Write Color buffers causes more freezing in games prone to freezes than leaving the setting off. Example games so far

I would say Dishonored also is more prone to freezes with wcb simply because accurate getllar recovers the freezes when wcb is disabled. But when enabled the freeze doesn't recover. Frequently I test with accurate rsx reservation access or accurate gettlar to resolve freezing in these games because it often works. I suspect TSX would work too but I don't have a TSX enabled CPU.

I feel I can provide a couple logs for each of these games when they freeze. They each have varying durations but since they're prone to freezes anyways I can't guarantee the log will always contain a wcb issue rather than an issue elsewhere. Because this option alone isn't the isolated problem setting it is only the antagonist.

kd-11 commented 9 months ago

Thanks. Yes, report here if buffer options trigger bugs.

It seems that Write Color buffers causes more freezing in games prone to freezes than leaving the setting off. Example games so far

  • Oblivion (wcb fixes save icons)
  • Skyrim (wcb fixes save icons)
  • Fallout 3 (wcb fixes save icons)
  • Assassin's creed 3 (wcb + rcb fixes water)
  • Assassin's creed 4 (wcb + rcb fixes water)
  • Assassin's creed rogue (wcb + rcb fixes water)

I would say Dishonored also is more prone to freezes with wcb simply because accurate getllar recovers the freezes when wcb is disabled. But when enabled the freeze doesn't recover. Frequently I test with accurate rsx reservation access or accurate gettlar to resolve freezing in these games because it often works. I suspect TSX would work too but I don't have a TSX enabled CPU.

I feel I can provide a couple logs for each of these games when they freeze. They each have varying durations but since they're prone to freezes anyways I can't guarantee the log will always contain a wcb issue rather than an issue elsewhere. Because this option alone isn't the isolated problem setting it is only the antagonist.

https://github.com/RPCS3/rpcs3/pull/14907 should solve some of these issues.

Ordinary205 commented 9 months ago

Sadly this PR doesn't fixes Assassin's Creed IV Black Flag when enabling WCB+RCB. RPCS3.log.gz PPU Interpreter is still required.

Darkhost1999 commented 9 months ago

The fix shouldn't have been to fix LLVM. Assassin's Creed IV Black Flags with WCB on used to freeze before you could even get to the tutorial on how to fight. And if you were lucky to get past that it surely froze before you even got to the theater house. But what should be tested is just how far can you go with WCB+RCB and ppu Interpreter without freezing. Technically it shouldn't freeze at all because when disabling wcb and rcb the game can be played plenty well and fine from the start all the way to Edward Kenway's island claiming it and beyond without freezing.

Ordinary205 commented 9 months ago

The fix shouldn't have been to fix LLVM. Assassin's Creed IV Black Flags with WCB on used to freeze before you could even get to the tutorial on how to fight. And if you were lucky to get past that it surely froze before you even got to the theater house. But what should be tested is just how far can you go with WCB+RCB and ppu Interpreter without freezing. Technically it shouldn't freeze at all because when disabling wcb and rcb the game can be played plenty well and fine from the start all the way to Edward Kenway's island claiming it and beyond without freezing.

Oh, I thought this PR was meant to fix LLVM on other games that has freezing issues with WCB+RCB, but nevermind. Also thanks for the reply.

Triticum0 commented 9 months ago

@kd-11 MotoGP08 seems to be fixed when RDB +WDB is enabled. you can tick the task on your tracker and maybe add pes 14/18 to the list?

Triticum0 commented 9 months ago

Trash Panic seems to have an issue where with wcb on the lighting breaks when it tries to render a fire and smoke effect but with WCB+RCB the lighting fixed but breaks the fire effect.

WCB on NPUA70047_screenshot_2023_01_13_19_16_52

WCB+RCB NPEA90042_screenshot_2024_01_03_01_19_52

Triticum0 commented 9 months ago

13432

Triticum0 commented 9 months ago

Ratchet & Clank: All 4 One breaks when Turn on all the buffers.

Shoegzer commented 8 months ago

In Fallout 3, turning on RCB+WCB produces graphical issues that are not present when only WCB is on. More information including screenshot and log is available here

Linear524 commented 2 weeks ago

Hi KD-11 ! Just a small question - will you ever return on working remaining RSX issues ?

kd-11 commented 2 weeks ago

@Linear524 Yes, I'm just busy with other things right now but I still plan on finishing all the items eventually.