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 / Renderer OpenGL/Vulkan bugs?

Author
Message
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 19th Feb 2021 21:31
#Renderer "Basic" appears to have no affect other than when GetRendererName() is used the output reads as OpenGL. I have AGKC and have compared - the difference between AGKS and AGKC is visually very obvious, yet when switching between renderer in AGKS there is no difference visually whatsoever...AGKS only uses Vulkan!!!

Also, when I create a windows executable and rename it, run it from the same folder, it switches renderer(by name only) in accordance as to what was last compiled even though this executable itself has already been built! That can't be right can it? Surely they should act completely independently? I basically did this in AGKS, compile/build as "Basic" render with text output of renderer to screen, rename the exe. Check it(run it) to confirm that it states OpenGL, now run same program again from IDE, but change renderer to "Advanced". exit it and then run the other executable again - it will read as Vulkan instead and will not revert unless changed in the next build of the other executable!!

In the advert for studio it states performance increase with Vulkan...I don't seem to be able to spot it - how does one go about finding it? From the ad(no I did not double copy mid quote!);
Quote: "A new Vulkan rendering graphics engine will bring improved speed performance to your apps and will bring improved speed performance, modernisation and future proofing to your apps"

Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 19th Feb 2021 21:44 Edited at: 19th Feb 2021 21:57
You can't rename the interpreter/player to run a project in a different render mode. The render mode you select is stored in the 'bytecode.byc' file in the \media folder. So regardless of whatever the name of the player you use is, it will apply the render mode you selected in your source code the last time it was saved and compiled. To say it another way, just changing player names won't change the render mode.

That may be the reason you are not seeing a difference. Selecting 'Basic' for renderer and then compiling and running with the updated bytecode file will apply the selected render mode. Just changing player (EXE) names won't.

Vulkan performance can vary. A lot will depend on what you try to render, what display hardware you are using, and how you manage various graphics elements in code. For me, the best performance increase I've observed on the same system between the OpenGL and Vulkan renderers is about 15-20%. Considering what I was running (a current AMD CPU and GPU system) and testing at the time, that was within the margin of expected performance gain. Other tests have varied from being about the same to even a little slower (GPU chipset limitations being a key factor in the latter). So I wouldn't necessarily expect consistent performance gains between the two, only on configurations and conditions that are favorable to Vulkan.
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 19th Feb 2021 22:50
I see, I only noticed the mimic-switching while comparing the AGKC vs AGKS exe's - while looking for said speed improvement - mimic-switching wasn't important to me, I just happened to notice and thought it might have some bearing on it as it only affects AGKS. I think you have maybe misread - I cannot get OpenGL to work at all in AGKS which is why I cannot see a difference and has nothing to do with the mimic-switching between executable's. It states it is running OpenGL when i tell it to - but it is not - i know this because I also have AGKC which only runs OpenGL - I can physically see the difference so know what "Basic" mode should look like. Also what players? I'm not broadcasting - I am talking straight up windows exe's.

Yes I should see a speed improvement - that is what the advert states - it does not state it is hardware dependent. This fact aside for the moment at least - I should still see speed improvement somewhere and it should be reflected in the frame rate...I have GFXBench - a free program. I can run one of their bench marks in Vulkan and OpenGL and the frame rate difference was about 20 the 30 fps (120fps OpenGl vs 150 Vulkan). Both the AGKS and the AGKC executable's run at the same frame rate but are visually different. So this has to be down to not having full OpenGL support right? So as per the advert i have to ask again - where is this speed improvement? You cannot state something in an advert that is blatantly not true so it must exist somewhere for everybody that buys it - they even said it not once, but twice!

Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 19th Feb 2021 23:14 Edited at: 19th Feb 2021 23:21
Without knowing what those differences are that you are seeing, it's not very practical to guess what is happening beyond what you've said without more information.

Broadcasting doesn't have anything to do with switching player names and is not what I was referring to. When you launch a player on Windows, you are running the code in the 'bytecode.byc' file, you aren't changing anything with the player/EXE except for its name. All you are doing is copying the relevant player/EXE from the '\Players' or 'Tier1\Compiler\interpreters' folder over to your project's folder and running it from there. The only aspect that changes what executes is what you save to the bytecode file when you hit F5 or click 'Run' to save and run it.

