Merge pull request #3518 from Sonicadvance1/blacklist_sandy
Blacklist Sandy Bridge on mesa from using geometry shaders.
This commit is contained in:
commit
be1a9e4231
|
@ -132,8 +132,8 @@ static void InitDriverInfo()
|
|||
std::string sversion = std::string(g_ogl_config.gl_version);
|
||||
DriverDetails::Vendor vendor = DriverDetails::VENDOR_UNKNOWN;
|
||||
DriverDetails::Driver driver = DriverDetails::DRIVER_UNKNOWN;
|
||||
DriverDetails::Family family = DriverDetails::Family::UNKNOWN;
|
||||
double version = 0.0;
|
||||
u32 family = 0;
|
||||
|
||||
// Get the vendor first
|
||||
if (svendor == "NVIDIA Corporation" && srenderer != "NVIDIA Tegra")
|
||||
|
@ -210,11 +210,21 @@ static void InitDriverInfo()
|
|||
case DriverDetails::VENDOR_MESA:
|
||||
{
|
||||
if (svendor == "nouveau")
|
||||
{
|
||||
driver = DriverDetails::DRIVER_NOUVEAU;
|
||||
}
|
||||
else if (svendor == "Intel Open Source Technology Center")
|
||||
{
|
||||
driver = DriverDetails::DRIVER_I965;
|
||||
if (srenderer.find("Sandybridge") != std::string::npos)
|
||||
family = DriverDetails::Family::INTEL_SANDY;
|
||||
else if (srenderer.find("Ivybridge") != std::string::npos)
|
||||
family = DriverDetails::Family::INTEL_IVY;
|
||||
}
|
||||
else if (std::string::npos != srenderer.find("AMD") || std::string::npos != srenderer.find("ATI"))
|
||||
{
|
||||
driver = DriverDetails::DRIVER_R600;
|
||||
}
|
||||
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
|
@ -225,7 +235,22 @@ static void InitDriverInfo()
|
|||
break;
|
||||
case DriverDetails::VENDOR_INTEL: // Happens in OS X/Windows
|
||||
{
|
||||
sscanf(g_ogl_config.gl_renderer, "Intel HD Graphics %d", &family);
|
||||
u32 market_name;
|
||||
sscanf(g_ogl_config.gl_renderer, "Intel HD Graphics %d", &market_name);
|
||||
switch (market_name)
|
||||
{
|
||||
case 2000:
|
||||
case 3000:
|
||||
family = DriverDetails::Family::INTEL_SANDY;
|
||||
break;
|
||||
case 2500:
|
||||
case 4000:
|
||||
family = DriverDetails::Family::INTEL_IVY;
|
||||
break;
|
||||
default:
|
||||
family = DriverDetails::Family::UNKNOWN;
|
||||
break;
|
||||
};
|
||||
#ifdef _WIN32
|
||||
int glmajor = 0;
|
||||
int glminor = 0;
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace DriverDetails
|
|||
u32 m_os; // Which OS has the issue
|
||||
Vendor m_vendor; // Which vendor has the error
|
||||
Driver m_driver; // Which driver has the error
|
||||
s32 m_family; // Which family of hardware has the issue
|
||||
Family m_family; // Which family of hardware has the issue
|
||||
Bug m_bug; // Which bug it is
|
||||
double m_versionstart; // When it started
|
||||
double m_versionend; // When it ended
|
||||
|
@ -36,35 +36,36 @@ namespace DriverDetails
|
|||
|
||||
static Vendor m_vendor = VENDOR_UNKNOWN;
|
||||
static Driver m_driver = DRIVER_UNKNOWN;
|
||||
static s32 m_family = 0;
|
||||
static Family m_family = Family::UNKNOWN;
|
||||
static double m_version = 0.0;
|
||||
|
||||
// This is a list of all known bugs for each vendor
|
||||
// We use this to check if the device and driver has a issue
|
||||
static BugInfo m_known_bugs[] = {
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENNEGATEDBOOLEAN,-1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENGLES31, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENALPHATEST, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_ARM, DRIVER_ARM, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_ARM, DRIVER_ARM, -1, BUG_BROKENVSYNC, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_IMGTEC, DRIVER_IMGTEC, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, -1, BUG_BROKENUBO, 900, 916, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_R600, -1, BUG_BROKENUBO, 900, 913, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_R600, -1, BUG_BROKENGEOMETRYSHADERS, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_I965, -1, BUG_BROKENUBO, 900, 920, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_ALL, -1, BUG_BROKENCOPYIMAGE, -1.0, 1064.0, true},
|
||||
{OS_LINUX, VENDOR_ATI, DRIVER_ATI, -1, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
|
||||
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENBUFFERSTORAGE, -1.0, 33138.0, true},
|
||||
{OS_OSX, VENDOR_INTEL, DRIVER_INTEL, 3000, BUG_PRIMITIVERESTART, -1.0, -1.0, true},
|
||||
{OS_WINDOWS,VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
|
||||
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
|
||||
{OS_WINDOWS,VENDOR_INTEL, DRIVER_INTEL, -1, BUG_INTELBROKENBUFFERSTORAGE, 101810.3907, 101810.3960, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, Family::UNKNOWN, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, Family::UNKNOWN, BUG_BROKENNEGATEDBOOLEAN,-1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, Family::UNKNOWN, BUG_BROKENGLES31, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, Family::UNKNOWN, BUG_BROKENALPHATEST, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_ARM, DRIVER_ARM, Family::UNKNOWN, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_ARM, DRIVER_ARM, Family::UNKNOWN, BUG_BROKENVSYNC, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_IMGTEC, DRIVER_IMGTEC, Family::UNKNOWN, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, Family::UNKNOWN, BUG_BROKENUBO, 900, 916, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_R600, Family::UNKNOWN, BUG_BROKENUBO, 900, 913, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_R600, Family::UNKNOWN, BUG_BROKENGEOMETRYSHADERS, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_I965, Family::INTEL_SANDY, BUG_BROKENGEOMETRYSHADERS, -1.0, -1.0, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN, BUG_BROKENUBO, 900, 920, true},
|
||||
{OS_ALL, VENDOR_MESA, DRIVER_ALL, Family::UNKNOWN, BUG_BROKENCOPYIMAGE, -1.0, 1064.0, true},
|
||||
{OS_LINUX, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
|
||||
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN, BUG_BROKENBUFFERSTORAGE, -1.0, 33138.0, true},
|
||||
{OS_OSX, VENDOR_INTEL, DRIVER_INTEL, Family::INTEL_SANDY, BUG_PRIMITIVERESTART, -1.0, -1.0, true},
|
||||
{OS_WINDOWS,VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
|
||||
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
|
||||
{OS_WINDOWS,VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN, BUG_INTELBROKENBUFFERSTORAGE, 101810.3907, 101810.3960, true},
|
||||
};
|
||||
|
||||
static std::map<Bug, BugInfo> m_bugs;
|
||||
|
||||
void Init(Vendor vendor, Driver driver, const double version, const s32 family)
|
||||
void Init(Vendor vendor, Driver driver, const double version, const Family family)
|
||||
{
|
||||
m_vendor = vendor;
|
||||
m_driver = driver;
|
||||
|
@ -99,7 +100,7 @@ namespace DriverDetails
|
|||
if (( bug.m_os & m_os ) &&
|
||||
( bug.m_vendor == m_vendor || bug.m_vendor == VENDOR_ALL ) &&
|
||||
( bug.m_driver == m_driver || bug.m_driver == DRIVER_ALL ) &&
|
||||
( bug.m_family == m_family || bug.m_family == -1) &&
|
||||
( bug.m_family == m_family || bug.m_family == Family::UNKNOWN) &&
|
||||
( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
|
||||
( bug.m_versionend > m_version || bug.m_versionend == -1 )
|
||||
)
|
||||
|
|
|
@ -52,6 +52,13 @@ namespace DriverDetails
|
|||
DRIVER_UNKNOWN // Unknown driver, default to official hardware driver
|
||||
};
|
||||
|
||||
enum class Family
|
||||
{
|
||||
UNKNOWN,
|
||||
INTEL_SANDY,
|
||||
INTEL_IVY,
|
||||
};
|
||||
|
||||
// Enum of known bugs
|
||||
// These can be vendor specific, but we put them all in here
|
||||
// For putting a new bug in here, make sure to put a detailed comment above the enum
|
||||
|
@ -182,16 +189,16 @@ namespace DriverDetails
|
|||
BUG_BROKENALPHATEST,
|
||||
|
||||
// Bug: Broken lines in geometry shaders
|
||||
// Affected Devices: Mesa r600/radeonsi
|
||||
// Affected Devices: Mesa r600/radeonsi, Mesa Sandy Bridge
|
||||
// Started Version: -1
|
||||
// Ended Version: -1
|
||||
// Mesa inroduced geometry shader support for radeon devices and failed to test it with us.
|
||||
// Mesa introduced geometry shader support for radeon and sandy bridge devices and failed to test it with us.
|
||||
// Causes misrenderings on a large amount of things that draw lines.
|
||||
BUG_BROKENGEOMETRYSHADERS,
|
||||
};
|
||||
|
||||
// Initializes our internal vendor, device family, and driver version
|
||||
void Init(Vendor vendor, Driver driver, const double version, const s32 family);
|
||||
void Init(Vendor vendor, Driver driver, const double version, const Family family);
|
||||
|
||||
// Once Vendor and driver version is set, this will return if it has the applicable bug passed to it.
|
||||
bool HasBug(Bug bug);
|
||||
|
|
Loading…
Reference in New Issue