Qt: Unrestrict resolution scale up to device limits
This commit is contained in:
@ -754,39 +754,6 @@ void D3D12Device::DestroyDeferredObjects(u64 fence_value)
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12Device::GetAdapterAndModeList(AdapterAndModeList* ret, IDXGIFactory5* factory)
|
||||
{
|
||||
ret->adapter_names = D3DCommon::GetAdapterNames(factory);
|
||||
ret->fullscreen_modes = D3DCommon::GetFullscreenModes(factory, {});
|
||||
}
|
||||
|
||||
GPUDevice::AdapterAndModeList D3D12Device::StaticGetAdapterAndModeList()
|
||||
{
|
||||
AdapterAndModeList ret;
|
||||
std::unique_lock lock(s_instance_mutex);
|
||||
|
||||
// Device shouldn't be torn down since we have the lock.
|
||||
if (g_gpu_device && g_gpu_device->GetRenderAPI() == RenderAPI::D3D12)
|
||||
{
|
||||
GetAdapterAndModeList(&ret, D3D12Device::GetInstance().m_dxgi_factory.Get());
|
||||
}
|
||||
else
|
||||
{
|
||||
ComPtr<IDXGIFactory5> factory = D3DCommon::CreateFactory(false, nullptr);
|
||||
if (factory)
|
||||
GetAdapterAndModeList(&ret, factory.Get());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GPUDevice::AdapterAndModeList D3D12Device::GetAdapterAndModeList()
|
||||
{
|
||||
AdapterAndModeList ret;
|
||||
GetAdapterAndModeList(&ret, m_dxgi_factory.Get());
|
||||
return ret;
|
||||
}
|
||||
|
||||
RenderAPI D3D12Device::GetRenderAPI() const
|
||||
{
|
||||
return RenderAPI::D3D12;
|
||||
|
||||
Reference in New Issue
Block a user