X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=apps%2Fd3d11%2Ftri.cpp;h=28f930298e2a30b45d0b442947cfb1f2c2ba77f9;hp=1649bbf67d304da28c7e234239a0cfb3d7e5010c;hb=5a26553410dc781b71da75c163400b801dfbf34a;hpb=009c029e5360c8ae668b21caffeb275639ede8a7 diff --git a/apps/d3d11/tri.cpp b/apps/d3d11/tri.cpp index 1649bbf..28f9302 100644 --- a/apps/d3d11/tri.cpp +++ b/apps/d3d11/tri.cpp @@ -103,12 +103,18 @@ int main(int argc, char *argv[]){ SwapChainDesc.OutputWindow = hWnd; SwapChainDesc.Windowed = true; + static const D3D_FEATURE_LEVEL FeatureLevels[] = { + D3D_FEATURE_LEVEL_11_0, + D3D_FEATURE_LEVEL_10_1, + D3D_FEATURE_LEVEL_10_0 + }; + hr = D3D11CreateDeviceAndSwapChain(NULL, /* pAdapter */ D3D_DRIVER_TYPE_HARDWARE, NULL, /* Software */ D3D11_CREATE_DEVICE_DEBUG, - NULL, - 0, + FeatureLevels, + sizeof FeatureLevels / sizeof FeatureLevels[0], D3D11_SDK_VERSION, &SwapChainDesc, &g_pSwapChain, @@ -250,6 +256,9 @@ int main(int argc, char *argv[]){ g_pSwapChain->Release(); g_pSwapChain = NULL; + g_pDeviceContext->Release(); + g_pDeviceContext = NULL; + g_pDevice->Release(); g_pDevice = NULL;