All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ui/spice-app: honor gl=off option, reject core/es
@ 2026-10-05  9:15 marcandre.lureau
  2026-10-05  9:41 ` Daniel P. Berrangé
  0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2026-10-05  9:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

With -display spice-app, the value of the gl option is ignored: gl=off
enables OpenGL exactly like gl=on. Only omitting the option keeps OpenGL
disabled.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4639
Fixes: d8aec9d9f129 ("display: add -display spice-app launching a Spice client")
Reported-by: @jeremie.b
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/spice-app.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ui/spice-app.c b/ui/spice-app.c
index fe3df62bfa5d..90e8de0bc87d 100644
--- a/ui/spice-app.c
+++ b/ui/spice-app.c
@@ -180,8 +180,14 @@ static void spice_app_display_early_init(DisplayOptions *opts)
     qemu_opt_set(qopts, "image-compression", "off", &error_abort);
     qemu_opt_set(qopts, "streaming-video", "off", &error_abort);
 #ifdef HAVE_SPICE_GL
-    qemu_opt_set(qopts, "gl", opts->has_gl ? "on" : "off", &error_abort);
-    display_opengl = opts->has_gl;
+    if (opts->has_gl &&
+        opts->gl != DISPLAY_GL_MODE_ON &&
+        opts->gl != DISPLAY_GL_MODE_OFF) {
+        error_report("spice-app only supports gl=on/off");
+        exit(1);
+    }
+    display_opengl = opts->has_gl && opts->gl != DISPLAY_GL_MODE_OFF;
+    qemu_opt_set(qopts, "gl", display_opengl ? "on" : "off", &error_abort);
 #endif
 }
 
-- 
2.56.0.rc0.29.g47ce80527c56



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-05  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05  9:15 [PATCH] ui/spice-app: honor gl=off option, reject core/es marcandre.lureau
2026-10-05  9:41 ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.