Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] SPU PIC support #5944

Merged
merged 9 commits into from May 14, 2019
Merged

[WIP] SPU PIC support #5944

merged 9 commits into from May 14, 2019

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented May 10, 2019

Settings:

  • Block size: Safe or Mega
  • SPU LLVM

@isJuhn
Copy link
Contributor

isJuhn commented May 10, 2019

Spider-Man Shattered Dimensions [BLES00946] stops compiling spu code just after boot, rpcs3 stops responding if you mess with ui a bit. on second boot spu compilation stops on 3/100 spu programs

RPCS3.log
spu.log

@legend800
Copy link

Nothing but fatals or freezes during SPU compile on my games.

@Kravickas
Copy link
Contributor

Kravickas commented May 10, 2019

I had good experience with LLVM Mega in NHL 16, no segfault, no freeze

@isJuhn
Copy link
Contributor

isJuhn commented May 11, 2019

Spider-Man Shattered Dimensions [BLES00946] now boots and see a huge improvement in terms of spu compilation. nearly all spu programs are reused now. in master 30 seconds of gameplay used to generate 11k spu programs, with 2k unique hashes. now it's 2113 programs and 2054 unique hashes from the same playtime.

@ruipin
Copy link
Contributor

ruipin commented May 11, 2019

RDR now generates 7k SPU programs in the same playtime it used to generate about 100k. Stutter is virtually gone when using SPU LLVM, and I'm getting 16-23FPS where I used to get 1-16FPS (9900k @ 5.1GHz).

TLOU has regressed (might be related to the previous LLVM PR though), and no longer gets past the loading screen. UC1 also no longer manages to get to menu. If I do not use Safe, all these games I mentioned seem to crash immediately at startup.

@MsDarkLow
Copy link
Contributor

Fist of the North Star: Ken's Rage - DEMO [NPEB90285]
SPU LLVM - Safe
Got a massive improvement, from basically Infinite SPU cache down to 5k.
There is a lot less stutter.
Doing one of the "most intensive attacks" it went from an avg of 11fps to 25-30FPS! No longer stuttering whenever an action happens.

@PedroMtz20
Copy link

PedroMtz20 commented May 11, 2019

Metal Gear Rising Revengance got massive improvement with SPU LLVM safe, went from 100k+ SPU cache to 7k
Also better framerate but still suffers from FIFO desync event eventually making the game hang

@legend800
Copy link

legend800 commented May 11, 2019

Splatterhouse is finally playable on the SPU LLVM! No more constant cache building! Nice work. I think this PR fixes this then: #5843

2019-05-10 19_31_30-Window

Unfortunately, Splatterhouse still gets PPU mem errors after a few mins I found out, just a lot less than ASMJIT. This is being tracked separately here: #5837

2019-05-10 19_31_55-

RPCS3.log

UPDATE 1:
Issue 1:
Wipeout HD hits freezes on loading the menus with existing cache (this PR bumping cache?):
F {SPU[0x2000005] Thread (WOHD_singleSPU_CellSpursKernel0) [0x3fe74]} class std::out_of_range thrown: invalid map<K, T> key
wipeout.log
Also locks up with no cache:
wipeout new cache.zip

Issue 2:
Motorstorm Apocalypse freezes while loading the menus (no cache):
RPCS3.zip

As a note, not sure if ASMJIT is supposed to be unaffected, but it at least crashes on Splatterhouse.
wipeout.zip

@MSuih
Copy link
Member

MSuih commented May 11, 2019

Edit: Whatever issue I'm having seems to affect master as well, so it's unrelated to this PR.

@arabek
Copy link
Contributor

arabek commented May 11, 2019

Whatever issue MSuih was having i had tried it out in RDR and couldn reproduce. Works from cold cache and after emulator restart with a primed cache of 3737 spu units compiled. LLVM block size Mega.

@legend800
Copy link

Updated my post above with a quick pass through some titles, noting some that are broken now on this PR. I'll continue to update it with new commit pushes.

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented May 11, 2019

Settings used: SPU LLVM in Safe mode.

Game SPU Cache Before SPU Cache After Screenshot reference
BioShock Infinite 50.6k (title screen and still compiling) ~5.4k (ingame) Screenshot
Grand Theft Auto IV 15k 6k Screenshot
Grand Theft Auto V 31.5k (loading screen and still compiling) 8.5k (ingame) Screenshot
Midnight Club: Los Angeles - Complete Edition ~23.5k 4.5k Screenshot
One Piece: Pirate Warriors ~38k (only in title screen and still compiling) 5.5k (It no longer stutters when you attack or move and performance goes up to ~50 FPS in cutscenes and ~60 FPS in the first level.) Screenshot
Saints Row: The Third - The Full Package 13k-14k (still compiling) ~6k Screenshot
Saints Row IV ~14.1k ~5.4k Screenshot (First mission)

@hellboysss
Copy link

no sound in twisted metal BCUS98106 with SPU LLVM

@vsub
Copy link

vsub commented May 11, 2019

RPCS3 auto closes when closing the game window:
Ar NoSurge
Atelier Shallie
Atelier Escha & Loggy
Ar Tonelico Quga
Persona 5

Eternal Sonata - the game window auto closes after loading the shaders
Tales of Xillia 1\2 - Fatal Error while using ASMJIT(maybe this is what you mean by "ASMJIT don't work") and rpcs3 auto closes when closing the game window while using LLVM(maybe all games are affected by this)

@Nekotekina
Copy link
Member Author

@vsub Try new commit. ASMJIT is currently just unsupported — it needs more work.

@MSuih
Copy link
Member

MSuih commented May 11, 2019

Whatever that RDR safe mode issue was, it's now fixed with latest commit and I can load the game even with existing SPU cache. Mega mode still has some issues but that's not caused by this PR.

@vsub
Copy link

vsub commented May 11, 2019

@Nekotekina Yes,all problems mentioned above are fixed and Eternal Sonata spu cache seems to be WAY better.
On master if I load a save at the first town and then the first possible save location and play the tutorial,the spu cache becomes above 100k but with this pr,it is less than 2k

And also the game runs a little fasted on this pr

@Xcedf
Copy link

Xcedf commented May 11, 2019

RDR started new game, did some random moves 7,5k On Safe never had it on safe before, but on Mega begining of the game was about 35-40k, while Mega cache from whole game is ~59k
Metal Gear Revengeance Safe - 4,4k, was 55k on Mega just in the begining
Now for the bad things Mega hows fatal error window on every game with this PR
GoW 3, TloU, Infamous are stopped working on this PR, sadly Infamous and TLoU will be a fine subjects, they're also making a lot of spu cache

@Xcedf
Copy link

Xcedf commented May 11, 2019

Yet Mega mode regression is a part of previous Giga PR

@legend800
Copy link

legend800 commented May 11, 2019

On the latest build, closing emu window no longer crashes emu (on Master).

Several broken games on Master with SPU LLVM work again (Ridge Racer 7, HOTD4, Razing, Xmen, etc).

However, Wipeout and Motorstorm Apocolypse are still unstable (even with cleared cache). Both are fine on Master.

Wipeout black screen upon entergameplay:
RPCS3.log.gz

MS Apoc freezes loading menus:
RPCS3.log.gz

@Ghostotakoi
Copy link

This might fix j-star victory versus

@Xcedf
Copy link

Xcedf commented May 11, 2019

With recent fix of Mega mode
did more tests
Heavy Rain:
Safe 4.5k Mega 1.6k
RDR:
Safe: 7.2k Mega 3.7k
Metal Gear Revengeance:
Safe: 4.4k Mega 2.2k
Far Cry 2 anoter game with countless SPU cache
Safe: 4.2k Mega 1.9k
Some sane numbers after all

@arcadee1977
Copy link

arcadee1977 commented May 14, 2019

@Nekotekina Musou Orochi 2 Ultimate is full speed ! Huge speed-up! Amazing!! Thank you very much!(spu ASMJIT+MEGA)

SPU LLVM no longer <1 FPS , great work ! But still random freeze in game.

@tabnk
Copy link

tabnk commented May 14, 2019

Tested Trinity: Souls of Zill O'll.

No improvement in performance.

@legend800
Copy link

legend800 commented May 14, 2019

@tabnk Only report improvements/regressions from master.

On latest build, GOW3 is still broken on safe/mega. GOWA though, seems more stable than Master (on mega only).

@arcadee1977
Copy link

arcadee1977 commented May 14, 2019

Sengoku Musou 4【BLJM61144】is full speed too! This is a great PR!!

882901087bf40ad1e789ff5b592c11dfa8ecceef

@jenci8888
Copy link

jenci8888 commented May 14, 2019

Other "Koei Tecmo" games are playable for this PR.
No longer constant freezing/lagging nor crashing. (while master does.)
Excellent job, Neko-chan! 👍

Samurai Warriors 4 [NPEB02062]
image

RPCS3.log.gz

@resadent
Copy link

Just tested spu giga with latest build. Persona 5 performs way worse than with mega. ~15fps in places with lots of npcs. Got the log in case it helps. My pc is ivy bridge.
RPCS3.log.gz

@Nekotekina
Copy link
Member Author

Don't bother with Giga, at least until I start working on it specifically.

SPU ASMJIT not supported yet.
Giga mode not supported properly.
Adjust restored stack pointer for the lack of tail call.
Use GHC calling convention directly for SPU object entry points.
This may address performance degradation after RPCS3#5923.
Avoid returns from the recompiler gateway, favoring tail calls.
This may address performance degradation after RPCS3#5923.
Renewed and adapted for PIC and all branch types.
This may address performance degradation after RPCS3#5923.
Pauses SPURS threads beyond limit automatically if set.
Also move disasm to spu_recompiler_base::dump.
Interleave disasm with block target info for convenience.
Also cleanup and adapt for GHC CC.
Don't scan before the entry point.
Disable stack mirror in SPU LLVM.
Improve analyser logic for holes.
@Tom-Neverwinter
Copy link

Tom-Neverwinter commented May 15, 2019

regression for WipEout® HD Fury [BCES00664] textures pop in and out. stutter. audio is even more out of sync.
8096 seemed to work fairly well. https://pastebin.com/qZuf5Hyt

@RainbowCookie32
Copy link
Contributor

Report regressions on the tracker #5965

@alessandro784
Copy link

alessandro784 commented May 15, 2019

strange.... . after i reboot pc now mega mode work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet