jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.16k stars 264 forks source link

ioS related improvement request #1224

Open ansinerd opened 1 year ago

ansinerd commented 1 year ago

First of all we are indebted to you for your amazing work. Thankful to you for making play ! A possibility on ios. I just wanted to request some ios related improvement, past few updates the open GL performance has regressed with time. Many games that used to work slightly better have regressed. Vulcan is hit or miss like before. I know you are independent developer and your work is highly appreciated, its not a demand but rather a polite request if u could some ios related improvement to your amazing emulator to make it more playable.

thank you

System Details

Spidy123222 commented 1 year ago

I do notice on a experimental version of provenance which is porting play to their app doesn’t have same issue play has on Vulkan so I wonder if there is some type of moltenvk (maybe different versions?) problem here. For opengles I think I’m getting similar regressions too including some hitching in games like KingdomHearts.

jpd002 commented 1 year ago

Do you have examples of games that have regressed over time?

I'm aware of the KH issues on OpenGL/iOS, working on a fix.

Thanks!

Spidy123222 commented 1 year ago

Do you have examples of games that have regressed over time?

I'm aware of the KH issues on OpenGL/iOS, working on a fix.

Thanks!

Yeah I'm mentioning via Vulkan side of things. Idk why a port of play and offical app working differently on same Vulkan without editing other than moltenvk differences. Some of us talking about it in the discord too. Play app. image

Provenance port image

jpd002 commented 1 year ago

The main issue with Vulkan on Apple GPUs is that MoltenVK doesn't properly support framebuffer fetch (https://github.com/KhronosGroup/MoltenVK/issues/1374). I have a patch that adds support for it, but it probably breaks other stuff (namely fragment shader interlock on Intel GPUs).

And that second screen shot you uploaded looks suspiciously a lot like OpenGL. Here's a screen shot of OpenGL running on macOS (Apple M1):

image
Spidy123222 commented 1 year ago

The main issue with Vulkan on Apple GPUs is that MoltenVK doesn't properly support framebuffer fetch (https://github.com/KhronosGroup/MoltenVK/issues/1374). I have a patch that adds support for it, but it probably breaks other stuff (namely fragment shader interlock on Intel GPUs).

And that second screen shot you uploaded looks suspiciously a lot like OpenGL. Here's a screen shot of OpenGL running on macOS (Apple M1):

image

Hm they said it was running Vulkan it's still being ported so I'll have to show them your message see if it's a mistake. Thanks also sorry you got bothered by comparing a port just wondered if it was a moltenvk difference or not. I’ll keep you posted.

ansinerd commented 1 year ago

Do you have examples of games that have regressed over time?

I'm aware of the KH issues on OpenGL/iOS, working on a fix.

Thanks!

  1. Gran Turismo 4 : I definitely remembers it playing at 5-10fps earlier on but now its just glitch on graphic part on open GL.
  2. Gran Turismo 3: its kinda having very low amplitude oscillating screen (i m not sure how to put it in words) and definitely game feels few fps slower/
  3. The warriors : Game feels 2-5 frames faster but graphic suddenly much worse than it was before.
  4. I definitely remember playing Urban reign with vertical lines on vulcan but now it just wont load the game at all on either back end, it just remains at black screen. I tried the same rom in provenance (experimental play core) and it somehow plays the game like I remember.
  5. shinobi : it had grapgical glitches even before but they are more now that its almost impossible to play game.
  6. Downhill domination : Game speed has improved by much. Graphics look great but somehow the screen keeps on oscillating with low amplitude (like how old crt monitor would behave in 90s, I don’t know how to put it in words) but definitely it dint have that issues before. But yes the game is much more playable now with speed n graphical improvement on open gl. PS : that oscillating screen issue is not therr with Vulcan, just open gl issues.

I don’t know if i mentioned some games that were not part of compatibility list but I mentioned my own experience with these games which i tried on earlier build (june/july) and then now on latest.

I am sorry in advance if i am causing you trouble. and once again even to be able to play our childhood games on our iPhone/iPad is nothing but a miracle. Thank you so much for your immense efforts and time. Wish you best of luck and we hope in months we could see more improvement to sound and graphics. Thanks once again.

8414C023-6F80-454E-B832-28FFBF7C68DC

81D0339B-80BD-4D76-85D1-B613FD722074 ADDA1046-7182-48E2-A215-80A6B318DFC4

JoeMatt commented 1 year ago

The main issue with Vulkan on Apple GPUs is that MoltenVK doesn't properly support framebuffer fetch (KhronosGroup/MoltenVK#1374). I have a patch that adds support for it, but it probably breaks other stuff (namely fragment shader interlock on Intel GPUs).

