Skip to content

Commit

Permalink
Avoid performance problems with AMD drivers in Mesa
Browse files Browse the repository at this point in the history
  • Loading branch information
Jj0YzL5nvJ committed Apr 2, 2018
1 parent 9497a9b commit cc5d063
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Graphics/OpenGLContext/opengl_GLInfo.cpp
Expand Up @@ -40,6 +40,10 @@ void GLInfo::init() {
renderer = Renderer::Intel;
else if (strstr((const char*)strRenderer, "PowerVR") != nullptr)
renderer = Renderer::PowerVR;
else if (strstr((const char*)strRenderer, "AMD") != nullptr)
renderer = Renderer::AMD;
else if (strstr((const char*)strRenderer, "Radeon") != nullptr)
renderer = Renderer::AMD;
LOG(LOG_VERBOSE, "OpenGL renderer: %s\n", strRenderer);

int numericVersion = majorVersion * 10 + minorVersion;
Expand All @@ -61,8 +65,10 @@ void GLInfo::init() {
if (isGLES2)
config.generalEmulation.enableFragmentDepthWrite = 0;

bufferStorage = (!isGLESX && (numericVersion >= 44)) || Utils::isExtensionSupported(*this, "GL_ARB_buffer_storage") ||
Utils::isExtensionSupported(*this, "GL_EXT_buffer_storage");
if (renderer != Renderer::AMD) {
bufferStorage = (!isGLESX && (numericVersion >= 44)) || Utils::isExtensionSupported(*this, "GL_ARB_buffer_storage") ||
Utils::isExtensionSupported(*this, "GL_EXT_buffer_storage");
}

texStorage = (isGLESX && (numericVersion >= 30)) || (!isGLESX && numericVersion >= 42) ||
Utils::isExtensionSupported(*this, "GL_ARB_texture_storage");
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/OpenGLContext/opengl_GLInfo.h
Expand Up @@ -10,6 +10,7 @@ enum class Renderer {
VideoCore,
Intel,
PowerVR,
AMD,
Other
};

Expand Down

0 comments on commit cc5d063

Please sign in to comment.