Fix missing GPU events when using shaders profiling/debugging or graphics dev tools are enabled

This commit is contained in:
Wojtek Figat
2024-07-03 18:29:42 +02:00
parent b3d77ab9eb
commit b8100e9417
5 changed files with 23 additions and 11 deletions

View File

@@ -188,11 +188,13 @@ bool GraphicsService::Init()
);
// Initialize
if (device->IsDebugToolAttached)
if (device->IsDebugToolAttached ||
CommandLine::Options.ShaderProfile ||
CommandLine::Options.ShaderDebug)
{
#if COMPILE_WITH_PROFILER
// Auto-enable GPU profiler
ProfilerGPU::Enabled = true;
// Auto-enable GPU events
ProfilerGPU::EventsEnabled = true;
#endif
}
if (device->LoadContent())