wined3d: Use resource mapping functions in process_vertices_strided().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d039ee73f8
commit
7d97171425
|
@ -2885,6 +2885,8 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
|||
DWORD DestFVF)
|
||||
{
|
||||
struct wined3d_matrix mat, proj_mat, view_mat, world_mat;
|
||||
struct wined3d_map_desc map_desc;
|
||||
struct wined3d_box box = {0};
|
||||
struct wined3d_viewport vp;
|
||||
UINT vertex_size;
|
||||
unsigned int i;
|
||||
|
@ -2925,11 +2927,14 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
|||
doClip = FALSE;
|
||||
|
||||
vertex_size = get_flexible_vertex_size(DestFVF);
|
||||
if (FAILED(hr = wined3d_buffer_map(dest, dwDestIndex * vertex_size, dwCount * vertex_size, &dest_ptr, 0)))
|
||||
box.left = dwDestIndex * vertex_size;
|
||||
box.right = box.left + dwCount * vertex_size;
|
||||
if (FAILED(hr = wined3d_resource_map(&dest->resource, 0, &map_desc, &box, 0)))
|
||||
{
|
||||
WARN("Failed to map buffer, hr %#x.\n", hr);
|
||||
return hr;
|
||||
}
|
||||
dest_ptr = map_desc.data;
|
||||
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
|
@ -3139,7 +3144,7 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
|||
}
|
||||
}
|
||||
|
||||
wined3d_buffer_unmap(dest);
|
||||
wined3d_resource_unmap(&dest->resource, 0);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue