“1 OpenGL errors detected 0 : (1285) Out of memory” after tens of thousands of Loop (inside each Loop: use VTK, new Window, Render, VolumeMapper then delete them))
app crashed after many loops, OpenGL Error"Out of memory" BUT cudaMemGetInfo and nvdia-smi log there is still enough available GPU memory…
Use a GL debug callback to get more details on the error. It might not be an out of memory error, but instead out of some other resource.
For how to do this, see:
and do you know the inside memory layout or management of OpenGL? different on various platforms and drivers?
very werid that after got the OpenGL Out of memory ERROR, not only nvidia-smi shows that there is still enough available VRAM, and test with cudaMalloc shows that there is enough large contigous VRAM…donot know why after many loops of new and delete window with other res, OpenGL in VTK crash and shows Out of memory, it seems that OpenGL is not able to alloc on the very large enough contigous VRAM…
No. I’m not a driver developer. My experience is limit to being an OpenGL application developer. Mostly with NVIDIA’s OpenGL driver, both on Linux and Windows.
While that may be one possible cause, there are others. For just a few of the many examples (with NVIDIA drivers), see this thread. Search for
Bindless Texture documentation, it is written the following about maximum amount of resident textures:
The amount of storage available for resident images/textures may be less than the total storage for textures that is available. As such, you should attempt to minimize the time a texture spends being resident. Do not attempt to take steps like making textures resident/unresident every frame or something. But if you are finished using a texture for some time, make it unresident.
I’d suggest you see what the driver is telling you about your specific error. It may not be what you think.
thank you very much!
how to get the specific error? is there API? or just search the OpenGL error code (1285) Out of memory WITH the version of the nvidia-driver?
GL CALLBACK: ** GL ERROR ** type = 0x824c, severity = 0x9146, message = GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.
It’s probably a bug in your code. Possibly a leak.
You’re not running under Wine, correct?
A few web hits for the specific
GL_OUT_OF_MEMORY detailed error you’re getting: