diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-04-11 23:38:40 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-04-11 23:38:40 -0500 |
| commit | ed67cc3fb219ad8e3e393fd31076830fafc5a3d9 (patch) | |
| tree | df29034e3fc9fa3362ecad09adc68d8c0477380e /Source/Core | |
| parent | b106dbc96e5fc0933f8ae5e1d655453efd419100 (diff) | |
Add the ability to determine the Mali driver version.
This is the only way we can determine the video driver version with mali.
Really it's a good thing that they only push driver updates once every two years, makes it easy to determine what driver anybody is running.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 4ad70be08a..76d55f97d1 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -292,9 +292,25 @@ void InitDriverInfo() break; case DriverDetails::VENDOR_ARM: if (std::string::npos != srenderer.find("Mali-T6")) + { driver = DriverDetails::DRIVER_ARM_T6XX; + // 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")) + { driver = DriverDetails::DRIVER_ARM_4XX; + } break; case DriverDetails::VENDOR_MESA: { |
