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.
  2. Dismiss Notice

Disable D3D11_CREATE_DEVICE_SINGLETHREADED without Command Line Arguments

Discussion in 'General Graphics' started by SquallLiu, Nov 4, 2019.

  1. SquallLiu

    SquallLiu

    Joined:
    Jun 19, 2017
    Posts:
    32
    Can we disable D3D11_CREATE_DEVICE_SINGLETHREADED without Command Line Arguments?
    I wrote a native plugin which uses D3D11's DeferredContext.

    If graphic device is created with D3D11_CREATE_DEVICE_SINGLETHREADED, we can't create DeferredContext interface.

    Currently, I use "-force-d3d11-no-singlethreaded" for DeferredContext.
    But I don't want to use this command line on release build either.

    Thanks.
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    333
    I think D3D11_CREATE_DEVICE_SINGLETHREADED should not be used by default. You can force it with "-force-d3d11-singlethreaded", but if you give no command line arguments, the default should be the D3D11 default (i.e. no SINGLETHREADED).
     
  3. SquallLiu

    SquallLiu

    Joined:
    Jun 19, 2017
    Posts:
    32
    However, Unity 2018.4.0f actually creates GFX with D3D11_CREATE_DEVICE_SINGLETHREADED as default.
    Game build uses D3D11_CREATE_DEVICE_SINGLETHREADED, too.

    I didn't use "-force-d3d11-singlethreaded" at all.

    How do I fix it?
    Thanks.