On Fri, Jul 02, 2021 at 04:32:21PM +0400, email@example.com wrote:
> From: Marc-André Lureau <firstname.lastname@example.org>
> Before commit 49afbca3b00e8e517d54964229a794b51768deaf ("virtio-gpu: drop
> use_virgl_renderer"), use_virgl_renderer was preventing calling GL
> functions from non-GL context threads. The innocuously looking
> g->parent_obj.use_virgl_renderer = false;
> was set the first time virtio_gpu_gl_reset() was called, during
> pc_machine_reset() in the main thread. Further virtio_gpu_gl_reset()
> calls in IO threads, without associated GL context, were thus skipping
> GL calls and avoided warnings or crashes (see also
Conflicts with patch by Akihiko Odaki fixing the same thing or a
virtio-gpu: Call Virgl only in the main thread
Can you have a look please and suggest how to handle this?
Thanks, I didn't notice we were trying to solve the same issue.
Akihiko's patch indeed seems to solve the crash, but doesn't solve the flood of asserts (on wayland):
qemu-system-x86_64: Gtk: gtk_gl_area_make_current: assertion 'gtk_widget_get_realized (widget)' failed
qemu-system-x86_64: Gdk: gdk_window_create_gl_context: assertion 'GDK_IS_WINDOW (window)' failed
qemu-system-x86_64: Gdk: gdk_gl_context_set_required_version: assertion 'GDK_IS_GL_CONTEXT (context)' failed
... and many more
My patch cleans it for me, I would suggest to take mine.
Fwiw, I just tested also on X11, and we have another regression that seems unrelated:
qemu-system-x86_64: ../src/dispatch_common.c:858: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.