I am working on a Direct3D rendering application that uses a lot of texture RAM. I notice that if I allocate a Pool.Default volume texture:
_texture = new VolumeTexture(device, size.Width, size.Height, size.Depth, 1, Usage.None, Format.L16, Pool.Default);
my process's system memory decreases by the same amount I allocate on the video card. I think this is unexpected. This texture is supposed to be video-memory only.
Effectively this means I can not use all texture RAM on high end video cards, I can not afford to lose a whole gigabyte of system RAM. We're short on adress space as it is....
Is there anybody who knows what's happening here? Are there ways to prevent this from happening?
This was seen on Windows 7 64 bit from a 32 bit process, using Directx 9c, with several different nVidia cards. The process is marked as /LARGEADRESSAWARE to make sure we get as much as adress space as possible.
You may have guessed by now that I am not writing a game.... but I assume the Direct3D experts are here to be found.... And I can imagine this issue affects games as much as it affects us...
EDIT:
This appears to happen only with Volume Textures. If I allocate 2D textures of the same size it does not happen. By default my volume textures were 32megabytes each. If I make them smaller (I tried down to 2megabytes each), There are still blocks being allocated. According to VMMap, each texture gets a 32 meg block in my process, flagged as "Read/Write/WriteCombine".
The fact that they are labeled as "WriteCombine" makes me really curious, no other block of memory is labeled like that.