DirectX SDK

D3DDEVINFO_TEXTUREMANAGER

The D3DDEVINFO_TEXTUREMANAGER structure contains information about the current state of the texture manager. This structure is used with the IDirect3DDevice7::GetInfo method.

typedef struct _D3DDEVINFO_TEXTUREMANAGER {
    BOOL    bThrashing;         
    DWORD   dwNumEvicts;        
    DWORD   dwNumVidCreates;    
    DWORD   dwNumTexturesUsed;  
    DWORD   dwNumUsedTexInVid;  
    DWORD   dwWorkingSet;       
    DWORD   dwWorkingSetBytes;  
    DWORD   dwTotalManaged;     
    DWORD   dwTotalBytes;       
    DWORD   dwLastPri;          
} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
 

Members

bThrashing
Thrashing status. TRUE if thrashing occurred during the last frame, or FALSE otherwise.
dwNumEvicts
Number of textures that were removed during the last frame.
dwNumVidCreates
Number of textures that were created in video memory during the last frame.
dwNumTexturesUsed
Total number of textures used during the last frame.
dwNumUsedTexInVid
Number of video memory textures that were used during the last frame.
dwWorkingSet
Number of textures currently resident in video memory.
dwWorkingSetBytes
Number of bytes currently allocated by textures resident in video memory.
dwTotalManaged
Total number of managed textures.
dwTotalBytes
Total number of bytes allocated for managed textures.
dwLastPri
Priority of last evicted texture.

Remarks

Use the values in dwNumUsedTexInVid and dwNumTexturesUsed to determine the percentage of textures used during the last frame that were resident in video memory (local or nonlocal). The following code fragment shows how to make this computation:

// For this example, the d3dtminfo variable is a D3DDEVINFO_TEXTUREMANAGER
// structure that has been filled by a call to IDirect3DDevice7::GetInfo.

DWORD dwHitRate;

// Retrieve the percentage of textures used that were in video memory.
dwHitRate = (d3dtminfo.dwNumUsedTexInVid * 100) / d3dtminfo.dwNumTexturesUsed;

See Also

IDirect3DDevice7::GetInfo