Visual Studio 2017 C++: D3D12_DEPTH_STENCIL_DESC1 undefined


  • Good morning.  I'm new to Visual Studio and Direct X, so please bear with me.

    I'm trying to build the code from here  For some reason my IDE can't find a bunch of symbols supposed to be in the core Direct X 12 specification--D3D12_DEPTH_STENCIL_DESC1 is one of them.  I don't think it's an #include error because I'm not getting any missing file errors from the compiler, and D3D12_DEPTH_STENCIL_DESC seems to be located just fine.  I'm trying to trace this problem and I think I'm missing a file in the SDK somewhere.

    Other missing structures from the core spec are D3D12_RANGE_UINT64, D3D12_SUBRESOURCE_RANGE_UINT64.  Some others might be missing but my compiler stopped after 100 errors.  Many other DirectX 12 symbols seem to be defined just fine.

    Thanks in advance.

    Saturday, April 15, 2017 2:36 PM

All replies

  • The D3D12_DEPTH_STENCIL_DESC1 datatype was added in the Windows 10 Creators Update SDK (15063), so the copy of d3d12.h in the Windows 10 SDK (10240), Windows 10 November 2015 SDK (10586), and Windows 10 Anniversary Update SDK (14393) won't define it. Also note that officially only VS 2017 supports the Windows 10 Creators Update SDK (15063), so if you are using VS 2015 you can't use that version anyhow.

    If you are using VS 2017, then you need to update to pick up the new Windows 10 Creators Update SDK (15063) which was released on April 10, 2017 as part of a VS 2017 update (version 15.1 - 26403.03) and update your project settings to use the new version. For details on how you control the version of the Windows 10 SDK you use to build your application, see this blog post.

    Also, if you are new to DirectX I strongly recommend starting with DirectX 11 rather than trying to use DirectX 12. See this wiki for more information.

    Monday, April 17, 2017 4:55 AM