KWin
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
KWin::GLPlatform Class Reference

#include <glplatform.h>

Public Member Functions

 ~GLPlatform ()
 
void detect (OpenGLPlatformInterface platformInterface)
 
void printResults () const
 
bool supports (GLFeature feature) const
 
Version glVersion () const
 
Version glslVersion () const
 
Version mesaVersion () const
 
Version driverVersion () const
 
Driver driver () const
 
ChipClass chipClass () const
 
bool isMesaDriver () const
 
bool isRadeon () const
 
bool isNvidia () const
 
bool isIntel () const
 
bool isVirtualBox () const
 
bool isVMware () const
 
bool isSoftwareEmulation () const
 
bool isVirtualMachine () const
 
bool isAdreno () const
 
bool isVirgl () const
 
bool isPanfrost () const
 
bool isLima () const
 
bool isVideoCore4 () const
 
bool isVideoCore3D () const
 
QByteArrayView glVersionString () const
 
QByteArrayView glRendererString () const
 
QByteArrayView glVendorString () const
 
QByteArrayView glShadingLanguageVersionString () const
 
bool isLooseBinding () const
 
bool isGLES () const
 
CompositingType recommendedCompositor () const
 
bool preferBufferSubData () const
 
OpenGLPlatformInterface platformInterface () const
 

Static Public Member Functions

static GLPlatforminstance ()
 
static QString driverToString (Driver driver)
 
static QByteArray driverToString8 (Driver driver)
 
static QString chipClassToString (ChipClass chipClass)
 
static QByteArray chipClassToString8 (ChipClass chipClass)
 

Friends

void KWin::cleanupGL ()
 

Detailed Description

Definition at line 157 of file glplatform.h.

Constructor & Destructor Documentation

◆ ~GLPlatform()

KWin::GLPlatform::~GLPlatform ( )

Definition at line 726 of file glplatform.cpp.

Member Function Documentation

◆ chipClass()

ChipClass KWin::GLPlatform::chipClass ( ) const

Returns the chip class.

Definition at line 1098 of file glplatform.cpp.

◆ chipClassToString()

QString KWin::GLPlatform::chipClassToString ( ChipClass chipClass)
static
Returns
a human readable form for the chipClass as a QString.
Since
4.9
See also
chipClass

Definition at line 587 of file glplatform.cpp.

◆ chipClassToString8()

QByteArray KWin::GLPlatform::chipClassToString8 ( ChipClass chipClass)
static
Returns
a human readable form for the chipClass as a QByteArray.
Since
5.5
See also
chipClass

Definition at line 591 of file glplatform.cpp.

◆ detect()

void KWin::GLPlatform::detect ( OpenGLPlatformInterface platformInterface)

Runs the detection code using the current OpenGL context.

Definition at line 730 of file glplatform.cpp.

◆ driver()

Driver KWin::GLPlatform::driver ( ) const

Returns the driver.

Definition at line 1093 of file glplatform.cpp.

◆ driverToString()

QString KWin::GLPlatform::driverToString ( Driver driver)
static
Returns
a human readable form for the driver as a QString.
Since
4.9
See also
driver

Definition at line 530 of file glplatform.cpp.

◆ driverToString8()

QByteArray KWin::GLPlatform::driverToString8 ( Driver driver)
static
Returns
a human readable form for the driver as a QByteArray.
Since
5.5
See also
driver

Definition at line 534 of file glplatform.cpp.

◆ driverVersion()

Version KWin::GLPlatform::driverVersion ( ) const

Returns the driver version.

For Mesa drivers, this is the same as the Mesa version number.

Definition at line 1084 of file glplatform.cpp.

◆ glRendererString()

QByteArrayView KWin::GLPlatform::glRendererString ( ) const
Returns
the GL_RENDERER string as provided by the driver.
Since
4.9

Definition at line 1168 of file glplatform.cpp.

◆ glShadingLanguageVersionString()

QByteArrayView KWin::GLPlatform::glShadingLanguageVersionString ( ) const
Returns
the GL_SHADING_LANGUAGE_VERSION string as provided by the driver. If the driver does not support the OpenGL Shading Language a null bytearray is returned.
Since
4.9

Definition at line 1183 of file glplatform.cpp.

◆ glslVersion()

Version KWin::GLPlatform::glslVersion ( ) const

Returns the GLSL version if the driver supports GLSL, and 0 otherwise.

Definition at line 1074 of file glplatform.cpp.

◆ glVendorString()

QByteArrayView KWin::GLPlatform::glVendorString ( ) const
Returns
the GL_VENDOR string as provided by the driver.
Since
4.9

Definition at line 1173 of file glplatform.cpp.

◆ glVersion()

Version KWin::GLPlatform::glVersion ( ) const

Returns the OpenGL version.

Definition at line 1069 of file glplatform.cpp.

◆ glVersionString()

QByteArrayView KWin::GLPlatform::glVersionString ( ) const
Returns
the GL_VERSION string as provided by the driver.
Since
4.9

Definition at line 1178 of file glplatform.cpp.

◆ instance()

GLPlatform * KWin::GLPlatform::instance ( )
inlinestatic

Returns a pointer to the GLPlatform instance.

