vrend: Don't check queries in wrong context.

If we can't switch to the original context for the query objects,
don't check it.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
macos/master
Lepton Wu 5 years ago
parent 33cfd72346
commit daab8d327e
  1. 4
      src/vrend_renderer.c

@ -8869,8 +8869,8 @@ static void vrend_renderer_check_queries(void)
struct vrend_query *query, *stor;
LIST_FOR_EACH_ENTRY_SAFE(query, stor, &vrend_state.waiting_query_list, waiting_queries) {
vrend_hw_switch_context(vrend_lookup_renderer_ctx(query->ctx_id), true);
if (vrend_check_query(query))
if (!vrend_hw_switch_context(vrend_lookup_renderer_ctx(query->ctx_id), true) ||
vrend_check_query(query))
list_delinit(&query->waiting_queries);
}
}

Loading…
Cancel
Save