In error reports from some end users of our game I have quite often seen following behaviour: IDirect3DVertexBuffer9::Lock
fails, returned error code is D3DERR_NOTAVAILABLE
.
Once this happens, quite frequently (but not always) it is followed by the CreateTexture
or CreateVertexBuffer
call failing with error D3DERR_OUTOFVIDEOMEMORY
.
What are possible reasons for a vertex buffer lock failure? Could the virtual memory address space be exhausted, or what?
Based on the DIRECTXDEV response by Chuck Walbourn from Microsoft, besides of "out of address space" another cause could be "out of page pool".
Alternatively, on Windows XP this could indicate you have hit the limits of paged pool kernel memory. Typically this happens when you create a lot of Direct3D resources (textures, etc.)
We DO create a lot of Direct3D resources.