GPU: Restart when changing inflight frames setting.

We need to keep the push and pull in step, so changing at runtime is
messy.
This commit is contained in:
Unknown W. Brackets committed 2020-03-02 19:21:15 -08:00
1 parent fa8968f5c6
commit 051a84e9bd
15 files changed
+44 -24

No files matched your search

+6 -4
View File
@@ -202,6 +202,12 @@ void VulkanRenderManager::CreateBackbuffers() {
VLOG("Backbuffers Created");
}
if (newInflightFrames_ != -1) {
ILOG("Updating inflight frames to %d", newInflightFrames_);
vulkan_->UpdateInflightFrames(newInflightFrames_);
newInflightFrames_ = -1;
}
// Start the thread.
if (useThread_ && HasBackbuffers()) {
run_ = true;
@@ -914,10 +920,6 @@ void VulkanRenderManager::Finish() {
frameData.pull_condVar.notify_all();
}
vulkan_->EndFrame();
if (newInflightFrames_ != -1) {
vulkan_->UpdateInflightFrames(newInflightFrames_);
newInflightFrames_ = -1;
}
insideFrame_ = false;
}