Jump to content
  • Advertisement
Sign in to follow this  
Deliverance

Is there a way i can find how much video memory my program is using and...

This topic is 3598 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
A quick and dirty way to find the amount of VRAM available when your program starts is to make 1 meg textures/render targets until it fails. If you can make 64 1meg textures, your card is 64MB.

Share this post


Link to post
Share on other sites
Quote:
Original post by beebs1
nVidia PerfHUD should be able to tell you this, and a lot more besides.

GPU PerfStudio is a similar tool from ATI/AMD.


I use an nvidia card and certainly looked at PerfHUD but that's only for D3D applications. I could not find a total amount of memory used by the program with gDebugger either(could have missed the feauture though, there is a lot of info there)

Share this post


Link to post
Share on other sites
Quote:
Original post by Numsgil
A quick and dirty way to find the amount of VRAM available when your program starts is to make 1 meg textures/render targets until it fails. If you can make 64 1meg textures, your card is 64MB.


I tested an application that was using(about 70mb) more than the maximum video memory of the video card(32mb) and it worked but very slowly, the textures were loaded okay, only it worked very slowly(guess it was running in software). So i'm not sure this may be of help...

[Edited by - Deliverance on August 12, 2008 4:15:23 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Numsgil
A quick and dirty way to find the amount of VRAM available when your program starts is to make 1 meg textures/render targets until it fails. If you can make 64 1meg textures, your card is 64MB.


Ya that won't work. Your graphics driver will regularly move textures in and out of vram. So it is possible to allocate more texture memory that there is vram.

Your method would probably work if you used a feature that is guaranteed to be located in vram, such as pbuffers. However, that doesn't make this technique an less offensive (for obvious reasons).

Share this post


Link to post
Share on other sites
There's something that will fail if you're out of VRAM. I though it was textures but I might be wrong. Try creating a hardware buffer. I know for sure those fail. The trick is to find something that can only be done in VRAM, and create a couple of them until it fails, and then calculate the amount of VRAM from that.

Incidentally this trick comes from Game Coding Complete 2nd Edition. If anyone can think of a better way to have a nice dialog pop up when the user tries to run your game that says "sorry chump, you need more VRAM", I'd like to hear it, too :)

Share this post


Link to post
Share on other sites
I tried nviddia PerfSDK, because the HUD is only for D3D. The problem is it cannot display the amount of video memory used. I says 0 all the time. Here's a similar post with the same problem:http://developer.nvidia.com/forums/index.php?showtopic=233. So are we both doing something wrong? I tried collecting the info with Perfmon solution and it too does say 0 for video memory usage.

Share this post


Link to post
Share on other sites
Which GPU do you have? PerfHUD has different capabilities for different hardware.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!