Definition at line 394 of file glplatform.h.

◆ isAdreno()

bool KWin::GLPlatform::isAdreno ( ) const
Returns
true if the GPU is a Qualcomm Adreno GPU, and false otherwise
Since
5.8

Definition at line 1143 of file glplatform.cpp.

◆ isGLES()

bool KWin::GLPlatform::isGLES ( ) const
Returns
Whether OpenGL ES is used

Definition at line 1213 of file glplatform.cpp.

◆ isIntel()

bool KWin::GLPlatform::isIntel ( ) const

Returns true if the GPU is an Intel GPU, and false otherwise.

Definition at line 1118 of file glplatform.cpp.

◆ isLima()

bool KWin::GLPlatform::isLima ( ) const
Returns
true if the GPU is a Mali GPU supported by the Lima driver (Mali 400, 450)
Since
5.27.1

Definition at line 1153 of file glplatform.cpp.

◆ isLooseBinding()

bool KWin::GLPlatform::isLooseBinding ( ) const
Returns
Whether the driver supports loose texture binding.
Since
4.9

Definition at line 1188 of file glplatform.cpp.

◆ isMesaDriver()

bool KWin::GLPlatform::isMesaDriver ( ) const

Returns true if the driver is a Mesa driver, and false otherwise.

Definition at line 1103 of file glplatform.cpp.

◆ isNvidia()

bool KWin::GLPlatform::isNvidia ( ) const

Returns true if the GPU is an NVIDIA GPU, and false otherwise.

Definition at line 1113 of file glplatform.cpp.

◆ isPanfrost()

bool KWin::GLPlatform::isPanfrost ( ) const
Returns
true if the "GPU" is a Panfrost Mali GPU
Since
5.21.5

Definition at line 1148 of file glplatform.cpp.

◆ isRadeon()

bool KWin::GLPlatform::isRadeon ( ) const

Returns true if the GPU is a Radeon GPU, and false otherwise.

Definition at line 1108 of file glplatform.cpp.

◆ isSoftwareEmulation()

bool KWin::GLPlatform::isSoftwareEmulation ( ) const
Returns
true if OpenGL is emulated in software.
Since
4.7

Definition at line 1138 of file glplatform.cpp.

◆ isVideoCore3D()

bool KWin::GLPlatform::isVideoCore3D ( ) const
Returns
true if the GPU is a Broadcom VideoCore 3D (e.g. Raspberry Pi 4, 400)
Since
5.27.1

Definition at line 1163 of file glplatform.cpp.

◆ isVideoCore4()

bool KWin::GLPlatform::isVideoCore4 ( ) const
Returns
true if the GPU is a Broadcom VideoCore IV (e.g. Raspberry Pi 0 to 3)
Since
5.27.1

Definition at line 1158 of file glplatform.cpp.

◆ isVirgl()

bool KWin::GLPlatform::isVirgl ( ) const
Returns
true if the "GPU" is a virtio-gpu (Qemu/KVM)
Since
5.18

Definition at line 1133 of file glplatform.cpp.

◆ isVirtualBox()

bool KWin::GLPlatform::isVirtualBox ( ) const
Returns
true if the "GPU" is a VirtualBox GPU, and false otherwise.
Since
4.10

Definition at line 1123 of file glplatform.cpp.

◆ isVirtualMachine()

bool KWin::GLPlatform::isVirtualMachine ( ) const
Returns
true if the driver is known to be from a virtual machine.
Since
4.10

Definition at line 1193 of file glplatform.cpp.

◆ isVMware()

bool KWin::GLPlatform::isVMware ( ) const
Returns
true if the "GPU" is a VMWare GPU, and false otherwise.
Since
4.10

Definition at line 1128 of file glplatform.cpp.

◆ mesaVersion()

Version KWin::GLPlatform::mesaVersion ( ) const

Returns the Mesa version if the driver is a Mesa driver, and 0 otherwise.

Definition at line 1079 of file glplatform.cpp.

◆ platformInterface()

OpenGLPlatformInterface KWin::GLPlatform::platformInterface ( ) const
Returns
The OpenGLPlatformInterface currently used
Since
5.0

Definition at line 1208 of file glplatform.cpp.

◆ preferBufferSubData()

bool KWin::GLPlatform::preferBufferSubData ( ) const

Returns true if glMapBufferRange() is likely to perform worse than glBufferSubData() when updating an unused range of a buffer object, and false otherwise.

Since
4.11

Definition at line 1203 of file glplatform.cpp.

◆ printResults()

void KWin::GLPlatform::printResults ( ) const

Prints the results of the detection code.

Definition at line 1035 of file glplatform.cpp.

◆ recommendedCompositor()

CompositingType KWin::GLPlatform::recommendedCompositor ( ) const
Returns
The CompositingType recommended by the driver.
Since
4.10

Definition at line 1198 of file glplatform.cpp.

◆ supports()

bool KWin::GLPlatform::supports ( GLFeature feature) const

Returns true if the driver support the given feature, and false otherwise.

Definition at line 1056 of file glplatform.cpp.

Friends And Related Symbol Documentation

◆ KWin::cleanupGL

void KWin::cleanupGL ( )
friend

The documentation for this class was generated from the following files: