   Total amount of graphics memory
  Hi everybody,does anyone know how to query the total amount of graphics memory?Thanks,T.   
  You can get an approximation by IDirect3DDevice9::GetAvailableTextureMem().   ;Quote:Original post by KonfusiusYou can get an approximation by IDirect3DDevice9::GetAvailableTextureMem().That is as good as you're going to get without profiling the actual drivers themselves. Although, it's worth noting that the value returned from that call is likely to be much larger than the quantity you have on the hardware itself.It's not easy to retrieve the 128/256/512 values that your hardware actually has installed. From an application programming point of view, it's not really that useful either.hthJack   ;Quote:Original post by jollyjeffersQuote:Original post by KonfusiusYou can get an approximation by IDirect3DDevice9::GetAvailableTextureMem().That is as good as you're going to get without profiling the actual drivers themselves. Although, it's worth noting that the value returned from that call is likely to be much larger than the quantity you have on the hardware itself.It's not easy to retrieve the 128/256/512 values that your hardware actually has installed. From an application programming point of view, it's not really that useful either.hthJackWell it would be somewhat useful in the sense of choosing what quality of textures to use for the computer's default settings.   ;  Thanks for your replies.IDirect3DDevice9::GetAvailableTextureMem() returns the free amount of memory including AGP memory, right?I also tried to do it using DirectDraw. It used to return reasonable results on my old card (Radeon X800), but on my new card (Radeon X1800) it returns the same number as GetAvailableTextureMem().Is it possible to query the size of the AGP memory area to estimate the free amount of memory on the graphics card?Thanks.EDIT: Does anyone how the Microsoft System Information retrieves the amount of graphics memory?[Edited by - LaserMission on December 15, 2005 11:59:47 AM];Quote:Original post by FlimflamWell it would be somewhat useful in the sense of choosing what quality of textures to use for the computer's default settings.Yes, I see what you're saying... but it's useful in the sense that you can "guess" - but you can't rely on it. I know that if I chose maximum detail and filled that memory up it'd be pretty slow due to the AGP<->VRAM swapping [smile]Quote:EDIT: Does anyone how the Microsoft System Information retrieves the amount of graphics memory?Almost certainly queries the drivers directly. I doubt it goes via Direct3D for that information. There are some fragments of information around on how you can query display drivers, but it's not always complete - and prone to getting broken with new drivers..hthJack   ;  Why not do something like:UINT vMem=IDirect3DDevice9::GetAvailableTextureMem();MEMORYSTATUS mem;GlobalMemoryStatus(&mem);DWORD dwTotalMem = (DWORD)(mem.dwTotalPhys / DIV)+1;vMem-=dwTotalMem;;Quote:Original post by jollyjeffersQuote:Original post by FlimflamWell it would be somewhat useful in the sense of choosing what quality of textures to use for the computer's default settings.Yes, I see what you're saying... but it's useful in the sense that you can "guess" - but you can't rely on it. I know that if I chose maximum detail and filled that memory up it'd be pretty slow due to the AGP<->VRAM swapping [smile]Quote:EDIT: Does anyone how the Microsoft System Information retrieves the amount of graphics memory?Almost certainly queries the drivers directly. I doubt it goes via Direct3D for that information. There are some fragments of information around on how you can query display drivers, but it's not always complete - and prone to getting broken with new drivers..hthJackAh, true :) Yeah, an estimation amount is generally good. I just remember reading somewhere that the returned value tends to estimate much higher than the actual amount, I've never actually had to use the function, myself :)   ;Quote:Original post by xDS4LxWhy not do something like:UINT vMem=IDirect3DDevice9::GetAvailableTextureMem();MEMORYSTATUS mem;GlobalMemoryStatus(&mem);DWORD dwTotalMem = (DWORD)(mem.dwTotalPhys / DIV)+1;vMem-=dwTotalMem;Hmm, so you mean subtracting the system memory (such as 1024mb in my case) from the reported value (which is around 600mb in my case)... to try and get the 128mb that my GPU has?Whilst I don't think your fragment would yield *reliable* results it might be possible to get from GetAvailableTextureMem() to the 128/256/512 values that the hardware has installed, its not likely to be a universal result..There are a lot of unknowns involved in the value that GetAvailableTextureMem() returns.Jack   ;  you can use the dxdiag com interfaces to get the amount of video memory.  this gives you the number you see when you run dxdiag.exe and afaik is the best way to get vidmem.   