|
From: | Akihiko Odaki |
Subject: | Re: [PATCH] ui/sdl2: Support multiple OpenGL-enabled windows |
Date: | Wed, 7 Jun 2023 20:24:00 +0900 |
User-agent: | Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 2023/06/07 19:29, Marc-André Lureau wrote:
Hi AntonioOn Wed, Jun 7, 2023 at 1:13 PM Antonio Caggiano <quic_acaggian@quicinc.com <mailto:quic_acaggian@quicinc.com>> wrote:Multiple graphics devices can be defined with an associated OpenGL enabled SDL console, hence make sure to not destroy their shaders and windows.
I guess you meant multiple graphics devices can be associated to an OpenGL-enabled console and a switch event from a device destroys the shared state, but I don't see anything that associates multiple devices to a single console.
It does not make sense to check scon->opengl here; it should be always true when this function is called.Signed-off-by: Antonio Caggiano <quic_acaggian@quicinc.com <mailto:quic_acaggian@quicinc.com>> --- ui/sdl2-gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index bbfa70eac3..795fb1afc9 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -89,7 +89,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl, scon->surface = new_surface; - if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) { + if (is_placeholder(new_surface) && !scon->opengl) { qemu_gl_fini_shader(scon->gls); scon->gls = NULL; sdl2_window_destroy(scon);This was introduced in commit c821a58ee7003c2a0567dddaee33c2a5ae71c404 by Akihiko.Why should the window visibility behaviour be different whether it uses opengl or not ?If you are fixing a GL/shader crash, maybe it needs to be done differently. thanks
The condition qemu_console_get_index(dcl->con) should not be removed either. This keeps the first console persistent and makes sure the user can always interact with QEMU with the GUI SDL2 provides.
Regards, Akihiko Odaki
[Prev in Thread] | Current Thread | [Next in Thread] |