And that second screen shot you uploaded looks suspiciously a lot like OpenGL. Here's a screen shot of OpenGL running on macOS (Apple M1): image

Can we #ifdef this?

If you want, I can take a look at the patch and make a PR.

Everyone is really excited about Play! in Provenance so whatever I can do to help lmk.

jpd002 commented 1 year ago

This is the patch, dunno if it still applies cleanly since I made that last year: https://github.com/jpd002/MoltenVK/commit/898553af81e3ee24e82d5c654c15776c3c1b4b78.

I don't think the MoltenVK team would accept this patch as is. I think maybe adding a special flag in a forked MoltenVK version to enable this on iOS would be possible, but it's painful to maintain. There might be other options :)

JoeMatt commented 1 year ago

This is the patch, dunno if it still applies cleanly since I made that last year: jpd002/MoltenVK@898553a.

I don't think the MoltenVK team would accept this patch as is. I think maybe adding a special flag in a forked MoltenVK version to enable this on iOS would be possible, but it's painful to maintain. There might be other options :)

Interesting, I'll take a look.

We would need this for Citra too I think, which I'm working on a fork based on an android arm64 fork.

JoeMatt commented 1 year ago

I was able to merge that patch no issues.

Added for here, https://github.com/Provenance-Emu/MoltenVK

I'm not building MoltenVK from source yet, but will change over and test this eventually

ansinerd commented 1 year ago

This is the patch, dunno if it still applies cleanly since I made that last year: jpd002/MoltenVK@898553a.

I don't think the MoltenVK team would accept this patch as is. I think maybe adding a special flag in a forked MoltenVK version to enable this on iOS would be possible, but it's painful to maintain. There might be other options :)

Whatever you did in recent most commit on github has improved the performance of some games. Game : Urban Reign Fps : upto 37 now whereas it used to be 15-20fps earlier Although vertical line issue still persists. Video backend : OpenGL

IMG_0156

Video backend : experimental Vulkan Game : Urban reign Fps : upto 56 fps achieved The vulkan backend has done some magic, I remember in earlier build game wont even boot on Vulkan. Then on last few builds game would run slower than open GL and now game can easily play between 40 to 56fos constantly. IMG_0158

Issue : visual graphic glitch that keeps on happening throughout the game. As seen in screenshot below. IMG_0159

request : if only vulkan graphical glitch is fixed this game will become perfectly playable at full speed on VULKAN backend. On open GL vertical line plus dropping fps needs to be fixed.

once again, massive gratitude for your work. Amazing amazing work indeed. Great performance in recent build. I am so happy and glad to see play ! Getting where we all wish to see it.

2 : I know GOW II is not marked playable but i did try it on recent most github build. Cut scenes render perfectly upto 30 fps on openGL 1x resolution but same green screen issue once game starts. On Vulkan backend : the game plays at 14-15 fps constantly but there are graphical glitches all over. If Vulkan is fixed and even 5fps is increased, game would be playable imo. Attaching screenshot below , from cut scene on openGL with 32fps and Vulkan on 14fps with graphical glitch. IMG_0164

IMG_0166

PS : Pardon me for writing in not so well formed manner. I am not intending to bother you Jpd or demand anything, all we wish is to improve this great emulator and I feel I can contribute this way by reporting issues I am facing so that i could be fixed. thanks once again for being kind and patient. Lastly, thank you so much for even making it a possibility for all of us to play ps2 games on iOS.

ansinerd commented 1 year ago

Continuing this thread to have your attention dear dev.

we all are grateful to you for your wonderful work on play ! Emulator, its something that we have been expecting to deliver amazing performance one day. One of a quite HLE emu.

anyways, I was hoping to know if it was possible for you to improvise Vulkan support for android and ios devices.

the Dolphin emu is completely metal supported now, it has improved the performance much.

Because of Vulkan, now we have an amazing and ever refining CITRA port for ios. Vulkan has sped up the emulation on iOS as well as on pc with pcsx2 and yuzu.

even on Play ! Emulator, many games run faster on Vulkan backend but with more and more graphical glitches compared to opengl backend. Assuming Vulkan offers better experience, could we expect you to try you hacky patch or workaround you mentioned before on ios/android and try and improve the emulation on those devices specifically even if no pc.

so it’s kind of request to keep in mind that we would be grateful if Vulkan is improved in play ! I genuinely wanna use Play ! On my secondary android device but even with good specs the performance is not really great on android. Not comparing any other emulator, because we have been supporting and wanting play ! To be no 1 choice for pcsx2, so was hoping if you could do anything for vulkan refinement on all devices (specifically phones/ipad)

thank you so much in advance