This topic is now archived and is closed to further replies.


How much Video Memory?

Recommended Posts

Infinisearch    2964
In the DirectX CapsViewer included with the DirectX8.1 SDK under: DirectDrawDevices/~DisplayDevice~/Memory/ The program reports video, local, non-local, and texture memory. Does anybody know by what method the program gets this information? The closest I got was the GetAvailableTextureMem() method of the IDirect3DDevice interface. The D3DCAPS8 structure doesn''t seem to possess the information either. Any help would be greatly appreciated.

Share this post

Link to post
Share on other sites
S1CA    1418
I''m pretty sure it uses DirectDraw (i.e. DX7) interfaces to get that info before creating an instance of D3D8 to get the rest. It needs to do that anyway to ascertain which version of the SDK is installed.

In fact, a quick dependency walk reveals it imports both DDRAW.DLL and D3D8.DLL.

Beware though:

- some older drivers mis-report these values (0 or -1 in some cases).

- most drivers round the values, its not an exact science.

- some drivers give you the same value for texture memory and a value for local video memory. For those drivers this DOES NOT mean total_local_video = local+texture, they just duplicate the value to both.

- some cards like the old 3Dfx ones, and possibly one of the ATI ones actually have 2 graphics chips. VRAM used by one can''t necessarily be used by the other.

- having 2621440bytes of texture memory **DOES NOT** necessarily (even usually) mean that you can create 10 256x256x32 surfaces successfully.

- consider issues such as fragmentation, memory alignment (e.g. a surface might need to start on a 32byte boundary), driver data (DMA headers etc).

- unless you''re writing a "system information" type utility, the numbers you get back for these values should only be used as a VERY rough guide.
For example switching to higher detail textures if there is more than 4Mb of texture memory.

Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites