Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinglplatform.cpp
Show First 20 Lines • Show All 674 Lines • ▼ Show 20 Line(s) | 645 | { | |||
---|---|---|---|---|---|
675 | } else { | 675 | } else { | ||
676 | const QByteArray extensions = (const char *) glGetString(GL_EXTENSIONS); | 676 | const QByteArray extensions = (const char *) glGetString(GL_EXTENSIONS); | ||
677 | m_extensions = QSet<QByteArray>::fromList(extensions.split(' ')); | 677 | m_extensions = QSet<QByteArray>::fromList(extensions.split(' ')); | ||
678 | } | 678 | } | ||
679 | 679 | | |||
680 | // Parse the Mesa version | 680 | // Parse the Mesa version | ||
681 | const int mesaIndex = versionTokens.indexOf("Mesa"); | 681 | const int mesaIndex = versionTokens.indexOf("Mesa"); | ||
682 | if (mesaIndex != -1) { | 682 | if (mesaIndex != -1) { | ||
683 | const QByteArray version = versionTokens.at(mesaIndex + 1); | 683 | const QByteArray &version = versionTokens.at(mesaIndex + 1); | ||
684 | m_mesaVersion = parseVersionString(version); | 684 | m_mesaVersion = parseVersionString(version); | ||
685 | } | 685 | } | ||
686 | 686 | | |||
687 | if (isGLES()) { | 687 | if (isGLES()) { | ||
688 | m_supportsGLSL = true; | 688 | m_supportsGLSL = true; | ||
689 | m_textureNPOT = true; | 689 | m_textureNPOT = true; | ||
690 | } else { | 690 | } else { | ||
691 | m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") && | 691 | m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") && | ||
Show All 21 Lines | |||||
713 | 713 | | |||
714 | // Mesa classic drivers | 714 | // Mesa classic drivers | ||
715 | // ==================================================== | 715 | // ==================================================== | ||
716 | 716 | | |||
717 | // Radeon | 717 | // Radeon | ||
718 | if (m_renderer.startsWith("Mesa DRI R")) { | 718 | if (m_renderer.startsWith("Mesa DRI R")) { | ||
719 | // Sample renderer string: Mesa DRI R600 (RV740 94B3) 20090101 x86/MMX/SSE2 TCL DRI2 | 719 | // Sample renderer string: Mesa DRI R600 (RV740 94B3) 20090101 x86/MMX/SSE2 TCL DRI2 | ||
720 | const QList<QByteArray> tokens = m_renderer.split(' '); | 720 | const QList<QByteArray> tokens = m_renderer.split(' '); | ||
721 | const QByteArray chipClass = tokens.at(2); | 721 | const QByteArray &chipClass = tokens.at(2); | ||
722 | m_chipset = tokens.at(3).mid(1, -1); // Strip the leading '(' | 722 | m_chipset = tokens.at(3).mid(1, -1); // Strip the leading '(' | ||
723 | 723 | | |||
724 | if (chipClass == "R100") | 724 | if (chipClass == "R100") | ||
725 | // Vendor: Tungsten Graphics, Inc. | 725 | // Vendor: Tungsten Graphics, Inc. | ||
726 | m_driver = Driver_R100; | 726 | m_driver = Driver_R100; | ||
727 | 727 | | |||
728 | else if (chipClass == "R200") | 728 | else if (chipClass == "R200") | ||
729 | // Vendor: Tungsten Graphics, Inc. | 729 | // Vendor: Tungsten Graphics, Inc. | ||
▲ Show 20 Lines • Show All 512 Lines • Show Last 20 Lines |