Vulkan / Dx11 renderer

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
JayD
Posts: 7
Joined: Sat May 26, 2018 8:29 am

Vulkan / Dx11 renderer

Post by JayD »

I made a Vulcan/Dx11 Renderer for irrlicht, and reworked OpenGL renderer compatible with NSight and RenderDoc 1.1.
Examples is working, except shader based examples because i'm shaders usage different with stock irrlicht.

This is my learning project but I thought you might be interested in other.

https://github.com/JayDT/Irrlicht

Note: Vulkan dependencies required x64 compile.

Vulkan dependencies:
- cmake 3.6
- https://vulkan.lunarg.com/
- other depencencies will auto download cmake and compile

Compile:
mkdir objdir
cd objdir
cmake -G "Visual Studio 15 Win64" ..

I hope not forgotten anything.

Debug compile previews:
Image
Image
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Vulkan / Dx11 renderer

Post by devsh »

Really nice work, I take it all the material permutations work?

Is this based off 1.8.4 or SVN trunk?

Also how long did it take you?

And where were you hiding all this time?

P.S. Do you have any benchmarks for release mode?
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

Re: Vulkan / Dx11 renderer

Post by mant »

Looks like it is based on trunk version.
JayD
Posts: 7
Joined: Sat May 26, 2018 8:29 am

Re: Vulkan / Dx11 renderer

Post by JayD »

I started an irrlicht at 3 years ago, but with a lot of pause with my fun art works.
Yes this irrlicht based on 1.8.4 version.

It was 2.5 months Vulcan driver, but still very primitive.
Necessary yet implemented Multithreading, and partially implemented Multi GPU support.

Vulcan in Single thread environment and few draw calls are slower or even faster than openGL (4.5 or above), but vulkan lower gpu stress with same fps.
These are just what I've experienced while writing.

My Sandbox Release code:
- ~2000 draw and instanced draw call per frame.
- 3000 object some inside in buildings.
- FPS limit 200 fps (sleep 5 ms)

- Vulkan
Image
- OpenGL
Image
- DirectX
Image
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Vulkan / Dx11 renderer

Post by devsh »

Really nice, I like the screenshots, but you will have to change the front-facing API a lot if you want this to work with multithreading.

I had a browse through your repository, it looks like you already have all the vulkan and gl objects you need, so adding things like queries, fences, events, semaphores, compute shaders etc. is already possible from the back-API :)

First of you need event/fence objects at the top level.

I have some design documents with abstract designs for a multithreaded pipeline
https://docs.google.com/document/d/1LGW ... 9HGNA/edit# (assets)
https://docs.google.com/document/d/1WA8 ... czXqs/edit# (common shaders for OpenGL and Vulkan, requires the assets pipeline)

https://docs.google.com/document/d/1OLf ... BG_x4/edit# (very poor and abstract)

The split into CPU objects (non-renderable) and GPU objects (not-easily-modifiable) is very handy as it allows for letting go of doubly used RAM (for textures and meshes for example).

What is cool with a multithreaded pipeline is that you can possibly introduce overlapped IO (async file IO) and really enable proper resource streaming.

These plans are completely public domain, you dont even have to acknowledge if you use them or derive something from them.

P.S. Under Vulkan are you using dedicated memory allocations for render-target textures, especially the depth buffer?
JayD
Posts: 7
Joined: Sat May 26, 2018 8:29 am

Re: Vulkan / Dx11 renderer

Post by JayD »

Irrlicht 8. SpecialFX example Release code:
- The modern graphical API does not like constantly uploaded vertexes, so there is a lot of difference between the 2 demos.

- Stock 1.9 Irrlicht OpenGL:
Image
- OpenGL
Image
- Vulkan
Image
- DirectX 11
Image
AReichl
Posts: 268
Joined: Wed Jul 13, 2011 2:34 pm

Re: Vulkan / Dx11 renderer

Post by AReichl »

I have the same problem as with Irrlicht-BAW - cannot compile ( only SDL2 and zlib ).
Tried different compilers ( different versions of mingw and Visual Studio ), but Cmake
stops at different stages depending on the compiler chosen.
Too much external dependencies - some are downloaded by Cmake but cannot be
compiled, some are not downloaded and therefore not found and so on.
So many warningsand errors that i don't know where to begin solving them.
JayD
Posts: 7
Joined: Sat May 26, 2018 8:29 am

Re: Vulkan / Dx11 renderer

Post by JayD »

All right, I try to rework a dependencies and compiler support.
First of you need event/fence objects at the top level.
Yes and thinking about solution. It's really great documents, I just ran through the week and read it better. Thank you for shared.
Under Vulkan are you using dedicated memory allocations for render-target textures, especially the depth buffer?
This was recommended from several sources, but I didn't take much time with this.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Vulkan / Dx11 renderer

Post by devsh »

You can catch most vulkan performance issues with Debug Util Messengers and VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT :)

AMD has a number of articles on GPUOpen as well, most notably how when you use a single device you can extract function pointers to vulkan routines to save yourself CPU overhead.
Since irrlicht is single-threaded CPU overhead really matters.

P.S. AReichl, can you message me with your skype or something, I'd really love to sort out your issues.
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

Re: Vulkan / Dx11 renderer

Post by mant »

Hi JayD. I'm very excited to see your work. I would like to try porting my engine here to your backend: http://irrlicht.sourceforge.net/forum/v ... 5&p=304117
Do you have any warnings for me :D
What are your plan for mobile? Is it working now for Android/iOS?
Still waiting for VK shader example though.
JayD
Posts: 7
Joined: Sat May 26, 2018 8:29 am

Re: Vulkan / Dx11 renderer

Post by JayD »

Hi Mant.

Yes I'd like to do Android, Linux, but i'm rewrite a few old hax code on my project.
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

Re: Vulkan / Dx11 renderer

Post by mant »

Hi, I'm trying to build on Linux and will send PR from: https://github.com/manhnt9/Irrlicht
There're some changes may break your build so I'm splitting commits for safe changes first.
Pinic
Posts: 21
Joined: Wed Mar 07, 2018 10:55 am

Re: Vulkan / Dx11 renderer

Post by Pinic »

As you will not prompt to collect under Code Blocks?
Не знаю может быть переводчик делает как то это не привольно, вот вопрос
Как собрать приложение в Code Blocks?
Pinic
Posts: 21
Joined: Wed Mar 07, 2018 10:55 am

Re: Vulkan / Dx11 renderer

Post by Pinic »

Please tell me how to assemble the engine!
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Vulkan / Dx11 renderer

Post by robmar »

Typical that DX11 is 40% faster than Vulkan, be interesting to know how DX9 performed?!
There are posts about games still running faster under DX9 with same quality graphics compared to DX11/12.
The Vulkan implementation doesn't support vertices in hardware yet?
Post Reply