{"record":{"id":"cf815ef24c3e5361","repo":"neovide/neovide","slug":"failed-to-find-any-suitable-direct3d-12-adapters","errorCode":null,"errorMessage":"Failed to find any suitable Direct3D 12 adapters","messagePattern":"Failed to find any suitable Direct3D 12 adapters","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/renderer/d3d.rs","lineNumber":133,"sourceCode":"    pub fn new(window: Rc<Window>, settings: Arc<Settings>) -> Self {\n        tracy_zone!(\"D3DSkiaRenderer::new\");\n        #[cfg(feature = \"d3d_debug\")]\n        let dxgi_factory: IDXGIFactory2 = unsafe {\n            let mut debug_controller: Option<ID3D12Debug> = None;\n            D3D12GetDebugInterface(&mut debug_controller)\n                .expect(\"Failed to create Direct3D debug controller\");\n\n            debug_controller.expect(\"Failed to enable debug layer\").EnableDebugLayer();\n\n            CreateDXGIFactory2(DXGI_CREATE_FACTORY_DEBUG).expect(\"Failed to create DXGI factory\")\n        };\n\n        #[cfg(not(feature = \"d3d_debug\"))]\n        let dxgi_factory: IDXGIFactory2 =\n            unsafe { CreateDXGIFactory1().expect(\"Failed to create DXGI factory\") };\n\n        let adapter = get_hardware_adapter(&dxgi_factory)\n            .expect(\"Failed to find any suitable Direct3D 12 adapters\");\n\n        let mut device: Option<ID3D12Device> = None;\n        unsafe {\n            tracy_zone!(\"create_device\");\n            D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_11_0, &mut device)\n                .expect(\"Failed to create a Direct3D 12 device\");\n        }\n        let device = device.expect(\"Failed to create a Direct3D 12 device\");\n\n        // Describe and create the command queue.\n        let queue_desc = D3D12_COMMAND_QUEUE_DESC {\n            Flags: D3D12_COMMAND_QUEUE_FLAG_NONE,\n            Type: D3D12_COMMAND_LIST_TYPE_DIRECT,\n            ..Default::default()\n        };\n        let command_queue: ID3D12CommandQueue = unsafe {\n            device\n                .CreateCommandQueue(&queue_desc)","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/neovide/neovide/blob/ade2d9cda777879975b1852f77dc672f5ff43b78/src/renderer/d3d.rs#L115-L151","documentation":"After creating the DXGI factory, D3DSkiaRenderer::new calls get_hardware_adapter(&dxgi_factory) and unwraps it with expect('Failed to find any suitable Direct3D 12 adapters'). get_hardware_adapter walks EnumAdapters1 looking for a hardware adapter that supports D3D12; returning None means no GPU on the system exposes the required feature level. This fires on machines with only software/warp-capable or very old GPUs, headless/remote-desktop sessions without GPU enumeration, or disabled display drivers. Renderer construction cannot proceed, so the expect panics and the application exits during startup.","triggerScenarios":"Thrown at src/renderer/d3d.rs:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fall back to the WARP software adapter (IDXGIFactory4::EnumWarpAdapter) when no hardware D3D12 adapter is found, instead of panicking","Report the failure through the application's error-window path so the user gets an actionable message about GPU/D3D12 support","Relax the adapter selection criteria (lower feature-level requirement) if the current check is too strict for older GPUs"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ade2d9cda777879975b1852f77dc672f5ff43b78","analyzedAt":"2026-09-06T04:14:57.389Z","contentChangedAt":"2026-09-06T04:14:57.389Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}