Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-07-21 15:57:37



Reply to topic  [ 4 posts ] 
Known bug: GL texture memory leak with NVIDIA and GL threads 
Author Message

Joined: 2009-03-17 18:42:51
Posts: 6016
Reply with quote
I discovered the reason for apparent GL texture memory leaks with NVIDIA cards (*) and shared GL threads enabled (especially obvious at very high frame rates i.e; at 500+ fps).

The fix is simply to set the "RenderGLImageSyncInThread" debug setting to FALSE, which disables a bogus optimization that was supposed to be possible with NVIDIA driver.

This setting and the related (bogus) code will be removed in next release.


(*) Other brands do not have this bogus optimization applied and "RenderGLImageSyncInThread" is ignored for them.


2025-04-15 10:36:34
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 6016
Reply with quote
Bug fixed in today's v1.32.2.44 release.


2025-04-19 08:16:46
Profile WWW

Joined: 2011-10-07 10:39:20
Posts: 214
Reply with quote
Just out of curiosity.

So the NVIDIA path was broken all the time, since introduction of the multi threaded OpenGL contexts, and the other platforms just got fixed "by chance" when the patch in
viewtopic.php?f=10&t=2335 got added?


2025-04-19 18:08:49
Profile

Joined: 2009-03-17 18:42:51
Posts: 6016
Reply with quote
kathrine wrote:
Just out of curiosity.

So the NVIDIA path was broken all the time, since introduction of the multi threaded OpenGL contexts, and the other platforms just got fixed "by chance" when the patch in
viewtopic.php?f=10&t=2335 got added?

The NVIDIA exception (it was never used for AMD and Intel GPUs) was an optimization by LL, that I kept (even if I added a debug setting to control it, just in case... and case happened) because it looked like it worked (the GL textures were properly created in the GL threads and used in the main thread without any apparent corruption, unlike what happened with other GPU brands), but I kept having leaks with GL textures and could not figure out what caused them (I really searched many times for it, since it pissed me off to have to relog after long sessions with lots of avatars around, for example).

Then, I noticed that when removing the frame rate limiter in my skybox (1700+ fps in forward rendering), the leak happened extremely quickly and was HUGE. I then suspected a race condition and bad locking/syncing between threads, and by reviewing for the Nth time the LLImagGL code, I finally found this potential suspect and could confirm it was indeed the culprit.

So yes, all these months with that bug... But it now got squished !


2025-04-19 19:21:58
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.