MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / FlushModifiedPresent

Function FlushModifiedPresent

PresentData/Debug.cpp:248–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void FlushModifiedPresent()
249{
250 if (gModifiedPresent == nullptr) return;
251
252 uint32_t changedCount = 0;
253
254#define FLUSH_MEMBER(_Fn, _Name) \
255 if (gModifiedPresent->_Name != gOriginalPresentValues._Name) { \
256 if (changedCount++ == 0) { \
257 wprintf(L"%*hsp%u", 17 + 6 + 6, "", gModifiedPresent->FrameId); \
258 } \
259 wprintf(L" " L#_Name L"="); \
260 _Fn(gModifiedPresent->_Name); \
261 }
262 FLUSH_MEMBER(PrintTimeDelta, TimeInPresent)
263 FLUSH_MEMBER(PrintTime, ReadyTime)
264 FLUSH_MEMBER(PrintTime, InputTime)
265 FLUSH_MEMBER(PrintTime, MouseClickTime)
266 FLUSH_MEMBER(PrintTime, GPUStartTime)
267 FLUSH_MEMBER(PrintTimeDelta, GPUDuration)
268 FLUSH_MEMBER(PrintTimeDelta, GPUVideoDuration)
269 FLUSH_MEMBER(PrintU64x, SwapChainAddress)
270 FLUSH_MEMBER(PrintU32, SyncInterval)
271 FLUSH_MEMBER(PrintU32, PresentFlags)
272 FLUSH_MEMBER(PrintU64x, Hwnd)
273 FLUSH_MEMBER(PrintU64x, DxgkPresentHistoryToken)
274 FLUSH_MEMBER(PrintU32, QueueSubmitSequence)
275 FLUSH_MEMBER(PrintU32, DriverThreadId)
276 FLUSH_MEMBER(PrintPresentMode, PresentMode)
277 FLUSH_MEMBER(PrintPresentResult, FinalState)
278 FLUSH_MEMBER(PrintBool, SupportsTearing)
279 FLUSH_MEMBER(PrintBool, WaitForFlipEvent)
280 FLUSH_MEMBER(PrintBool, WaitForMPOFlipEvent)
281 FLUSH_MEMBER(PrintBool, SeenDxgkPresent)
282 FLUSH_MEMBER(PrintBool, SeenWin32KEvents)
283 FLUSH_MEMBER(PrintBool, PresentInDwmWaitingStruct)
284 FLUSH_MEMBER(PrintBool, IsCompleted)
285 FLUSH_MEMBER(PrintBool, IsLost)
286 FLUSH_MEMBER(PrintBool, PresentFailed)
287 FLUSH_MEMBER(PrintBool, WaitingForPresentStop)
288 FLUSH_MEMBER(PrintBool, WaitingForFlipFrameType)
289 FLUSH_MEMBER(PrintBool, DoneWaitingForFlipFrameType)
290 FLUSH_MEMBER(PrintBool, WaitingForFrameId)
291#undef FLUSH_MEMBER
292
293 // Displayed
294 if (gModifiedPresent->Displayed != gOriginalPresentValues.Displayed) {
295 if (changedCount++ == 0) {
296 wprintf(L"%*hsp%u", 17 + 6 + 6, "", gModifiedPresent->FrameId);
297 }
298 wprintf(L" Displayed=");
299 auto first = true;
300 for (auto const& pr : gModifiedPresent->Displayed) {
301 wprintf(L"%c ", first ? L'[' : L',');
302 PrintFrameType(pr.first);
303 wprintf(L":");
304 PrintTime(pr.second);
305 first = false;

Callers 2

VerboseTraceEventImplFunction · 0.85

Calls 2

PrintFrameTypeFunction · 0.85
PrintTimeFunction · 0.85

Tested by

no test coverage detected