summaryrefslogtreecommitdiffstats
path: root/Projects
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-31 04:03:00 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-31 04:03:00 +0000
commit39301f3ff366f46074911662158d3c0697d58bec (patch)
treeb296ed8a9913d3efa83be42cbe2c8191c8b5e1d2 /Projects
parentAdded social media icons (diff)
downloadDiligentEngine-39301f3ff366f46074911662158d3c0697d58bec.tar.gz
DiligentEngine-39301f3ff366f46074911662158d3c0697d58bec.zip
Updated asteroids demo to call FinishFrame on deferred contexts; updated core & samples submodules
Diffstat (limited to 'Projects')
-rw-r--r--Projects/Asteroids/src/asteroids_DE.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp
index 0ac1b3c..033106c 100644
--- a/Projects/Asteroids/src/asteroids_DE.cpp
+++ b/Projects/Asteroids/src/asteroids_DE.cpp
@@ -666,7 +666,6 @@ void Asteroids::WorkerThreadFunc(Asteroids *pThis, Diligent::Uint32 ThreadNum)
// Increment number of completed threads
++pThis->m_NumThreadsCompleted;
}
-
}
void Asteroids::RenderSubset(Diligent::Uint32 SubsetNum,
@@ -804,6 +803,12 @@ void Asteroids::Render(float frameTime, const OrbitCamera& camera, const Setting
}
}
+ // Call FinishFrame() to release dynamic resources allocated by deferred contexts
+ // IMPORTANT: we must wait until the command lists are submitted for execution
+ // because FinishFrame() invalidates all dynamic resources
+ for(auto& ctx : mDeferredCtxt)
+ ctx->FinishFrame();
+
QueryPerformanceCounter((LARGE_INTEGER*)&currCounter);
mRenderTicks = currCounter-mRenderTicks;