Seize
Seize

Reputation: 11

ID3D12Device2: No such interface supported

I'm trying to call "m_pDevice->CreatePipelineState" for a MeshShader pipeline. But failed in "m_pDevice->QueryInterface" for obtaining a ID3D12Device2 handle.

ID3D12Device2* pDevice2; HRESULT hr = m_pDevice->QueryInterface(IID_PPV_ARGS(&pDevice2)); pDevice2->CreatePipelineState(&desc, IID_PPV_ARGS(&pPipelineState));

HRESULT: E_NOINTERFACE No such interface supported.

I searched for a long time but still can't find out why. Does anyone have any ideas what this could be?

IDE: VS2017 Enterprise 15.9.51 OS: Windows 10 2009(19043.1706) Windows SDK: 10.0.19041.0 Graphics card: RTX 2060

have tried:

  1. configue "Windows SDK Version" in Debug-Properties to 10.0.19041.0
  2. reinstall IDE
  3. reinstall Windows SDK kits
  4. update graphics card driver up-to-date
  5. Check FeatureSupport "D3D12_FEATURE_D3D12_OPTIONS7" succeed.

Upvotes: 1

Views: 727

Answers (1)

Chuck Walbourn
Chuck Walbourn

Reputation: 41127

For DirectX 12, you can create the device at the level you want rather than using the QueryInterface method. This is probably an easier scenario to debug.

With a minimum requirement of Windows 10 (19043), you can use any of ID3D12Device - ID3D12Device8 in the creation:

ComPtr<ID3D12Device8> m_d3dDevice;

// ...

// Create the DX12 API device object.
hr = D3D12CreateDevice(
        adapter.Get(),
        D3D_FEATURE_LEVEL_11_0,
        IID_PPV_ARGS(&m_d3dDevice)
        );

At the time of this answer, all version of Windows 10 prior to Version 21H2 (Build 19044) are technically out of support for consumers. For shipping software, you can make Windows 10 (Version 1909, 18363) your minimum supported OS and use of the DirectX Agility SDK to be sure the above code will still succeed.

See this blog post.

Upvotes: 2

Related Questions