Excessive amounts of memory used per context
Submitted by Steve
Assigned to Ian Romanick
Description
Created attachment 68715 Modified isosurf sample from wxWidgets
This issue has been seen in Mesa 7.x, 8.x, and 9.x. In the latest available drivers from xorg-edgers 2:2.20.10 the memory usage actually went down some, but it is still unacceptably high.
Creating multiple OpenGL contexts results in an excessive amount of memory being used. I would expect some extra memory usage, but not causing an application to use 4x or more memory (roughly 12MB virtual and 2MB physical).
This was noticed as an attempt to work around bug #55675 where using a single canvas to render to multiple drawables resulted in performance degradation over time. Using a separate context per drawable resolves the performance degradation, but results in using around 4x more memory.
In the attached sample you can uncomment the SINGLE_CONTEXT define to compare memory usage between using a single context and using multiple contexts.
Attachment 68715, "Modified isosurf sample from wxWidgets":
isosurf.cpp
Version: 7.11