Vulkan status

@

I have also tested VR with Vulkan on Windows now, and well, it just works :slight_smile: Just opened the VR preview in the editor that’s running with Vulkan, and the VR preview automatically run with Vulkan SM5 and it just worked. Very nice!

Performance is not as good as with D3D11 though. I can’t profile due to gpu stats not working, but with Vulkan I have 45 fps where with D3D11 I have 90 fps. With D3D11 the GPU time is 4.4 ms, so there’s a lot of free room until it would start reprojecting at 45 fps. Vulkan seems to be significantly slower than D3D11. I also tested performance of Vulkan in packaged, it’s same slow as in Editor there.

Thanks for the reports. 4.17 s not out yet :wink: It’s not done yet, we’re bug fixing still.

What of the stuff that I mentioned is known, what will still be fixed until 4.17? Should profiling with Vulkan work in 4.17?

For example, I guess performance won’t increase significantly until 4.17 release, that’s bigger changes that will go into master now, right?

Crash bugs & visual artifacts are higher priority for 4.17; performance optimizations will probably not make it to 4.17 (including gpu time/timestamp queries). We’ll focus on that for 4.18.

Thanks!

Its surely more important to fix the visual artifacts than to improve the performance. If there are no visual artifacts any more, then even with limited performance it will be possible to ship a VR game with Linux support using Vulkan, and that’s awesome :slight_smile:

I did some testing with Vulkan SM5 on Windows and Linux.

On Windows I can confirm all the problems [MENTION=24522] Alcatraz[/MENTION] mentioned.
Specs: Windows 8.1 Pro, i7-2600K, 16GB RAM, GTX 670

On Linux I see loads of visual artifacts but they vanish when I enable r.Vulkan.WaitForIdleOnSubmit (thanks @Yaakuro for mentioning this!)
Specs: Arch Linux, i5-750, 16GB RAM, GTX 750Ti

During my tests I noticed that it’s not possible to disable VSync by setting r.vsync to 0.
In the source code I found that the swap chain’s present mode is hard coded to VK_PRESENT_MODE_FIFO_KHR which locks the FPS to the refresh rate.
By changing it to VK_PRESENT_MODE_MAILBOX_KHR in conjuction with setting t.MaxFPS to a very high value I was able to unlock the FPS.
With that I found that the FPS are much lower than with D3D11 and to make matters worse CPU usage is a lot higher.

I know it’s not a priority but I’d like to see Vulkan at least on par with D3D11 rather sooner than later (I won’t even mention D3D12 ;))

If you want Vulkan to be on par with D3D11 then you need to wait until UE4 pipeline is suited for Vulkan and DX12. It is still more like a DX11 rendering engine.

Here’s the talk from Rolando (ā€œVulkan on UE4ā€) at Siggraph 2 days ago:

Also someone (not me) posted it on the r/AMD subreddit, they hope it makes UE4 run better on AMD GPUs:

@ With 4.18 Preview being close now, can you maybe give some update on where Vulkan is now and whats still missing? I see in the last dev-rendering merge there was quite a lot of Vulkan stuff, I see you fixed profilegpu, and also improved performance quite a bit I think. I didn’t test it yet, I will once the 4.18 branch is available. It would be nice to know what ā€œknown issuesā€ there are still with Vulkan that I don’t even need to report :slight_smile:

When do you expect Vulkan in UE4 to perform same like D3D11 regarding performance?

@

I’ve tried running the editor with -vulkan in 4.18P1, but unfortunately it just crashes.

FYI & I talked about this and was already fixed Editor crashes when run with vulkan - Rendering - Epic Developer Community Forums

At this point I think we got most of the rendering issues fixed, we are now focusing on performance (like I mentioned in the talk).

Ah, great!

Do you have a plan when you want to be at roughly D3D11 performance with Vulkan? Currently especially post processing seems to be very slow on Vulkan, SSAO is 3 times faster on D3D11.

Once optimizations are done, will Vulkan replace D3D11 as the engine’s primary API? Will distance fields be made to work on Vulkan as well? How about D3D12?

With the release of Wolfstein working with Vulkan and optimized for AMD Ryzen, bringing impressive performanc, Im really looking foward to see this working well into the engine and starting checking my game’s project performance. It might make me delay launch until I can get it tested with Vulkan and have all regression test with it, and if possible it leaving experimental status in the next 8 months. Keep it up guys!

Any new vulkan stuff in 4.19?

@Zeblote A lot of bug fixes, CPU and GPU optimizations! :slight_smile:

@mariomguy DF should be working on 4.18 AFAIK. We’ll keep D3D11 as the default API as the drivers and RHI are the most stable and mature today.

I got to test my asset with Vulkan at 4.19 since it is not working still at 4.18, thou I dont receive any errors. the material is just invisible atm.

PS: I tested and there is still issues. Main material is still invisible and I also noticed terrain at certain distances start to show artifacts that looks like black triangles. Im using raymarching and custom hlsl nodes, that works perfect for sm5. I was expecting at least for the remain of the scene that performance would be better but I am getting 1/2 FPS of I can get with sm5. If I set screenpercentage to 200% it is showing even worst performance than expected. I know the code is still wip but as I said, I was expecting more.

Has this issue been looked at?

I’ve been wrestling with this for a while now.

It sounds like it’s going to be a while before we can get Vulkan on more mobile devices. I’m planning on making a mobile game now, but there are a lot of features I would like to use that are not accessible through the ES2 Mobile renderer: Ambient Occlusion, World Position Offset, Subsurface Scattering, and of course the plethora of texture limitations, especially on landscape (no more than 3 user-defined samplers per component).