nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   GPU memory consumption, back buffer, Quadro (http://www.nvnews.net/vbulletin/showthread.php?t=182758)

tdsussman 06-04-12 03:12 PM

GPU memory consumption, back buffer, Quadro
 
2 Attachment(s)
The use of glScissor when drawing into the back buffer causes the GPU memory requirement to continually increase.

Please see the attached simple OpenGL program glxtest.c. It is run using

./glxtest.exe (ibufse) (iscissor)

in which

ibufse=1: draw to front buffer
ibufse=2: draw to back buffer

iscissor=0: do not scissor when clearing
iscissor=1: scissor when clearing

./glxtest.exe 2 1

draws to the back buffer repeately, scissoring when clearing the screen.

Observe that

GPU_MEMORY_INFO_CURRENT_AVAILABLE_MEMORY_NVX

continually decreases. The memory of the process reported by 'top'
also continually increases.

If I don't scissor

./glxtest.exe 2 0

or if I scissor into the front buffer

./glxtest.exe 1 1

then the memory doesn't increase.

I am running Red Hat Enterprise Linux 5 (kernel 2.6.18-8.e15) on an x86_64 platform.
Driver: NVIDIA 295.53, as downloaded from the NVIDIA website.
Graphics card: QUADRO FX 570, 256 MB memory.

I have attached nvidia-bug-report.log.gz.

Is this memory increase a bug in the NVIDIA drivers for Linux? If so, should I report the
bug directly to NVIDIA?

Thank you.

AaronP 06-05-12 03:50 PM

Re: GPU memory consumption, back buffer, Quadro
 
Does the problem go away if you add a glFinish() or a SwapBuffers in your rendering loop? It's possible that your rendering requests are simply queuing up more work faster than the GPU can process it.

tdsussman 06-07-12 07:28 AM

Re: GPU memory consumption, back buffer, Quadro
 
Quote:

Originally Posted by AaronP (Post 2561550)
Does the problem go away if you add a glFinish() or a SwapBuffers in your rendering loop? It's possible that your rendering requests are simply queuing up more work faster than the GPU can process it.

No, the problem does not go away if I add a glFinish.

The problem goes away if the entire back buffer is cleared by glClear.
But if the glClear is removed, or if the glClear doesn't clear the entire back buffer
(because of the scissoring), then the problem is present.

AaronP 06-07-12 04:09 PM

Re: GPU memory consumption, back buffer, Quadro
 
Okay. Can you please either repost the test with the glFinish in place or provide a patch to make sure I add it to exactly the same place you did, for testing?

tdsussman 06-08-12 04:14 PM

Re: GPU memory consumption, back buffer, Quadro
 
Hello Aaron,

I have reposted glxtest.zip. Note that there is a call to "gerror" after every OpenGL
call, and gerror calls glFinish. So glFinish is called after every OpenGL call.

The memory increase is still present when drawing to the back buffer, when the back buffer is
not completely cleared by glClear.

idigthought 08-14-12 09:14 PM

Re: GPU memory consumption, back buffer, Quadro
 
I see the same results using tdsussman's example with a Quadro FX 5800 , and I see a similar leak in my application, though I don't have the scissor test enabled.

tdsussman: have you found a workaround? Thanks.


All times are GMT -5. The time now is 07:02 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.