From 4e58264035197b4b34fa3313cf69556ee84419f5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 30 Aug 2021 13:15:59 +0100 Subject: [PATCH] Don't include inf/nan times in summation * These can be generated by buggy drivers particularly on GL, so try to mitigate the effect of that. --- qrenderdoc/Windows/EventBrowser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index d9e885491..0f92eacd5 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -991,6 +991,9 @@ private: if(a.eventId >= m_Times.size()) continue; + if(qIsNaN(m_Times[a.eventId]) || qIsInf(m_Times[a.eventId])) + continue; + // add the time for this event, if it's non-negative. Because we fill out nodes in reverse // order, any children that are nodes themselves should be populated by now duration += qMax(0.0, m_Times[a.eventId]);