Solution:
Root Cause: Multi-dGPU PCIe Bus Isolation and DirectX Device Enumeration
On workstations equipped with multiple discrete GPUs (e.g., dGPU1 for rendering, dGPU2 for encoding/display output), DirectX 11/12 graphics devices establish independent device contexts (
ID3D11Device). When OBS initializes on dGPU2, its graphics hook inside a game running on dGPU1 attempts to map shared surface handles (
HANDLE passed to
OpenSharedResource). If cross-adapter resource sharing is disabled or unsupported by driver WDDM allocation models, texture pointer conversion yields a null pointer error, causing OBS Game Capture to render black.
Diagnostic Verification:
In the OBS log file, locate the entry: [Game Capture] d3d11_init_shared_texture failed or DXGI_ERROR_INVALID_CALL.Execute dxdiag in Command Prompt to inspect vendor ID and Device ID assignments across all physical graphics cards.Step-by-Step Fix:
1Re-assign OBS Display and Render Adapter in Settings:
In OBS Studio, navigate to Settings > Advanced > Video.Set GPU to 0 (or the specific index corresponding to the primary gaming GPU rendering the DirectX surface).2Force Windows SLI/Crossfire Explicit Binding:
Open NVIDIA Control Panel > Manage 3D Settings > Program Settings.Select OBS Studio (obs64.exe) and set CUDA - GPUs to the GPU rendering the game.3Enable Cross-adapter Hook Compatibility:
Double-click the Game Capture source in OBS Studio.Enable the checkbox marked SLI/Crossfire Capture Mode (Slow). This forces OBS to use system RAM staging buffers instead of direct GPU VRAM texture handles.4Apply Changes and Restart:
Restart OBS Studio and relaunch the game to re-initialize the hook hook pipeline.Prevention & Long-Term Monitoring:
Maintain unified GPU assignment across game rendering engine and streaming capture software. Avoid splitting capture and rendering across physical PCIe channels unless using capture card pass-through configurations.