[PATCH 3/5] wined3d: Don't bother allocating "free_fences" in context_create().

Henri Verbeet hverbeet at codeweavers.com
Fri Apr 19 11:34:47 CDT 2019


We use "free_fences" with wined3d_array_reserve(), which handles NULL fine.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/context.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 425721aaa23..476d96939b8 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1908,13 +1908,8 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
         goto out;
     list_init(&context->occlusion_queries);
 
-    context->free_fence_size = 4;
-    if (!(context->free_fences = heap_calloc(context->free_fence_size, sizeof(*context->free_fences))))
-        goto out;
     list_init(&context->fences);
-
     list_init(&context->so_statistics_queries);
-
     list_init(&context->pipeline_statistics_queries);
 
     list_init(&context->fbo_list);
@@ -1992,7 +1987,6 @@ out:
         wined3d_release_dc(swapchain->win_handle, context->hdc);
     device->shader_backend->shader_free_context_data(context);
     device->adapter->fragment_pipe->free_context_data(context);
-    heap_free(context->free_fences);
     heap_free(context->free_occlusion_queries);
     heap_free(context->free_timestamp_queries);
     heap_free(context);
-- 
2.11.0




More information about the wine-devel mailing list