static HRESULT WINAPI d3d8_volume_UnlockBox(IDirect3DVolume8 *iface) { struct d3d8_volume *volume = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx); wined3d_mutex_unlock(); return hr; }
static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface) { struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx); wined3d_mutex_unlock(); switch(hr) { case WINEDDERR_NOTLOCKED: return D3DERR_INVALIDCALL; default: return hr; } }