diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index c17303403..2ff663cd1 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -904,6 +904,9 @@ Debug& operator<<(Debug& debug, const Context::DetectedDriver value) { _c(Mesa) _c(NVidia) #endif + #ifndef MAGNUM_TARGET_WEBGL + _c(Svga3D) + #endif #undef _c /* LCOV_EXCL_STOP */ } @@ -924,6 +927,9 @@ Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) { Context::DetectedDriver::Mesa, Context::DetectedDriver::NVidia, #endif + #ifndef MAGNUM_TARGET_WEBGL + Context::DetectedDriver::Svga3D + #endif }); } #endif diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index 7a2494b2a..5f607fbea 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -256,7 +256,8 @@ class MAGNUM_EXPORT Context { IntelWindows = 1 << 2, /** - * Mesa drivers on Linux + * Mesa drivers on Windows and Linux. See also + * @ref DetectedDriver::Svga3D. * @requires_gles Not detectable on WebGL, as browsers * intentionally hide most of the driver information. */ @@ -267,7 +268,19 @@ class MAGNUM_EXPORT Context { * @requires_gles Not detectable on WebGL, as browsers * intentionally hide most of the driver information. */ - NVidia = 1 << 4 + NVidia = 1 << 4, + #endif + + #ifndef MAGNUM_TARGET_WEBGL + /** + * VMware guest GL driver SVGA3D, implemented using Mesa, both + * Windows and Linux guests. See https://www.mesa3d.org/vmware-guest.html + * for more information. Detected in combination with + * @ref DetectedDriver::Mesa. + * @requires_gles Not detectable on WebGL, as browsers + * intentionally hide most of the driver information. + */ + Svga3D = 1 << 5 #endif }; diff --git a/src/Magnum/Implementation/driverSpecific.cpp b/src/Magnum/Implementation/driverSpecific.cpp index 618b61b8b..a27a1bc64 100644 --- a/src/Magnum/Implementation/driverSpecific.cpp +++ b/src/Magnum/Implementation/driverSpecific.cpp @@ -130,6 +130,7 @@ auto Context::detectedDriver() -> DetectedDrivers { _detectedDrivers = DetectedDrivers{}; + const std::string renderer = rendererString(); const std::string vendor = vendorString(); const std::string version = versionString(); @@ -145,11 +146,15 @@ auto Context::detectedDriver() -> DetectedDrivers { return *_detectedDrivers |= DetectedDriver::IntelWindows; #endif - #ifdef CORRADE_TARGET_UNIX /* Mesa drivers */ - if(version.find("Mesa") != std::string::npos) - return *_detectedDrivers |= DetectedDriver::Mesa; - #endif + if(version.find("Mesa") != std::string::npos) { + *_detectedDrivers |= DetectedDriver::Mesa; + + if(renderer.find("SVGA3D") != std::string::npos) + *_detectedDrivers |= DetectedDriver::Svga3D; + + return *_detectedDrivers; + } if(vendor.find("NVIDIA Corporation") != std::string::npos) return *_detectedDrivers |= DetectedDriver::NVidia;