static bool vrend_hw_switch_query_context(struct vrend_context *ctx)
{
   if (vrend_state.use_async_fence_cb) {
      if (!ctx)
         return false;

      if (ctx == vrend_state.current_sync_thread_ctx)
         return true;

      if (ctx->ctx_id != 0 && ctx->in_error)
         return false;

      vrend_clicbs->make_current(ctx->sub->gl_context);
      vrend_state.current_sync_thread_ctx = ctx;
      return true;
   } else {
      return vrend_hw_switch_context(ctx, true);
   }
}
static bool vrend_hw_switch_query_context(struct vrend_context *ctx)
{
   if (vrend_state.use_async_fence_cb) {
      if (!ctx)
         return false;

      if (ctx == vrend_state.current_sync_thread_ctx)
         return true;

      if (ctx->ctx_id != 0 && ctx->in_error)
         return false;

      vrend_clicbs->make_current(ctx->sub->gl_context);
      vrend_state.current_sync_thread_ctx = ctx;
      return true;
   } else {
      return vrend_hw_switch_context(ctx, true);
   }
}