diff --git a/examples/WebGPUDemo/platform/platform_windows.cpp b/examples/WebGPUDemo/platform/platform_windows.cpp index 80ed4c7f..153531ca 100644 --- a/examples/WebGPUDemo/platform/platform_windows.cpp +++ b/examples/WebGPUDemo/platform/platform_windows.cpp @@ -15,10 +15,14 @@ #endif #include #include +#include #include "platform.h" #pragma comment(lib, "user32.lib") #pragma comment(lib, "gdi32.lib") +#pragma comment(lib, "dxguid.lib") // Dawn: WKPDID_D3DDebugObjectName +#pragma comment(lib, "OneCore") // Dawn: CompareObjectHandles +#pragma comment(lib, "ntdll.lib") // wgpu-native: NtReadFile et al. static HWND sHwnd = nullptr; static bool sRunning = false; diff --git a/public/tracy/TracyWebGPU.hpp b/public/tracy/TracyWebGPU.hpp index 8ca03175..0f35c4ed 100644 --- a/public/tracy/TracyWebGPU.hpp +++ b/public/tracy/TracyWebGPU.hpp @@ -74,6 +74,7 @@ using TracyWebGPUCtx = void*; #if TRACY_WEBGPU_DEBUG_LEVEL #define TracyWebGPUDebug(...) __VA_ARGS__; #if defined(_MSC_VER) +extern "C" int32_t IsDebuggerPresent(void); #define TracyWebGPUBreak() if (IsDebuggerPresent()) __debugbreak() #else #define TracyWebGPUBreak() ((void)0) @@ -226,7 +227,7 @@ namespace tracy // incremental regression: cpuToGpuModel.Update(tcpu, tgpu); wallToGpuModel.Update(twall, tgpu); - fprintf(stderr, "----- (sample accepted! wall = %lld | cpu = %lld | gpu = %lld | period = %f)\n", twall, tcpu, tgpu, Period()); + TracyWebGPUDebug( fprintf(stderr, "----- (sample accepted! wall = %lld | cpu = %lld | gpu = %lld | period = %f)\n", twall, tcpu, tgpu, Period()) ); return true; } } m_calibration;