Commit 1d27b69f authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Simplify logic in wined3d_event_query_issue().

parent 8b9ece67
...@@ -214,27 +214,17 @@ enum wined3d_event_query_result wined3d_event_query_finish(const struct wined3d_ ...@@ -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) 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; const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
if (query->context) if (query->context && !(context = context_reacquire(device, query->context))
{
if (!(context = context_reacquire(device, query->context))
&& !query->context->gl_info->supported[ARB_SYNC]) && !query->context->gl_info->supported[ARB_SYNC])
{
context_free_event_query(query); context_free_event_query(query);
context = context_acquire(device, NULL, 0);
context_alloc_event_query(context, query);
}
if (!context) if (!context)
context = context_acquire(device, NULL, 0); context = context_acquire(device, NULL, 0);
}
else
{
context = context_acquire(device, NULL, 0);
context_alloc_event_query(context, query);
}
gl_info = context->gl_info; gl_info = context->gl_info;
if (!query->context)
context_alloc_event_query(context, query);
if (gl_info->supported[ARB_SYNC]) if (gl_info->supported[ARB_SYNC])
{ {
......
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