D3D12Device: Fix GPU-based validation being unconditionally enabled

This commit is contained in:
Stenzek 2025-04-06 17:14:01 +10:00
parent f55961593a
commit a9f1dd20c3
No known key found for this signature in database

View File

@ -191,6 +191,8 @@ bool D3D12Device::CreateDeviceAndMainSwapChain(std::string_view adapter, Feature
INFO_LOG("Enabling debug layer.");
debug12->EnableDebugLayer();
if (m_debug_device_gpu_validation)
{
ComPtr<ID3D12Debug1> debug12_1;
if (SUCCEEDED(debug12.As(&debug12_1)))
{
@ -203,6 +205,7 @@ bool D3D12Device::CreateDeviceAndMainSwapChain(std::string_view adapter, Feature
m_debug_device_gpu_validation = false;
}
}
}
else
{
ERROR_LOG("Debug layer requested but not available.");