new refcount for d3d ??

Stefan Dösinger stefan at codeweavers.com
Sun Apr 5 17:23:39 CDT 2009


Am Sonntag, 5. April 2009 23:59:01 schrieb Henri Verbeet:
> I don't know what was discussed on IRC, but essentially we need to
> keep track of which resources (in a broad way, not just objects
> derived from IWineD3DResource) are in use by a stateblock in wined3d,
> and delay destroying the d3d9 object as long as the wined3d object is
> in use.
Yep

> The most reasonable way I can think of to do this at the moment is to
> have the d3d9 Release() methods not do the cleanup themselves, but
> instead have a destroy/cleanup function which the wined3d object calls
> once its refcount reaches zero. That also means the stateblock needs
> to keep a reference to these objects, of course. I think Stefan wrote
> something along those lines once for vertex buffers.
That was my suggestion. We already keep a wined3d-internal refcount for all 
these objects(shaders, textures, ...), and my plan was a callback 
function(maybe provided via a COM interface, similar to the 
WineD3DDeviceParent one). Some time ago I thought you weren't too fond of 
that idea, but maybe that was a missunderstanding.



More information about the wine-devel mailing list