It is possible that AGKS's implementation of OpenGL differs from AGKC's, perhaps in texture filtering, perhaps in other ways, while some/all of AGKS's OpenGL elements may more closely resemble Vulkan than does AGKC's implementation of OpenGL. I've observed certain differences in anisotropic filtering for example.

So we'd need to know what specific differences you are seeing in AGKC (GL) vs AGKS (GL and/or Vulkan) before we could determine more. It may also help to specifically determine what final output mode AGKS is actually running in to note whether a mode is actually different or not (to rule out AGKS always remaining in GL due to configuration limitations). One way you can do that being more directly tied to final rendering output method rather than just requested label is to use this command:



With that, you can determine for sure what the final output render mode is based on the depth state (and after any mode might be switched post-launch because of detected limitations or conditions). If you're in a 0-1.0 depth structure, it's definitely OpenGL, if it's 1.0-0, it's definitely Vulkan. Once that's done, you can perhaps more accurately compare the differences. But again, I suspect the OpenGL and Vulkan modes of AGKS will very closely resemble each other while the AGKC OpenGL mode may have more noticeable differences.

For performance matters, I'd be interested to learn more about the system configuration you are using. I doubt Vulkan will be faster in every situation, but it's good to know either way what those situations might be.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 19th Feb 2021 23:38
Quote: "For performance matters, I'd be interested to learn more about the system configuration you are using. I doubt Vulkan will be faster in every situation, but it's good to know either way what those situations might be."


I'd actually be curious to know where you ARE seeing a performance difference (let along the 15-20% you're saying exists)
As it stands I've seen (best case) ~5% Performance Improvement when specifically targeting a GPU Heavy Workload., which is difficult to say the least as it's far too easy to run into CPU Bottlenecks.
Maybe the situation is a little different in C++ ("Tier 2") but then I'd argue the AppGameKit Middleware SDK for C++ somewhat defeats the point in using AGK; as there are free and better Middleware Engines...

Now in regards to the AGKv2 and AGK-S OpenGL Runtimes looking different... there are some subtle differences between the two.
They wrote AGK-S in a bit of an odd way., so they rewrote the OpenGL Renderer but removed all functionality that Vulkan couldn't do more-or-less Command for Command; while retaining OpenGL ES 1.1 Compliancy... THEN they wrote the Vulkan Renderer to essentially do everything the New OpenGL Renderer was doing.
So in essence there is a bit less functionality compared to AGKv2 OpenGL Renderer; which already wasn't full OpenGL 2.0 Compliant (so less featured than Dark BASIC Professional).

Like it's absolutely maddening., as there was clearly a lot of time and effort put in to (as best as I can tell) provide a Marketing Bullet Point that is otherwise meaningless.
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Feb 2021 00:20
Raven wrote: "I'd actually be curious to know where you ARE seeing a performance difference (let along the 15-20% you're saying exists)"


Sure. The most recent example (earlier this week) involves a full game project (all kinds of graphical things going on including multiple renders, shadows, shaders, etc) in Tier1 on an Asus FX505DY laptop with a Ryzen 5 3550 and RX 560X GPU. GL performance was steady around 40 FPS, Vulkan was 47, so right around 15% improvement on that configuration.
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 20th Feb 2021 02:39
The difference was shadows - as you said the filtering. I added your snippet which confirmed OpenGL was indeed in use when instructed in AGKS.

Cannot say I have heard of an exe being referred to as a player, first time I have come across the term was for the broadcasting to players in AppGameKit so thought it only specific to them alone, hence my confusion. Sorry about that!

The code I am running is for a short view distance large map rolling tile terrain. When monitoring the idle program at the start the fps was so erratic it couldn't be pinned down so I just averaged the fps every 500 frames and let the program settle each time, for Studio Vulkan ranged 560-590fps hovering around the 580 mark a lot, for Studio OpenGL 500-580fps not hovering as much but when it did around 570, for Classic 460-540fps again didn't exactly hover as much but when it did around 530. That said classic did get 600fps a number of times momentarily.

