Vulkan: Don't merge render passes where the second one begins with a clear.

God of War optimization survives this check, thankfully.

Force Unleashed doesn't, but meh, it's not as bad there anyway.
This commit is contained in:
Henrik Rydgård 2020-05-10 23:09:49 +02:00
parent d8923dff5c
commit a34c773b13

View file

@ -776,7 +776,10 @@ void VulkanQueueRunner::ApplyRenderPassMerge(std::vector<VKRStep *> &steps) {
if (steps[j]->dependencies.contains(touchedFramebuffers)) {
goto done_fb;
}
if (steps[j]->render.framebuffer == fb) {
if (steps[j]->render.framebuffer == fb &&
steps[j]->render.color != VKRRenderPassAction::CLEAR &&
steps[j]->render.depth != VKRRenderPassAction::CLEAR &&
steps[j]->render.stencil != VKRRenderPassAction::CLEAR) {
// ok. Now, if it's a render, slurp up all the commands
// and kill the step.
// Also slurp up any pretransitions.