Module: wine Branch: master Commit: 1d27b69f3219f3bd5ac9cf68dd0eebf0f0a86f7d URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d27b69f3219f3bd5ac9cf68dd...
Author: Józef Kucia jkucia@codeweavers.com Date: Wed Apr 5 15:38:06 2017 +0200
wined3d: Simplify logic in wined3d_event_query_issue().
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/query.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 1927e7e..685c5ce 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -214,27 +214,17 @@ enum wined3d_event_query_result wined3d_event_query_finish(const struct wined3d_
void wined3d_event_query_issue(struct wined3d_event_query *query, const struct wined3d_device *device) { + struct wined3d_context *context = NULL; const struct wined3d_gl_info *gl_info; - struct wined3d_context *context;
- if (query->context) - { - if (!(context = context_reacquire(device, query->context)) - && !query->context->gl_info->supported[ARB_SYNC]) - { - context_free_event_query(query); - context = context_acquire(device, NULL, 0); - context_alloc_event_query(context, query); - } - if (!context) - context = context_acquire(device, NULL, 0); - } - else - { + if (query->context && !(context = context_reacquire(device, query->context)) + && !query->context->gl_info->supported[ARB_SYNC]) + context_free_event_query(query); + if (!context) context = context_acquire(device, NULL, 0); - context_alloc_event_query(context, query); - } gl_info = context->gl_info; + if (!query->context) + context_alloc_event_query(context, query);
if (gl_info->supported[ARB_SYNC]) {