From 0fec69001bdad6772ff9feafc8c2a3a235665dde Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 19 Dec 2014 21:31:37 +0000 Subject: [PATCH 1/2] Fixes Adreno 400 slow performance. Adreno 300 and 400 have the same video driver performance issues because they are very similar architectures which use basically the same thing with everything. There isn't any need to detect the family of the driver with Qualcomm anyway. If we ever need family specific bugs then we can implement real support for that. Performance issue on Adreno 400 series was due to us only detecting Adreno 300 series, and with Adreno 400 it wouldn't use the bugs, which would cause it to use glBufferSubData, causing the huge performance hit. --- Source/Core/VideoBackends/OGL/Render.cpp | 5 +---- Source/Core/VideoCommon/DriverDetails.cpp | 18 +++++++++--------- Source/Core/VideoCommon/DriverDetails.h | 3 +-- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index cc52c47e03..4d02b9be64 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -266,10 +266,7 @@ static void InitDriverInfo() { case DriverDetails::VENDOR_QUALCOMM: { - if (std::string::npos != srenderer.find("Adreno (TM) 3")) - driver = DriverDetails::DRIVER_QUALCOMM_3XX; - else - driver = DriverDetails::DRIVER_QUALCOMM_2XX; + driver = DriverDetails::DRIVER_QUALCOMM; double glVersion; sscanf(g_ogl_config.gl_version, "OpenGL ES %lg V@%lg", &glVersion, &version); } diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index ccde499071..a70e600957 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -40,15 +40,15 @@ namespace DriverDetails // 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_3XX, -1, BUG_NODYNUBOACCESS, 14.0, 94.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, 65.0, true}, - {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENATTRIBUTELESS, -1.0, 94.0, true}, - {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENNEGATEDBOOLEAN,-1.0, -1.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_NODYNUBOACCESS, 14.0, 94.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENCENTROID, 14.0, 46.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENSWAP, -1.0, 46.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENTEXTURESIZE, -1.0, 65.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENATTRIBUTELESS, -1.0, 94.0, true}, + {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENNEGATEDBOOLEAN,-1.0, -1.0, true}, {OS_ALL, VENDOR_ARM, DRIVER_ARM_MIDGARD, -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}, diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h index 49371d3a03..a1b147af6e 100644 --- a/Source/Core/VideoCommon/DriverDetails.h +++ b/Source/Core/VideoCommon/DriverDetails.h @@ -45,8 +45,7 @@ namespace DriverDetails DRIVER_ARM_MIDGARD, // Official Mali driver DRIVER_ARM_UTGARD, // Official Mali driver DRIVER_LIMA, // OSS Mali driver - DRIVER_QUALCOMM_3XX, // Official Adreno driver 3xx - DRIVER_QUALCOMM_2XX, // Official Adreno driver 2xx + DRIVER_QUALCOMM, // Official Adreno driver DRIVER_FREEDRENO, // OSS Adreno driver DRIVER_IMGTEC, // OSS PowerVR driver DRIVER_VIVANTE, // Official vivante driver From 8c0e26d96987194bc04d77071a897a507d8bcaa4 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 19 Dec 2014 21:41:12 +0000 Subject: [PATCH 2/2] Minor changes to DriverDetails Fixes a typo where the official IMGTec drivers were said to be the OSS driver support. Removes Mali GPU family detection just like I removed the Adreno family detection. We don't support Mali Utgard anyway. If we need family detection we can properly add it, right now it isn't needed. --- Source/Core/VideoBackends/OGL/Render.cpp | 34 +++++++++-------------- Source/Core/VideoCommon/DriverDetails.cpp | 2 +- Source/Core/VideoCommon/DriverDetails.h | 7 ++--- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 4d02b9be64..9baeb286a6 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -275,28 +275,20 @@ static void InitDriverInfo() // Currently the Mali-T line has two families in it. // Mali-T6xx and Mali-T7xx // These two families are similar enough that they share bugs in their drivers. - if (std::string::npos != srenderer.find("Mali-T")) - { - driver = DriverDetails::DRIVER_ARM_MIDGARD; - // Mali drivers provide no way to explicitly find out what video driver is running. - // This is similar to how we can't find the Nvidia driver version in Windows. - // Good thing is that ARM introduces a new video driver about once every two years so we can - // find the driver version by the features it exposes. - // r2p0 - No OpenGL ES 3.0 support (We don't support this) - // r3p0 - OpenGL ES 3.0 support - // r4p0 - Supports 'GL_EXT_shader_pixel_local_storage' extension. + // + // Mali drivers provide no way to explicitly find out what video driver is running. + // This is similar to how we can't find the Nvidia driver version in Windows. + // Good thing is that ARM introduces a new video driver about once every two years so we can + // find the driver version by the features it exposes. + // r2p0 - No OpenGL ES 3.0 support (We don't support this) + // r3p0 - OpenGL ES 3.0 support + // r4p0 - Supports 'GL_EXT_shader_pixel_local_storage' extension. - if (GLExtensions::Supports("GL_EXT_shader_pixel_local_storage")) - version = 400; - else - version = 300; - } - else if (std::string::npos != srenderer.find("Mali-4") || - std::string::npos != srenderer.find("Mali-3") || - std::string::npos != srenderer.find("Mali-2")) - { - driver = DriverDetails::DRIVER_ARM_UTGARD; - } + driver = DriverDetails::DRIVER_ARM; + if (GLExtensions::Supports("GL_EXT_shader_pixel_local_storage")) + version = 400; + else + version = 300; break; case DriverDetails::VENDOR_MESA: { diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index a70e600957..dbcd45133f 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -49,7 +49,7 @@ namespace DriverDetails {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENTEXTURESIZE, -1.0, 65.0, true}, {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENATTRIBUTELESS, -1.0, 94.0, true}, {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM, -1, BUG_BROKENNEGATEDBOOLEAN,-1.0, -1.0, true}, - {OS_ALL, VENDOR_ARM, DRIVER_ARM_MIDGARD, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true}, + {OS_ALL, VENDOR_ARM, DRIVER_ARM, -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}, diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h index a1b147af6e..278e339fac 100644 --- a/Source/Core/VideoCommon/DriverDetails.h +++ b/Source/Core/VideoCommon/DriverDetails.h @@ -42,13 +42,12 @@ namespace DriverDetails DRIVER_R600, // OSS Radeon DRIVER_INTEL, // Official Intel DRIVER_I965, // OSS Intel - DRIVER_ARM_MIDGARD, // Official Mali driver - DRIVER_ARM_UTGARD, // Official Mali driver + DRIVER_ARM, // Official Mali driver DRIVER_LIMA, // OSS Mali driver DRIVER_QUALCOMM, // Official Adreno driver DRIVER_FREEDRENO, // OSS Adreno driver - DRIVER_IMGTEC, // OSS PowerVR driver - DRIVER_VIVANTE, // Official vivante driver + DRIVER_IMGTEC, // Official PowerVR driver + DRIVER_VIVANTE, // Official Vivante driver DRIVER_UNKNOWN // Unknown driver, default to official hardware driver };