frontends/va: set PIPE_FLUSH_ASYNC when possible

When there are external handles, flush cannot be async.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28771>
This commit is contained in:
Chia-I Wu 2024-04-15 15:02:52 -07:00 committed by Marge Bot
parent a90075e772
commit 7ed3874996
1 changed files with 4 additions and 0 deletions

View File

@ -1302,6 +1302,10 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
context->desc.base.fence = &surf->fence;
}
/* when there are external handles, we can't set PIPE_FLUSH_ASYNC */
if (context->desc.base.fence)
context->desc.base.flush_flags = drv->has_external_handles ? 0 : PIPE_FLUSH_ASYNC;
context->decoder->end_frame(context->decoder, context->target, &context->desc.base);
if (drv->pipe->screen->get_video_param(drv->pipe->screen,