[PATCH 1/6] wined3d: Add support for buffers in wined3d_device_update_sub_resource().
Henri Verbeet
hverbeet at gmail.com
Sun Jan 3 12:06:19 CST 2016
On 1 January 2016 at 18:08, Józef Kucia <jkucia at codeweavers.com> wrote:
> @@ -3989,6 +3989,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
> TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
> device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
>
> + if (resource->type == WINED3D_RTYPE_BUFFER)
> + {
> + struct wined3d_buffer *buffer = buffer_from_resource(resource);
> + HRESULT hr;
> +
> + if (FAILED(hr = wined3d_buffer_upload_data(buffer, box, data)))
> + WARN("Failed to update buffer data, hr %#x.\n", hr);
> +
> + return;
> + }
Are the sub_resource_idx and row_pitch/depth_pitch parameters
validated in any way for buffer resources?
More information about the wine-devel
mailing list