mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Cosmetic changes
This commit is contained in:
parent
a6767ebd52
commit
8d3e60c2f1
@ -52,7 +52,7 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
||||||
REFGUID InterfaceName,
|
REFGUID InterfaceName,
|
||||||
LARGE_INTEGER* pUMDVersion) {
|
LARGE_INTEGER* pUMDVersion) {
|
||||||
Logger::err("DxgiAdapter::CheckInterfaceSupport: No D3D10 support");
|
Logger::err("DXGI: CheckInterfaceSupport: No D3D10 support");
|
||||||
return DXGI_ERROR_UNSUPPORTED;
|
return DXGI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace dxvk {
|
|||||||
if (Priority < -7 || Priority > 7)
|
if (Priority < -7 || Priority > 7)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
Logger::err("DxgiDevice::SetGPUThreadPriority: Ignoring");
|
Logger::err("DXGI: SetGPUThreadPriority: Ignoring");
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,7 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiFactory::GetParent(
|
HRESULT STDMETHODCALLTYPE DxgiFactory::GetParent(REFIID riid, void** ppParent) {
|
||||||
REFIID riid,
|
|
||||||
void** ppParent) {
|
|
||||||
InitReturnPtr(ppParent);
|
InitReturnPtr(ppParent);
|
||||||
|
|
||||||
Logger::warn("DxgiFactory::GetParent: Unknown interface query");
|
Logger::warn("DxgiFactory::GetParent: Unknown interface query");
|
||||||
@ -51,7 +49,7 @@ namespace dxvk {
|
|||||||
if (ppAdapter == nullptr)
|
if (ppAdapter == nullptr)
|
||||||
return DXGI_ERROR_INVALID_CALL;
|
return DXGI_ERROR_INVALID_CALL;
|
||||||
|
|
||||||
Logger::err("DxgiFactory::CreateSoftwareAdapter: Software adapters not supported");
|
Logger::err("DXGI: CreateSoftwareAdapter: Software adapters not supported");
|
||||||
return DXGI_ERROR_UNSUPPORTED;
|
return DXGI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +118,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) {
|
HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) {
|
||||||
Logger::warn("DxgiFactory::MakeWindowAssociation: Ignoring flags");
|
Logger::warn("DXGI: MakeWindowAssociation: Ignoring flags");
|
||||||
m_associatedWindow = WindowHandle;
|
m_associatedWindow = WindowHandle;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -65,20 +65,11 @@ namespace dxvk {
|
|||||||
const DXGI_MODE_DESC *pModeToMatch,
|
const DXGI_MODE_DESC *pModeToMatch,
|
||||||
DXGI_MODE_DESC *pClosestMatch,
|
DXGI_MODE_DESC *pClosestMatch,
|
||||||
IUnknown *pConcernedDevice) {
|
IUnknown *pConcernedDevice) {
|
||||||
if (pModeToMatch == nullptr) {
|
if (pModeToMatch == nullptr || pClosestMatch == nullptr)
|
||||||
Logger::err("DxgiOutput::FindClosestMatchingMode: pModeToMatch is nullptr");
|
|
||||||
return DXGI_ERROR_INVALID_CALL;
|
return DXGI_ERROR_INVALID_CALL;
|
||||||
}
|
|
||||||
|
|
||||||
if (pClosestMatch == nullptr) {
|
if (pModeToMatch->Format == DXGI_FORMAT_UNKNOWN && pConcernedDevice == nullptr)
|
||||||
Logger::err("DxgiOutput::FindClosestMatchingMode: pClosestMatch is nullptr");
|
|
||||||
return DXGI_ERROR_INVALID_CALL;
|
return DXGI_ERROR_INVALID_CALL;
|
||||||
}
|
|
||||||
|
|
||||||
if (pModeToMatch->Format == DXGI_FORMAT_UNKNOWN && pConcernedDevice == nullptr) {
|
|
||||||
Logger::err("DxgiOutput::FindClosestMatchingMode: no pointer to device was provided for DXGI_FORMAT_UNKNOWN format");
|
|
||||||
return DXGI_ERROR_INVALID_CALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If no format was specified, fall back to a standard
|
// If no format was specified, fall back to a standard
|
||||||
// SRGB format, which is supported on all devices.
|
// SRGB format, which is supported on all devices.
|
||||||
@ -101,7 +92,7 @@ namespace dxvk {
|
|||||||
GetDisplayModeList(targetFormat, DXGI_ENUM_MODES_SCALING, &modeCount, nullptr);
|
GetDisplayModeList(targetFormat, DXGI_ENUM_MODES_SCALING, &modeCount, nullptr);
|
||||||
|
|
||||||
if (modeCount == 0) {
|
if (modeCount == 0) {
|
||||||
Logger::err("DxgiOutput::FindClosestMatchingMode: No modes found");
|
Logger::err("DXGI: FindClosestMatchingMode: No modes found");
|
||||||
return DXGI_ERROR_NOT_FOUND;
|
return DXGI_ERROR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +145,7 @@ namespace dxvk {
|
|||||||
monInfo.cbSize = sizeof(monInfo);
|
monInfo.cbSize = sizeof(monInfo);
|
||||||
|
|
||||||
if (!::GetMonitorInfoW(m_monitor, reinterpret_cast<MONITORINFO*>(&monInfo))) {
|
if (!::GetMonitorInfoW(m_monitor, reinterpret_cast<MONITORINFO*>(&monInfo))) {
|
||||||
Logger::err("DxgiOutput: Failed to query monitor info");
|
Logger::err("DXGI: Failed to query monitor info");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +172,7 @@ namespace dxvk {
|
|||||||
monInfo.cbSize = sizeof(monInfo);
|
monInfo.cbSize = sizeof(monInfo);
|
||||||
|
|
||||||
if (!::GetMonitorInfoW(m_monitor, reinterpret_cast<MONITORINFO*>(&monInfo))) {
|
if (!::GetMonitorInfoW(m_monitor, reinterpret_cast<MONITORINFO*>(&monInfo))) {
|
||||||
Logger::err("DxgiOutput: Failed to query monitor info");
|
Logger::err("DXGI: Failed to query monitor info");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +237,7 @@ namespace dxvk {
|
|||||||
DXGI_VK_OUTPUT_DATA outputData;
|
DXGI_VK_OUTPUT_DATA outputData;
|
||||||
|
|
||||||
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
||||||
Logger::err("DxgiOutput: Failed to query output data");
|
Logger::err("DXGI: Failed to query output data");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +250,7 @@ namespace dxvk {
|
|||||||
DXGI_VK_OUTPUT_DATA outputData;
|
DXGI_VK_OUTPUT_DATA outputData;
|
||||||
|
|
||||||
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
||||||
Logger::err("DxgiOutput: Failed to query output data");
|
Logger::err("DXGI: Failed to query output data");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +286,7 @@ namespace dxvk {
|
|||||||
DXGI_VK_OUTPUT_DATA outputData;
|
DXGI_VK_OUTPUT_DATA outputData;
|
||||||
|
|
||||||
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
if (FAILED(m_adapter->GetOutputData(m_monitor, &outputData))) {
|
||||||
Logger::err("DxgiOutput: Failed to query output data");
|
Logger::err("DXGI: Failed to query output data");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +294,7 @@ namespace dxvk {
|
|||||||
outputData.GammaDirty = TRUE;
|
outputData.GammaDirty = TRUE;
|
||||||
|
|
||||||
if (FAILED(m_adapter->SetOutputData(m_monitor, &outputData))) {
|
if (FAILED(m_adapter->SetOutputData(m_monitor, &outputData))) {
|
||||||
Logger::err("DxgiOutput: Failed to query output data");
|
Logger::err("DXGI: Failed to update output data");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
} return S_OK;
|
} return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace dxvk {
|
|||||||
// communicate with the underlying D3D device
|
// communicate with the underlying D3D device
|
||||||
if (FAILED(pDevice->QueryInterface(__uuidof(IDXGIVkPresenter),
|
if (FAILED(pDevice->QueryInterface(__uuidof(IDXGIVkPresenter),
|
||||||
reinterpret_cast<void**>(&m_presentDevice))))
|
reinterpret_cast<void**>(&m_presentDevice))))
|
||||||
throw DxvkError("DxgiSwapChain::DxgiSwapChain: Invalid device");
|
throw DxvkError("DXGI: DxgiSwapChain: Invalid device");
|
||||||
|
|
||||||
// Retrieve the adapter, which is going
|
// Retrieve the adapter, which is going
|
||||||
// to be used to enumerate displays.
|
// to be used to enumerate displays.
|
||||||
@ -25,10 +25,10 @@ namespace dxvk {
|
|||||||
Com<IDXGIAdapter> adapter;
|
Com<IDXGIAdapter> adapter;
|
||||||
|
|
||||||
if (FAILED(pDevice->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast<void**>(&device))))
|
if (FAILED(pDevice->QueryInterface(__uuidof(IDXGIDevice), reinterpret_cast<void**>(&device))))
|
||||||
throw DxvkError("DxgiSwapChain::DxgiSwapChain: Invalid device");
|
throw DxvkError("DXGI: DxgiSwapChain: Invalid device");
|
||||||
|
|
||||||
if (FAILED(device->GetAdapter(&adapter)))
|
if (FAILED(device->GetAdapter(&adapter)))
|
||||||
throw DxvkError("DxgiSwapChain::DxgiSwapChain: Failed to retrieve adapter");
|
throw DxvkError("DXGI: DxgiSwapChain: Failed to retrieve adapter");
|
||||||
|
|
||||||
m_device = static_cast<DxgiDevice*>(device.ptr());
|
m_device = static_cast<DxgiDevice*>(device.ptr());
|
||||||
m_adapter = static_cast<DxgiAdapter*>(adapter.ptr());
|
m_adapter = static_cast<DxgiAdapter*>(adapter.ptr());
|
||||||
@ -49,13 +49,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Set initial window mode and fullscreen state
|
// Set initial window mode and fullscreen state
|
||||||
if (!pDesc->Windowed && FAILED(EnterFullscreenMode(nullptr)))
|
if (!pDesc->Windowed && FAILED(EnterFullscreenMode(nullptr)))
|
||||||
throw DxvkError("DxgiSwapChain: Failed to set initial fullscreen state");
|
throw DxvkError("DXGI: DxgiSwapChain: Failed to set initial fullscreen state");
|
||||||
|
|
||||||
if (FAILED(CreatePresenter()) || FAILED(CreateBackBuffer()))
|
if (FAILED(CreatePresenter()) || FAILED(CreateBackBuffer()))
|
||||||
throw DxvkError("DxgiSwapChain: Failed to create presenter or back buffer");
|
throw DxvkError("DXGI: DxgiSwapChain: Failed to create presenter or back buffer");
|
||||||
|
|
||||||
if (FAILED(SetDefaultGammaControl()))
|
if (FAILED(SetDefaultGammaControl()))
|
||||||
throw DxvkError("DxgiSwapChain: Failed to set up gamma ramp");
|
throw DxvkError("DXGI: DxgiSwapChain: Failed to set up gamma ramp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ namespace dxvk {
|
|||||||
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
|
||||||
if (FAILED(GetSampleCount(m_desc.SampleDesc.Count, &sampleCount))) {
|
if (FAILED(GetSampleCount(m_desc.SampleDesc.Count, &sampleCount))) {
|
||||||
Logger::err("DxgiSwapChain: Invalid sample count");
|
Logger::err("DXGI: CreateBackBuffer: Invalid sample count");
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ namespace dxvk {
|
|||||||
m_backBuffer = nullptr;
|
m_backBuffer = nullptr;
|
||||||
|
|
||||||
if (FAILED(m_presentDevice->CreateSwapChainBackBuffer(&m_desc, &m_backBuffer))) {
|
if (FAILED(m_presentDevice->CreateSwapChainBackBuffer(&m_desc, &m_backBuffer))) {
|
||||||
Logger::err("DxgiSwapChain: Failed to create back buffer");
|
Logger::err("DXGI: CreateBackBuffer: Failed to create back buffer");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (output == nullptr) {
|
if (output == nullptr) {
|
||||||
if (FAILED(GetContainingOutput(&output))) {
|
if (FAILED(GetContainingOutput(&output))) {
|
||||||
Logger::err("DxgiSwapChain: Failed to enter fullscreen mode: Cannot query containing output");
|
Logger::err("DXGI: EnterFullscreenMode: Cannot query containing output");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user