Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: VRAM usage not reported correctly.  (Read 343 times)
AriusEso
Customers
Community Member
*****
Posts: 377

Esoteric


« on: July 14, 2008, 09:06:56 PM »

I vaguely remember someone else mentioning this. But I couldn't find a bug thread. I was stress testing one of my loading routines and I noticed only minimal VRAM usage. I'm loading 869mb's worth of textures with only 2-4mb's of VRAM being used. The amount changes when I switch from windowed to fullscreen and vice-versa. Now, I am recreating my render targets on this occurrence, so I know it's not them being dropped from memory. I'm assuming TV doesn't drop texture resources on device reset(?).

Fullscreen: http://azazeldev.org/possible_bugs/full.png
Windowed: http://azazeldev.org/possible_bugs/window.png

VRAM usage is bottom left.

I'm grabbing the values by doing:

Code:
std::string Free     = mageCore::Util->IntToStr((mageCore::CC.m_Textures->GetFreeTextureMemory() / 1024) / 1024);
std::string Used     = mageCore::Util->IntToStr((mageCore::CC.m_Textures->GetUsedTextureMemory() / 1024) / 1024);
std::string Comb     = "VRAM: " + mageCore::Util->CombineStrings(Used, Free, "/") + " MB";

Which I assume is correct.

So are these functions borked, or is it something my end?

Edit:

Also, just had a thought when I woke this morning. You are loading the textures in to VRAM, right, and not system RAM? ( I vaguely remember the default pool resources get lost on device reset... ? ).
« Last Edit: July 15, 2008, 08:27:23 AM by AriusEso » Logged

SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #1 on: July 17, 2008, 12:46:40 PM »

TextureMemory is really not like VRAM.
You have actually 3 places : VRAM / NONLOCALvideomemory / SYSTEMMEMORY

All textures are first stored in RAM, except rendersurfaces, they're uploaded to NON LOCAL MMEMORy or VRAM depending on the priority of the texture.

You shouldn't use the numbers returned by the GetTextureMemory as VRAM numbers

Unfortunately there is no way to get really the used/free VRAM, it's missing from DirectX9 if I remember well.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks