[PATCH 6/8] wined3d: replace wined3d_surface_preload with wined3d_texture_preload

Henri Verbeet hverbeet at gmail.com
Thu Sep 10 06:09:18 CDT 2015


On 9 September 2015 at 12:23, Riccardo Bortolato <rikyz619 at gmail.com> wrote:
>  static void WINAPI d3d9_surface_PreLoad(IDirect3DSurface9 *iface)
>  {
>      struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
> +    struct d3d9_texture *texture = surface->texture;
>
>      TRACE("iface %p.\n", iface);
>
> +    /* Standalone surfaces can't be in D3DPOOL_MANAGED */
> +    if (!texture)
> +        return;
> +
>      wined3d_mutex_lock();
> -    wined3d_surface_preload(surface->wined3d_surface);
> +    wined3d_texture_preload(texture->wined3d_texture);
>      wined3d_mutex_unlock();
>  }
>
This isn't necessarily wrong, but it may be too complicated. In
particular, at some point we'll have to do maps for e.g. off-screen
plain surfaces as well, and then you can't avoid getting the wined3d
texture from somewhere. That probably means either creating an
implicit d3d9 texture for those surfaces, or just storing a pointer to
the wined3d texture in the d3d9 surface. So I'd like to see
map()/unmap() before preload().



More information about the wine-devel mailing list