[PATCH 2/5] wined3d: Set palettes on the swapchain.

Henri Verbeet hverbeet at gmail.com
Thu May 15 08:27:51 CDT 2014


On 15 May 2014 14:33, Stefan Dösinger <stefan at codeweavers.com> wrote:
> diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c
> index 3f7e2ad..780f068 100644
> --- a/dlls/wined3d/palette.c
> +++ b/dlls/wined3d/palette.c
> @@ -136,8 +136,8 @@ HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette,
>          if (resource->type == WINED3D_RTYPE_SURFACE)
>          {
>              struct wined3d_surface *surface = surface_from_resource(resource);
> -            if (surface->palette == palette)
> -                surface->surface_ops->surface_realize_palette(surface);
> +            if (surface->swapchain && surface->swapchain->palette == palette)
> +                surface->swapchain->swapchain_ops->swapchain_realize_palette(surface->swapchain);
>          }
>      }
>
I don't think this kind of thing should be needed. You should be able
to make the palette texture that currently lives in the ARB program
shader backend a property of the wined3d palette, and then presents
can just make sure the palette texture is current. Something similar,
if perhaps slightly more involved, should be possible for the GDI
swapchain with GDI palettes.



More information about the wine-devel mailing list