[PATCH 2/5] wined3d: Introduce a wined3d_vertex_pipe_ops structure.
Rico Schüller
kgbricola at web.de
Thu Apr 25 04:58:02 CDT 2013
On 25.04.2013 09:59, Henri Verbeet wrote:
> -static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct fragment_pipeline *fragment_pipe)
> +static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe,
> + const struct fragment_pipeline *fragment_pipe)
> {
> struct shader_arb_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv));
> struct fragment_caps fragment_caps;
> - void *fragment_priv;
> + void *vertex_priv, *fragment_priv;
> +
> + if (!(vertex_priv = vertex_pipe->vp_alloc(&arb_program_shader_backend, priv)))
> + {
> + ERR("Failed to initialize vertex pipe.\n");
> + HeapFree(GetProcessHeap(), 0, priv);
> + return E_FAIL;
> + }
>
> if (!(fragment_priv = fragment_pipe->alloc_private(&arb_program_shader_backend, priv)))
> {
> ERR("Failed to initialize fragment pipe.\n");
> + fragment_pipe->free_private(device);
Shouldn't that vertex_pipe->vp_free(device)?
> HeapFree(GetProcessHeap(), 0, priv);
> return E_FAIL;
> }
More information about the wine-devel
mailing list