vk: remove unnecessary flush and gc (#7207)
This commit is contained in:
@@ -290,9 +290,11 @@ void VulkanDriver::setPresentationTime(int64_t monotonic_clock_ns) {
|
||||
}
|
||||
|
||||
void VulkanDriver::endFrame(uint32_t frameId) {
|
||||
if (mCommands->flush()) {
|
||||
collectGarbage();
|
||||
}
|
||||
FVK_SYSTRACE_CONTEXT();
|
||||
FVK_SYSTRACE_START("endframe");
|
||||
mCommands->flush();
|
||||
collectGarbage();
|
||||
FVK_SYSTRACE_END();
|
||||
}
|
||||
|
||||
void VulkanDriver::flush(int) {
|
||||
@@ -1370,10 +1372,6 @@ void VulkanDriver::commit(Handle<HwSwapChain> sch) {
|
||||
|
||||
VulkanSwapChain* swapChain = mResourceAllocator.handle_cast<VulkanSwapChain*>(sch);
|
||||
|
||||
if (mCommands->flush()) {
|
||||
collectGarbage();
|
||||
}
|
||||
|
||||
// Present the backbuffer after the most recent command buffer submission has finished.
|
||||
swapChain->present();
|
||||
FVK_SYSTRACE_END();
|
||||
|
||||
@@ -88,8 +88,8 @@ void VulkanSwapChain::present() {
|
||||
.layerCount = 1,
|
||||
};
|
||||
mColors[mCurrentSwapIndex]->transitionLayout(cmdbuf, subresources, VulkanLayout::PRESENT);
|
||||
mCommands->flush();
|
||||
}
|
||||
mCommands->flush();
|
||||
VkSemaphore const finishedDrawing = mCommands->acquireFinishedSignal();
|
||||
VkResult const result = mPlatform->present(swapChain, mCurrentSwapIndex, finishedDrawing);
|
||||
ASSERT_POSTCONDITION(result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR
|
||||
|
||||
Reference in New Issue
Block a user