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

[Android] [Vulkan] Constant FPS drop in Final Fantasy Type-0 #13464

Closed
kage2051 opened this issue Sep 22, 2020 · 29 comments
Closed

[Android] [Vulkan] Constant FPS drop in Final Fantasy Type-0 #13464

kage2051 opened this issue Sep 22, 2020 · 29 comments
Labels
Milestone

Comments

@kage2051
Copy link

When using 2x or higher rendering resolution and Vulkan backend, I get constant FPS drop in the game mentioned above, even with block transfer effects set to off.

On GL though, I can run it decently as long as I use any resolution not higher than 3x.

Device tested:
Redmi Note 6 Pro (SD636, 4GB RAM)
Android 9
Latest development build of PPSSPP. Tried going back to stable but it just makes the issue even worse.

Other settings shown below:
Screenshot_2020-09-21-21-17-55-806_org ppsspp ppsspp

@Panderner
Copy link
Contributor

@kage2051 Frame rate comparison for both backends?

@kage2051
Copy link
Author

OpenGL, 3x rendering resolution, no texture scaling:
Screenshot_2020-09-22-12-28-01-209_org ppsspp ppsspp

Vulkan, 3x rendering resolution, no texture scaling:
Screenshot_2020-09-22-12-29-04-712_org ppsspp ppsspp

As you can see, the framerate difference is brutal in that game.

@hrydgard
Copy link
Owner

That is quite surprising but an interesting find. Needs investigation.

@hrydgard hrydgard added this to the v1.11.0 milestone Sep 22, 2020
@hrydgard
Copy link
Owner

Does by any chance the new option "clear framebuffer on first use" make any measurable difference here?

@kage2051
Copy link
Author

Does by any chance the new option "clear framebuffer on first use" make any measurable difference here?

That option was checked during the tests to make sure.

@kage2051
Copy link
Author

kage2051 commented Sep 25, 2020

Another thing that is worth mentioning here: sometimes when Ace (one of the characters) performs a one-hit KO with his card attack, framerate drops to 23 for a second, even on 1x resolution. Also that some non-FMV cutscenes tend to suffer from slight frame drops as well.

All of them reproduced on the same device, independently of the backend used.

@ghost
Copy link

ghost commented Oct 10, 2020

This game FPS is horrible on PC as well using the Vulkan renderer and an AMD Gpu

@hrydgard
Copy link
Owner

Is this all through the game? Got a savegame at some particularly bad spot?

@ghost
Copy link

ghost commented Oct 10, 2020

You can see it in the beginning of mission 1 so you dont need a save.
If you use the OGL backend it will be ok but Vulkan will cause massive FPS drops.
Tried this both on Win10 and a LInux distro I have in dual-boot.

@hrydgard
Copy link
Owner

So the game does a framebuffer copy that gets converted to a readback, as part of a bloom effect. It's a VRAM to VRAM copy, which should be safe enough to convert to an on-GPU framebuffer copy.

@hrydgard
Copy link
Owner

That fix will only improve performance with block transfer effects on, so there's probably more work to do.

hrydgard added a commit that referenced this issue Oct 11, 2020
We just set the render area to the union of the scissor rects used in a pass.

Might help some games on some mobile hardware, a little bit.

Possibly #13464?
@hrydgard
Copy link
Owner

Did #13541 make any kind of difference? (I'd primarily expect it to make a difference on Mali GPUs on mobile...)

@kage2051
Copy link
Author

kage2051 commented Oct 13, 2020

Did #13541 make any kind of difference? (I'd primarily expect it to make a difference on Mali GPUs on mobile...)

No big difference to be honest. I could only play on 1x using Vulkan, while with GL I get 30fps on 3x.

@hrydgard
Copy link
Owner

I recently enabled the use of reduced-precision math in Vulkan fragment shaders, just like we always had on GL. Did that have any effect here?

@kage2051
Copy link
Author

I recently enabled the use of reduced-precision math in Vulkan fragment shaders, just like we always had on GL. Did that have any effect here?

It only improved speed a bit on 2x IR, I still get 20fps at the same scene if I increase the resolution to 3x.
This is one of those few cases where Vulkan drivers perform worse because they might behave differently from OGL. What's curious though is that on OGL, even with the CPU texture scaling on, I get reasonable speeds in most games as long as they aren't in the same level as GoW.

@hrydgard
Copy link
Owner

hrydgard commented Jan 31, 2021

Ok. Could you grab a GE frame dump of a scene where you're getting a large difference between the two APIs? I'd like to take a closer look. Instructions: https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump , then zip it up and drag into a message here.

@kage2051
Copy link
Author

Results below:
OGL:
recording_ogl.ppdmp.zip

Vulkan:
recording_vulkan.ppdmp.zip

@hrydgard
Copy link
Owner

Thanks! Will be very helpful when I get back to this issue.

@ghost
Copy link

ghost commented May 18, 2021

PPSSPP latest git build
Using your ge dump
Screenshot_2021-05-18-17-05-33-928_org ppsspp ppsspp
Vulkan backend Helio G85

@hrydgard
Copy link
Owner

The interesting thing would be to compare Vulkan and OpenGL on your device, since the report here is about Vulkan being unexplainably slower..

@ghost
Copy link

ghost commented May 21, 2021

OpenGL

Screenshot_2021-05-21-19-34-29-925_org ppsspp ppsspp

Vulkan

Screenshot_2021-05-21-19-34-13-240_org ppsspp ppsspp
PPSSPP v1.11.3
Redmi Note 9 Mediatek Helio G85

@hrydgard
Copy link
Owner

If you increase the render resolution, is there a point where either slows down? if so, which one (or both)?

@ghost
Copy link

ghost commented May 21, 2021

OpenGL 4X Resolution

Screenshot_2021-05-22-00-56-45-047_org ppsspp ppsspp
Screenshot_2021-05-22-00-56-37-885_org ppsspp ppsspp

Vulkan 4X Resolution

Screenshot_2021-05-22-00-56-15-990_org ppsspp ppsspp
Screenshot_2021-05-22-00-56-07-024_org ppsspp ppsspp
Redmi Note 9 default ppsspp settings

@ghost
Copy link

ghost commented Jul 29, 2021

Vulkan is stll low fps on this game using the PPSSPP v1.11.3-975

OGL

Screenshot_2021-07-29-15-42-05-589_org ppsspp ppsspp

VK

Screenshot_2021-07-29-15-39-57-679_org ppsspp ppsspp

@hrydgard hrydgard modified the milestones: v1.12.0, Future-Prio Aug 29, 2021
@ghost
Copy link

ghost commented Apr 15, 2022

This game performance on vulkan improve now using ppsspp latest development build for android using default settings.
Screenshot_2022-04-15-23-18-42-896_org ppsspp ppsspp

@hrydgard
Copy link
Owner

great!

@IrfanH495
Copy link

sorry, is this also an issue?
OpenGL 2Xpsp
Screenshot_20221026-210147_PPSSPP
Screenshot_20221026-210212_PPSSPP

Vulkan 2Xpsp
Screenshot_20221026-210024_PPSSPP

or my device is too weak.
Samsung M20

@hrydgard
Copy link
Owner

Looks to me that there's not much difference in VK vs OpenGL on your device, but neither runs quite fast enough. That's not really an issue on its own, it's just that the game is a little too heavy to emulate for your device....

I think I'm gonna go ahead and close this, as there are no recent reports of OpenGL being drastically faster than Vulkan.

@Xavierneil
Copy link

Does the type 0 fixed?? i can't pass through the elevator at the start of mission. it crashes everytime

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

No branches or pull requests

6 participants