"Ann and Jason Edmeades" us@the-edmeades.demon.co.uk writes:
In this case (very pseudo code!)
D3D9 SetStreamSource (idx, d3d9_vb): Call WineD3D SetStreamSource(idx, d3d9_vb->wined3d_vb)
WineD3D SetStreamSource: In an array store the new vb and addref, and release the old one.
If I just addref/release the wined3d interface, I am not maintaining correct reference counting for the d3d9 object (Think: Create, SetStreamSource, Release. We would release the d3d9 one when we shouldn't).
Yes, but that should be up to the wined3d_vb object then, if it holds a pointer it has to maintain the reference count; users of wined3d_vb don't have to know that it contains a parent pointer.