From e38ab2260d21e2379f33a1782eea96a16203152d Mon Sep 17 00:00:00 2001 From: ZeWaka Date: Thu, 13 Nov 2025 01:15:45 -0800 Subject: [PATCH] fix CPUID parsing in TraceInfo the extended model was 4 bytes too low, as well as the extended family the extended family was also not properly masked and the reserved space bled into it fixes #1193 --- profiler/src/profiler/TracyView_TraceInfo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyView_TraceInfo.cpp b/profiler/src/profiler/TracyView_TraceInfo.cpp index 1b7a8425..a5cab9c6 100644 --- a/profiler/src/profiler/TracyView_TraceInfo.cpp +++ b/profiler/src/profiler/TracyView_TraceInfo.cpp @@ -899,8 +899,9 @@ void View::DrawInfo() const auto stepping = cpuId & 0xF; const auto baseModel = ( cpuId >> 4 ) & 0xF; const auto baseFamily = ( cpuId >> 8 ) & 0xF; - const auto extModel = ( cpuId >> 12 ) & 0xF; - const auto extFamily = ( cpuId >> 16 ); + // 12-15 unused + const auto extModel = ( cpuId >> 16 ) & 0xF; + const auto extFamily = ( cpuId >> 20 ) & 0xFF; const uint32_t model = ( baseFamily == 6 || baseFamily == 15 ) ? ( ( extModel << 4 ) | baseModel ) : baseModel; const uint32_t family = baseFamily == 15 ? baseFamily + extFamily : baseFamily;