[kwin] Drop direct rendering detection from GLPlatform

It's no longer needed as the OpenGLBackend has a direct rendering
detection and the remaining OpenGL2 backend aborts if the backend
uses indirect rendering. Thus the GLPlatform must always have a
direct rendering context.

REVIEW: 116829
This commit is contained in:
Martin Gräßlin 2014-03-16 10:31:04 +01:00
parent abecbf2369
commit 89c2688f74
3 changed files with 1 additions and 24 deletions

View file

@ -504,7 +504,6 @@ GLPlatform::GLPlatform()
m_mesaVersion(0),
m_galliumVersion(0),
m_looseBinding(false),
m_directRendering(false),
m_supportsGLSL(false),
m_limitedGLSL(false),
m_textureNPOT(false),
@ -563,7 +562,6 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
}
if (platformInterface == EglPlatformInterface) {
m_directRendering = true;
#ifdef KWIN_HAVE_OPENGLES
m_supportsGLSL = true;
m_textureNPOT = true;
@ -576,11 +574,7 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
#endif
} else if (platformInterface == GlxPlatformInterface) {
#ifndef KWIN_HAVE_OPENGLES
GLXContext ctx = glXGetCurrentContext();
m_directRendering = glXIsDirect(display(), ctx);
m_supportsGLSL = m_directRendering &&
m_extensions.contains("GL_ARB_shader_objects") &&
m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") &&
m_extensions.contains("GL_ARB_fragment_shader") &&
m_extensions.contains("GL_ARB_vertex_shader");
@ -893,7 +887,6 @@ void GLPlatform::printResults() const
if (kernelVersion() > 0)
print(QStringLiteral("Linux kernel version:"), versionToString(m_kernelVersion));
print(QStringLiteral("Direct rendering:"), m_directRendering ? QStringLiteral("yes") : QStringLiteral("no"));
print(QStringLiteral("Requires strict binding:"), !m_looseBinding ? QStringLiteral("yes") : QStringLiteral("no"));
print(QStringLiteral("GLSL shaders:"), m_supportsGLSL ? (m_limitedGLSL ? QStringLiteral("limited") : QStringLiteral("yes")) : QStringLiteral("no"));
print(QStringLiteral("Texture NPOT support:"), m_textureNPOT ? (m_limitedNPOT ? QStringLiteral("limited") : QStringLiteral("yes")) : QStringLiteral("no"));
@ -1031,11 +1024,6 @@ const QByteArray &GLPlatform::glShadingLanguageVersionString() const
return m_glsl_version;
}
bool GLPlatform::isDirectRendering() const
{
return m_directRendering;
}
bool GLPlatform::isLooseBinding() const
{
return m_looseBinding;

View file

@ -286,11 +286,6 @@ public:
* @since 4.9
**/
const QByteArray &glShadingLanguageVersionString() const;
/**
* @returns Whether a direct rendering OpenGL context is used.
* @since 4.9
**/
bool isDirectRendering() const;
/**
* @returns Whether the driver supports loose texture binding.
* @since 4.9
@ -361,7 +356,6 @@ private:
qint64 m_serverVersion;
qint64 m_kernelVersion;
bool m_looseBinding: 1;
bool m_directRendering: 1;
bool m_supportsGLSL: 1;
bool m_limitedGLSL: 1;
bool m_textureNPOT: 1;

View file

@ -1451,11 +1451,6 @@ QString Workspace::supportInformation() const
support.append(QStringLiteral("Linux kernel version: ") + GLPlatform::versionToString(platform->kernelVersion()) + QStringLiteral("\n"));
support.append(QStringLiteral("Direct rendering: "));
if (platform->isDirectRendering()) {
support.append(QStringLiteral("yes\n"));
} else {
support.append(QStringLiteral("no\n"));
}
support.append(QStringLiteral("Requires strict binding: "));
if (!platform->isLooseBinding()) {
support.append(QStringLiteral("yes\n"));