Jump to content
  • Advertisement
Sign in to follow this  
wazoo

wglMakeCurrent leaking memory on ATI cards

This topic is 4757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
You can get around the context switches by creating one window and rendering to multiple viewports, instead of using multiple windows.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!