Search Unity

What is going on with DX12?

Discussion in 'High Definition Render Pipeline' started by jjejj87, Aug 6, 2021.

  1. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    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.
     
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    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
     
  3. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
    I suspect the current DX12 is a DX11ON12 port of the DX11 layer.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
  5. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    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...
     
  6. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    GDK being DX12 only puts a lot of pressure on this subject.
     
  7. merpheus

    merpheus

    Joined:
    Mar 5, 2013
    Posts:
    202
    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?
     
    sebas77 likes this.
  8. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
    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.
     
  9. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    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....
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    I think he means it's a layer that translates a lot of already existing dx11 code to dx12.
     
    sebas77 likes this.
  11. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
  13. StevenTillson02

    StevenTillson02

    Joined:
    Jun 30, 2021
    Posts:
    11
    while debugging, I also noticed the same error. Let me know when anyone got the solution.
     
  14. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643