Add Bug to Disable "LoadOp" clear renderpass in vulkan

This optimisation doesn't work on PowerVR's Vulkan implementation. We
(incorrectly) disallow Framebuffer objects to be used with a different
load or store op than that which they were created with, despite the
spec allowing such.

This fixes the windwaker intro "smearing"
This commit is contained in:
Jonathan Hamilton
2017-06-19 18:46:17 -07:00
parent 11057649ee
commit 62e8d25cd1
3 changed files with 17 additions and 1 deletions

View File

@ -376,6 +376,12 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha
// If we're not in a render pass (start of the frame), we can use a clear render pass
// to discard the data, rather than loading and then clearing.
bool use_clear_render_pass = (color_enable && alpha_enable && z_enable);
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_CLEAR_LOADOP_RENDERPASS))
{
// This path cannot be used if the driver implementation doesn't guarantee pixels with no drawn
// geomerty in "this" renderpass won't be cleared
use_clear_render_pass = false;
}
if (StateTracker::GetInstance()->InRenderPass())
{
// Prefer not to end a render pass just to do a clear.