Ppsspp: opengl versus vulkan

Created on 30 Apr 2018  路  16Comments  路  Source: hrydgard/ppsspp

using the previous versions vulkan backend really standup... but now opengl is more faster than vulkan backend in some games..for example

how did itest the speed?
in kingdom hearts birth by sleep:
-keyblade master examination
-fight lots of orb monsters
-use flame salvo - max 15 tragets

kingdom hearts birth by sleep when i use vulkan in a very busy and crowded place of the game the fps rate is ranging from 69~72 , but when i use opengl fps rate is ranging 99 ~ 100 !!!! omg! haahhaaha

is it because opengl is improving? there are these cases that i need to switch to opengl instead of vulkan because of its speed improvements.. (im not complaining about the speed xp just little disappointed with vulkan)

is it possible to make vulkan more faster than current opengl? if its possible, maybe there is a possiblity that silenthill will be playable

What should happen?

OS android 7.0 , Octa-core, 2360 MHz, ARM Cortex-A53, 64-bit, 16 nm , Mali-T830 MP2 , 4 GB RAM

Most helpful comment

Yeah, we multithreaded the OpenGL backend too recently so it can make use of two CPU cores. Was a ton of work but apparently worth it :) It will still usually use up a lot more CPU than Vulkan and thus eat more battery. On Android you can get strange power effects like the OS clocking down the CPU if it's not fully used, which can slow things down. Alternatively, this could just be a case of immature Vulkan drivers.

Anyway, there's a reason we still allow you to choose OpenGL - sometimes it might work better. Plus, there's still further room for optimization of both backends for the future.

All 16 comments

Yeah, we multithreaded the OpenGL backend too recently so it can make use of two CPU cores. Was a ton of work but apparently worth it :) It will still usually use up a lot more CPU than Vulkan and thus eat more battery. On Android you can get strange power effects like the OS clocking down the CPU if it's not fully used, which can slow things down. Alternatively, this could just be a case of immature Vulkan drivers.

Anyway, there's a reason we still allow you to choose OpenGL - sometimes it might work better. Plus, there's still further room for optimization of both backends for the future.

@hrydgard
Told you OpenGL was faster! 馃槈

I'm still not convinced about Vulkan being better right now (not even in terms of battery)

After I created the issue that was similar to this, I tweaked my kernel a bit to improve performance on Vulkan. It's better than before that's for sure, but still I get occasional frame drops (a lot shorter and better than before)
But no such issue on OpenGL.

Also, regarding CPU consumption, I tested 5 minutes on both backends playing the same game.
Remember I said OpenGL usage was a bit higher back then? Well, after optimizing my kernel they're fairly on the same level now! Their battery consumption must be similar too (CPU consumption roughly correlates to battery consumption)

I know you want to keep blaming "immature drivers" because you get a good performance on your S8, but let's not forget it has a beast of a CPU. It may be clocked nearly the same as my Snapdragon 821 (2.2GHz little cores, 2.4GHz big cores), but it performs better in terms of GFLOPs (also faster in terms of I/O)
This might be worth investigating.

Another strange thing I noticed that might be worth looking into is, Vulkan cache creation takes a lot longer than OpenGL (nearly 2-3 times).

Well, I can definitely believe that OpenGL is faster on your device. On most of my machines and devices, Vulkan wins. Don't worry, we're gonna keep both backends, so just use what's faster on your device. I'm a bit confused too as to how OpenGL is beating Vulkan though...

Me too

Problematic weird cases aside(ie Medal of Honor), I think more devices might suffer from enabling MT in Vulkan aka see increased cpu usage without difference in performance. Maybe we need an option to disable Vulkan MT to test it on more devices.

@LunaMoo
Count me in for testing when that happens!

Here's a quick comparison between Snapdragon 821( having the same API and driver version as mine) and Snapdragon 835 in S8+:
https://vulkan.gpuinfo.org/displayreport.php?id=2136#device
https://vulkan.gpuinfo.org/displayreport.php?id=2830#device

I certainly noticed the difference when i am playing Final Fantasy games, smooth on different sections of gameplay

But laggy on God of War games than OpenGL

Using Huawei Nova Lite, Android 8.0. Kirin 655

Closing because this is not really a specific issue. There are many ways left to improve performance in the future...

@hrydgard
Have you made any significant changes since build 971? I don't know why I can get extremely good performance on my phone! No lag or sound issues on Vulkan. Also, my phone doesn't heat up at all (played for 2 hours straight and still cool...hm...as a cucumber?!)
I'm not sure if it's what you did to the emulator or what I did to my phone but everything looks great right now! 馃憤

good to hear, but very little that should affect performance has changed since then. maybe you just rebooted :) Are you using "sustained performance mode"?

Rebooting is the technique they used on old Android phones! Don't think it works on today's phones with over 4GB of ram!

No my ROM doesn't support sust perf mode for unknown reasons (it's android 7.0 though)

The only thing I did was raise my phone's thermal throttling limit, which actually should make the phone warmer (I can definitely confirm that in Dolphin!) This also happened in build 971. But not build 988.
I don't know what's going on here!

@hrydgard Could it have been an I/O issue? I remember turning off an option in Developers Options called "Mock SD Card Optimization". Don't know what it means (not literally) anyway!

Also noticed that OpenGL is using more than 2 cores?
screenshot_2018-05-11-19-09-21

When it use all the cores the game become slow? why? supposed to be fast 馃槦

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PilipinoAko picture PilipinoAko  路  5Comments

nassau-tk picture nassau-tk  路  5Comments

thedax picture thedax  路  6Comments

moura464 picture moura464  路  3Comments

ewlkkf picture ewlkkf  路  6Comments