mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[d3d10] Add option to enable or disable D3D10 support
This commit is contained in:
parent
04ed4273ba
commit
bd4338be42
@ -30,8 +30,17 @@ extern "C" {
|
|||||||
ID3D10Device** ppDevice) {
|
ID3D10Device** ppDevice) {
|
||||||
Com<ID3D11Device> d3d11Device;
|
Com<ID3D11Device> d3d11Device;
|
||||||
|
|
||||||
HRESULT hr = D3D11CoreCreateDevice(pFactory,
|
if (ppDevice != nullptr)
|
||||||
pAdapter, Flags, &FeatureLevel, 1, &d3d11Device);
|
*ppDevice = nullptr;
|
||||||
|
|
||||||
|
HRESULT hr = pAdapter->CheckInterfaceSupport(
|
||||||
|
__uuidof(ID3D10Device), nullptr);
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
hr = D3D11CoreCreateDevice(pFactory, pAdapter,
|
||||||
|
Flags, &FeatureLevel, 1, &d3d11Device);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -57,12 +57,16 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
||||||
REFGUID InterfaceName,
|
REFGUID InterfaceName,
|
||||||
LARGE_INTEGER* pUMDVersion) {
|
LARGE_INTEGER* pUMDVersion) {
|
||||||
|
const DxgiOptions* options = m_factory->GetOptions();
|
||||||
|
|
||||||
if (pUMDVersion != nullptr)
|
if (pUMDVersion != nullptr)
|
||||||
*pUMDVersion = LARGE_INTEGER();
|
*pUMDVersion = LARGE_INTEGER();
|
||||||
|
|
||||||
|
if (options->d3d10Enable) {
|
||||||
if (InterfaceName == __uuidof(ID3D10Device)
|
if (InterfaceName == __uuidof(ID3D10Device)
|
||||||
|| InterfaceName == __uuidof(ID3D10Device1))
|
|| InterfaceName == __uuidof(ID3D10Device1))
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
||||||
Logger::err(str::format(InterfaceName));
|
Logger::err(str::format(InterfaceName));
|
||||||
|
@ -41,6 +41,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
||||||
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
||||||
|
|
||||||
|
this->d3d10Enable = config.getOption<bool>("d3d10.enable", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -45,6 +45,9 @@ namespace dxvk {
|
|||||||
/// Sync interval. Overrides the value
|
/// Sync interval. Overrides the value
|
||||||
/// passed to IDXGISwapChain::Present.
|
/// passed to IDXGISwapChain::Present.
|
||||||
int32_t syncInterval;
|
int32_t syncInterval;
|
||||||
|
|
||||||
|
/// Enables D3D10 support
|
||||||
|
bool d3d10Enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user