Re: [PATCH 1/4] wined3d: fix flip_surface flag copying bug
Ignore patch 1/4 and 2/4 for now. I missed a reply from Henri to the bug report. Roderick On Wed, Apr 28, 2010 at 2:29 PM, Roderick Colenbrander <thunderbird2k(a)gmail.com> wrote:
This patch fixes a part of bug 22356. The issue is that Jedi Knight performs a full surface copy from the back to the front buffer which in the end uses flip_surface. flip_surface swaps the surface flags which causes an issue in this case because only one of the buffers ever had SFLAG_CONVERTED set. This means that SFLAG_CONVERTED is set for the odd frame and unset for the even frame. --- dlls/wined3d/surface.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fcdfec8..d14dbd0 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2917,10 +2917,13 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) { front->texture_name_srgb = tmp; }
+ /* Copy location flags */ { DWORD tmp_flags = back->Flags; - back->Flags = front->Flags; - front->Flags = tmp_flags; + back->Flags &= ~SFLAG_LOCATIONS; + back->Flags |= front->Flags & SFLAG_LOCATIONS; + front->Flags &= ~SFLAG_LOCATIONS; + front->Flags |= tmp_flags & SFLAG_LOCATIONS; } }
-- 1.6.3.3
participants (1)
-
Roderick Colenbrander