Add SetStablePowerState for D3D12 when doing shaders profiling

This commit is contained in:
Wojtek Figat
2024-07-19 14:26:19 +02:00
parent 3f9989ea57
commit 3296337f40

View File

@@ -423,9 +423,12 @@ bool GPUDeviceDX12::Init()
}
}
#if BUILD_DEBUG && false
#if !BUILD_RELEASE
// Prevent the GPU from overclocking or under-clocking to get consistent timings
_device->SetStablePowerState(TRUE);
if (CommandLine::Options.ShaderProfile)
{
_device->SetStablePowerState(TRUE);
}
#endif
// Setup resources