rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

Surface configuration works inconsistently

Open kd-11 opened this issue 3 years ago • 19 comments

"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

  • [ ] Text is broken in madden series if RCB ~~or WDB~~ is enabled. (Cause discovered)
  • [x] R&C ACiT is hilariously broken with ideal world settings.
  • [ ] Puzzle Dimension has broken visuals with Vulkan when RCB is enabled. OpenGL is not affected.
  • [ ] Fix pitch mismatch data loss. https://github.com/RPCS3/rpcs3/issues/10208
  • [ ] Fix data loss due to silent modification. Tag system needs to be updated. This affects a lot of games not just Madden.
  • [ ] DMA detiling. Local work exists for a long time, but performance is poor. This is the cause of SPU glitching.
  • [ ] MotoGP08 gets corrupted graphics when RDB is enabled.

Finally

  • [ ] Merge RCB+RDB
  • [ ] Merge WCB + WDB
  • [ ] Blit engine write to surface cache data does not enforce protection.

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.

kd-11 avatar Oct 25 '20 17:10 kd-11

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

Satan86 avatar Nov 13 '20 19:11 Satan86

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.

kd-11 avatar Nov 14 '20 12:11 kd-11

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?

Caladain avatar Dec 06 '20 03:12 Caladain

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 avatar Dec 06 '20 08:12 kd-11

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 avatar Apr 15 '21 19:04 kd-11

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 avatar Apr 20 '21 21:04 kd-11

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 avatar Apr 20 '21 22:04 kd-11

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

kd-11 avatar Apr 23 '21 21:04 kd-11

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 avatar Apr 23 '21 21:04 kd-11

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 avatar Apr 28 '21 21:04 kd-11

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.

kd-11 avatar Jun 06 '21 21:06 kd-11

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:

  • Without read depth buffers. RPCS3.log
  • With read depth buffers. ·F 0:01:20.280478 {RSX [0x009b60c]} SIG: Thread terminated due to fatal error: Verification failed (in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\RSX\VK\VKTexture.cpp:253[:4], in function copy_buffer_to_image) (error=0xcb) // "Out of memory (compute heap). Lower your resolution scale setting." RPCS3.log

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 avatar Aug 27 '22 16:08 Darkhost1999

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

Darkhost1999 avatar Aug 27 '22 16:08 Darkhost1999

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

kd-11 avatar Aug 27 '22 20:08 kd-11

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.

Darkhost1999 avatar Oct 03 '22 13:10 Darkhost1999

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?

Zackpunky avatar Nov 30 '22 17:11 Zackpunky

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.

kd-11 avatar Nov 30 '22 17:11 kd-11

#12946 Broken setting menu with WCB

Triticum0 avatar May 05 '23 14:05 Triticum0

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.

Ordinary205 avatar May 20 '23 14:05 Ordinary205

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

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

Darkhost1999 avatar Jun 17 '23 09:06 Darkhost1999

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

Triticum0 avatar Jun 24 '23 09:06 Triticum0

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.

Darkhost1999 avatar Nov 13 '23 19:11 Darkhost1999

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.

kd-11 avatar Dec 17 '23 21:12 kd-11

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

Ordinary205 avatar Dec 18 '23 04:12 Ordinary205

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.

Darkhost1999 avatar Dec 18 '23 14:12 Darkhost1999

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.

Ordinary205 avatar Dec 18 '23 14:12 Ordinary205

@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 avatar Jan 03 '24 00:01 Triticum0

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 avatar Jan 03 '24 01:01 Triticum0

#13432

Triticum0 avatar Jan 04 '24 17:01 Triticum0

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

Triticum0 avatar Jan 05 '24 01:01 Triticum0