microsoft / microsoft/DirectX-Graphics-Samples
Most but not all samples fail in SwapChain Present() unless I change GetHardwareAdapter() to pass true for third arg - requestHighPerformanceAdapter
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
HelloWindow works, but HelloTriangle fails.
The adapter Intel(R) HD Graphics 4600 is selected because it comes first when DXGI_GPU_PREFERENCE_UNSPECIFIED and it reports D3D_FEATURE_LEVEL_11_0 but then it crashes in Present():
HRESULT is 0x887a0005 : The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Debug output:
The thread 25936 has exited with code 0 (0x0).
D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
Exception thrown at 0x00007FFC5F3FAF29 in D3D12HelloTriangle.exe: Microsoft C++ exception: _com_error at memory location 0x000000190E4FC1E0.
Exception thrown at 0x00007FFC5F3FAF29 in D3D12HelloTriangle.exe: Microsoft C++ exception: _com_error at memory location 0x000000190E4FC558.
Exception thrown at 0x00007FFB99778F9D (d3d12SDKLayers.dll) in D3D12HelloTriangle.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
From dxdiag:
Diagnostics
Windows Error Reporting:
+++ WER0 +++:
Fault bucket 1497160328855956209, type 5
Event Name: D3DDRED2
Response: Not available
Cab Id: 0
Problem signature:
P1: VEN_8086
P2: 20.19.15.5126
P3: 0x887A0006
P4: 7
P5: D3D12HelloTriangle.exe
P6: Unknown
P7:
P8:
P9:
P10:
If I change the call to GetHardwareAdapter() to add the requestHighPerformanceAdapter arg then DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE causes NVIDIA Quadro K2100M to be selected which doesn't crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with GetHardwareAdapter() and the HelloTriangle sample, comparing its adapter selection with HelloWindow. Reproduce the Present() device-removal failure on the Intel adapter and verify whether the sample should handle or avoid that selection; done means the sample no longer crashes under the reported configuration without breaking adapter selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100