0

I'm trying to create a D3D12 device as specified in

https://msdn.microsoft.com/en-us/library/dn899120%28v=vs.85%29.aspx

I have a NVidia 670 gtx, Windows 10 preview build 9926, and last 10041 windows sdk.

I also have latest NVidia beta driver, system information for GeForce reports a DirectX12 runtime.

Calling

ID3D12Device* device;
    HRESULT hr = D3D12CreateDevice(NULL, D3D_DRIVER_TYPE::D3D_DRIVER_TYPE_HARDWARE,
        D3D12_CREATE_DEVICE_FLAG::D3D12_CREATE_DEVICE_NONE,
        D3D_FEATURE_LEVEL::D3D_FEATURE_LEVEL_11_0, D3D12_SDK_VERSION, __uuidof(ID3D12Device), (void**)&device);

Returns me a HRESULT with NOINTERFACE error code

Strangely calling:

ID3D12Object* device;
    HRESULT hr = D3D12CreateDevice(NULL, D3D_DRIVER_TYPE::D3D_DRIVER_TYPE_HARDWARE,
        D3D12_CREATE_DEVICE_FLAG::D3D12_CREATE_DEVICE_NONE,
        D3D_FEATURE_LEVEL::D3D_FEATURE_LEVEL_11_0, D3D12_SDK_VERSION, __uuidof(ID3D12Object), (void**)&device);

returns me a valid object, but I'm not able to use QueryInterface to get a valid device object afterwards.

Please note I already tried using LoadLibrary/GetProcAddress instead of using d3d12 headers, which returns same error code.

mrvux
  • 8,523
  • 1
  • 27
  • 61
  • update to Win10 Build 10041 and try again. – magicandre1981 Mar 28 '15 at 18:07
  • Ah right, forgot was on slow windows update path, thanks, you can put it as answer and I'll accept it. – mrvux Mar 28 '15 at 20:39
  • Using Loadlibrary and getprocaddress, are just ways to link to the d3d12.dll dynamically (programatically during run time) rather than having them statically built into your project at compile time or the initialization of run time. In either case it's returning e_nointerface I believe cause it doesn't like the parameters you are sending it. – marshal craft Nov 11 '16 at 23:29

1 Answers1

4

You should always use the same OS and SDK Build, because APIs can change betweens builds. Because you use SDK for Build 10041, you should also update Windows 10 to the Build 10041. Open the Settings App, and search for a new Windows 10 Build and install it.

magicandre1981
  • 27,895
  • 5
  • 86
  • 127