1
\$\begingroup\$

In this question I saw that I was running out of memory in D3DPOOL_DEFAULT in DX9EX. After changing my usage from D3DUSAGE_DYNAMIC to 0 (static usage), everything runs wonderfully with no DX9 error.

At the point in my load process where I would previously get DX9's out of memory error, I now see system memory start to grow. So I assume that the WDDM is managing my textures.

So my question is, am I really seeing memory management here? I read about the WDDM in Copying and Accessing Resource Data (Direct3D 10), but I'm not sure that pertains to DX9EX. Wikipedia says: WDDM drivers allow video memory to be virtuallized and video data to be paged out of video memory into system RAM.

| improve this question | | | | |
\$\endgroup\$
1
\$\begingroup\$

Direct3D9Ex exposes the WDDM virtualized memory behavior, whereas Direct3D 9 on WDDM emulates the XPDM behavior. With Direct3D9Ex, you never get "Lost Device", but you can get "Device Removed".

"DYNAMIC" is a specific behavior which requires memory that is accessible by both the CPU and GPU that is in limited supply depending on your system setup, so you should definitely prefer to use "static" data wherever possible.

A lot of detail on this is covered in the talk "Why Your Windows Game Won't Run In 2,147,352,576 Bytes"

| improve this answer | | | | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.