Metal. (MoltenVK) support for iOS an Mac devices


#41

Of course I know that. I meant I don’t know in this case


#42

According to the rendering docs (for opengl 3.2 or higher)

It also says that gpu instancing will be used by default, when available.
However, since you’re not using opengl, this extension is obviously unavailable, and I must presume that is resulting in a crapload of small draw calls… I have no idea how Vulkan deals with gpu instancing, but I presume it’s similar - I figure it should be fairly easy to hack the render pipe to deal with instancing on vulkan.


#43

@elix22

Gave another swing at it.
Testing on latest commit 763109e2d6f85d34b169e47f9663a7968f959396, Sat Feb 16 09:03:51 2019 +0200

07_Billboards
Still not ok. It’s 50+ fps when few distant billboards are in sight, and drop to 40 when 3-4 are in sight at short range. Can go to 30 something if overloaded.

35_SignedDistanceFieldText
Example is not working functionally, no text.
Don’t know if this is related, but gave an error:
failed to compile pixel shader Text(SIGNED_DISTANCE_FIELD TEXT_EFFECT_SHADOW)
ERROR: GL_OES_standard_derivatives : extension not supported

36_Urho2DTileMap
Appears ok. Example is not working functionally (doesn’t create tiles)

37_UIDrag
Rendering ok.
Functional: Ipad multitouch doesn’t work

38_SceneAndUILoad
Rendering ok.

39_CrowdNavigation
Rendering ok.

42_PBRMaterials
Not functional

44_RibbonTrailDemo
Rendering ok.


#44

07_Billboards
Still not ok. It’s 50+ fps when few distant billboards are in sight, and drop to 40 when 3-4 are in sight at short range. Can go to 30 something if overloaded.

Is it release build ?
My fix was about the memory hog issue , meaning after long time of running you should not see any FPS decrease and eventually crash (without doing anything )

37_UIDrag
Rendering ok.
Functional: Ipad multitouch doesn’t work

Yes I am aware about the multi-touch issue , it’s not directly related to my implementation , you will see it also if using the legacy OpenGL/ES rendering backend.
However I will debug it once I will have some spare time and provide a fix for that.

42_PBRMaterials
Not functional

We will have to wait until Angle-Vulkan will support OpenGL ES 3.0 to make it work


#45

Yes, release build. Probably I didn’t notice this issue first time I tried…
I’ll let it run long time now, to profile the memory

Sorry, my mistake. Forgot to stress that “functional” it’s just a note I’m taking while testing which, unless it prevents rendering, can be ignored.
Basically “Rendering” is what we are interested in. For this reason, I’m skipping all examples not directly related to that, things like networking, and so on…


#46

I’ve checked signed distance field example for mac os

35_SignedDistanceFieldText

the text is not shown on ios version. Just to confirm the bug, I was unsure


#47

Yep , looks like a bug .
Issues begin to pile up , I would suggest to track them on Github .
Feel free to open issues on my Github .
For this specific scenario if possible please attach logs for both Mac and iOS

General note ,
The main components (Angle-Vulkan and MoltenVK ) are still under heavy development , so there are still some missing features (and some bugs) , I plan to merge the latest Angle branch once a month .

Since Angle-Vulkan is probably going to be officially supported in Android-Q
My guess is that Angle-Vulkan will be feature complete by 08/2019 (possible release date of Android Q)

Hopefully we will have a production ready solution once Apple will remove OopenGL/ES from their platforms.


#48

you’re throwing out a number 8/19, how many people are working on that branch? if you want help, I can boot back to windows any time, but shudder at the thought


#49

you’re throwing out a number 8/19, how many people are working on that branch?

The 08/2019 date is just a guess based on previous releases of Android ,
I am referring to the Release date of Android Q , not to my implementation .

On my branch its only me at my spare time during the weekends .

If you or anyone else has the knowledge on the internals of Urho3D , SDL, OpenGL/ES , Angle , Vulkan or MoltenVK , you are more than welcome to contribute to this branch (my branch) .

At the end it will benefit all the game developers that would like to continue to use Urho3D and develop games for MacOS and iOS .
This is the only open source option to keep this engine alive in the future (at least for MacOS and iOS).

Google has unlimited resources , you can follow the development on Angle and get some estimation on the amount of people that are working on it :slight_smile:

https://chromium-review.googlesource.com/q/project:angle/angle+status:open
https://chromium-review.googlesource.com/q/project:angle/angle+status:merged

You can also read some stuff on Angle-Vulkan and Android Q release date



#50

Homework :slight_smile:


#51

Alright, I’ll move bug reports to github.
Didn’t know about google’s, I’ll have a look.