[virglrenderer-devel] [PATCH] vrend: call glFlush after glFenceSync.
Jakob Bornecrantz
jakob at collabora.com
Tue Apr 3 13:50:05 UTC 2018
On 2018-04-02 17:46, Lepton Wu wrote:
> I hit app stall frequently when running virgl on Windows/macOS, it
> turned out virgl kept calling glClientWaitSync and just got timeout.
> According to https://www.khronos.org/opengl/wiki/Sync_Object, the sync
> object may never be signaled without proper flushing. This glFlush fixes
> the stall issue on Windows/macOS.
>
> Signed-off-by: Lepton Wu <lepton at chromium.org>
Thanks, patch has been reviewed, tested and pushed.
Cheers, Jakob.
> ---
> src/vrend_renderer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 159ed09..fd65342 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -6062,6 +6062,7 @@ int vrend_renderer_create_fence(int client_fence_id, uint32_t ctx_id)
> fence->ctx_id = ctx_id;
> fence->fence_id = client_fence_id;
> fence->syncobj = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
> + glFlush();
>
> if (fence->syncobj == NULL)
> goto fail;
>
More information about the virglrenderer-devel
mailing list