Commit b83beb18 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d9: Use wined3d_resource_{map, unmap}() instead of wined3d_texture_{map, unmap}().

parent b8dc15da
......@@ -251,7 +251,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
}
wined3d_mutex_lock();
hr = wined3d_texture_map(surface->wined3d_texture, surface->sub_resource_idx,
hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
&map_desc, rect ? &box : NULL, flags);
wined3d_mutex_unlock();
......@@ -272,7 +272,7 @@ static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
hr = wined3d_texture_unmap(surface->wined3d_texture, surface->sub_resource_idx);
hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
wined3d_mutex_unlock();
switch(hr)
......
......@@ -148,7 +148,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
iface, locked_box, box, flags);
wined3d_mutex_lock();
hr = wined3d_texture_map(volume->wined3d_texture, volume->sub_resource_idx,
hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,
&map_desc, (const struct wined3d_box *)box, flags);
wined3d_mutex_unlock();
......@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
hr = wined3d_texture_unmap(volume->wined3d_texture, volume->sub_resource_idx);
hr = wined3d_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
wined3d_mutex_unlock();
return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment