Skip to main content
gamedev.net
🔒 Locked

D3DPOOL_DEFAULT Question..

Started by ClementLuminy Oct 15, 2005 at 7:12 AM 2 replies 400+ views
Original Post
ClementLuminy
ClementLuminy
In wy current D3D Application i choose to store EVERY Textures resources in the D3DPOOL_DEFAULT. My application allow the restauration of resources after a lost of focus.... Do you thinks it's a good idéa (in term of performance) to use exclusivly the D3DPOOL_DEFAULT ??? I have somes problems to undestand the diférence between each Pool. D3DPOOL_DEFAULT seams to be the most efficient one..... Thanks for your help ! Clément Vidal
jollyjeffers
jollyjeffers
For simple demo's I tend to throw everything in the default pool.

There are cases where D3DPOOL_MANAGED will be better due to it maintaining a system-memory copy of the resource. If you're doing lots of resource modification (e.g. Lock() operations) then it can sometimes perform a bit better.

There was a good thread discussing this on DIRECTXDEV a while back. I'll see if I can find it for you...

Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
jollyjeffers
jollyjeffers
Another quick thing... D3DPOOL_MANAGED allows the runtime/driver to do some automagic resource management for you. Because it has a copy in system memory it can transparently page in/out the data as appropriate for the resources priority and usage pattern.

Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
neneboricua19
neneboricua19
In general, you should put as many resources as possible in MANAGED memory and only use DEFAULT memory for objects that can't be created in MANAGED (like render targets and such). The reason for this, as Jack stated, is that it allows D3D to handle memory management for you.

If you throw everything into DEFAULT memory, what happens if you try to allocate too many resources? Running out of video memory opens up a huge can of worms in D3D. On the other hand, using MANAGED memory lets D3D use AGP memory as well so it can page textures in and out of video memory as necessary.

Again, as Jack mentioned, there as a good thread about this on the DirectXDev mailing list. In the end, the general concensus was that you should create as many resources as you can in MANAGED memory and only use DEFAULT for things that cannot be created in MANAGED.

neneboricua

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.