godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.17k stars 21.2k forks source link

Add Vulkan renderer #3729

Closed Marqin closed 7 years ago

Marqin commented 8 years ago

Hi!

It would be nice to support Vulkan API, since it's already released.

nunodonato commented 8 years ago

I thought 3.0 would be for ES3 and not Vulkan

reduz commented 8 years ago

yeah vulkan is still not stable or widely supported

On Fri, Feb 19, 2016 at 9:37 AM, Nuno Donato notifications@github.com wrote:

I thought 3.0 would be for ES3 and not Vulkan

— Reply to this email directly or view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-186199577.

Marqin commented 8 years ago

http://vulkan.gpuinfo.org/ - this will track list of devices that support Vulkan As for drivers, now there are: Linux Desktop - Nvidia, Intel (open source) Windows 7+ - Nvidia, AMD Android 6.0 - Qualcomm PowerVR also has certified driver. AMD driver for Linux is incoming ( according to Khronos site it's still not certified ), but I don't know the state of Intel's one for Windows.

LifeIsStrange commented 8 years ago

And Just for information, AMD has said that their Vulkan driver will be shared between Windows and Linux and even more exiting, will be opensourced ! Same for their opencl driver.

Marqin commented 8 years ago

And here's the list of GPUs that Khronos has officialy acknowledged as conformant - https://www.khronos.org/conformance/adopters/conformant-products

LifeIsStrange commented 8 years ago

I think that this link could help you https://community.arm.com/groups/arm-mali-graphics/blog/2016/02/16/porting-a-graphics-engine-to-the-vulkan-api And here is a good description about the revolutionar concept of renderpasse http://gpuopen.com/vulkan-renderpasses/

Other Vulkan blog posts http://gpuopen.com/tag/vulkan/

Imagination (power VR) has also posted good blogs.

Some really good demos and examples for learning Vulkan https://github.com/SaschaWillems/Vulkan

And the official documentation : https://github.com/KhronosGroup/Vulkan-Docs

Other official complementary stuff : https://github.com/KhronosGroup/

Marqin commented 8 years ago

This is nice summary, but it does not include error handling and capabilities checks - https://renderdoc.org/vulkan-in-30-minutes.html

Also, nvidia made open source C++ wrapper for Vulkan - https://github.com/nvpro-pipeline/vkcpp

Marqin commented 8 years ago

wrong button, sorry

LifeIsStrange commented 8 years ago

@Marqin thx, Just for precising AMD is not yet in the list because they still haven't passed the Vulkan conformance test suite, but their driver already work well on the first Vulkan game port Talos(better than Nvidia currently) .

akien-mga commented 8 years ago

Thanks for the all references. We are all also very excited about Vulkan, but don't put your hopes too high, it won't be a priority for a while.

It's not only about available drivers, I guess we can trust the industry to make good drivers available within a few months, but it's more about focusing the work on what will be useful for gamers. All the GPUs that are meant to get Vulkan support are relatively high end, and thus only a small fraction of gamers (and game devs) own them. It will likely be another two years before such hardware is widespread enough for it to be sensible to make games for the masses with it.

So the focus will first be on OpenGL ES 3.0/3.1, and once it's working (which will already be a HUGE improvement), there will probably be some focus on implementing Vulkan support too as alternative.

Of course contributions towards Vulkan support will be very welcome, just wanted to clarify what @reduz has expressed lately regarding what the focus will be for Godot's core developers.

LifeIsStrange commented 8 years ago

@Marqin your links are good =) but this link https://renderdoc.org/vulkan-in-30-minutes.html Forgot to describe one of the main concept of Vulkan/direct x 12, the async compute shader http://gpuopen.com/maxing-out-gpu-usage-in-nbodygravity/ This can give a 45~% fps jump ! Note that this thing was used on consoles. Also sorry for my bad english

LifeIsStrange commented 8 years ago

@akien-mga You say "All the GPUs that are meant to get Vulkan support are relatively high end, and thus only a small fraction of gamers (and game devs) own them. It will likely be another two years before such hardware is widespread enough for it to be sensible to make games for the masses with it." Not on pc desktop, all openGL 4.x compatible gpu cards are Vulkan compatible ! GCN 1.0 fully support Vulkan. I don't know for nvidia and Intel. Also the need of performance for 4k and Virtual Reality and steam OS will accelerate it's adoption.

LifeIsStrange commented 8 years ago

All PC gpus from 2012 are supported currently. And maybe than olders will have a subset of Vulkan in the forthcoming drivers. So all gamers have a compatible card, and Vulkan will be supported on all OS, even BSD. Also a big part of the Vulkan driver implementation will be shared with the existing opengl implementations, so more they will be Vulkan Games (and de facto game engines) better we will have opengl drivers :)
This is vertuous ! Again sorry for my bad english I think that Vulkan should be THE priority of godot, because if it is one of the firsts engine to support it, godot will be massively used

Marqin commented 8 years ago

@LifeIsStrange Panda3D and few propertiary ones are already working so it probably won't be first.

All PC gpus from 2012 are supported currently.

And nv is probably working on Fermi support, so even older gpus will be.

Little offtopic @akien-mga :

So the focus will first be on OpenGL ES 3.0/3.1

But OpenGL ES 3.2 was released long ago and it supports the same hardware as 3.1, why not 3.2?

Marqin commented 8 years ago

I know you don't have resources to do Vulkan now, but please not close this issue, so it can stay as resource list and future milestone.

reduz commented 8 years ago

The problem is not PC support, this will be eventually resolved within a year or so. The main limitation is adoption on Mobile and HTML5.

As a lot of Godot users make games for Mobile, we must give priority to APIs that work on such platforms. OpenGL ES 3.0 and 3.1 are on the way to being widely standardized so they get priority.

Also, GLES3 is already very powerful and we will be able to enormously improve the rendering quality thanks to it

On Fri, Feb 19, 2016 at 11:26 AM, Hubert Jarosz notifications@github.com wrote:

I know you don't have resources to do Vulkan now, but please not close this issue, so it can stay as resource list and future milestone.

— Reply to this email directly or view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-186235285.

reduz commented 8 years ago

To clarify, the intention is not to give more priority to mobile than PC, but that both platforms must get the same attention due to the diversity of our userbase.

On Fri, Feb 19, 2016 at 11:38 AM, Juan Linietsky reduzio@gmail.com wrote:

The problem is not PC support, this will be eventually resolved within a year or so. The main limitation is adoption on Mobile and HTML5.

As a lot of Godot users make games for Mobile, we must give priority to APIs that work on such platforms. OpenGL ES 3.0 and 3.1 are on the way to being widely standardized so they get priority.

Also, GLES3 is already very powerful and we will be able to enormously improve the rendering quality thanks to it

On Fri, Feb 19, 2016 at 11:26 AM, Hubert Jarosz notifications@github.com wrote:

I know you don't have resources to do Vulkan now, but please not close this issue, so it can stay as resource list and future milestone.

— Reply to this email directly or view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-186235285 .

LifeIsStrange commented 8 years ago

I understund, but who care about smartphone "Games"? The fact is that the tactil control limitations destroy the possibility of creating true Games. The second limitation was the power, limitation that justly Vulkan aims to destroy. And Html Games are currently an ultra minority (the only popular is agar.io, which can be done on openGL 1.0) . Also Vulkan will arrive on virtual Reality and on consoles, ps4 and Nintendo NX and steam machines. The vast majority of 2017 Games will be on Vulkan, don't lose this train.

Also ARM 2011 GPUS, POWER VR 2012 gpus and currently qualcomm 2013 gpus will have Vulkan support. Google heavily push Vulkan. Mediatek will probably fully support it. And there is rumors than qualcomm will use the opensource freedreno driver, if it's true, the community could add support for 2012 cards. Also all the tizen drivers will be opensource and probably could be ported to Android. Vulkan will be everywhere supported on Android. And pc/console/VR/AR are far more important

But this is your software, you are free to do what you want obviously. Again sorry for my bad english.

LifeIsStrange commented 8 years ago

Oh and for html games, currently browser have very bad perf, the only browser which has good performance is Firefox, but has sadly less than 20/15% of marketshare.

http://blogs.unity3d.com/2015/12/15/updated-webgl-benchmark-results/

akien-mga commented 8 years ago

I understund, but who care about smartphone "Games"?

Many, many, many Godot users. And don't overestimate the hardware actual gamers have at their disposal. I'd bet that the number of gamers (not only hardcore gamers but also casual gamers that many Godot devs target) with Vulkan-compatible hardware is very low, probably something like 20-30%. Be it on desktop (how many Intel HD Graphics 4000 or 4400?) or mobile. On desktop, we still get many complaints about people without OpenGL 2.1 compatible hardware that can't run Godot...

Again, nobody said that we won't support Vulkan. Just that the priority will be first OpenGL 3.0, for all the good reasons explained above.

LifeIsStrange commented 8 years ago

"I'd bet that the number of gamers (not only hardcore gamers but also casual gamers that many Godot devs target) with Vulkan-compatible hardware is very low, probably something like 20-30%. Be it on desktop (how many Intel HD Graphics 4000 or 4400?) or mobile." No, I think there is more than 90% of casual gamers supported on PC for Vulkan. No need of Intel HD 4000, the 3000 is supported which date of 2012. We are on 2016, Vulkan pc Games will massively come on 2017 and before for VR Games This will do 5 years, pc live 5 years max with the current obsolescency +Windows bloat +Windows virus. And for Android all 2012 cards will probably be supported, and smartphone lives 2/3 years... So all smartphone will be compatible in end 2016.

And you speak about 2.1 opengl compatibility oO this cards was before 2004, this is a ultra négligeable minority with a Windows unsupported.

Again do what you want ! But I think that you are wrong about the hardware support of Vulkan.

And thanks for making awesome free software for all :)

Marqin commented 8 years ago

I understund, but who care about smartphone "Games"?

http://www.wired.co.uk/news/archive/2015-11/03/king-candy-crush-activision-acquisition

reduz commented 8 years ago

Yes, you may not like smartphone games and might be far from wanting to develop them, but a large amount of Godot developers use it for mobile. We can't simply ignore them.

On Fri, Feb 19, 2016 at 1:05 PM, Hubert Jarosz notifications@github.com wrote:

I understund, but who care about smartphone "Games"?

http://www.wired.co.uk/news/archive/2015-11/03/king-candy-crush-activision-acquisition

— Reply to this email directly or view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-186277915.

Marqin commented 8 years ago

We can't simply ignore them.

Godot is best open source mobile game engine, which attracts many people who are interested in mobile gamedev. And indeed we should not abandon them.

No need of Intel HD 4000, the 3000 is supported which date of 2012.

