Swapchain not created with feature level 9_3 or below


  • I have setup a project for a directx metro app, but when i run it with directx 10.1 hardware on a lower feature level (9_1), it will just crash after i create the swapchain. The console just has 1 simple message "D3D11: Removing Device." I am using an AMD Radeon HD 6570 with WDDM 1.2 driver. The game works fine in other feature levels (10 and above)


     DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0};
            swapChainDesc.Width = 0;
            swapChainDesc.Height = 0;
            swapChainDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;           
            swapChainDesc.Stereo = m_stereoEnabled; 
            swapChainDesc.SampleDesc.Count = 1;                          
            swapChainDesc.SampleDesc.Quality = 0;
            swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
            swapChainDesc.BufferCount = 2;  
    		swapChainDesc.Scaling = DXGI_SCALING_NONE;
    		swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; 
            swapChainDesc.Flags = 0;
            // Once the desired swap chain description is configured, it must be created on the same adapter as our D3D Device
            // First, retrieve the underlying DXGI Device from the D3D Device
            ComPtr<IDXGIDevice1>  dxgiDevice;
            // Ensure that DXGI does not queue more than one frame at a time. This both reduces 
            // latency and ensures that the application will only render after each VSync, minimizing 
            // power consumption.
            ComPtr<IDXGIAdapter> dxgiAdapter;
            ComPtr<IDXGIFactory2> dxgiFactory;
                    nullptr,    // allow on all displays

    I also tried running 3 samples from microsoft, and forcing the feature level to 9_1. They all show the same message (Device removed). Also when i try it on an actual DX9 device it will just crash. Other games such as cut the rope do seem to work fine (allthough laggish)

    Anyone know what i did wrong with creating my swapchain?

    3 เมษายน 2555 13:03


  • Oke, i found the problem myself :)

    I did indeed use the reference driver to fix the warnings directx would spill out (mostly index buffers not being 16bit). Next was running the game in release mode and forcing directx to spill out all logs by using 'dxcpl.exe'.

    Than it would crash on creating shaders, apparently not all shaders were using the correct version when compiling (should be 4.0 level 9_1). After fixing that the game would run and it would display 2d images perfectly fine. 3D and 2d mixed was still a big problem. 

    Turns out the fix for that is, is to enable the depth buffer before rendering (i was calling 'present' with the depthbuffer disabled).

    Now its working perfectly fine. :)

    16 เมษายน 2555 13:14