mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-02 14:16:53 +00:00
Vulkan Clear-renderpass merging: If a copy step is found that reads from the affected buffer, don't merge the clear into the later renderpass.
This commit is contained in:
parent
648b4eac51
commit
33a1e6a080
@ -286,6 +286,11 @@ void VulkanQueueRunner::RunSteps(VkCommandBuffer cmd, const std::vector<VKRStep
|
||||
// Cheaply skip the first step.
|
||||
steps[j]->stepType = VKRStepType::RENDER_SKIP;
|
||||
break;
|
||||
} else if (steps[i]->stepType == VKRStepType::COPY &&
|
||||
steps[i]->copy.src == steps[j]->render.framebuffer) {
|
||||
// Can't eliminate the clear if a game copies from it before it's
|
||||
// rendered to. However this should be rare.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -445,7 +450,7 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
|
||||
}
|
||||
}
|
||||
|
||||
// Don't execute empty renderpasses.
|
||||
// Don't execute empty renderpasses that keep the contents.
|
||||
if (step.commands.empty() && step.render.color == VKRRenderPassAction::KEEP && step.render.depth == VKRRenderPassAction::KEEP && step.render.stencil == VKRRenderPassAction::KEEP) {
|
||||
// Nothing to do.
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user