Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam:
- hr = ddraw_surface3_AddAttachedSurface(&This-
IDirectDrawSurface3_iface,
attachment_impl ? &attachment_impl->IDirectDrawSurface3_iface :
NULL); It isn't immediately clear to me why Surface3 is correct instead of Surface7. Do you have tests or bug reports to back this up?
Bug 3467 needs this change.
But I can write a small test. Would writing a test attaching an offscreen surface to another offscreen surface be enough to convince you of the correctness of the change? Indeed, only Z-buffer surfaces can be attached in version 7 of the metho.
Thanks in advance
A+
David
________________________________ De : Stefan Dösinger stefandoesinger@gmx.at À : wine-devel@winehq.org Envoyé le : Lundi 14 mai 2012 16h53 Objet : Re: ddraw: Forward AddAttachedSurface to the correct equivalent
Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam:
+ hr = ddraw_surface3_AddAttachedSurface(&This- IDirectDrawSurface3_iface, + attachment_impl ? &attachment_impl->IDirectDrawSurface3_iface :
NULL); It isn't immediately clear to me why Surface3 is correct instead of Surface7. Do you have tests or bug reports to back this up?
Am Montag, 14. Mai 2012, 18:45:01 schrieb paulo lesgaz:
But I can write a small test. Would writing a test attaching an offscreen
surface to another offscreen surface be enough to convince you of the correctness of the change? I recommend to port the entire AttachmentTest from dlls/ddraw/tests/dsurface.c to IDirectDrawSurface4. Please place the new test in ddraw4.c and follow the code style there. I'd be extra greatful if you could move AttachmentTest to ddraw1.c, AttachmentTest7 to ddraw7.c and also create a IDirectDrawSurface3 version in ddraw2.c.
Yes, that's a lot of work for fixing the bug. But ddraw is a complex API with many quirks, and we're past the point where quick fixes can be made without thurough testing.
As Matteo says, it probably makes more sense to forward Surface3 to Surface4 and change the Surface4 behavior than the other way around.
2012/5/14 Stefan Dösinger stefandoesinger@gmx.at:
Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam:
- hr = ddraw_surface3_AddAttachedSurface(&This-
IDirectDrawSurface3_iface,
- attachment_impl ? &attachment_impl->IDirectDrawSurface3_iface :
NULL); It isn't immediately clear to me why Surface3 is correct instead of Surface7. Do you have tests or bug reports to back this up?
I think it is for http://bugs.winehq.org/show_bug.cgi?id=3467, but probably a test would still help. Also maybe it should be implemented the other way around i.e. surface3_AddAttachedSurface calling into surface4_AddAttachedSurface.