diff --git a/doc/changelog.dox b/doc/changelog.dox index a78250cd3..a64a539aa 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -519,6 +519,7 @@ See also: - The @ref GL::Context class got significantly optimized in terms of compile time, header size and runtime as well, significantly reducing the amount of allocations done at startup. +- Added @ref GL::Context::DetectedDriver::QualcommAdreno - To make working with cube map images easier, @ref GL::CubeMapTexture::setSubImage() and @ref GL::CubeMapTexture::subImage() taking 3D images are now exposed on all diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 98fa7848d..b1fd499c8 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -1348,6 +1348,9 @@ Debug& operator<<(Debug& debug, const Context::DetectedDriver value) { #ifdef CORRADE_TARGET_ANDROID _c(ArmMali) #endif + #if defined(MAGNUM_TARGET_GLES) && !defined(CORRADE_TARGET_APPLE) + _c(QualcommAdreno) + #endif #undef _c /* LCOV_EXCL_STOP */ } @@ -1371,6 +1374,9 @@ Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) { #ifdef CORRADE_TARGET_ANDROID Context::DetectedDriver::ArmMali, #endif + #if defined(MAGNUM_TARGET_GLES) && !defined(CORRADE_TARGET_APPLE) + Context::DetectedDriver::QualcommAdreno + #endif }); } #endif diff --git a/src/Magnum/GL/Context.h b/src/Magnum/GL/Context.h index a7cd81d5e..562cefe08 100644 --- a/src/Magnum/GL/Context.h +++ b/src/Magnum/GL/Context.h @@ -489,7 +489,18 @@ class MAGNUM_GL_EXPORT Context { * @ref CORRADE_TARGET_ANDROID "Android". * @m_since{2019,10} */ - ArmMali = 1 << 7 + ArmMali = 1 << 7, + #endif + + #if (defined(MAGNUM_TARGET_GLES) && !defined(CORRADE_TARGET_APPLE)) || defined(DOXYGEN_GENERATING_OUTPUT) + /** + * Qualcomm Adreno drivers for OpenGL ES. + * @partialsupport Not available on + * @ref CORRADE_TARGET_APPLE"Apple" platforms. + * @m_since_latest + */ + /* Assuming these exist also on non-Android platforms (Windows?) */ + QualcommAdreno = 1 << 8 #endif }; diff --git a/src/Magnum/GL/Implementation/driverSpecific.cpp b/src/Magnum/GL/Implementation/driverSpecific.cpp index 3cf32aec1..394f34b06 100644 --- a/src/Magnum/GL/Implementation/driverSpecific.cpp +++ b/src/Magnum/GL/Implementation/driverSpecific.cpp @@ -581,6 +581,11 @@ auto Context::detectedDriver() -> DetectedDrivers { *_detectedDrivers |= DetectedDriver::ArmMali; #endif + #if defined(MAGNUM_TARGET_GLES) && !defined(CORRADE_TARGET_APPLE) + if(vendor.contains("Qualcomm"_s) && renderer.contains("Adreno"_s)) + *_detectedDrivers |= DetectedDriver::QualcommAdreno; + #endif + return *_detectedDrivers; }