mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 19:45:33 +00:00
D3D12Device: Fix GPU-based validation being unconditionally enabled
This commit is contained in:
parent
f55961593a
commit
a9f1dd20c3
@ -191,16 +191,19 @@ bool D3D12Device::CreateDeviceAndMainSwapChain(std::string_view adapter, Feature
|
|||||||
INFO_LOG("Enabling debug layer.");
|
INFO_LOG("Enabling debug layer.");
|
||||||
debug12->EnableDebugLayer();
|
debug12->EnableDebugLayer();
|
||||||
|
|
||||||
ComPtr<ID3D12Debug1> debug12_1;
|
if (m_debug_device_gpu_validation)
|
||||||
if (SUCCEEDED(debug12.As(&debug12_1)))
|
|
||||||
{
|
{
|
||||||
INFO_LOG("Enabling GPU-based validation.");
|
ComPtr<ID3D12Debug1> debug12_1;
|
||||||
debug12_1->SetEnableGPUBasedValidation(true);
|
if (SUCCEEDED(debug12.As(&debug12_1)))
|
||||||
}
|
{
|
||||||
else
|
INFO_LOG("Enabling GPU-based validation.");
|
||||||
{
|
debug12_1->SetEnableGPUBasedValidation(true);
|
||||||
ERROR_LOG("GPU-based validation requested but not available.");
|
}
|
||||||
m_debug_device_gpu_validation = false;
|
else
|
||||||
|
{
|
||||||
|
ERROR_LOG("GPU-based validation requested but not available.");
|
||||||
|
m_debug_device_gpu_validation = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user