wglMakeCurrent leaking memory on ATI cards

Started by
18 comments, last by rogdush 18 years, 7 months ago
Hi All, I've noticed the severe memory leaks when constantly switching from one GL render context to another using the wglMakeCurrent proc. I can reproduce it only on ATI cards (drivers ranging from official Catalyst to non-official Omega drivers), Nvidia drivers do not leak in such circumstance. I've tested this on several ATI cards with several different applications (to be sure it's not my software leaking memory). In order to reproduce such behavior all you need to do is to create several windows and for each of them to create the GL context. Then render each context sequentially, one after another, in the same thread. Did anyone else notice such mem leaks, or I'm the only one who uses multiple GL contexts?
Advertisement
Quote:Original post by wazoo
Hi All,

I've noticed the severe memory leaks when constantly switching from one GL render context to another using the wglMakeCurrent proc. I can reproduce it only on ATI cards (drivers ranging from official Catalyst to non-official Omega drivers), Nvidia drivers do not leak in such circumstance. I've tested this on several ATI cards with several different applications (to be sure it's not my software leaking memory).

In order to reproduce such behavior all you need to do is to create several windows and for each of them to create the GL context. Then render each context sequentially, one after another, in the same thread.

Did anyone else notice such mem leaks, or I'm the only one who uses multiple GL contexts?
Yeah, I remember seeing a thread about this problem a while ago... I was under the impression that it has been fixed since then. If not I suggest contacting ATI's developer relations and sending a minimal example program demonstrating the problem.

EDIT: Here is that thread... from October of last year. It doesn't mention if it has been fixed or not but it does say at the end that ATI would look into it.
Well, it seems that ATI didn't contact the guy (from the old thread) who also had this very problem and the problem is still unresolved, he says he tries to minimize the number of context switches. It won't work in my case because one of the things that is required from the thing I'm working on is the real-time display of the data in the viewports.
You can get around the context switches by creating one window and rendering to multiple viewports, instead of using multiple windows.
Quote:Original post by wazoo
Well, it seems that ATI didn't contact the guy (from the old thread) who also had this very problem and the problem is still unresolved, he says he tries to minimize the number of context switches. It won't work in my case because one of the things that is required from the thing I'm working on is the real-time display of the data in the viewports.
The very last post (on second page with default posts per page) says that they replied and said they would look into it. I suggest you write up a quick program that demonstrates it and send it in to ATI's developer relations to remind them about it. Hopefully it will be fixed soon after that and released in an upcoming driver set.
Quote:Original post by Kalidor
Quote:Original post by wazoo
Well, it seems that ATI didn't contact the guy (from the old thread) who also had this very problem and the problem is still unresolved, he says he tries to minimize the number of context switches. It won't work in my case because one of the things that is required from the thing I'm working on is the real-time display of the data in the viewports.
The very last post (on second page with default posts per page) says that they replied and said they would look into it. I suggest you write up a quick program that demonstrates it and send it in to ATI's developer relations to remind them about it. Hopefully it will be fixed soon after that and released in an upcoming driver set.


I contacted the guy and he told me the dev team never replied, just like in my case, I've sent them the email describing everything in detail and got no reply. I've spend a day installing different versions of their official drivers and saw that the amount of leaked memory actually grows larger in the newer driver builds.
Quote:Original post by Dave Hunt
You can get around the context switches by creating one window and rendering to multiple viewports, instead of using multiple windows.


I wish it were so easy :) The reason I'm using the multi-window viewport setup is because it allows to create any set of viewport windows with any size, position and z-index which isn't possible (or too complex to event bother to implement) with a single window setup. The good thing is that besides OGL we also support D3D9 as the renderer, so we will switch to D3D rendering on ATI cards to avoid the ATI driver leaks.
well, to drop opengl just like that isn't such a good idea. if there are workarounds, i'll use them. but this attitude from ATI is not to be forgiven.
I've had the same problem, and didn't hear from ATI either. Since I'm doing some other stuff now, I haven't looked into it further yet.
Quote:Original post by wazoo
I contacted the guy and he told me the dev team never replied, just like in my case, I've sent them the email describing everything in detail and got no reply. I've spend a day installing different versions of their official drivers and saw that the amount of leaked memory actually grows larger in the newer driver builds.
That is pretty disappointing. [sad] Oh well, hopefully they will get around to fixing it someday. Until then, good luck with the rest of your project.

This topic is closed to new replies.

Advertisement