-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.3.1
-
None
-
Linux desktop.
Relevant paste of qtdiag
Platform capabilities: ThreadedPixmaps OpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface
LibGL Vendor: Intel Open Source Technology Center
Renderer: Mesa DRI Intel(R) Ivybridge Mobile
Version: OpenGL ES 3.0 Mesa 10.3.0-devel (git-01c21c4)
Shading language: OpenGL ES GLSL ES 3.0
Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGBA): 8,8,8,8
Linux desktop. Relevant paste of qtdiag Platform capabilities: ThreadedPixmaps OpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface LibGL Vendor: Intel Open Source Technology Center Renderer: Mesa DRI Intel(R) Ivybridge Mobile Version: OpenGL ES 3.0 Mesa 10.3.0-devel (git-01c21c4) Shading language: OpenGL ES GLSL ES 3.0 Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGBA): 8,8,8,8
Whilst profiling an application we found a lot of memory (15Mb per screen) was used in the intel graphics driver on startup
The 15Mb per screen is used in _swrast_CreateContext which from the documentation of the calling code is
/* Initialize the software rasterizer and helper modules.
*
- As of GL 3.1 core, the gen4+ driver doesn't need the swrast context for
- software fallbacks (which we have to support on legacy GL to do weird
- glDrawPixels(), glBitmap(), and other functions).
*/
if (api != API_OPENGL_CORE && api != API_OPENGLES2) { _swrast_CreateContext(ctx); }
i.e it's only for fallback old code, and it has a considerable overhead. From working bacwards we only enter this code if we are requesting to use really really old openGL or some compatibility features.
From debug in QGLXContext it turns out by default we are requesting OpenGL 2.0.
We can do a setFormat on a per window per application basis and get an improvement, but I feel this might be better served in Qt. As I understand it QtQuick 2.0 requires much higher level OpenGL anyway, so we shouldn't be requesting such old versions by default.
Hardcoding the requested version to OpenGL 3.2 shows a considerable saving under massif and top shows a massive difference.