diff options
author | Dmitry Osipenko <dmitry.osipenko@collabora.com> | 2023-05-29 14:30:01 +0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-06-01 12:44:13 +0000 |
commit | a804add2ef7fb525733864c2da6394bb380bb45d (patch) | |
tree | 5c593a6fb95e367205a1934626d2f4ffc8ebe21d | |
parent | bfa5b59350a1d2cac320f6a7d1cabce9583de1c1 (diff) |
virgl: Fix inappropriate retirement of fences when using async callback
Once support for both async fencing and Venus context are enabled in Qemu,
the debug assert in Venus codepath catches attempt to perform a synced
retirement of the Venus fences when Qemu polls status of vrend queries.
The retirement shall be skipped for all context types if async cb is
used. Previously this stayed unnoticed because Qemu didn't support Venus
and crosvm uses fd event instead of doing a periodic poll like Qemu does
it. In order to reproduce this issue guest should create both vrend and
Venus contexts and then host should perform the polling. In particular
this happens in case of running Steam on Qemu with enabled Venus support.
Skip retiring fences if using async callback to fix triggering of the
debug check in proxy_context_retire_fences().
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1123>
-rw-r--r-- | src/virglrenderer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/virglrenderer.c b/src/virglrenderer.c index 907be48..28bd9da 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -610,7 +610,8 @@ virgl_context_foreach_retire_fences(struct virgl_context *ctx, { /* vrend contexts are polled explicitly by the caller */ if (ctx->capset_id != VIRGL_RENDERER_CAPSET_VIRGL && - ctx->capset_id != VIRGL_RENDERER_CAPSET_VIRGL2) + ctx->capset_id != VIRGL_RENDERER_CAPSET_VIRGL2 && + !(state.flags & VIRGL_RENDERER_ASYNC_FENCE_CB)) { assert(ctx->retire_fences); ctx->retire_fences(ctx); |