Jump to content


Direct X - D3DPOOL_DEFAULT problem


6 replies to this topic

#1 Spudman

    Member

  • Members
  • PipPip
  • 38 posts

Posted 05 September 2006 - 01:31 PM

I am using 'D3DXCreateTextureFromFileEx' to load textures straight into
Video Ram ( D3DPOOL_DEFAULT ). However I noticed that when I release
the textures the memory does not seem to be returned to the pool....
( using GetAvailableTextureMem() shows that this is the case! ).

HOWEVER... If I use D3DPOOL_MANAGED then the memory appears to be
returned....

Why should this be ?

#2 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 698 posts

Posted 05 September 2006 - 02:29 PM

Did you check the output from directx when it is placed in debug mode (using the option in the control panel and dbmon, assuming that you have the sdk installed)? Usually it provides useful information in cases like this.

#3 Goz

    Senior Member

  • Members
  • PipPipPipPip
  • 575 posts

Posted 05 September 2006 - 02:55 PM

It can take several frames before the runtime has actually finished with that "Released" resource and hence it can remain resident longer than you may expect...

#4 Spudman

    Member

  • Members
  • PipPip
  • 38 posts

Posted 06 September 2006 - 01:49 PM

The debugger don't give no clues.... the memory is definately not available
(even after many frames...), guess I'll just make do with the MANAGED pool at the moment until I can work out why DirectX isn't returning the video memory when the texture is in the D3DPOOL_DEFAULT.... problem is I want
stuff forced into video mem. to avoid long upload times on a laptop....

#5 MePHyst0

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 06 September 2006 - 04:35 PM

just curious, how do you release your texture?

#6 Goz

    Senior Member

  • Members
  • PipPipPipPip
  • 575 posts

Posted 06 September 2006 - 09:08 PM

and does the Release() call return 0?

#7 Spudman

    Member

  • Members
  • PipPip
  • 38 posts

Posted 07 September 2006 - 07:23 AM

Yes - I release with the usual .com Release method, and the expected return value is 0.... I'm still stumped....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users