Permalink
Browse files

And yet another case of the same problem as the previous commit.

  • Loading branch information...
hrydgard committed Dec 10, 2017
1 parent cca4e0b commit 2031b2a4cd451525b6c3bf8f03e5228f817efe85
Showing with 4 additions and 0 deletions.
  1. +4 −0 ext/native/thin3d/VulkanRenderManager.cpp
@@ -707,12 +707,14 @@ void VulkanRenderManager::Finish() {
FrameData &frameData = frameData_[curFrame];
if (!useThread_) {
frameData.steps = std::move(steps_);
steps_.clear();
frameData.type = VKRRunType::END;
Run(curFrame);
} else {
std::unique_lock<std::mutex> lock(frameData.pull_mutex);
VLOG("PUSH: Frame[%d].readyForRun = true", curFrame);
frameData.steps = std::move(steps_);
steps_.clear();
frameData.readyForRun = true;
frameData.type = VKRRunType::END;
frameData.pull_condVar.notify_all();
@@ -902,12 +904,14 @@ void VulkanRenderManager::FlushSync() {
FrameData &frameData = frameData_[curFrame];
if (!useThread_) {
frameData.steps = std::move(steps_);
steps_.clear();
frameData.type = VKRRunType::SYNC;
Run(curFrame);
} else {
std::unique_lock<std::mutex> lock(frameData.pull_mutex);
VLOG("PUSH: Frame[%d].readyForRun = true (sync)", curFrame);
frameData.steps = std::move(steps_);
steps_.clear();
frameData.readyForRun = true;
assert(frameData.readyForFence == false);
frameData.type = VKRRunType::SYNC;

0 comments on commit 2031b2a

Please sign in to comment.