Partager via


D2D1_RESOURCE_USAGE structure

Describes the memory used by image textures and shaders.

Syntax

typedef struct D2D1_RESOURCE_USAGE {
  SIZE_T workingTextureAreaMemory;
  SIZE_T cachingTextureAreaMemory;
  SIZE_T shaderCacheMemory;
} D2D1_RESOURCE_USAGE, *PD2D1_RESOURCE_USAGE;

Members

  • workingTextureAreaMemory
    An approximate amount of memory usage by image pipeline processing textures.

  • cachingTextureAreaMemory
    The approximate amount of memory used by the cached effect.

  • shaderCacheMemory
    The approximate amount of memory used by cached shaders.

Remarks

The processing texture area memory will take the width and height of all of the textures allocated for processing and multiply this by the number of channels and the bit depth per channel.

The cachingTextureArea memory will take the width and height of all of the textures allocated for cache effects and multiply this by the number of channels and the bit depth per channel.

The shaderCacheMemory will sum the number of bytes of pre-JITed shader code that has been loaded.

None of these measures take into account:

  • Driver allocation boundaries or overhead.
  • The cost of system memory structures used to track the video memory.
  • The contraction or expansion caused by JITing shaders.

This data is intended to be used by the application as a reference for when it should clear resources. It is not intended to be a precise profiling tool.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2D1.h

Type library

D2D1.lib