Quick answer: Vulkan pipeline statistics queries returning 0 after a long-running session? Counter overflow at uint64 max - reset query pool periodically.

Triangle count counter is 18 quintillion (uint64 max). Frame after, it's 4.

Reset query pool

vkResetQueryPool(device, pool, 0, count);

Resets counters to zero. Call periodically (e.g., every 1000 frames).

Or use rolling deltas

Read counter, compare to previous, save current. Overflow is transparent as long as the delta is small.

Verify with sanity bounds

If a counter value is wildly outside expected range, treat as overflow; reset and discard sample.

“Counters wrap. Long sessions hit the wrap. Reset is the discipline.”

Add counter reset to your standard frame loop. Once a frame is cheap; once a session is fragile.

Related reading