Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Is there a FPS cap when using the Vulkan Renderer?

Author
Message
Ranietz
AGK Gold Backer
16
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 9th Feb 2021 18:33
Hi.
I bought a new laptop (running Windows) that supports the Vulkan renderer and if I use 'SetSyncRate(0,0)' on the default new project I only get around 360 FPS. If I use '#renderer "Basic"' to force it to use OpneGL I get over 6000 FPS.
Is there a FPS cap when using the Vulkan renderer or is there something weird going on with my laptop? (Not that I need my apps to run at more than 60 FPS. It's just for testing.)
Raven
16
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 10th Feb 2021 02:34
I'd wager it's an issue., but I'm not so convinced the issue is with the Vulkan Renderer.
Now personally I've never seen any performance difference between the Renderers., this said in order for the Graphics to be more of a bottleneck to performance more than the CPU... you need a REALLY weak GPU.

In any case use this as a simple "Stress" Test



Now as a note., this is 2 Million Shaded Polygons (Basic Pixel Lighting and a Diffuse Texture Pattern) and the Texture itself is 4.2 Million Pixels.
This is where I barely begin to see a performance difference between Vulkan and OpenGL.

As OpenGL Renders this (at 3840x2160., i.e. UHD 4K) at 1100 FPS while Vulkan Renders it at 1160FPS
This is a negligible different to say the least, and might be improved with multiple objects; and I might write a stress test to handle that... but the problem is doing so would require them to be static rather than animated; as doing anything over multiple objects cripples AppGameKit Script performance and we're once again dealing with a CPU not GPU bottleneck to performance.

I will not something interesting though., as it only happens in Vulkan ("Advanced") Mode; and that's the AMD Overlay enables., which is good as it means I can Record with ReLive, use the Performance Metrics, etc.
The oddity of it though is it does come at a NOTICABLE FPS hit... dips down to 920 FPS, while it's onscreen then back to normal when it's not... same with recording, which in most games (or C++ Projects) is rarely causing more than 1-2 FPS as a performance hit.
So why it's affecting AppGameKit the way it does is, as I said interesting.
Ranietz
AGK Gold Backer
16
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 10th Feb 2021 10:21
Thanks for the reply Raven.
I tried your stress test and got only 115 FPS at 1920x1080 running the Vulkan renderer while I got over 1500 FPS at 1920x1080 running the OpenGL renderer.
Since there's not much difference between the two renderers on your computer I assume there's some settings on my laptop that cause this behavior.
I have a MSI laptop and it comes with some preinstalled software for the graphic card that I'll have to have a look at. I'll see what I can find.
Raven
16
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 10th Feb 2021 23:58
I believe there is a setting either under Display or Power that lets you switch between iGPU and dGPU depending on what type of Application is running...
It could be that under Vulkan (because AppGameKit Script is Single Threaded)., Vulkan is telling Windows that it's "Low Priority" Application and it's switching to your "Power Efficient" Graphics.

Given those figures., I'd wager you have what an iCore 9th Gen i5 / i7 H-Series (Intel 630 Graphics) with a GTX 1660Ti (Mobile).
But yeah... essentially I think you'll want to manually set the Graphics to always use the Dedicated GPU over the Integrated GPU., frankly Intel Graphics can just about run a Desktop and that's it.
I'd tell you where, but yeah if you have multiple dedicated Graphics it actually doesn't provide the option; instead you're manually choosing them in a Game.

That actually does make me wonder., as in Dark BASIC Professional; you were actually able to check for all available Graphics Hardware and select which you wanted to use... but AppGameKit doesn't have such a feature, wonder why.
Mind I'm still not really seeing a point in Vulkan being supported beyond it being a Bullet Point on the Marketing., as it provides no additional features (actually resulted in a few being deprecated) and there is no real noticeable performance difference... at least in AppGameKit Script.
It might be different in Tier 2 (C++) with the AppGameKit Engine SDK... might try that, as generally C++ OpenGL Vs. C++ Vulkan; especially on Hardware designed for it (like RDNA or RTX), you're generally going to see a clear performance benefit without even getting into the specific optimisations it can provide over OpenGL.

I've also hear people not that they're not seeing much of a difference in Memory Usage either., which again having complete control over Memory Management rather than having to let the API / Driver handle such for you; can lead to gains of 50% Smaller Memory (System and/or Graphics) Footprints.
So yeah., if you can solve the issue; don't worry, just use "Basic" instead; you're not missing out on anything.
SFSW
18
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 11th Feb 2021 02:44
Lack of correct detection could indeed be the cause. Since you're on a new Windows 10 setup, you can manually select a dedicated GPU you may have in your laptop. To do that:

- Type in 'graphics settings' in the Win10 search field, launch the app by the same name that is displayed.

- Leave the menu at 'Desktop app', browse for the runtime you want to test with.

- Once you select your test runtime, click on 'Options'.

- Check 'High Performance' and click on 'Save'.

If you don't see that option or only an integrated display device is available, then your system doesn't have a dedicated/discreet GPU you can try. But if it does, this method will activate the GPU for maximum performance for any future testing with your test program.
Ranietz
AGK Gold Backer
16
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 11th Feb 2021 10:28
Thanks again for the reply Raven and SFSW.
My laptop is a MSI GF65 i7 with 16GB RAM and GeForce RTX 2060 graphics card (and an Intel UHD graphics card)

I got it solved now and I had to, as you suggested, manually tell Windows to use the RTX card on the AppGameKit app instead of the onboard graphics card (using SFSW's method).
This is my first laptop and it came preinstalled with lots of programs for graphic cards and power savings and whatnot so it was quite a bit to dig through.
But it works now. Thanks again for the help.
SFSW
18
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 11th Feb 2021 16:34
Glad that was it. Do you notice a performance improvement with Vulkan vs OpenGL, or are they about the same?

It is annoying that so many laptops don't seem to be able to detect an API properly to enable a dedicated GPU automatically. Seems to work with OpenGL, but for whatever reason(s) (drivers lagging behind perhaps?), Vulkan tends to get missed.
Ranietz
AGK Gold Backer
16
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 11th Feb 2021 16:42
Quote: "Glad that was it. Do you notice a performance improvement with Vulkan vs OpenGL, or are they about the same?"

I haven't done much testing yet but they seem to perform about the same. At least on the test Raven provided. I'll do some more testing later.

Login to post a reply

Server time is: 2021-07-31 11:03:33
Your offset time is: 2021-07-31 11:03:33