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:
commit
7a4348b641
|
@ -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
|
// 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.
|
// to discard the data, rather than loading and then clearing.
|
||||||
bool use_clear_render_pass = (color_enable && alpha_enable && z_enable);
|
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())
|
if (StateTracker::GetInstance()->InRenderPass())
|
||||||
{
|
{
|
||||||
// Prefer not to end a render pass just to do a clear.
|
// Prefer not to end a render pass just to do a clear.
|
||||||
|
|
|
@ -103,7 +103,10 @@ static BugInfo m_known_bugs[] = {
|
||||||
{API_OPENGL, OS_LINUX, VENDOR_MESA, DRIVER_NOUVEAU, Family::UNKNOWN,
|
{API_OPENGL, OS_LINUX, VENDOR_MESA, DRIVER_NOUVEAU, Family::UNKNOWN,
|
||||||
BUG_SHARED_CONTEXT_SHADER_COMPILATION, -1.0, -1.0, true},
|
BUG_SHARED_CONTEXT_SHADER_COMPILATION, -1.0, -1.0, true},
|
||||||
{API_VULKAN, OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN,
|
{API_VULKAN, OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN,
|
||||||
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS, -1.0, -1.0, true}};
|
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS, -1.0, -1.0, true},
|
||||||
|
{API_VULKAN, OS_ALL, VENDOR_IMGTEC, DRIVER_IMGTEC, Family::UNKNOWN,
|
||||||
|
BUG_BROKEN_CLEAR_LOADOP_RENDERPASS, -1.0, -1.0, true},
|
||||||
|
};
|
||||||
|
|
||||||
static std::map<Bug, BugInfo> m_bugs;
|
static std::map<Bug, BugInfo> m_bugs;
|
||||||
|
|
||||||
|
@ -185,6 +188,9 @@ Vendor TranslatePCIVendorID(u32 vendor_id)
|
||||||
case 0x5143:
|
case 0x5143:
|
||||||
return VENDOR_QUALCOMM;
|
return VENDOR_QUALCOMM;
|
||||||
|
|
||||||
|
case 0x1010:
|
||||||
|
return VENDOR_IMGTEC;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return VENDOR_UNKNOWN;
|
return VENDOR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,6 +259,13 @@ enum Bug
|
||||||
// Ended version: -1
|
// Ended version: -1
|
||||||
// Seems to only occur when the top of the clear rect is non-zero.
|
// Seems to only occur when the top of the clear rect is non-zero.
|
||||||
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS,
|
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS,
|
||||||
|
// BUG: Some vulkan implementations don't like the 'clear' loadop renderpass.
|
||||||
|
// For example, the ImgTec VK driver fails if you try to use a framebuffer with a different
|
||||||
|
// load/store op than that which it was created with, despite the spec saying they should be
|
||||||
|
// compatible.
|
||||||
|
// Started Version: 1.7
|
||||||
|
// Ended Version: 1.10
|
||||||
|
BUG_BROKEN_CLEAR_LOADOP_RENDERPASS,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initializes our internal vendor, device family, and driver version
|
// Initializes our internal vendor, device family, and driver version
|
||||||
|
|
Loading…
Reference in New Issue