ddraw: Use wined3d_texture_preload() in d3d_device7_PreLoad().
This is safe because D3D is always initialized in D3D device methods. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8ae4580137
commit
59116f833e
|
@ -5631,7 +5631,7 @@ static HRESULT d3d_device7_PreLoad(IDirect3DDevice7 *iface, IDirectDrawSurface7
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
wined3d_surface_preload(surface->wined3d_surface);
|
wined3d_texture_preload(surface->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
|
|
@ -1867,19 +1867,6 @@ static inline unsigned short float_32_to_16(const float *in)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDECL wined3d_surface_preload(struct wined3d_surface *surface)
|
|
||||||
{
|
|
||||||
TRACE("surface %p.\n", surface);
|
|
||||||
|
|
||||||
if (!surface->resource.device->d3d_initialized)
|
|
||||||
{
|
|
||||||
ERR("D3D not initialized.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wined3d_texture_preload(surface->container);
|
|
||||||
}
|
|
||||||
|
|
||||||
void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
||||||
{
|
{
|
||||||
TRACE("surface %p.\n", surface);
|
TRACE("surface %p.\n", surface);
|
||||||
|
|
|
@ -228,7 +228,6 @@
|
||||||
@ cdecl wined3d_surface_get_resource(ptr)
|
@ cdecl wined3d_surface_get_resource(ptr)
|
||||||
@ cdecl wined3d_surface_getdc(ptr ptr)
|
@ cdecl wined3d_surface_getdc(ptr ptr)
|
||||||
@ cdecl wined3d_surface_map(ptr ptr ptr long)
|
@ cdecl wined3d_surface_map(ptr ptr ptr long)
|
||||||
@ cdecl wined3d_surface_preload(ptr)
|
|
||||||
@ cdecl wined3d_surface_releasedc(ptr ptr)
|
@ cdecl wined3d_surface_releasedc(ptr ptr)
|
||||||
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
|
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
|
||||||
@ cdecl wined3d_surface_unmap(ptr)
|
@ cdecl wined3d_surface_unmap(ptr)
|
||||||
|
|
|
@ -2479,7 +2479,6 @@ struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_su
|
||||||
HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc);
|
HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc);
|
||||||
HRESULT __cdecl wined3d_surface_map(struct wined3d_surface *surface,
|
HRESULT __cdecl wined3d_surface_map(struct wined3d_surface *surface,
|
||||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||||
void __cdecl wined3d_surface_preload(struct wined3d_surface *surface);
|
|
||||||
HRESULT __cdecl wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc);
|
HRESULT __cdecl wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc);
|
||||||
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
|
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
|
||||||
HRESULT __cdecl wined3d_surface_unmap(struct wined3d_surface *surface);
|
HRESULT __cdecl wined3d_surface_unmap(struct wined3d_surface *surface);
|
||||||
|
|
Loading…
Reference in New Issue