Reputation: 25
According to the IDXGIAdapter::CheckInterfaceSupport
documentation returns S_OK
if the passed in interface is supported and otherwise DXGI_ERROR_UNSUPPORTED
. Code snippet:
for( size_t i = 0; i < GInterface::m_Adapters.size(); i++)
{
hr = GInterface::m_Adapters.at(i)->CheckInterfaceSupport(__uuidof(ID3D11Device), (LARGE_INTEGER*)&umdVersion);
printf( "***D3D11 %sSUPPORTED FOR ADAPTER %d (%d)",
(hr != DXGI_ERROR_UNSUPPORTED) ? "" : "NOT ",
i,
umdVersion);
}
The console always prints NOT
, but if I change to __uuidof(ID3D10Device)
it does not.
But I definitely know that my GPU supports DirectX11, because:
Can please somebody clear things up I am slightly irritated, thank you.
Upvotes: 1
Views: 532
Reputation: 10049
In the 'remarks' section for the IDXGIAdapter:CheckInterfaceSupport
(emphasis mine):
Note You can use CheckInterfaceSupport only to check whether a Direct3D 10.x interface is supported, and only on Windows Vista SP1 and later versions of the operating system. If you try to use CheckInterfaceSupport to check whether a Direct3D 11.x and later version interface is supported, CheckInterfaceSupport returns DXGI_ERROR_UNSUPPORTED. Therefore, do not use CheckInterfaceSupport. Instead, to verify whether the operating system supports a particular interface, try to create the interface. For example, if you call the ID3D11Device::CreateBlendState method and it fails, the operating system does not support the ID3D11BlendState interface.
Upvotes: 1