Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Why are the main thread and render thread waiting for each other at the same time (HDRP 14 DX12)

Discussion in 'High Definition Render Pipeline' started by mgeorgedeveloper, Nov 8, 2023.

  1. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    308
    Interesting situation I found here profiling a dev build.

    There is a section near the end of the frame where the main thread is waiting for "last present", while the render thread is waiting for "gfx commands from main" simultaneously.

    Any idea how this situation arises and how to avoid it?

    - DX12
    - U2022.3.12
    - No vsync
    - RTX 4070

    I suppose the render thread at this point has sent stuff off to the GPU/driver and so both threads are waiting around?

    everyone-is-waiting.png