Am Mittwoch 15 November 2006 23:33 schrieb Markus Amsler:
dlls/wined3d/surface.c | 14 ++++++++++++++ dlls/wined3d/surface_gdi.c | 2 ++ dlls/wined3d/wined3d_private.h | 3 +++ include/wine/wined3d_interface.h | 4 ++++ 4 files changed, 23 insertions(+), 0 deletions(-)
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.
Btw, the refcount of the wined3d surfaces can't be seen by the app, so you don't have to add your 0 refcount hack to wined3d. Actually I am thinking of dropping refcounting in wined3d completely, it makes things just unneccessary difficult.
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.