query video mem???

Started by
2 comments, last by dma42 19 years, 2 months ago
Is there a call (query) at runtime to determine total video memory avaiable and current video memory used?????
Advertisement
I never used it, but there is IDirect3DDevice9::GetAvailableTextureMem() that returns an estimate of the available texture memory. But as stated in the SDK, this function cannot be used to know the exact amount of memory left since all HW have different alignment, internal format and overhead in their resources.
This may not be exactly what you are looking for, but you can use hardware queries to determine a lot of current info about the graphics card. Check out the queries page at:

DirectX Graphics -> Programming Guide -> Advanced Topics -> Queries

Specifically, create a RESOURCEMANAGER query, and then check your D3DDEVINFO_RESOURCEMANAGER structure. There, you can find stats pertaining to video memory usage. However, the RESOURCEMANAGER query is only enabled in the debug runtime.

There are lots of other really useful queries, too. I believe PIX uses a lot of them to get some of it's information.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
the direct draw device caps include some informations about the video memory:

dwVidMemTotal, dwVidMemFree, etc.
(take a look at them in the directx caps viewer).

The results are great for debugging, but it's no longer recommended to use dd in release builds. You also have to link the ddraw.lib if you want to use this function.

----
dma

This topic is closed to new replies.

Advertisement