From 2bdf0ee75da1d5e6d22eac648b45b6a70e302f6a Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Wed, 30 Aug 2023 09:09:46 -0700 Subject: [PATCH] more power-efficient busy-wait --- public/tracy/TracyD3D11.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/tracy/TracyD3D11.hpp b/public/tracy/TracyD3D11.hpp index d0e00292..07092861 100644 --- a/public/tracy/TracyD3D11.hpp +++ b/public/tracy/TracyD3D11.hpp @@ -39,6 +39,7 @@ using TracyD3D11Ctx = void*; #include "Tracy.hpp" #include "../client/TracyProfiler.hpp" #include "../client/TracyCallstack.hpp" +#include "../common/TracyYield.hpp" #include @@ -272,7 +273,7 @@ private: { m_immediateDevCtx->Flush(); while (m_immediateDevCtx->GetData(query, nullptr, 0, 0) != S_OK) - continue; // nothing; busy-wait... :-( + YieldThread(); // busy-wait :-( attempt to reduce power usage with _mm_pause() & friends... } tracy_force_inline uint8_t GetContextId() const