Add detection support for VMware driver (SVGA3D) to GLPlatform
VMware uses a Gallium driver which means that OpenGL based compositing works out of the box without any adjustments to GLPlatform. Just adding recognizing code for the SVGA3D driver. REVIEW: 106826
This commit is contained in:
parent
388edab9e5
commit
e84118d9f8
2 changed files with 23 additions and 0 deletions
|
@ -432,6 +432,8 @@ QString GLPlatform::driverToString(Driver driver)
|
|||
return "LLVMpipe";
|
||||
case Driver_VirtualBox:
|
||||
return "VirtualBox (Chromium)";
|
||||
case Driver_VMware:
|
||||
return "VMware (SVGA3D)";
|
||||
|
||||
default:
|
||||
return "Unknown";
|
||||
|
@ -680,6 +682,11 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
|
|||
else if (m_vendor == "VMware, Inc." && m_chipset == "llvmpipe") {
|
||||
m_driver = Driver_Llvmpipe;
|
||||
}
|
||||
|
||||
// SVGA3D
|
||||
else if (m_vendor == "VMware, Inc." && m_chipset.contains("SVGA3D")) {
|
||||
m_driver = Driver_VMware;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -789,6 +796,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
|
|||
if (isVirtualBox()) {
|
||||
m_virtualMachine = true;
|
||||
}
|
||||
|
||||
if (isVMware()) {
|
||||
m_virtualMachine = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void print(const QString &label, const QString &setting)
|
||||
|
@ -934,6 +945,11 @@ bool GLPlatform::isVirtualBox() const
|
|||
return m_driver == Driver_VirtualBox;
|
||||
}
|
||||
|
||||
bool GLPlatform::isVMware() const
|
||||
{
|
||||
return m_driver == Driver_VMware;
|
||||
}
|
||||
|
||||
bool GLPlatform::isSoftwareEmulation() const
|
||||
{
|
||||
return m_driver == Driver_Softpipe || m_driver == Driver_Swrast || m_driver == Driver_Llvmpipe;
|
||||
|
|
|
@ -97,6 +97,7 @@ enum Driver {
|
|||
Driver_Softpipe,
|
||||
Driver_Llvmpipe,
|
||||
Driver_VirtualBox,
|
||||
Driver_VMware,
|
||||
Driver_Unknown
|
||||
};
|
||||
|
||||
|
@ -245,6 +246,12 @@ public:
|
|||
**/
|
||||
bool isVirtualBox() const;
|
||||
|
||||
/**
|
||||
* @returns @c true if the "GPU" is a VMWare GPU, and @c false otherwise.
|
||||
* @since 4.10
|
||||
**/
|
||||
bool isVMware() const;
|
||||
|
||||
/**
|
||||
* @returns @c true if OpenGL is emulated in software.
|
||||
* @since 4.7
|
||||
|
|
Loading…
Reference in a new issue