# Why can't I create a D3D12 Device with the highest performance adpater retrieved by EnumAdapterByGpuPreference?

    IDXGIAdapter* higher_performance_adapter;
if(SUCCEEDED(dx_result))
{
UINT output_index = 0;
IDXGIOutput* output;
{
DXGI_OUTPUT_DESC output_description = {0};
output->GetDesc(&output_description);

++output_index;
}

ID3D12Device* device;
D3D_FEATURE_LEVEL_12_1,
__uuidof(ID3D12Device),
(void**)&device);
if(SUCCEEDED(dx_result))
{

...


I'm trying to create a D3D12 device selecting the GPU with the higher performance because passing null to the adapter parameter at D3D12CreateDevice gets the first adapater from EnumAdapters, which is the Intel integrated GPU. But, when I got a IDXGIAdapter object of my dedicated GPU, the EnumOutputs function failed, as well as the D3D12CreateDevice. Why is that? Why these functions fails when using the dedicated GPU, which in my case is a NVIDIA, ?

The returned dx_result is "0x887a0004 : The specified device interface or feature level is not supported on this system. "

That don't makes sense, since my system supports DirectX12.

• See Anatomy of Direct3D 12 Create Device for some general advice on Direct3D 12 device creation. Keep in mind that you can in fact have a system where only some of the drivers/devices supports DX12 while others only support DX11. D3D_FEATURE_LEVEL_11_0 is also the best choice for broad hardware support for DX12. – Chuck Walbourn Jul 12 at 19:13