What is going on with DX12?

I’ve mentioned this in a few threads before (and it goes about 5 years back) but I am just wondering why DX12 is straight up slower than DX11? I’ve tested with my live project and test scenes and DX12 is definitely slower. The margin ranges from 30% to about 45% in worst cases.

I am just really confused as there was plenty of time to reach performance parity (DX12 support in Unity began 2015~2016) and I am sitting here wondering what is going on.

Is this something that the devs can definitely do but had not enough time? (Like grass shader)
Or are the devs stuck not able to solve this issue?

All the latest raytracing tech only works on DX12 and the performance drop (without turning DXR on) is just strange to me. I am surprised that the devs are working on UI overlays and not DX12 performance issue…

Can someone tell me what is going on and if there is a way to reach performance parity. Or is there a magical bool checkbox that I forgot to check…

Any help will be appreciated.

4 Likes

What version did you test on? From what I’ve read they’ve been trying to reach performance parity with DX11 for a while but it’s still not there. There’s a big thread somewhere in the forums with a lot of insight and discussions about DX12 performance. One of the devs said that DX12 needs a lot more manual work for a lot of things that DX11 did for the developer, so they need to do all that stuff, and they still aren’t utilizing DX12 features but it’s being ‘worked on’.

I wonder how it performs on 2021.2

I suspect the current DX12 is a DX11ON12 port of the DX11 layer.

Not that big, but I believe it’s this thread: https://discussions.unity.com/t/779647

2021.2b6 with HDRP12.

I keep hearing Unity devs saying that DX12 is almost ready and that it has seen many improvements but it is dreadfully slow…I just can’t really understand why this is not fixed yet. Seriously…how does this stay Experimental/Preview for 6 years…Rewriting a whole graphics API wouldn’t take this long…Seriously achieving performance parity for DirectX versions can’t be more difficult than writing one…

DX11 -released 2009
DX12 -released 2015

I mean I am sure the dev cycle overlaps, but seriously it is taking Unity longer to implement than Microsoft making a new one…

What’s funny is that most of the improvements that the devs talk about are already included for HDRP and when they say “the improvements are coming soon” but this is regarding URP and built in…

Long story short don’t expect HDRP DX12 performance to improve in 2021. I’ve seen devs mention 2022, and that means that it wouldn’t arrive before April (earliest date of 2022 release) even if the devs moved heaven and earth.

Now that goes into 7 years…

First it was the terrain grass.
Then it is the Realtime GI.
Let’s not forget the Hybrid Renderer…
then UI overlays because it is so important
now DX12.

Phew…

GDK being DX12 only puts a lot of pressure on this subject.

I remember a mention on graphics forum that, it actually is not the case. But the way they manage stuff with dx12 is pretty much the dx11-ish way. So no mid-driver layer, from what I remember they were saying, but they cut down the performance while trying to manage things in dx11 way.

When the heck Unity will finally get open-source so we can actually see what is actually wrong?

1 Like

The only reason why I suspect it is that while debugging something I don’t remember now, I actually saw on the stack the text DX11on12. I didn’t investigate further, so completely wild guess.

Wait…why would the devs do that? I mean…DX12 is the newer version…why would anyone try to support DX11 on DX12…when DX11 is already working fine in Unity…

I am not trying to say that I don’t trust you but I find this hard to believe…even Unity wouldn’t do something like this. And to leave DX12 in that state for 6 years? no way…this can’t be…

I think he means it’s a layer that translates a lot of already existing dx11 code to dx12.

1 Like

It makes sense to think they are adopting a similar strategy to what’s explained here

This is what the Unity developer said btw : Why is DX12 so much slower than DX11?

1 Like

while debugging, I also noticed the same error. Let me know when anyone got the solution.

it may not be the official MS layer of abstraction, but he is saying that they are indeed porting features bit by bit and it’s sorta d3d11on12