2012 is only 3-4 years ago. My girlfriend has much older PC. My PC is also much older ( but I've bought new GPU recently for some AAA games ).

reduz commented 8 years ago

Think about it, it's easier to find financing for making mobile games than PC games, so a large amount of developers do mobile games even if they don't like the genre. Godot helps them bring food to the table by supporting mobile. Think of the children :P

On Fri, Feb 19, 2016 at 1:06 PM, Juan Linietsky reduzio@gmail.com wrote:

Yes, you may not like smartphone games and might be far from wanting to develop them, but a large amount of Godot developers use it for mobile. We can't simply ignore them.

On Fri, Feb 19, 2016 at 1:05 PM, Hubert Jarosz notifications@github.com wrote:

I understund, but who care about smartphone "Games"?

http://www.wired.co.uk/news/archive/2015-11/03/king-candy-crush-activision-acquisition

— Reply to this email directly or view it on GitHub https://github.com/godotengine/godot/issues/3729#issuecomment-186277915 .

akien-mga commented 8 years ago

No need of Intel HD 4000, the 3000 is supported which date of 2012.

Reference? When I checked two days ago Intel HD 4000 and 4400 were not planned to be supported.

Marqin commented 8 years ago

Thanks @reduz , you made me laugh today :joy:

LifeIsStrange commented 8 years ago

@Marqin I don't speaked about amoral games firms, but about users. Candy crush and others Android like software aren't Games, but more a way for forgot it's life or the fact that the user has no meaning in his life. This Games are cancers and has no need of opengl es 3.1/2.

For doing my antithesis, there is few true Games that arrive on Android, like don't starve, life is strange (this is my name <3)or downwell. But again the tactil limitations will destroy the Gameplay of this good pc Games. And this will lag without Vulkan. And I bet to you than there will be far more Vulkan games than opengl es 3.1 Games.

LifeIsStrange commented 8 years ago

@akien-mga On Wikipedia "Ivy Bridge 22 nm 2012-Apr Core i3-/i5-/i7-3000" On the compatible hardware rubric. https://en.m.wikipedia.org/wiki/Vulkan_(API)

reduz commented 8 years ago

@LifeIsStrange You have to think of us, Godot Developers, as Knife manufacturers. We just make a tool in hopes of it being useful for everyone, even if that use implies that somebody will murder his wife with it.

akien-mga commented 8 years ago

On Wikipedia "Ivy Bridge 22 nm 2012-Apr Core i3-/i5-/i7-3000" On the compatible hardware rubric. https://en.m.wikipedia.org/wiki/Vulkan_(API)

From the reference they give on Wikipedia: "The Intel Open Source Technology 3D Graphics Team is excited to announce the availability of our Vulkan driver for fifth and sixth generation Intel® Core™ processors (Broadwell and Skylake). The driver passes the Vulkan 1.0 Conformance Test Suite on these platforms and have experimental support for older platforms."

That doesn't explicitly state Ivy Bridge and later. But there is hope indeed :)

Marqin commented 8 years ago

@LifeIsStrange If you don't want to have game engine that is versatile, you can always use Panda3D which is open source, only for PC and plans to have Vulkan support ( and uses Python for scripting ). Or sponsor some programmer to do Vulkan for Godot ;-)

Personally, I think it's great that Godot supports so many targets, which makes him the only real open source alternative for Unity ( which is great, because it allows many not-much-programmer people to express themselves via gamedev ).

LifeIsStrange commented 8 years ago

"Godot is best open source mobile game engine, which attracts many people who are interested in mobile gamedev. And indeed we should not abandon them." But justly... If you want to stay the Best open source mobile game engine you need to support Vulkan before end 2016. Why ? Because there is a revolution in the mobile game industry, a lot of powerfull pc Games studio like bethesda, activition, ubisoft and Dice have all announced that they are really interested on the Android Games market. But this Games will be heavy AAA, and they will run on Vulkan. Think that the majority of smartphones lives 2 years.... And that the 2012 socs will be supported so almost all smartphones will have Vulkan support. Google is also heavily pushing Vulkan and the Android pc distribution is in revolution with remix os like :http://wccftech.com/remix-os-multi-window-android-for-pc-and-mac-announced/ Vulkan is a game changer, not opengl es 3.0! Vulkan will give a 2.5x perf improvement on the smartphones. You are also the only unity/unreal engine opensource conccurent, if you don't support Vulkan you will lose the pc and VR and consoles market. Vulkan is the graal that the Linux gamers ever needed ! Please understund those facts. Again sorry for my bad english. Also you could reuse your Vulkan implementation in your future opengl es 3.0 implementation.

Like described here https://community.arm.com/groups/arm-mali-graphics/blog/2016/02/16/porting-a-graphics-engine-to-the-vulkan-api Sorry for taking your time but your decision is very important

LifeIsStrange commented 8 years ago

@akien-mga "The driver passes the Vulkan 1.0 Conformance Test Suite on these platforms and have experimental support for older platforms."

That doesn't explicitly state Ivy Bridge and later. But there is hope indeed :)" No this garantuee us that they will support Vulkan, the "experimental" is driver support, not hardware support , they will not work on drivers support if this gpus don't support Vulkan à the hardware level I guess . And Intel is better placed than us for knowing which of their gpu support Vulkan

ghost commented 8 years ago

Performance improvements is just an advertisement pitch. In real situation I will be impressed even if there's going to be ~1.5 performance improvement. Overall, Vulkan is a great thing, but, come on, why the hell are you pushing it so aggressively? It's going to happen sometime soon, Godot game devs won't lose their bread and butter if Vulkan won't be supported for some time. Be a bit more cautious before jumping on bandwagon and diverting resources from important tasks.

LifeIsStrange commented 8 years ago

@reduz

"@LifeIsStrange You have to think of us, Godot Developers, as Knife manufacturers. We just make a tool in hopes of it being useful for everyone, even if that use implies that somebody will murder his wife with it." I have already say, do what you want, this is your software, I Just try to convince you than Supporting opengl es 3.0 is useless compared to Vulkan and that will have a big lack compared to unity/unreal. You realise what a x2.5 fps jump represent ? With openGL es 3.0, godot will loose the pc market, the VR market, and the upcoming consoles market which will use Vulkan (ps4, Nintendo NX and steam machines). And even if you don't care about this markets, Supporting openGL es 3.0 is also the bad choice on Android. There will be far more demand for Vulkan Games than opengl es 3.0 Games on Android. It will be supported almost everywhere in end 2016 because the smartphone lives 2 years. And all the pc Games which will be ported to Android will use Vulkan for performance. Also Vulkan is espected to be far more efficient. And finally the majority of Games will be ported from the Apple metal api, which use Vulkan features like async compute and multithreaded commands.

LifeIsStrange commented 8 years ago

@arcfutahito Ok sorry.

reduz commented 8 years ago

Supporting opengl es 3.0 is useless compared to Vulkan and that will have a big lack compared to unity/unreal.

Big lack of what? Do you know what Vulkan is for?

You realise what a x2.5 fps jump represent ?

Yes, Vulkan will not give your app a 2.5fps jump. Thinking like this is ridiculous.

With openGL es 3.0, godot will loose the pc market, the VR market, and the upcoming consoles market which will use Vulkan (ps4, Nintendo NX and steam machines).

VR has nothing to do with Vulkan, it works in any API. PS4 and NX so far have not announced Vulkan support, so this is speculation.

And even if you don't care about this markets, Supporting openGL es 3.0 is also the bad choice on Android. There will be far more demand for Vulkan Games than opengl es 3.0 Games on Android. It will be supported almost everywhere in end 2016 because the smartphone lives 2 years.

Try again: http://developer.android.com/about/dashboards/index.html

ES3.0 has been out for years and it's still not even half of the market. It will obviously take Vulkan a long time to reach that point. 2016 is not even close.

And all the pc Games which will be ported to Android will use Vulkan for performance. Also Vulkan is espected to be far more efficient.

Dude, I'm a Khronos advisor and had access to Vulkan for months before it was released a few days ago. Vulkan IS NOT about performance. This kind of stupidity you get by reading too media articles who have naturally no idea about this because they never developed games.

Vulkan is about having a simpler API that makes drivers easy to develop. Currently OpenGL and DirectX became so complex that making optimized and bug free drivers was a huge amount of work.

Vulkan is simpler and puts that burden into developer's shoulders, but in exchange we get better compatibility and drivers.

In real use case scenarios, you can get a little performance boost when drawing very large amount of objects from CPU, but that performance improvement you speak of is illogical and does not exist.

And finally the majority of Games will be ported from the Apple metal api, which use Vulkan features like async compute and multithreaded commands.

Apple has not announced Vulkan support yet, neither for OSX or iPhone, so this is only speculation from your part.

Seriously, I understand you are excited about it, but Vulkan is being promoted for reasons different to the ones you believe. It has nothing to do with performance, it's being promoted because it represents a lower driver development cost for 3D hardware manufacturers.

volzhs commented 8 years ago

I just want to say that... so many my customers use over 2 years old phones, even over 3~4 years.

Marqin commented 8 years ago

Vulkan is simpler and puts that burden into developer's shoulders, but in exchange we get better compatibility and drivers.

Actually Vulkan makes it easier to create code that will not be compatible.

Also, many people should keep in mind that simpler means less bloated not easier. I've read some vulkan docs and I'm going to write some vulkano code after my exams, but it looks like I'll have to write tons of bloat code that won't be any help for my app.

Also, Compute Shaders are supported since OpenGL 4.3 ( which is sadly not available on Macs ), and OpenGL has many threading features and it's possible to reach very low driver overhead with OpenGL.

Oh, and the fps gain you are talking about. It won't magically happen. Vulkan just makes AZDO easier, by being low-level.

And... Most engines you mentioned have paid programmers. And we don't have enough staff to make it happen.

Keep in mind that moving to OpenGL ES 3 will also give us much better renderer than today. And much wider audience than Vulkan.

It will be much better to first support brilliant Physically-based rendering in Godot, and then think about optimising it with Vulkan.

NathanWarden commented 8 years ago

I'm really excited about Vulkan too! :) However, most games that will really see a benefit from it in the short term are not the types of games people are making in Godot. I think it's a good long term goal for it to implemented, but there are much bigger fish to fry first.

ghost commented 8 years ago

Anyways, I'll just leave this here: http://arstechnica.com/gaming/2016/02/vulkan-benchmarks-a-boost-for-amd-and-nvidia-but-theres-work-to-be-done/

NathanWarden commented 8 years ago

Anyways, I'll just leave this here: http://arstechnica.com/gaming/2016/02/vulkan-benchmarks-a-boost-for-amd-and-nvidia-but-theres-work-to-be-done/

To be fair though, this comparison really needs to be redone once Croteam is fully done with their Vulkan port. These graphs only include stage 1 of 3 of their porting process which was to just get it switched over to Vulkan. This seams to be the most trivial and least beneficial part and doesn't include any multi-threading or other optimizations. So the 4 core and 6 core comparisons are nearly useless.

http://steamcommunity.com/app/257510/discussions/0/412447331651559970/#c412447331651997070

Summary:

1) Port <-- This is where they're at 2) Multi thread 3) Redesign engine for Vulkan.

So in short, a comparison to DX11 is not an equal balance because Talos was designed from the beginning to use DX11. The current Vulkan state of it is far from even being completely ported.

Hope this helps :)

DriNeo commented 8 years ago

Is Godot can manage two renderers to give some choice ?

If it's the case the current Opengl ES 2.0 is already a good deal for any 2D game ( Dog Mendonça is a so beautiful game ;) ) and probably for 3D mobile games.

So why not trying to implement the most advanced solution for an alternative renderer ?

mohaalak commented 8 years ago

hey I and many others developer are making games for mobiles and we need open gl es 3.0 so much . I am sure that vulkan is great and I was one of the people that writes in the forum that vulkan is coming but the real issue is that vulkan does not support mobile gaming , android is so slow for updating their system most of phones does not have android 6, and ios does not support vulkan and it will be long time to intel , nvidia, amd make vulkan driver for their old card graphics and that leaves majority of gamers without a supported system.

Marqin commented 8 years ago

Is Godot can manage two renderers to give some choice ?

It can, but there are not enough programmers, and there are many more importand features that need to be implemented. Also some will grant better 3D ( OpenGL ES 3, deferred shading, physically-based rendering, etc. ).

DriNeo commented 8 years ago

What is the OpenGL ES 2.0 limitations for mobile games ?

ghost commented 8 years ago

@DriNeo Well, GLES 2, according to Google Dashboards posted by reduz (interesting read actually, I recommend checking it) is 53.2% of market. On the other hand you have fancier graphics and almost none supported devices in the wild.

ghost commented 8 years ago

vulkan is only supported on linux and partially on windows . is pointless to add support right now. maybe in a few years

adolson commented 8 years ago

https://www.reddit.com/r/linux_gaming/comments/48k9gz/any_word_on_vulkan_support_in_unity_unreal_engine/d0led36

Can't really dispute what this guy's saying...