0

When using CreateBitmapFromWicBitmap() I can see the GPU memory usage increase. The code looks like:

hr = pRenderTarget->CreateBitmapFromWicBitmap(pImagePoolEntry->pConverter,
NULL, pImagePoolEntry->pPoolImage.GetAddressOf());

pPoolImage is defined as ComPtr<ID2D1Bitmap> pPoolImage;

The pPoolImage pointer hangs around for the life of using the image, when done and the pPoolImage is released I do not see the GPU memory usage decrease.

So is there a way to have the GPU release the image data? or should I not be worried. The only time I see the usage drop is when the application is terminated.

Note: I'm using GPU-Z to monitor the GPU memory usage.

Thanks

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
Tony Teveris
  • 165
  • 10

1 Answers1

0

DirectX video memory destruction is deferred. You can explicitly use IDXGIDevice3::Trim, but generally it doesn't matter in real-world cases.

See MSDN

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81