LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-14-2008, 09:24 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
c++ - how to find memory footprint of a GL display list (or mem usage on a GPU)?


Might be a long shot, but I figure I'll ask here anyway...

I'm building a GL display list from a file (openGL). It works great, displays very fast, all is good. However, when I want to load a new file, it takes a good 2 seconds to parse the file & compile the display list.

What I'd like to do is cache the data so I don't have to parse the files after they are all loaded. I could do this in main memory, but figure that if it stays in the graphics card's memory, it will be even faster. What I don't know is how to see how much memory I'm using in a display list or on the graphics card.

Is there a way to determine this mem usage of an openGL display list? Is there a way to see how much memory is in use on the graphics card? Preferably via code rather than a system call.
 
Old 03-16-2008, 10:09 AM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: Slackware64 13.37, Kubuntu 10.04
Posts: 2,944

Rep: Reputation: Disabled
Maybe the card driver has an entry in /proc somewhere? Either that or look for an ioctl for the device (if there is one.)
ta0kira
 
Old 03-16-2008, 10:32 AM   #3
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
I do not know of any methods to achieve the details you want in a program but external programs will let you view this sort of info. Such as gDEBugger, nvidia tools(PerfKit), ati tools(PerfStudio).
Why are you using display lists and not VBO's etc?

http://www.gremedy.com/
http://developer.nvidia.com/object/nvperfkit_home.html
http://ati.amd.com/developer/gpups/index.html

Last edited by dmail; 03-16-2008 at 10:35 AM.
 
Old 03-17-2008, 01:14 PM   #4
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Thanks for the responses...

- while there are a few entries in /proc for the nvidia card, none seem to reflect memory usage.

- gDEBugger - this seems promising, but doesn't run on my machine - a lib issue. I'll ask my admin about it today (::grumble:: about not having admin privileges)

- nvPerfkit requires you to run its own driver- that driver is outdated and I couldn't install it anyway (see grumble above )

- the ati perf studio requires windows and an ati card.

- display lists vs vbo? I could get long winded, but the short answer is "because I chose to". This is not trying to sound nasty, just saying that both methods do similar things in very different ways, and both have advantages over the other in certain cases. Several of the advatages of VBOs don't apply in my case (shared vertexes, for example), so I went the display list route. I haven't done an A vs B, but the display lists are running quite fast, so much so that I didn't see a need to optimize getting data to the screen any further... just need to get it off of the disk faster and less frequently.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check memory footprint Ephracis Programming 7 01-04-2008 02:16 AM
X11 memory footprint otoomet Linux - Software 4 09-30-2007 05:03 PM
how to find max memory usage for process in Linux by command line kashameni Linux - Newbie 9 06-01-2007 01:39 AM
Memory usage display problem swaroop.tata Linux - General 1 01-18-2006 01:38 PM
Help!!!: TCP code size/memory usage / footprint bichettelinux Linux - Networking 3 07-13-2003 05:31 PM


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

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration