Search Unity

Why is DX12 so much slower than DX11?

Discussion in 'General Graphics' started by funkyCoty, Mar 6, 2020.

  1. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    8,215
    I wasn't intending to put words in your mouth, I was using hyperbole to more clearly point out that dx12 clearly hasn't been a priority for Unity and it hasn't really been worked on over the last 6 years.

    Because somehow I doubt a team of graphics programmers were tasked to create great dx12 support as their no 1 priority, and they still haven't managed to finish it 6 years later, no?
     
    hopeful likes this.
  2. davidcole

    davidcole

    Joined:
    May 23, 2013
    Posts:
    9
    yes, this is exactly the point I was trying to make, but I removed too much of the original quote, which is why it came across a bit differently.

    I also want to respond to the comment about toxicity, as I think I contributed to that and it’s absolutely not what I want here. I apologise for the negativity in my post. It comes from a place of creative passion – which phenomenal software like Unity facilitates. It’s easy to get a little carried away I guess.

    It does seem Unity has been listening to feedback from its users about issues like this – so when they say it’s being worked on, I think we can believe them.
     
    gsylvain and richardkettlewell like this.
  3. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    23
    Last time I tried out DX12 about a year ago my experiences were like others in this thread, but I thought I would give it a go again (using latest 2021.2), to my surprise performance is actually a lot better for me with DX12 now, particularly in terms of smoothness - with DX11 I was having some issues with stuttering when rapidly moving around the view frustrum (due to large amount of instanced terrain tiles), this vanishes when switching to DX12.

    The only issue is with DX12 I get frequent editor crashes on things like 'toolbar.paint' when DX11 was very stable in that regard
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,547
    Did the crash reporter tell you if that crash was a known bug? If not, could you please report it as one?
     
  5. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    23
    Sure next time I get a crash I will make a report

    Have been noticing some huge improvements in the responsiveness of the editor, like saving the scene is so quick compared to DX11 I thought I had hit the wrong key combo or it wasn't working, and if I alt-tab back to Unity after doing other stuff on the computer it renders and is responsive almost instantly instead of taking ~10 seconds to draw everything and become responsive to input that I had become used to (with a big complicated scene).
     
    MartinTilo likes this.
  6. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    23
    Ever since 2021.1.14 came out I haven't been able to load my project with DX12 due to editor crash, have tried every new version hoping it will be fixed but still not the case. 13 still works fine as does DX11. Using a 1060 with latest 471.96 (happened with previous release too).

    Looking into the crash dumps I'm seeing this

    Code (csharp):
    1. d3d12: upload buffer was full! Waited for COPY queue for 1.059 ms.
    2. d3d12: upload buffer was full! Waited for COPY queue for 5.641 ms.
    3. d3d12: upload buffer was full! Waited for COPY queue for 1.895 ms.
    4. d3d12: upload buffer was full! Waited for COPY queue for 5.410 ms.
    5. d3d12: upload buffer was full! Waited for COPY queue for 0.000 ms.
    6. d3d12: upload buffer was full! Waited for COPY queue for 5.436 ms.
    7. d3d12: upload buffer was full! Waited for COPY queue for 5.748 ms.
    8. d3d12: upload buffer was full! Waited for COPY queue for 5.355 ms.
    9. d3d12: upload buffer was full! Waited for COPY queue for 4.464 ms.
    10. d3d12: upload buffer was full! Waited for COPY queue for 2.881 ms.
    11. d3d12: upload buffer was full! Waited for COPY queue for 4.004 ms.
    12. d3d12: upload buffer was full! Waited for COPY queue for 5.376 ms.
    13. d3d12: upload buffer was full! Waited for COPY queue for 0.550 ms.
    14. ProgressiveSceneManager::Cancel()
    15. d3d12: CreateCommandAllocator failed (887a0005).
    16. Device removed reason (887a0006).
    17. GfxDevice was not out of Local memory
    18. Local memory usage:
    19. Budget: 5496610816
    20. CurrentUsage: 5177020416
    21. AvailableForReservation: 67108864
    22. CurrentReservation: 2904555520
    23. GfxDevice was not out of Non-Local memory
    24. Non-Local memory usage:
    25. Budget: 9896141620
    26. CurrentUsage: 266612736
    27. AvailableForReservation: 0
    28. CurrentReservation: 5082288538
    29. Set -force-d3d12-debug for more information on device removal
    30. d3d12: CreateCommandList failed (80070057).
    31. Crash!!!
    Exception in the dump is "The thread tried to read from or write to a virtual address for which it does not have the appropriate access." and dissasembly shows the error happens on the second of these two lines


    00007FF638DAA0C5 call D3D12CommandList::GetCmdListAndMakeActive (07FF638DC09A0h)
    00007FF638DAA0CA mov r9,qword ptr [rax]


    I tried using -force-d3d12-debug, but this just seems to make the project open with DX11?
     
  7. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    381
    Send a bug report with a sample of your project that causes the same problem when built
     
    MartinTilo likes this.
  8. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    23
    Have submitted multiple bug reports on this issue, am not able to upload the project. I'd have to make a new empty project and recreate the issue with it
     
unityunity