Merge pull request #5478 from stenzek/vulkan-nvidia

Vulkan: Don't use vkCmdClearAttachments on NVIDIA with MSAA
This commit is contained in:
Anthony 2017-08-14 13:12:41 -07:00 committed by GitHub
commit 6a272f22de
3 changed files with 12 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include "VideoCommon/AVIDump.h" #include "VideoCommon/AVIDump.h"
#include "VideoCommon/BPFunctions.h" #include "VideoCommon/BPFunctions.h"
#include "VideoCommon/BPMemory.h" #include "VideoCommon/BPMemory.h"
#include "VideoCommon/DriverDetails.h"
#include "VideoCommon/OnScreenDisplay.h" #include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h" #include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h" #include "VideoCommon/PixelShaderManager.h"
@ -391,6 +392,8 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha
// Fast path: Use vkCmdClearAttachments to clear the buffers within a render path // Fast path: Use vkCmdClearAttachments to clear the buffers within a render path
// We can't use this when preserving alpha but clearing color. // We can't use this when preserving alpha but clearing color.
if (g_ActiveConfig.iMultisamples == 1 ||
!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS))
{ {
VkClearAttachment clear_attachments[2]; VkClearAttachment clear_attachments[2];
uint32_t num_clear_attachments = 0; uint32_t num_clear_attachments = 0;

View File

@ -101,7 +101,9 @@ static BugInfo m_known_bugs[] = {
{API_OPENGL, OS_LINUX, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN, {API_OPENGL, OS_LINUX, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN,
BUG_SHARED_CONTEXT_SHADER_COMPILATION, -1.0, -1.0, true}, BUG_SHARED_CONTEXT_SHADER_COMPILATION, -1.0, -1.0, true},
{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,
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS, -1.0, -1.0, true}};
static std::map<Bug, BugInfo> m_bugs; static std::map<Bug, BugInfo> m_bugs;

View File

@ -253,6 +253,12 @@ enum Bug
// Started version: -1 // Started version: -1
// Ended Version: -1 // Ended Version: -1
BUG_SHARED_CONTEXT_SHADER_COMPILATION, BUG_SHARED_CONTEXT_SHADER_COMPILATION,
// Bug: vkCmdClearAttachments with MSAA enabled causes NVIDIA Maxwell+ cards to lock up.
// Started version: -1
// Ended version: -1
// Seems to only occur when the top of the clear rect is non-zero.
BUG_BROKEN_MSAA_VKCMDCLEARATTACHMENTS,
}; };
// Initializes our internal vendor, device family, and driver version // Initializes our internal vendor, device family, and driver version