From b9ce48f649840505262b6c0f10072a88c59aaaaf Mon Sep 17 00:00:00 2001 From: Person Date: Thu, 9 Apr 2020 15:41:49 -0700 Subject: [PATCH] --Bug fixes -ETA time was wrong with incremental final renders after waiting for a period of time. --Code changes -Small change to prevent parsing error when using tbb on some systems. --- Source/Ember/EmberPch.h | 8 +++++--- Source/Ember/Renderer.cpp | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/Ember/EmberPch.h b/Source/Ember/EmberPch.h index 106f251..500f80e 100644 --- a/Source/Ember/EmberPch.h +++ b/Source/Ember/EmberPch.h @@ -66,9 +66,11 @@ #include "libxml2/libxml/parser.h" #endif -//Intel's Threading Building Blocks is what's used for all threading. -#include -#include +#if !defined(Q_MOC_RUN) + //Intel's Threading Building Blocks is what's used for all threading. + #include + #include +#endif #define GLM_FORCE_RADIANS 1 #define GLM_ENABLE_EXPERIMENTAL 1 diff --git a/Source/Ember/Renderer.cpp b/Source/Ember/Renderer.cpp index 209b14f..e7ef60a 100644 --- a/Source/Ember/Renderer.cpp +++ b/Source/Ember/Renderer.cpp @@ -390,12 +390,12 @@ eRenderStatus Renderer::Run(vector& finalImage, double time, si if (!resume)//Only set this if it's the first run through. m_ProcessState = eProcessState::ITER_STARTED; - m_RenderTimer.Tic(); m_ProgressTimer.Tic(); } if (!resume)//Beginning, reset everything. { + m_RenderTimer.Tic(); m_LastTemporalSample = 0; m_LastIter = 0; m_LastIterPercent = 0; @@ -409,6 +409,7 @@ eRenderStatus Renderer::Run(vector& finalImage, double time, si //User requested an increase in quality after finishing. else if (m_ProcessState == eProcessState::ITER_STARTED && m_ProcessAction == eProcessAction::KEEP_ITERATING && TemporalSamples() == 1) { + m_RenderTimer.Tic(); m_LastTemporalSample = 0; m_LastIter = m_Stats.m_Iters; m_LastIterPercent = 0;//Might skip a progress update, but shouldn't matter. @@ -697,7 +698,7 @@ AccumOnly: if (AccumulatorToFinalImage(finalImage, finalOffset) == eRenderStatus::RENDER_OK) { - m_Stats.m_RenderMs = m_RenderTimer.Toc();//Record total time from the very beginning to the very end, including all intermediate calls. + m_Stats.m_RenderMs += m_RenderTimer.Toc();//Record total time from the very beginning to the very end, including all intermediate calls. //Even though the ember changes throughought the inner loops because of interpolation, it's probably ok to assign here. //This will hold the last interpolated value (even though spatial and temporal filters were created based off of one of the first interpolated values). m_LastEmber = m_Ember;