microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6.01k stars 2.02k forks source link

Can't run D3D12xGPU sample - missing D3D11 SDK Layers for Windows 10?? #447

Closed CGAndersonSea closed 3 years ago

CGAndersonSea commented 6 years ago

I have latest windows 10 update, latest vs2017, and did install windows 10 sdk as per directx 12 instructions (had to uninstall the sdk first from VS2017 installation), then just to be sure updated VS2017 installation with a few things to make sure didn't miss anything.

Apparently, I did miss something? The samples compiles fine (no changes to sln), Debug/64, but when run I get the following:

'D3D12xGPU.exe' (Win32): Loaded 'C:\Windows\System32\dxilconv.dll'. Cannot find or open the PDB file. 'D3D12xGPU.exe' (Win32): Loaded 'C:\Users\cyander\Documents\Github\DXR\DirectX-Graphics-Samples-1.3-dxr\Samples\Desktop\D3D12xGPU\src\bin\x64\Debug\DXGIDebug.dll'. Symbols loaded. D3D11CreateDevice: Flags (0x2) were specified which require the D3D11 SDK Layers for Windows 10, but they are not present on the system. These flags must be removed, or the Windows 10 SDK must be installed. Flags include: D3D11_CREATE_DEVICE_DEBUG Exception thrown at 0x00007FFB08D6A388 in D3D12xGPU.exe: Microsoft C++ exception: _com_error at memory location 0x000000C134D2E210. Exception thrown at 0x00007FFB08D6A388 in D3D12xGPU.exe: Microsoft C++ exception: HrException at memory location 0x000000C134D2E628. Application hit a problem: HRESULT of 0x887A002D Terminating.

walbourn commented 6 years ago

The "debug layers" for Windows 10 are a Windows optional feature that's called "Graphics Tools". Normally this is enabled automatically by installing the Windows SDK, but it can depend on your network and if you are using an insider release of Windows 10.

Go to System Settings -> Add or remove programs -> Apps & features -> Manage optional features. If "Graphics Tools" is not listed, try "Add a feature". If it's still not there, then you may need to contact your IT admin.

See this blog post.

CGAndersonSea commented 6 years ago

thanks, however, didn't work. I checked but found Optional Features -> Add returned optional features is empty. and the workaround suggested on the net (which worked for some, did not work for others) will not work for me. My sysadmin has disabled registry setting. I will contact them and see if they can make it possible, but I wish there were an alternate way to get these tools. thanks.

CGAndersonSea commented 6 years ago

by the way, it's is expected behavior for the sample to crash if the sdk layers are not in place? correct? you cannot run the sample without them? thanks

pkristof commented 6 years ago

SDK layers shouldn't be required for a sample to run. I've added it to our backlog to review the sample and the hard dependency. Thanks.

walbourn commented 6 years ago

Note that if you don't have a DirectX 12 capable driver/video card, and the sample falls back to using the WARP12 software device, then it would fail without the SDK layers because WARP12 is currently developer only.

CGAnderson commented 6 years ago

Yet presumably I'm using a DirectX 12 capable driver/video card (an AMD Vega 64, which is certainly supporting most of DirectX12 and Vulkan...even if it doesn't handle the v1.3 RTRT stuff yet) and it seems odd that a debug layer/optional Graphics Tools would be a hard dependency for a software device. I was taking 'developer only' to not imply a requirement for an optional debug layer - only that developer settings must be set in Windows 10 (which they are.) :(

walbourn commented 6 years ago

I was pointing out that WARP12 is part of the Graphics Tools optional feature. While you can rely on WARP11 being available on 'retail' systems, you can't rely on WARP12 which is "developer only" because the performance is not considered sufficient (yet).

Anyhow, that may not the problem in your scenario. I just wanted to note one possible source of dependency.

Can you build and run SimpleTriangle on your system?

CGAnderson commented 6 years ago

I see. Thanks for the explanation.😊

On Tue, Aug 28, 2018, 11:21 AM Chuck Walbourn notifications@github.com wrote:

I was pointing out that WARP12 is part of the Graphics Tools optional feature. While you can rely on WARP11 being available on 'retail' systems, you can't rely on WARP12 which is "developer only" because the performance is not considered sufficient (yet).

Anyhow, that may not the problem in your, I just wanted to note on possible source of dependency.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/DirectX-Graphics-Samples/issues/447#issuecomment-416689667, or mute the thread https://github.com/notifications/unsubscribe-auth/AGS3LG5frBAKrHOCxR39bq72qHNgQp3nks5uVYnjgaJpZM4WKiao .

WeakKnight commented 4 years ago

In China's Network Environment, I can not install it via Optional Features Panel. Is there any other way to install it?

walbourn commented 4 years ago

Which specific build of Windows 10 are you using? The Feature-On-Demand much match your build. Is that Windows 10 (19041)?

There are a set of offline FOD packages available here. The "Graphics" one is the FOD for the DirectX layer but only up through Windows 10 Version 1803 (17763).

https://docs.microsoft.com/en-us/windows-hardware/test/hlk/getstarted/download-supplemental-hlk-resources