mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +01:00
[dxgi] Fix CheckInterfaceSupport for IDXGIDevice
On Windows, this succeeds and reports the D3D9 driver version to the application.
This commit is contained in:
parent
ab51aac6d7
commit
2f4e4abcac
@ -102,20 +102,28 @@ namespace dxvk {
|
||||
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
||||
REFGUID InterfaceName,
|
||||
LARGE_INTEGER* pUMDVersion) {
|
||||
const DxgiOptions* options = m_factory->GetOptions();
|
||||
HRESULT hr = DXGI_ERROR_UNSUPPORTED;
|
||||
|
||||
if (pUMDVersion != nullptr)
|
||||
*pUMDVersion = LARGE_INTEGER();
|
||||
|
||||
if (options->d3d10Enable) {
|
||||
if (InterfaceName == __uuidof(IDXGIDevice))
|
||||
hr = S_OK;
|
||||
|
||||
if (m_factory->GetOptions()->d3d10Enable) {
|
||||
if (InterfaceName == __uuidof(ID3D10Device)
|
||||
|| InterfaceName == __uuidof(ID3D10Device1))
|
||||
return S_OK;
|
||||
hr = S_OK;
|
||||
}
|
||||
|
||||
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
||||
Logger::err(str::format(InterfaceName));
|
||||
return DXGI_ERROR_UNSUPPORTED;
|
||||
|
||||
// We can't really reconstruct the version numbers
|
||||
// returned by Windows drivers from Vulkan data
|
||||
if (pUMDVersion)
|
||||
pUMDVersion->QuadPart = SUCCEEDED(hr) ? ~0ull : 0ull;
|
||||
|
||||
if (FAILED(hr)) {
|
||||
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
||||
Logger::err(str::format(InterfaceName));
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user