On 14/11/06, Markus Amsler markus.amsler@oribi.org wrote:
After spamming wine-patches with d3d tests, I tried to implement the probed behaviour. Attached are two patches, which makes all d3d8 refcount test pass. They are small and ugly. The problems are:
The implicit surfaces now gets released if the refcount is -1. Somehow we have to force releasing d3d8 sufaces from wined3d. No idea how.
You could probably either force the refcount to 0 (ie, something like "while(IWineD3DSurface_Release(surface));"), or add an explicit destructor to the d3d8 implementation. That's not too pretty either, but I suppose it's better than releasing on -1.
I added a flag to mark the implicit surfaces. It's redundant, because wined3d knows the implicit surfaces. The other idea is calling GetRenderTarget and friends in Surface_(AddRef/Release). Besides the problem of an endless recursion, it would be quite an overhead.
Shouldn't we just check if the surface's container is the same as the surface's device?
Totally unrelated to this, are you ever on IRC?