Readback fix

This commit is contained in:
Henrik Rydgård
2022-09-23 19:45:50 +02:00
parent ef7c8844f8
commit f6c78584f6

View File

@@ -146,11 +146,8 @@ void FrameData::SubmitPending(VulkanContext *vulkan, FrameSubmitType type, Frame
hasPresentCommands = false;
if (type == FrameSubmitType::Present) {
NOTICE_LOG(G3D, "Has present commands, Triggering fence");
fenceToTrigger = fence;
}
} else {
NOTICE_LOG(G3D, "No present commands, not triggering fence");
}
if (!numCmdBufs && fenceToTrigger == VK_NULL_HANDLE) {
@@ -183,6 +180,7 @@ void FrameData::SubmitPending(VulkanContext *vulkan, FrameSubmitType type, Frame
// Hard stall of the GPU, not ideal, but necessary so the CPU has the contents of the readback.
vkWaitForFences(vulkan->GetDevice(), 1, &readbackFence, true, UINT64_MAX);
vkResetFences(vulkan->GetDevice(), 1, &readbackFence);
syncDone = true;
}
}