Stefan Dösinger wrote:
Does wined3d have to know if the surface is implicit? Wouldn't it be sufficient to just store it in the d3d8/9 surface? This would avoid adding more complexity to wined3d.
The problem is the implicit surface (IS) destruction in wined3d (device and swapchain). Release won't destroy them, so wined3d needs a way to destroy IS. I solved it with setImplicit(false); release;.
Another posibility would be to move the IS destruction to d3d8/d3d9. There we would have more control over the IS, and the parentDevice problem from patch [5] would also be solved. But it means some code duplication in d3d8/d3d9.
I went for less code.