IDXGISwapChain::CheckInterfaceSupport returns 一个不可能的结果
IDXGISwapChain::CheckInterfaceSupport returns a result that cannot be
根据 IDXGIAdapter::CheckInterfaceSupport
documentation returns S_OK
是否支持传入的接口,否则 DXGI_ERROR_UNSUPPORTED
。代码片段:
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);
}
控制台总是打印 NOT
,但如果我更改为 __uuidof(ID3D10Device)
,则不会。
但我绝对知道我的 GPU 支持 DirectX11,因为:
- 我目前正在编写的程序使用的是 DirectX 11,它是 运行
- 我的 GPU:GTX 970,不是最新的,但是...应该支持 D3D11 :D
可以请谁把事情搞清楚我有点烦,谢谢。
在 IDXGIAdapter:CheckInterfaceSupport
的 'remarks' 部分(强调我的):
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.
根据 IDXGIAdapter::CheckInterfaceSupport
documentation returns S_OK
是否支持传入的接口,否则 DXGI_ERROR_UNSUPPORTED
。代码片段:
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);
}
控制台总是打印 NOT
,但如果我更改为 __uuidof(ID3D10Device)
,则不会。
但我绝对知道我的 GPU 支持 DirectX11,因为:
- 我目前正在编写的程序使用的是 DirectX 11,它是 运行
- 我的 GPU:GTX 970,不是最新的,但是...应该支持 D3D11 :D
可以请谁把事情搞清楚我有点烦,谢谢。
在 IDXGIAdapter:CheckInterfaceSupport
的 'remarks' 部分(强调我的):
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.