From 93a08dc744daff2e7150bdf5775645d94567ace1 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 7 Feb 2021 18:37:03 -0800 Subject: Reworked ExecuteCommandList(+s) to take an array of command lists instead of one --- Projects/Asteroids/src/asteroids_DE.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Projects/Asteroids/src/asteroids_DE.cpp') diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp index 64fdc43..4e7a98c 100644 --- a/Projects/Asteroids/src/asteroids_DE.cpp +++ b/Projects/Asteroids/src/asteroids_DE.cpp @@ -1024,9 +1024,13 @@ void Asteroids::Render(float frameTime, const OrbitCamera& camera, const Setting // Reset mRenderSubsetsSignal while all threads are waiting for mUpdateSubsetsSignal mRenderSubsetsSignal.Reset(); + mCmdListPtrs.resize(mCmdLists.size()); + for(size_t i=0; i < mCmdLists.size(); ++i) + mCmdListPtrs[i] = mCmdLists[i]; + mDeviceCtxt->ExecuteCommandLists(static_cast(mCmdListPtrs.size()), mCmdListPtrs.data()); + for (auto& cmdList : mCmdLists) { - mDeviceCtxt->ExecuteCommandList(cmdList); // Release command lists now to release all outstanding references // In d3d11 mode, command lists hold references to the swap chain's back buffer // that cause swap chain resize to fail -- cgit v1.2.3