Henri Verbeet : wined3d: Implement the initial buffer data upload on top of wined3d_device_update_sub_resource ().
Alexandre Julliard
julliard at winehq.org
Tue Sep 20 10:45:01 CDT 2016
Module: wine
Branch: master
Commit: 84db05620f2318b8a088b92da83a95e042cb28ca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=84db05620f2318b8a088b92da83a95e042cb28ca
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Sep 20 11:41:38 2016 +0200
wined3d: Implement the initial buffer data upload on top of wined3d_device_update_sub_resource().
Mostly for consistency with the initial texture data upload.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/buffer.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 7dc33c7..b927105 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1347,15 +1347,9 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
}
buffer->maps_size = 1;
- if (data && FAILED(hr = wined3d_buffer_upload_data(buffer, NULL, data->data)))
- {
- ERR("Failed to upload data, hr %#x.\n", hr);
- buffer_unload(&buffer->resource);
- resource_cleanup(&buffer->resource);
- wined3d_resource_wait_idle(&buffer->resource);
- HeapFree(GetProcessHeap(), 0, buffer->maps);
- return hr;
- }
+ if (data)
+ wined3d_device_update_sub_resource(device, &buffer->resource,
+ 0, NULL, data->data, data->row_pitch, data->slice_pitch);
return WINED3D_OK;
}
More information about the wine-cvs
mailing list