Merge pull request #5649 from JonnyH/WIP/disable-vk-clear-renderpass

Add DriverDetails::BUG to Disable "LoadOp" clear renderpass in vulkan
This commit is contained in:
Stenzek
2017-09-03 13:49:51 +10:00
committed by GitHub
3 changed files with 20 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.