summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-12-31 15:41:50 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-12-31 15:41:50 -0600
commit8d8b0fc884367bc4d433d698a790ef5badee6957 (patch)
treea15158d7f38eea2f63432da4f75615ad5919571c /Source/Core/VideoCommon/Src
parent0b31fc8f52444964398b4d0253793c22e7f042b3 (diff)
parent6d63db96e962586b13ad343e26182f9e7be7cc2b (diff)
Merge branch 'master' into buffer_storage
Conflicts: Source/Core/VideoBackends/OGL/Src/Render.cpp Source/Core/VideoCommon/Src/DriverDetails.cpp Source/Core/VideoCommon/Src/DriverDetails.h
Diffstat (limited to 'Source/Core/VideoCommon/Src')
-rw-r--r--Source/Core/VideoCommon/Src/DriverDetails.cpp37
-rw-r--r--Source/Core/VideoCommon/Src/DriverDetails.h10
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderGen.cpp7
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.cpp7
4 files changed, 34 insertions, 27 deletions
diff --git a/Source/Core/VideoCommon/Src/DriverDetails.cpp b/Source/Core/VideoCommon/Src/DriverDetails.cpp
index f83804763e..4ab09b065f 100644
--- a/Source/Core/VideoCommon/Src/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/Src/DriverDetails.cpp
@@ -14,6 +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
Bug m_bug; // Which bug it is
double m_versionstart; // When it started
double m_versionend; // When it ended
@@ -33,35 +34,38 @@ namespace DriverDetails
Vendor m_vendor = VENDOR_UNKNOWN;
Driver m_driver = DRIVER_UNKNOWN;
+ s32 m_family = 0.0;
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
BugInfo m_known_bugs[] = {
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_NODYNUBOACCESS, 14.0, 46.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENCENTROID, 14.0, 46.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENINFOLOG, -1.0, 46.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENSWAP, -1.0, 46.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
- {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENTEXTURESIZE, -1.0, -1.0, true},
- {OS_ALL, VENDOR_ARM, DRIVER_ARM_T6XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
- {OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENUBO, 900, 916, true},
- {OS_ALL, VENDOR_MESA, DRIVER_R600, BUG_BROKENUBO, 900, 913, true},
- {OS_ALL, VENDOR_MESA, DRIVER_I965, BUG_BROKENUBO, 900, 920, true},
- {OS_ALL, VENDOR_ATI, DRIVER_ATI, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
- {OS_LINUX, VENDOR_ATI, DRIVER_ATI, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
- {OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
- {OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, BUG_BROKENBUFFERSTORAGE, -1.0, -1.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_NODYNUBOACCESS, 14.0, 46.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENCENTROID, 14.0, 46.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENSWAP, -1.0, 46.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
+ {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENTEXTURESIZE, -1.0, -1.0, true},
+ {OS_ALL, VENDOR_ARM, DRIVER_ARM_T6XX, -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_I965, -1, BUG_BROKENUBO, 900, 920, true},
+ {OS_ALL, VENDOR_ATI, DRIVER_ATI, -1, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
+ {OS_LINUX, VENDOR_ATI, DRIVER_ATI, -1, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
+ {OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, -1, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
+ {OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENBUFFERSTORAGE, -1.0, -1.0, true},
+ {OS_OSX, VENDOR_INTEL, DRIVER_INTEL, 3000, BUG_PRIMITIVERESTART, -1.0, -1.0, true},
};
std::map<Bug, BugInfo> m_bugs;
- void Init(Vendor vendor, Driver driver, const double version)
+ void Init(Vendor vendor, Driver driver, const double version, const s32 family)
{
m_vendor = vendor;
m_driver = driver;
m_version = version;
+ m_family = family;
if (driver == DRIVER_UNKNOWN)
switch(vendor)
@@ -92,6 +96,7 @@ namespace DriverDetails
( 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_versionstart <= m_version || bug.m_versionstart == -1 ) &&
( bug.m_versionend > m_version || bug.m_versionend == -1 )
)
diff --git a/Source/Core/VideoCommon/Src/DriverDetails.h b/Source/Core/VideoCommon/Src/DriverDetails.h
index dd8eeade69..cd4644be2d 100644
--- a/Source/Core/VideoCommon/Src/DriverDetails.h
+++ b/Source/Core/VideoCommon/Src/DriverDetails.h
@@ -149,10 +149,18 @@ namespace DriverDetails
// It reduces what is needed for streaming to basically a memcpy call
// It seems to work for all buffer types except GL_ARRAY_BUFFER
BUG_BROKENBUFFERSTORAGE,
+ // Bug: Intel HD 3000 on OS X has broken primitive restart
+ // Affected devices: Intel HD 3000
+ // Affected OS: OS X
+ // Started Version: -1
+ // Ended Version: -1
+ // The drivers on OS X has broken primitive restart.
+ // Intel HD 4000 series isn't affected by the bug
+ BUG_PRIMITIVERESTART,
};
// Initializes our internal vendor, device family, and driver version
- void Init(Vendor vendor, Driver driver, const double version);
+ void Init(Vendor vendor, Driver driver, const double version, const s32 family);
// Once Vendor and driver version is set, this will return if it has the applicable bug passed to it.
bool HasBug(Bug bug);
diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
index 78b3c57dda..f0cce5d750 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
@@ -411,13 +411,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
// divide
out.Write("o.pos.z = o.pos.w + o.pos.z * 2.0;\n");
- // Sonic Unleashed puts its final rendering at the near or
- // far plane of the viewing frustrum(actually box, they use
- // orthogonal projection for that), and we end up putting it
- // just beyond, and the rendering gets clipped away. (The
- // primitive gets dropped)
- out.Write("o.pos.z = o.pos.z * 1048575.0/1048576.0;\n");
-
// the next steps of the OGL pipeline are:
// (x_c,y_c,z_c,w_c) = o.pos //switch to OGL spec terminology
// clipping to -w_c <= (x_c,y_c,z_c) <= w_c
diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
index 5ec371a0ba..ca90077bc1 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
@@ -411,9 +411,10 @@ void VertexShaderManager::SetConstants()
g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f;
- // donkopunchstania: GC GPU rounds differently?
- // -(1 + epsilon) so objects are clipped as they are on the real HW
- g_fProjectionMatrix[14] = -1.00000011921f;
+ // donkopunchstania suggested the GC GPU might round differently
+ // He had thus changed this to -(1 + epsilon) to fix clipping issues.
+ // I (neobrain) don't think his conjecture is true and thus reverted his change.
+ g_fProjectionMatrix[14] = -1.0f;
g_fProjectionMatrix[15] = 0.0f;
SETSTAT_FT(stats.gproj_0, g_fProjectionMatrix[0]);