Forums - GL leaking textures?

2 posts / 0 new
Last post
GL leaking textures?
Mark_Ng
Join Date: 8 Sep 10
Posts: 3
Posted: Sun, 2010-11-14 21:11

In my game engine I've noticed that GL might be leaking texture data. This issue is happening on a Nexus One (Adreno 200) running Android 2.2.

The following sequence of events happens during testing:

1) meminfo shows that the native heap is at size X

2) glGenTextures is called to generate a texture

3) glTexImage is called to specify texture data

4) meminfo shows that the native heap is at size Y (where Y-X is approximately the size of the texture data specified with glTexImage2D)

5) glDeleteTextures is called on the texture object created in 2)

6) meminfo shows that the native heap remains at around size Y. After letting the process run awhile longer the heap size still doesn't drop back down. 

From the observations above, it looks like glDeleteTextures isn't actually freeing up the heap that was allocated when glTexImage2D is specified. I'm not sure if this is exactly the case, but I've ensured that no other allocations are being done between the glTexImage2D and glDeleteTextures call. Is there anything else that needs to be done to properly clean up texture data or is possible that there is a leak in the GL driver?

Thanks,

-Mark

  • Up0
  • Down0
Mark_Ng
Join Date: 8 Sep 10
Posts: 3
Posted: Sun, 2010-11-14 21:25

Never mind... Right after I posted this message I realized that I wasn't making the GL context current to the thread that was calling glDeleteTextures. Grrrr...

Problem solved.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.