d3d8: Use wined3d_resource_map() in d3d8_indexbuffer_Lock().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9853b59cd7
commit
9a82f0efa2
|
@ -465,14 +465,20 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, UINT o
|
||||||
BYTE **data, DWORD flags)
|
BYTE **data, DWORD flags)
|
||||||
{
|
{
|
||||||
struct d3d8_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer8(iface);
|
struct d3d8_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer8(iface);
|
||||||
|
struct wined3d_map_desc wined3d_map_desc;
|
||||||
|
struct wined3d_box wined3d_box = {0};
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n",
|
TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n",
|
||||||
iface, offset, size, data, flags);
|
iface, offset, size, data, flags);
|
||||||
|
|
||||||
|
wined3d_box.left = offset;
|
||||||
|
wined3d_box.right = offset + size;
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = wined3d_buffer_map(buffer->wined3d_buffer, offset, size, data, flags);
|
hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->wined3d_buffer),
|
||||||
|
0, &wined3d_map_desc, &wined3d_box, flags);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
*data = wined3d_map_desc.data;
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue