Commit 249b494c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wined3d: Removed no longer needed wine_rb_init error handling.

parent c0fa655d
......@@ -4993,14 +4993,7 @@ static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wine
memset(priv->pshader_const_dirty, 1,
sizeof(*priv->pshader_const_dirty) * d3d_info->limits.ps_uniform_count);
if (wine_rb_init(&priv->signature_tree, &sig_tree_functions) == -1)
{
ERR("RB tree init failed\n");
fragment_pipe->free_private(device);
vertex_pipe->vp_free(device);
HeapFree(GetProcessHeap(), 0, priv);
return E_OUTOFMEMORY;
}
wine_rb_init(&priv->signature_tree, &sig_tree_functions);
priv->vertex_pipe = vertex_pipe;
priv->fragment_pipe = fragment_pipe;
......@@ -5884,13 +5877,7 @@ static void *arbfp_alloc(const struct wined3d_shader_backend_ops *shader_backend
else if (!(priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv))))
return NULL;
if (wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
if (priv != shader_priv)
HeapFree(GetProcessHeap(), 0, priv);
return NULL;
}
wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions);
priv->use_arbfp_fixed_func = TRUE;
return priv;
......@@ -7080,12 +7067,7 @@ static HRESULT arbfp_blit_alloc(struct wined3d_device *device)
if (!(priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv))))
return E_OUTOFMEMORY;
if (wine_rb_init(&priv->shaders, &wined3d_arbfp_blit_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
HeapFree(GetProcessHeap(), 0, priv);
return E_OUTOFMEMORY;
}
wine_rb_init(&priv->shaders, &wined3d_arbfp_blit_rb_functions);
device->blit_priv = priv;
......
......@@ -1323,13 +1323,7 @@ static void *atifs_alloc(const struct wined3d_shader_backend_ops *shader_backend
if (!(priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv))))
return NULL;
if (wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
HeapFree(GetProcessHeap(), 0, priv);
return NULL;
}
wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions);
return priv;
}
......
......@@ -5089,11 +5089,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
fragment_pipeline = adapter->fragment_pipe;
if (wine_rb_init(&device->samplers, &wined3d_sampler_rb_functions) == -1)
{
ERR("Failed to initialize sampler rbtree.\n");
return E_OUTOFMEMORY;
}
wine_rb_init(&device->samplers, &wined3d_sampler_rb_functions);
if (vertex_pipeline->vp_states && fragment_pipeline->states
&& FAILED(hr = compile_state_table(device->StateTable, device->multistate_funcs,
......
......@@ -8483,11 +8483,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
goto fail;
}
if (wine_rb_init(&priv->program_lookup, &wined3d_glsl_program_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
goto fail;
}
wine_rb_init(&priv->program_lookup, &wined3d_glsl_program_rb_functions);
priv->next_constant_version = 1;
priv->vertex_pipe = vertex_pipe;
......@@ -8921,13 +8917,7 @@ static void *glsl_vertex_pipe_vp_alloc(const struct wined3d_shader_backend_ops *
if (shader_backend == &glsl_shader_backend)
{
priv = shader_priv;
if (wine_rb_init(&priv->ffp_vertex_shaders, &wined3d_ffp_vertex_program_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
return NULL;
}
wine_rb_init(&priv->ffp_vertex_shaders, &wined3d_ffp_vertex_program_rb_functions);
return priv;
}
......@@ -9447,13 +9437,7 @@ static void *glsl_fragment_pipe_alloc(const struct wined3d_shader_backend_ops *s
if (shader_backend == &glsl_shader_backend)
{
priv = shader_priv;
if (wine_rb_init(&priv->ffp_fragment_shaders, &wined3d_ffp_frag_program_rb_functions) == -1)
{
ERR("Failed to initialize rbtree.\n");
return NULL;
}
wine_rb_init(&priv->ffp_fragment_shaders, &wined3d_ffp_frag_program_rb_functions);
return priv;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment