AMF
AMF copied to clipboard
[Bug]: AMD DirectCapture component fails to initialize with error 0x80004001
Describe the bug
When attempting to work on an AMD Direct Capture implementation to address capture performance issues in Sunshine (#384), I was unable to successfully initialize the AMFDisplayCapture
component. I tried the DVR sample to ensure it wasn't a bug in my code, but that also failed with the same debug output when configured to use the "AMD DirectCapture" capture component. When configured to use the "Desktop Duplication" capture component, capture worked fine.
To Reproduce Steps to reproduce the behavior:
- Compile and run the AMD DVR sample
- Ensure "AMD DirectCapture" is selected from the "Capture Component" menu (should be default)
- Click Record
Setup (please complete the following information):
- OS: Windows 11 22H2 10.0.22621.2213
- Driver Version: 31.0.22001.4001
- GPU: AMD Radeon RX 7900 XT
- Which component has the issue: Display Capture
Debug Log (please upload or paste):
2023-08-20 16:04:36.844 163C [AMFScreenCaptureEngineImplDX11] Error: ..\..\..\..\..\runtime\src\components\ScreenCapture\DX11\ScreenCaptureEngineDX11.cpp(133):COM failed, HR = 80004001:ReloadTextures() failed, status: 0
2023-08-20 16:04:36.844 163C [AMFScreenCaptureEngineImplDX11] Error: ..\..\..\..\..\runtime\src\components\ScreenCapture\DX11\ScreenCaptureEngineDX11.cpp(108):AMF_ERROR 1 : AMF_FAIL: ReloadTextures() failed
2023-08-20 16:04:36.844 163C [AMFScreenCaptureImpl] Error: ..\..\..\..\..\runtime\src\components\ScreenCapture\ScreenCaptureImpl.cpp(298):AMF_ERROR 1 : AMF_FAIL: InitDisplayCapture() failed
Expected behavior AMD DVR sample should successfully record the display.
Screenshots
The "No video stream available" error is displayed after clicking Record.
Additional context This may be a regression in the 31.0.22001.4001 drivers.