Fix startup failure on older CPUs that don't support invariant TSC
#580
This commit is contained in:
@@ -228,6 +228,7 @@ static int64_t SetupHwTimer()
|
||||
uint32_t regs[4];
|
||||
CpuId( regs, 1 );
|
||||
if( !( regs[3] & ( 1 << 4 ) ) ) InitFailure( "CPU doesn't support RDTSC instruction." );
|
||||
#if !defined TRACY_NO_INVARIANT_CHECK
|
||||
CpuId( regs, 0x80000007 );
|
||||
if( !( regs[3] & ( 1 << 8 ) ) )
|
||||
{
|
||||
@@ -241,6 +242,7 @@ static int64_t SetupHwTimer()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return Profiler::GetTime();
|
||||
|
||||
3
Source/ThirdParty/tracy/tracy.Build.cs
vendored
3
Source/ThirdParty/tracy/tracy.Build.cs
vendored
@@ -34,7 +34,10 @@ public class tracy : ThirdPartyModule
|
||||
|
||||
options.PublicDefinitions.Add("TRACY_ENABLE");
|
||||
if (options.Platform.Target == TargetPlatform.Windows)
|
||||
{
|
||||
options.PrivateDefinitions.Add("TRACY_DBGHELP_LOCK=DbgHelp");
|
||||
options.PrivateDefinitions.Add("TRACY_NO_INVARIANT_CHECK");
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user