Advertisement

DX12 or Vulkan for hobbyist?

Started by August 09, 2019 11:56 PM
4 comments, last by YAGP 5 years, 1 month ago

Hello everybody!

I'm currently planning on dabbling in low-level GPU programming as a side-project. I have lots of previous experience in OpenGL and DX11, and now want to work with the cutting-edge features (RTX, etc.) that the new GPUs and APIs have to offer, as a hobby. The "problem" I'm having right now is that I can't decide on which API I should use. DX12 or Vulkan? I do all of my development on Windows 10, so the platform independence and Windows 7/8 support of Vulkan is a non-factor for me. Are there any significant advantages that either of the APIs have? Driver stability? Performance? Tooling? Stuff like that ?

Sadly, I don't really have the time to learn both, so I have to decide ?

Thanks!

My two cents.

I have implemented both a DX12 and an Vulkan backend for the engine I am using and I mostly did them both at the same time. First of all, the APIs are surprisingly similar. Implementing a common API on top of them is a lot more straightforward than doing the same for OpenGL and D3D9.

That said, there are differences and if I was to choose I would do Vulkan first. There are certain aspects of Vulkan, eg. render passes, that you might want to keep around in your common API. These are trivial to emulate on D3D12. On the other hand, if you make an API without them and later want to support Vulkan it might be trickier, maybe...

I don't think you can go massively wrong either way but I would start with Vulkan.

Advertisement
2 hours ago, GuyWithBeard said:

There are certain aspects of Vulkan, eg. render passes

D3D12 has them now: https://docs.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-render-passes

I haven't used them on D3D12 so I don't know if there are any differences.

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

Having worked with both I would say that D3D12 is a little simpler, but not in a significant way (and I'm sure some would disagree with me on that). D3D12 also integrates a bit better into the OS being an Windows-specific API, but for most things that doesn't matter (swap chain and interop with other API's is probably where it matters the most). So overall I don't think it will matter too much at an API level: you'll probably experience roughly the same amount of pain no matter what you choose here. ?

D3D12 does have PIX, which is a really nice tool. RenderDoc supports both D3D12 and Vulkan so you can use that either way, although RenderDoc doesn't support any of the ray-tracing stuff. PIX is also the only tool I know of that tries to support bindless resources. So if your end-goal is to do ray-tracing then I think D3D12 might be your best bet.

Thanks for the answers! I've decided to go with D3D12, because I like the better integration in to the OS and the amazing PIX. I actually have never used that tool before for D3D11 and I'm amazed how it .. just works. I've had my share of problems getting graphics debuggers to work, so this is a huge plus.

On 8/10/2019 at 8:40 PM, MJP said:

you'll probably experience roughly the same amount of pain no matter what you choose here. ?

You didn't promise too much. I've been playing around with the API for the past few days and there is sooo much typing for the simplest of tasks ?

This topic is closed to new replies.

Advertisement