From d579ed3cce1e5ef833bf31584f3f09e67bdeb098 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 13 Aug 2026 18:31:27 +0200 Subject: [PATCH] Fix VSync on 32-bit win32 targets. The struct sizes are kernel sizes. A 64-bit kernel is required for tracing anyway. --- public/client/windows/TracyETW.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/client/windows/TracyETW.cpp b/public/client/windows/TracyETW.cpp index 4ddc9292..88ced71d 100644 --- a/public/client/windows/TracyETW.cpp +++ b/public/client/windows/TracyETW.cpp @@ -117,17 +117,17 @@ static_assert( offsetof( StackWalkEvent, stack ) == 16, "unexpected StackWalkEve struct VSyncDPC { static constexpr USHORT EventId = 17; // 0x11 - void* dxgAdapter; + uint64_t dxgAdapter; uint32_t vidPnTargetId; uint64_t scannedPhysicalAddress; uint32_t vidPnSourceId; uint32_t frameNumber; int64_t frameQpcTime; - void* hFlipDevice; + uint64_t hFlipDevice; uint32_t flipType; uint64_t flipFenceId; }; -static_assert( sizeof( VSyncDPC ) == 64, "unexpected VSyncInfo struct size/alignment" ); +static_assert( sizeof( VSyncDPC ) == 64, "unexpected VSyncDPC struct size/alignment" ); // -------------------------- @@ -517,6 +517,8 @@ static ULONG EnableContextSwitchMonitoring( Session& session ) static ULONG EnableVSyncMonitoring( Session& session ) { + if( !IsOS64Bit() ) + return 0 /* ERROR_SUCCESS */; // TODO: fabricate SetLastError(ERROR_NOT_SUPPORTED) instead? // TODO: is this correct? #if ( _WIN32_WINNT < _WIN32_WINNT_WINBLUE ) return ETWError( ERROR_NOT_SUPPORTED );