From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwDT3-0002mQ-VI for qemu-devel@nongnu.org; Sat, 23 May 2015 13:44:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwDSz-00038E-7c for qemu-devel@nongnu.org; Sat, 23 May 2015 13:44:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwDSz-000383-2B for qemu-devel@nongnu.org; Sat, 23 May 2015 13:44:09 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 02A1E8E3C3 for ; Sat, 23 May 2015 17:44:07 +0000 (UTC) Message-ID: <5560BC64.6060600@redhat.com> Date: Sat, 23 May 2015 19:44:04 +0200 From: Max Reitz MIME-Version: 1.0 References: <1432135182-29676-1-git-send-email-kraxel@redhat.com> <1432135182-29676-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1432135182-29676-5-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: Paolo Bonzini On 20.05.2015 17:19, Gerd Hoffmann wrote: > This adds opengl rendering support to the gtk ui, using egl. > It's off by default for now, use 'qemu -display gtk,gl=on' > to play with this. > > Note that gtk got native opengl support with release 3.16. > There most likely will be a separate implementation for 3.16+, > using the native gtk opengl support. This patch covers older > versions (and for the time being 3.16 too, hopefully without > rendering quirks). > > Signed-off-by: Gerd Hoffmann > --- > include/ui/console.h | 2 +- > include/ui/gtk.h | 23 +++++++++ > ui/Makefile.objs | 3 ++ > ui/gtk-egl.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++ > ui/gtk.c | 77 ++++++++++++++++++++++------ > vl.c | 11 +++- > 6 files changed, 240 insertions(+), 17 deletions(-) > create mode 100644 ui/gtk-egl.c I do see the quandary with gtk 3.14 and 3.15 (gtk_widget_set_double_buffered() is deprecated, but we need it), but the problem is, with this patch, you simply cannot compile qemu on a gtk 3.14+ system with --with-gtkabi=3.0 and without --disable-opengl, which I don't think is right. So at least the commit message is wrong, this patch does not cover 3.16. It would without -Werror (or with -Wno-deprecated-declarations), but that's enabled by default. Once the native OpenGL support introduced by 3.16 is used, at least that'll be covered, but we'll still have to deal with 3.14 and 3.15. I think the right thing to do is to make configure disable OpenGL support if gtk 3.14+ is to be used (in the future, that would be 3.14/3.15 only). That, or pass -Wno-deprecated-declarations for compiling ui/gtk.c, but that seems very ugly to me. Not planning to have OpenGL support for 3.14/3.15 I think is fine, but we have to make sure that OpenGL support cannot be silently enabled by configure and then break compilation of qemu. Max