My specs are in my sig at bottom of each of my posts. I have latest drivers and windows fully updated to, as are both Classic and Studio. Is there more you need to know?

Now here is a new weird thing I just came across, if I have task manager open(I was watching cpu graph) the classic compilation just quits without error within 60 seconds. If I run it for ages and ages without task manager it is fine right up until the very moment I open task manager(at which point it quits without error). This is repeatable every time. So I checked previous exe backup early versions of this code and same happens but only sometimes! So I checked the ones with different names in older versions and they occur almost every time. Here is the thing, I am not actually naming them directly - AppGameKit is! Basically when I progress code enough to back it up I add a version value to the folder name then copy it, keeping the new name for the current project. In Classic, the next time the project is compiled its name is taken from the folder name, in Studio its name is taken from the project file. I have to look into this more though as I don't have the time right now, I have seams to smooth!

I do genuinely want to know where/how this performance increase can be measured, from the fps results it just looks like the performance increase is relative to studios OpenGL and only marginally so for my specific project - and fairly significantly increased against Classic BUT Classic did get higher frames on odd occasions. So it would be better to know how best to use Vulkan hence my asking where is this performance. but I am extremely concerned it is as Raven states, nothing more than an expensive marketing bullet point - could have been fully 2.0 compliant or maybe better instead, could have completed features also advertised like physics for example. I still cannot get over the fact there is a memory leak when changing physics, didn't mention that in the brochure - not only that but there is an actual FB post just recently linking to a review that places AppGameKit up there with the "best" while stating "Developers have access to AppGameKitā€™s C++ libraries for advanced physics" loool should have said real physics as it has a memory leak that mimics a black hole! I have no clue on who digital.com are/if they are of any stature in the industry.
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Feb 2021 03:09
That works, knowing that is what you are using. Interesting, so Vulkan was fastest overall at about 580, AGKS GL at 570, and AGKC at 530. And with some spikes, which I would expect. A much smaller overall margin, but probably expected with a lighter rendering load at framerates in the 500's using an GTX 750 GPU. Later GPU's (post Maxwell/900 for Nvidia, so 1000 series and up) seem to do better with Vulkan, but it's useful to note you at least saw about the same or slightly better performance with it using a 700 series. It's been tough for me to pin down specifics on what might work better or worse overall. It seems that in general, the heavier the rendering load, the better the performance increase in Vulkan with -some- systems (mostly newer/later AMD and Nvidia GPU's).

I can't speak to claims and ads, just curious myself to gauge what others are testing and running in the various rendering modes. That task manager behavior is indeed strange, wow
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 20th Feb 2021 03:44
If it helps you any - the collections project for the shader pack dlc - OpenGL wins out significantly(if you don't have it, its basically a bunch of spheres, a bone animated character, a few boxes and planes all with shaders on ocean, xray, outline, ssao, and many more all in 1 scene). When I checked the sensor info in GPU-Z it shows that the fps drop was down to activity in the memory control load.
In this image you will note the little red graphs, each with a drop in activity in their timelines about half way along the graphs, every data point to the left of the marked inactivity is the OpenGL exe(Studio), on the right of said inactivity area is Vulkan. Average for Vulkan 180fps, OpenGL 260fps - a massive difference. In the rolling terrain project that I've been using during this thread no shaders in the scene at all other than internally generated ones of course.

Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Feb 2021 04:22 Edited at: 20th Feb 2021 04:28
That is also interesting and yes, I do have that also to test with. So I gave it a try. Setting the sync rate to 0 for unlimited allowed it to run at maximum speeds on a test setup with a GTX980 (old Maxwell) and provides the following results:

Studio:
- 597 average with Vulkan
- 670 average with OpenGL

Classic:
- 639 average with OpenGL

Now on the Ryzen system, things change quite a bit, it provides the following results:

Studio:
- 175 average with Vulkan
- 90 average with OpenGL

Classic:
- 73 average with OpenGL

So as I've experienced and tested before, an older GPU (ie Maxwell) will generally run about the same or slower, depending on other conditions. In this test, a margin of 12%. Fairly minor. Classic's OpenGL being the slowest, also by a fairly minor margin.

However, things change when newer tech is used. Even with a slower overall framework in the laptop, the difference that the Ryzen/RX560 combination provides results in almost 200% faster framerates between Vulkan and OpenGL. 194% to be exact. Vulkan is enormously faster on that setup than OpenGL and its evident just watching it on the screen.

The AMD hardware is newer (Polaris 11 GPU, iirc) and likely better optimized to take advantage of Vulkan compared to the older Nvidia setup. Could be other elements at play also (bottlenecks in other parts of the system, types of shader operations, etc), but the end result is Vulkan is faster by a much larger margin with that shader pack collection project compared to my own games and test projects (where the performance margin is in favor of Vulkan by about 15-20% at most). So I guess when it comes to throwing that much at it, the advantage becomes even more pronounced on new enough hardware that takes advantage of Vulkan.
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 20th Feb 2021 05:43 Edited at: 20th Feb 2021 05:51
So I forgot to mention classic with the collection project - 184fps average, it has same sensor usage in GPU-z across the board as Studio OpenGL with exception to power consumption - it used less power - but the odd thing was I normally have music on, but didn't so I noticed a noise - from where I sit it sounded almost whiny but it was such a quiet noise it was hard to tell if it was a fan kicking up a small amount, excessive use of HDD, or plain electrical interference. Close up it sounds something like the HDD or maybe ball bearing rattling but the fans sound no different in terms of speed increase. The HDD light doesn't come on but when it does the noise ends when the HDD light goes off, but then the noise starts again not long after! Running Vulkan/OpenGL via Studio and this sound is not present...really weird given my temps are low. But fps performance for classic with collection project is more or less the same as Vulkan, yet studio OpenGL performs miles better!

Also as i am writing this post I just noticed in the build options Classic is set for x86 but Studio is set for x64!

So with all this odd behaviour and strange results is it fair to say build 2 exes but run a launcher to choose which one is the best option? But then should a 3rd option for Classic OpenGL be offered - how would that be labelled lol?! It would mean labelling the OpenGL differences along the lines of Classic as "Low Quality v1.1+ " and Studio as "High Quality v1.1 minimum" !!?

Edit:
Ran Classic again this time as x64 as it should have been from the start - 225fps, also the noise became way more pronounced - turns out it was electrical interference as my speakers are part of the TV/monitor which is less than a foot from the tower.
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Feb 2021 06:40 Edited at: 20th Feb 2021 06:41
James H wrote: "Also as i am writing this post I just noticed in the build options Classic is set for x86 but Studio is set for x64!"


Ah yes, that would indeed make a difference. Good to know anyway for comparison.

James H wrote: "So with all this odd behaviour and strange results is it fair to say build 2 exes but run a launcher to choose which one is the best option? But then should a 3rd option for Classic OpenGL be offered - how would that be labelled lol?! It would mean labelling the OpenGL differences along the lines of Classic as "Low Quality v1.1+ " and Studio as "High Quality v1.1 minimum" !!?"


Yeah, that might be more confusing than beneficial to the end user. If you wanted to offer both, you'd need to have two copies of the same player in two different root folders with two separate '\media' folders so that they could run independently (effectively two separate copies of your game). Otherwise, whatever player/EXE you use is still going to load the bytecode file from the '\media' folder it has access to. You can put together separate players/EXE's with their own individual bytecode files with a utility like Enigma Virtual Box. But that's basically the only option since AGKC/S doesn't yet support bundling the player with a bytecode file (nor media for that matter).
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 20th Feb 2021 07:14
You wouldn't think you literally just told me about the bytecode! My only excuse is I am tired it is 6/7 am and I should probably sleep at some point soon lol.

If you need any similar specific test doing in future, feel free to message me
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E

Login to post a reply

Server time is: 2024-03-28 20:57:10
Your offset time is: 2024-03-28 20:57:10