Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Official DX12 is out of experimental since 2022.2.0a17

Discussion in '2022.2 Beta' started by tvirolai, Jun 28, 2022.

  1. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    784
    > d3d12: Profiler is enabled, but stable power state is not. GPU timing errors are expected.

    Every time i start the editor i see this message, and i dont know what to do with it. What is stable power, where do i enable it?
     
  2. guoxx_

    guoxx_

    Joined:
    Mar 16, 2021
    Posts:
    46
    launch unity.exe with following argument: -force-d3d12-stablepowerstate
     
  3. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    784
    Thanks for the answer. Not seeing this command in the documentation, nor does the warning inform in any way how to solve it. Really think that something out of experimental should be more polished.
     
  4. tvirolai

    tvirolai

    Unity Technologies

    Joined:
    Jan 13, 2020
    Posts:
    70
    Enabling it will actually reduce your performance. It's in order to get stable profiling results.

    https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-setstablepowerstate see here for more information on what it actually means.

    We probably should improve our documentation for what it does and means. If you're not doing fine grained profiling you should ignore it.
     
    Kmsxkuse and TJHeuvel-net like this.
  5. dnach

    dnach

    Unity Technologies

    Joined:
    Mar 9, 2022
    Posts:
    79
    With the aim of further improving DX12 performance, 2023.1a21 introduces a new graphics jobs threading mode called “Split Graphics Jobs”. The new threading mode is now the default for DX12 Standalone Players, with support for additional graphics APIs in our roadmap.

    For more information, including performance figures from our internal tests, please check the official forum post:
    https://forum.unity.com/threads/directx12-and-graphics-jobs-improvements-in-2023-1-split-graphics-jobs-and-editor-support.1375098/
     
    m0nsky likes this.
  6. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    489
    Great work bringing DX12 forward! I tried it out to get an early glimpse of potential performance. I'm seeing about a ten percent drop in fps performance across different scenes. This isn't a complaint -- I know it's hot off the press and further optimization is planned. I'm looking forward to trying it again in the future.
     
  7. mluchian

    mluchian

    Joined:
    Aug 24, 2022
    Posts:
    6
    A couple of people mentioned that Nsight Graphics works fine when the D3D12 Graphics API is enabled. I'm having the exact opposite problem, each time I try to start a standalone alone D3D12 build from Nsight Graphics, the build just crashes. To exlude any issues due to my code, I tried the HDRP sample scene and it still crashes.
    Some help with this would be greatly appreciated.
     
  8. sbsmith

    sbsmith

    Joined:
    Feb 7, 2013
    Posts:
    112
    We are seeing a 4-10x performance drop between 2022.2.2 and 2022.1.24 in URP. Also we are seeing two different types of crashes in the editor and in builds. In the editor, we see this:
    Screenshot 2023-01-12 120505.png

    And in the build we see this:
    Code (CSharp):
    1. Device removed reason (887a0006).
    2. GfxDevice was not out of Local memory
    3. Local memory usage:
    4. Budget: 9750708224
    5. CurrentUsage: 2200891392
    6. AvailableForReservation: 67108864
    7. CurrentReservation: 5009571840
    8. GfxDevice was not out of Non-Local memory
    9. Non-Local memory usage:
    10. Budget: 16334927872
    11. CurrentUsage: 238055424
    12. AvailableForReservation: 0
    13. CurrentReservation: 8301681664
    14. Set -force-d3d12-debug for more information on device removal
    15. Device removed reason (887a0006).
    16. Crash!!!
    Rolling back to 2022.1.24 fixes everything

    What's the best way for us to submit useful information because we don't have much to go on?

    Update: Player is set to auto-detect the API. We have been able to get more stability in the editor by forcing it to DX12, but that seems to increase crashes in the builds. (Also, sadly, I'm working on an older laptop with a GTX 1060 that can't update its drivers and I seem to be the only one on my team spared from these errors)

    Update 2: I'm now being told the swap chair error is still happening after the rollback in the editor, but the build is still stable and the performance is better.
     
    Last edited: Jan 19, 2023
  9. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    213
    Performance parity?
    Whenever I update Unity, I wait until the 3rd release of a major update to upgrade (X.X.3f1) , and I try out DX12 only to quickly disguard it and go back to dx11, but after hearing dx12 is now official I had high hopes this time.

    But with the Standard pipeline performance is still terrible (plus there are rendering errors to boot)
    DX11 ~110fps > DX12 ~50fps nvidia1650 & 2022.2.3
    Is this parity only with HDRP or is it standard pipeline as well?
    The only thing I want from dx12 is adaptive resolution scaling
     
    Genebris likes this.
  10. Genebris

    Genebris

    Joined:
    Mar 18, 2013
    Posts:
    67
    It's also terrible in HDRP.
     
  11. azmi_unity

    azmi_unity

    Joined:
    Dec 13, 2020
    Posts:
    54
    In my project, transparent materials starts glitching out when there are over 10k instances on camera. I'm using ECS1.0 though, but DX11 works fine.

    HDRP 14.0.6 on Unity 2022.2.11
     
  12. Blade_Master_2020

    Blade_Master_2020

    Joined:
    Aug 3, 2019
    Posts:
    36
    Same here. We switched our HDRP project from DX11 to DX12(officially released), and the FPS drops from 80 to 45.
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    9,945
    Come on guys, it hasn't even been 10 years since they announced their plans to support DX12 early in the Unity 5 cycle, you can't yet expect the support to be good a mere 8 years later.
    upload_2023-4-30_23-29-48.png