[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 1/4] wined3d: fix flip_surface flag copying bug
From:       Roderick Colenbrander <thunderbird2k () gmail ! com>
Date:       2010-04-28 12:38:42
Message-ID: v2vc8485d471004280538t73061d72nc71d8edd0d221515 () mail ! gmail ! com
[Download RAW message or body]

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@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
>
>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic